/* ========================================
   GNDU RC JALANDHAR - MAIN STYLESHEET
   ======================================== */

:root {
  --maroon: #800000;
  --maroon-dark: #5a0000;
  --maroon-light: #a00000;
  --gold: #c9a84c;
  --gold-light: #e8c97a;
  --navy: #1a2a4a;
  --navy-light: #2a3f6f;
  --white: #ffffff;
  --off-white: #f8f5f0;
  --light-gray: #e8e4df;
  --mid-gray: #999;
  --dark-gray: #333;
  --text: #222;
  --link: #800000;
  --border: #ccc;
  --shadow: rgba(0,0,0,0.15);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Times New Roman', Times, serif;
  font-size: 14px;
  color: var(--text);
  background: var(--off-white);
  line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--maroon-dark); }

img { max-width: 100%; }

/* ---- TOP BAR ---- */
.top-bar {
  background: var(--navy);
  color: #ddd;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 2px solid var(--gold);
}
.top-bar .inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 15px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: #ddd; font-size: 12px; }
.top-bar a:hover { color: var(--gold-light); text-decoration: none; }
.top-bar .links a { margin-left: 12px; }

/* ---- HEADER ---- */
.site-header {
  background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--maroon) 50%, var(--maroon-light) 100%);
  padding: 10px 0;
  border-bottom: 3px solid var(--gold);
}
.site-header .inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-header .logo-area {
  display: flex;
  align-items: center;
  gap: 15px;
}
.site-header .logo {
  width: 90px;
  height: 90px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--gold);
  overflow: hidden;
  flex-shrink: 0;
}
.site-header .logo img {
  width: 80px;
  height: 80px;
  object-fit: contain;
}
.logo-placeholder {
  font-size: 28px;
  font-weight: bold;
  color: var(--maroon);
  text-align: center;
  line-height: 1.1;
}
.site-header .header-text {
  flex: 1;
  text-align: center;
}
.site-header .header-text .univ-name {
  font-size: 13px;
  color: var(--gold-light);
  font-style: italic;
  letter-spacing: 0.5px;
}
.site-header .header-text h1 {
  font-size: 28px;
  color: var(--white);
  font-family: 'Times New Roman', serif;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0,0,0,0.4);
  line-height: 1.2;
}
.site-header .header-text .tagline {
  font-size: 13px;
  color: var(--gold-light);
  font-style: italic;
  margin-top: 2px;
}
.site-header .naac-badge {
  text-align: center;
  background: var(--white);
  border: 2px solid var(--gold);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  color: var(--maroon-dark);
  font-weight: bold;
  flex-shrink: 0;
}
.site-header .naac-badge .grade {
  font-size: 22px;
  color: var(--maroon);
  display: block;
  font-weight: 900;
}

/* ---- MAIN NAV ---- */
.main-nav {
  background: var(--maroon);
  border-bottom: 2px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.main-nav ul {
  max-width: 1200px;
  margin: auto;
  list-style: none;
  display: flex;
  padding: 0 15px;
  flex-wrap: wrap;
}
.main-nav ul li {
  position: relative;
}
.main-nav ul li a {
  display: block;
  color: var(--white);
  padding: 11px 14px;
  font-size: 13px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  letter-spacing: 0.3px;
  transition: background 0.2s;
  border-right: 1px solid rgba(255,255,255,0.15);
}
.main-nav ul li a:hover,
.main-nav ul li a.active {
  background: var(--maroon-dark);
  color: var(--gold-light);
  text-decoration: none;
}
.main-nav ul li.home-li a {
  background: var(--navy);
}
/* dropdown */
.main-nav ul li:hover > ul { display: block; }
.main-nav ul li ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  min-width: 200px;
  z-index: 200;
  box-shadow: 2px 4px 10px var(--shadow);
}
.main-nav ul li ul li a {
  color: var(--maroon-dark);
  padding: 8px 15px;
  font-size: 12px;
  font-weight: normal;
  border-right: none;
  border-bottom: 1px solid #eee;
}
.main-nav ul li ul li a:hover {
  background: var(--off-white);
  color: var(--maroon);
}

/* ---- TICKER ---- */
.ticker-bar {
  background: var(--navy);
  color: var(--white);
  padding: 5px 0;
  border-bottom: 1px solid var(--gold);
  overflow: hidden;
}
.ticker-bar .ticker-inner {
  max-width: 1200px;
  margin: auto;
  padding: 0 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.ticker-bar .label {
  background: var(--gold);
  color: var(--maroon-dark);
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.ticker-content {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
}
.ticker-content span {
  display: inline-block;
  animation: ticker 35s linear infinite;
  font-size: 12px;
  color: #ccc;
}
.ticker-content span a { color: var(--gold-light); }
@keyframes ticker {
  0% { transform: translateX(100%); }
  100% { transform: translateX(-100%); }
}

/* ---- LAYOUT ---- */
.main-layout {
  max-width: 1200px;
  margin: 15px auto;
  padding: 0 15px;
  display: flex;
  gap: 15px;
}
.sidebar {
  width: 230px;
  flex-shrink: 0;
}
.content-area { flex: 1; min-width: 0; }

/* ---- BOXES / CARDS ---- */
.box {
  background: var(--white);
  border: 1px solid var(--border);
  margin-bottom: 15px;
  box-shadow: 0 1px 3px var(--shadow);
}
.box-header {
  background: linear-gradient(90deg, var(--maroon) 0%, var(--maroon-light) 100%);
  color: var(--white);
  padding: 7px 12px;
  font-size: 13px;
  font-weight: bold;
  font-family: Arial, sans-serif;
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 2px solid var(--gold);
}
.box-body { padding: 10px 12px; }

/* Notice Box */
.notice-list { list-style: none; max-height: 260px; overflow-y: auto; }
.notice-list::-webkit-scrollbar { width: 4px; }
.notice-list::-webkit-scrollbar-thumb { background: var(--maroon); }
.notice-list li {
  border-bottom: 1px dashed #ddd;
  padding: 5px 0;
  font-size: 12px;
  display: flex;
  align-items: flex-start;
  gap: 5px;
}
.notice-list li:last-child { border-bottom: none; }
.notice-list li::before {
  content: "▶";
  color: var(--maroon);
  font-size: 9px;
  margin-top: 2px;
  flex-shrink: 0;
}
.notice-list li a { color: #333; }
.notice-list li a:hover { color: var(--maroon); }
.badge-new {
  background: red;
  color: white;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 2px;
  font-weight: bold;
  text-transform: uppercase;
  flex-shrink: 0;
}

/* Quick Links Sidebar */
.quick-links { list-style: none; }
.quick-links li {
  border-bottom: 1px solid #eee;
}
.quick-links li a {
  display: block;
  padding: 6px 8px;
  font-size: 12px;
  color: #333;
  transition: all 0.15s;
}
.quick-links li a:hover {
  background: var(--off-white);
  color: var(--maroon);
  padding-left: 14px;
  text-decoration: none;
}
.quick-links li a::before {
  content: "› ";
  color: var(--maroon);
  font-weight: bold;
}

/* ---- BANNER SLIDER ---- */
.banner-slider {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--navy);
  height: 280px;
  margin-bottom: 15px;
}
.slides { display: flex; transition: transform 0.6s ease; height: 100%; }
.slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 16px;
  text-align: center;
  padding: 30px;
  position: relative;
  overflow: hidden;
}
.slide-1 { background: linear-gradient(135deg, var(--maroon-dark), var(--navy)); }
.slide-2 { background: linear-gradient(135deg, var(--navy), #2d5a2d); }
.slide-3 { background: linear-gradient(135deg, #5a3a00, var(--maroon)); }
.slide .slide-content h2 { font-size: 22px; color: var(--gold-light); margin-bottom: 8px; }
.slide .slide-content p { font-size: 14px; color: #ccc; max-width: 500px; }
.slide-nav {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
}
.slide-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  border: none;
  transition: background 0.2s;
}
.slide-dot.active { background: var(--gold); }
.slide-prev, .slide-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.4);
  color: white;
  border: none;
  font-size: 20px;
  padding: 8px 12px;
  cursor: pointer;
  z-index: 10;
}
.slide-prev { left: 0; }
.slide-next { right: 0; }
.slide-prev:hover, .slide-next:hover { background: var(--maroon); }

/* ---- ABOUT SNIPPET ---- */
.about-snippet { font-size: 13px; line-height: 1.7; color: #444; }
.about-snippet p { margin-bottom: 8px; }
.read-more {
  display: inline-block;
  background: var(--maroon);
  color: white;
  padding: 5px 14px;
  font-size: 12px;
  border-radius: 2px;
  margin-top: 6px;
}
.read-more:hover { background: var(--maroon-dark); color: white; text-decoration: none; }

/* ---- STATS ROW ---- */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 15px;
}
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  text-align: center;
  padding: 14px 8px;
  border-top: 3px solid var(--maroon);
  box-shadow: 0 1px 3px var(--shadow);
}
.stat-card .num {
  font-size: 26px;
  font-weight: bold;
  color: var(--maroon);
  display: block;
}
.stat-card .label {
  font-size: 11px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ---- EVENTS GRID ---- */
.events-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.event-card {
  border: 1px solid #ddd;
  padding: 10px;
  background: #fff;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.event-date {
  background: var(--maroon);
  color: white;
  text-align: center;
  padding: 6px 10px;
  min-width: 44px;
  flex-shrink: 0;
  border-radius: 2px;
}
.event-date .day { font-size: 20px; font-weight: bold; line-height: 1; }
.event-date .month { font-size: 10px; text-transform: uppercase; }
.event-card .event-info h4 { font-size: 12px; color: var(--maroon-dark); margin-bottom: 3px; }
.event-card .event-info p { font-size: 11px; color: #666; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--navy);
  color: #ccc;
  margin-top: 20px;
  border-top: 3px solid var(--gold);
}
.footer-top {
  max-width: 1200px;
  margin: auto;
  padding: 25px 15px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 25px;
}
.footer-col h4 {
  color: var(--gold-light);
  font-size: 13px;
  margin-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  padding-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.footer-col p, .footer-col li { font-size: 12px; line-height: 1.7; }
.footer-col ul { list-style: none; }
.footer-col ul li a { color: #bbb; }
.footer-col ul li a:hover { color: var(--gold-light); text-decoration: none; }
.footer-col ul li::before { content: "» "; color: var(--gold); }
.footer-bottom {
  background: rgba(0,0,0,0.3);
  text-align: center;
  padding: 8px;
  font-size: 11px;
  color: #999;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.footer-bottom a { color: var(--gold-light); }

/* ---- PAGE TITLE ---- */
.page-title-bar {
  background: linear-gradient(90deg, var(--maroon) 0%, var(--navy) 100%);
  color: white;
  padding: 12px 15px;
  margin-bottom: 15px;
  border-left: 4px solid var(--gold);
}
.page-title-bar h2 { font-size: 18px; }
.breadcrumb { font-size: 11px; color: #ccc; margin-top: 2px; }
.breadcrumb a { color: var(--gold-light); }

/* ---- TABLES ---- */
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
table.data-table th {
  background: var(--maroon);
  color: white;
  padding: 8px 10px;
  text-align: left;
  font-weight: bold;
}
table.data-table td {
  padding: 7px 10px;
  border-bottom: 1px solid #e0e0e0;
}
table.data-table tr:nth-child(even) td { background: #f8f5f0; }
table.data-table tr:hover td { background: #f0e8e8; }

/* ---- FORMS ---- */
.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: 13px;
  font-weight: bold;
  margin-bottom: 5px;
  color: var(--maroon-dark);
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="file"],
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  font-size: 13px;
  font-family: Arial, sans-serif;
  background: white;
  color: #333;
  border-radius: 2px;
}
.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--maroon);
  box-shadow: 0 0 0 2px rgba(128,0,0,0.1);
}
.btn {
  display: inline-block;
  padding: 8px 20px;
  font-size: 13px;
  font-family: Arial, sans-serif;
  font-weight: bold;
  border: none;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.2s;
  text-align: center;
}
.btn-primary {
  background: var(--maroon);
  color: white;
}
.btn-primary:hover { background: var(--maroon-dark); color: white; text-decoration: none; }
.btn-danger { background: #c00; color: white; }
.btn-danger:hover { background: #900; }
.btn-success { background: #2a7a2a; color: white; }
.btn-success:hover { background: #1a5a1a; }
.btn-secondary { background: #666; color: white; }
.btn-secondary:hover { background: #444; }

/* ---- RESULT PAGE ---- */
.result-search-box {
  max-width: 500px;
  margin: 20px auto;
  background: white;
  border: 1px solid #ccc;
  padding: 25px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  text-align: center;
}
.result-search-box h3 { color: var(--maroon); margin-bottom: 5px; font-size: 18px; }
.result-search-box p { color: #666; font-size: 12px; margin-bottom: 15px; }
.search-row {
  display: flex;
  gap: 8px;
}
.search-row input {
  flex: 1;
  padding: 10px 12px;
  border: 2px solid #ccc;
  font-size: 14px;
  border-radius: 2px;
}
.search-row input:focus {
  outline: none;
  border-color: var(--maroon);
}
.search-row button {
  background: var(--maroon);
  color: white;
  border: none;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: bold;
  cursor: pointer;
  border-radius: 2px;
}
.search-row button:hover { background: var(--maroon-dark); }
#result-output { margin-top: 20px; }
.result-card {
  background: white;
  border: 1px solid #ccc;
  overflow: hidden;
}
.result-card .result-header {
  background: var(--maroon);
  color: white;
  padding: 10px 15px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.result-card .result-body { padding: 15px; }
.result-card table.data-table { font-size: 13px; }
.result-actions { margin-top: 12px; display: flex; gap: 8px; }
.not-found {
  background: #fff5f5;
  border: 1px solid #f0b0b0;
  color: #900;
  padding: 15px;
  text-align: center;
  font-size: 14px;
  border-radius: 2px;
}
.not-found .icon { font-size: 30px; display: block; margin-bottom: 5px; }
.loading-spinner {
  display: none;
  text-align: center;
  padding: 20px;
  color: #666;
  font-size: 13px;
}
.loading-spinner .spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid #ddd;
  border-top-color: var(--maroon);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- ADMIN PANEL ---- */
.admin-wrapper {
  display: flex;
  min-height: 100vh;
  font-family: Arial, sans-serif;
}
.admin-sidebar {
  width: 230px;
  background: var(--maroon-dark);
  color: white;
  flex-shrink: 0;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  overflow-y: auto;
  z-index: 10;
}
.admin-sidebar .brand {
  background: rgba(0,0,0,0.3);
  padding: 15px;
  border-bottom: 2px solid var(--gold);
}
.admin-sidebar .brand h2 { font-size: 14px; color: var(--gold-light); }
.admin-sidebar .brand p { font-size: 11px; color: #ccc; }
.admin-nav { list-style: none; padding: 10px 0; }
.admin-nav li a {
  display: block;
  padding: 10px 16px;
  color: #ccc;
  font-size: 13px;
  transition: all 0.15s;
  border-left: 3px solid transparent;
}
.admin-nav li a:hover, .admin-nav li a.active {
  background: rgba(255,255,255,0.1);
  color: white;
  border-left-color: var(--gold);
  text-decoration: none;
}
.admin-nav .nav-section {
  padding: 12px 16px 4px;
  font-size: 10px;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.admin-main {
  margin-left: 230px;
  flex: 1;
  display: flex;
  flex-direction: column;
}
.admin-topbar {
  background: white;
  border-bottom: 2px solid var(--maroon);
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 5;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.admin-topbar h1 { font-size: 17px; color: var(--maroon-dark); }
.admin-topbar .user-info { font-size: 12px; color: #666; }
.admin-topbar .user-info a { color: var(--maroon); font-weight: bold; }
.admin-content { padding: 20px; flex: 1; background: #f5f5f5; }
.admin-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-bottom: 20px;
}
.admin-card {
  background: white;
  border: 1px solid #ddd;
  padding: 18px;
  border-top: 3px solid var(--maroon);
  border-radius: 2px;
  text-align: center;
}
.admin-card .num { font-size: 30px; font-weight: bold; color: var(--maroon); }
.admin-card .label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 4px; }
.admin-panel-box {
  background: white;
  border: 1px solid #ddd;
  margin-bottom: 20px;
  border-radius: 2px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.admin-panel-box .panel-header {
  background: var(--maroon);
  color: white;
  padding: 10px 15px;
  font-size: 14px;
  font-weight: bold;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid var(--gold);
}
.admin-panel-box .panel-body { padding: 18px; }

/* ---- ALERT ---- */
.alert {
  padding: 10px 14px;
  border-radius: 2px;
  font-size: 13px;
  margin-bottom: 14px;
  border: 1px solid;
}
.alert-success { background: #e8f5e9; color: #2a7a2a; border-color: #a5d6a7; }
.alert-error { background: #ffebee; color: #c00; border-color: #ef9a9a; }
.alert-info { background: #e3f2fd; color: #1565c0; border-color: #90caf9; }

/* ---- LOGIN PAGE ---- */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, var(--maroon-dark) 0%, var(--navy) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Arial, sans-serif;
}
.login-box {
  background: white;
  width: 380px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.login-box .login-header {
  background: var(--maroon);
  color: white;
  text-align: center;
  padding: 25px 20px;
  border-bottom: 3px solid var(--gold);
}
.login-box .login-header h2 { font-size: 16px; margin-bottom: 3px; }
.login-box .login-header p { font-size: 12px; color: rgba(255,255,255,0.7); }
.login-box .login-body { padding: 25px; }

/* ---- RESPONSIVE ---- */
@media (max-width: 900px) {
  .main-layout { flex-direction: column; }
  .sidebar { width: 100%; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .events-grid { grid-template-columns: 1fr; }
  .admin-sidebar { width: 200px; }
  .admin-main { margin-left: 200px; }
  .admin-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .site-header .header-text h1 { font-size: 18px; }
  .main-nav ul li a { padding: 8px 10px; font-size: 12px; }
  .footer-top { grid-template-columns: 1fr; }
  .admin-wrapper { flex-direction: column; }
  .admin-sidebar { position: relative; width: 100%; }
  .admin-main { margin-left: 0; }
  .admin-cards { grid-template-columns: 1fr; }
}
