/* styles.css - Institutional Olympiad & Science Council Portal Theme */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&family=Lora:ital,wght@0,400;0,700;1,400&display=swap');

:root {
  /* Color Tokens - Official Academic Institution Theme (Navy, Gold, Maroon, Grey) */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-alt: #f1f5f9;
  
  --color-primary: #0f1e36;    /* Deep Navy Blue */
  --color-secondary: #7a1c1c;  /* Academic Maroon */
  --color-gold: #c5a059;       /* Prestige Gold Accent */
  --color-text: #2d3748;       /* Charcoal Text */
  --color-muted: #5a6a85;
  --border-color: #cbd5e1;
  --border-light: #e2e8f0;
  
  /* Fonts */
  --font-sans: 'Roboto', sans-serif;
  --font-serif: 'Lora', Georgia, serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-secondary);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* Institutional Header Bar */
.top-header {
  background: var(--bg-primary);
  border-bottom: 4px solid var(--color-secondary);
  padding: 1.5rem 0;
}

.header-container {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

.header-emblem {
  width: 70px;
  height: 70px;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 2.2rem;
  font-family: var(--font-serif);
  font-weight: 700;
  border: 3px double var(--color-gold);
  flex-shrink: 0;
}

.header-text h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header-text p {
  font-size: 0.95rem;
  color: var(--color-secondary);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Announcements Ticker (Very Classic Olympiad Style) */
.ticker-wrap {
  background: var(--color-secondary);
  color: white;
  overflow: hidden;
  height: 35px;
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--color-gold);
  font-size: 0.85rem;
  font-weight: 500;
}

.ticker-title {
  background: var(--color-gold);
  color: var(--color-primary);
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  font-weight: 700;
  z-index: 10;
  flex-shrink: 0;
  text-transform: uppercase;
}

.ticker-content {
  display: inline-block;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 25s linear infinite;
}

@keyframes ticker {
  0% { transform: translate3d(0, 0, 0); }
  100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-content span {
  padding: 0 2rem;
  display: inline-block;
}

/* Institutional Main Menu */
.navbar {
  background: var(--color-primary);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 50px;
}

.nav-links {
  display: flex;
  list-style: none;
  height: 100%;
}

.nav-links li {
  height: 100%;
}

.nav-links a {
  display: flex;
  align-items: center;
  padding: 0 1.25rem;
  height: 100%;
  text-decoration: none;
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  transition: all 0.2s ease;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links li:first-child a {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-links a:hover {
  background: var(--color-secondary);
  color: white;
}

.cta-btn-nav {
  background: var(--color-gold);
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  padding: 0.4rem 1rem;
  border-radius: 2px;
  transition: all 0.2s ease;
}

.cta-btn-nav:hover {
  background: white;
  color: var(--color-primary);
}

/* Mobile Toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: white;
}

/* Main Grid Layout (Left Content, Right Sidebar) */
.main-wrapper {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0 2rem;
  display: grid;
  grid-template-columns: 8fr 4fr;
  gap: 2rem;
}

/* Content Panel Card */
.content-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--color-primary);
  padding: 2rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 2rem;
}

.card-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-gold);
  padding-bottom: 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.card-title-sub {
  font-size: 0.8rem;
  font-family: var(--font-sans);
  color: var(--color-secondary);
  text-transform: uppercase;
  font-weight: 600;
}

/* Side Column Cards */
.side-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-top: 3px solid var(--color-secondary);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  margin-bottom: 1.5rem;
}

.side-card-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--color-secondary);
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.4rem;
  text-transform: uppercase;
}

/* Academic lists */
.bullet-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.bullet-list li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.75rem;
  font-size: 0.95rem;
}

.bullet-list li::before {
  content: '■';
  color: var(--color-gold);
  position: absolute;
  left: 0;
  font-size: 0.75rem;
  top: 0.2rem;
}

/* Official Academic Tables */
.table-responsive {
  overflow-x: auto;
  margin: 1.5rem 0;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.portal-table th {
  background: var(--color-primary);
  color: white;
  text-align: left;
  padding: 0.65rem 1rem;
  font-weight: 600;
  border: 1px solid var(--color-primary);
}

.portal-table td {
  padding: 0.65rem 1rem;
  border: 1px solid var(--border-color);
  background: white;
}

.portal-table tr:nth-child(even) td {
  background: var(--bg-secondary);
}

.portal-table tr:hover td {
  background: var(--bg-alt);
}

/* Important Dates Widget */
.dates-table {
  width: 100%;
  font-size: 0.85rem;
}

.dates-table td {
  padding: 0.5rem 0;
  border-bottom: 1px dashed var(--border-light);
}

.dates-table tr:last-child td {
  border-bottom: none;
}

.date-label {
  font-weight: 600;
  color: var(--color-text);
}

.date-value {
  color: var(--color-secondary);
  text-align: right;
  font-weight: 700;
}

/* Quick Links Styling */
.quick-links-list {
  list-style: none;
}

.quick-links-list li {
  margin-bottom: 0.6rem;
}

.quick-links-list a {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-primary);
  font-weight: 600;
  font-size: 0.9rem;
  padding: 0.4rem 0.5rem;
  border-radius: 2px;
  background: var(--bg-secondary);
  border-left: 3px solid var(--color-gold);
  transition: all 0.2s ease;
}

.quick-links-list a:hover {
  background: var(--bg-alt);
  color: var(--color-secondary);
  border-left-color: var(--color-secondary);
}

/* Tabs for Competition Rounds - Classical Button Row */
.tabs-header {
  display: flex;
  border-bottom: 2px solid var(--color-primary);
  margin-bottom: 1.5rem;
}

.tab-btn {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-bottom: none;
  padding: 0.5rem 1.25rem;
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text);
  cursor: pointer;
  margin-right: 4px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.tab-btn.active {
  background: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

.tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.tab-content.active {
  display: block;
}

/* Download PDF Card List */
.pdf-list {
  list-style: none;
  margin-top: 1rem;
}

.pdf-list li {
  margin-bottom: 0.75rem;
}

.pdf-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  text-decoration: none;
  color: var(--color-secondary);
  font-weight: 700;
  font-size: 0.95rem;
}

.pdf-link:hover {
  text-decoration: underline;
}

.pdf-icon {
  color: #c0392b; /* Red PDF icon tint */
  font-weight: bold;
}

/* Hero Section (Banner Style instead of visual loops) */
.academic-banner {
  background: linear-gradient(135deg, var(--color-primary) 0%, #1e293b 100%);
  color: white;
  padding: 3.5rem 2rem;
  text-align: center;
  border-bottom: 3px solid var(--color-gold);
}

.academic-banner-content {
  max-width: 900px;
  margin: 0 auto;
}

.academic-banner h2 {
  font-family: var(--font-serif);
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  color: white;
}

.academic-banner p {
  font-size: 1.1rem;
  color: #94a3b8;
  max-width: 700px;
  margin: 0 auto 1.5rem auto;
}

.academic-banner-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Advisory Council Grid */
.advisor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.advisor-card {
  border: 1px solid var(--border-light);
  background: var(--bg-secondary);
  padding: 1.25rem;
  border-radius: 2px;
}

.advisor-name {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 1rem;
}

.advisor-title {
  font-size: 0.85rem;
  color: var(--color-secondary);
  font-weight: 600;
}

.advisor-institution {
  font-size: 0.8rem;
  color: var(--color-muted);
}

/* Modals */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 200;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-container {
  background: white;
  border: 4px solid var(--color-primary);
  border-radius: 4px;
  width: 90%;
  max-width: 500px;
  padding: 2rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.25);
  position: relative;
}

.modal-close {
  position: absolute;
  top: 0.5rem;
  right: 0.75rem;
  background: none;
  border: none;
  color: var(--color-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--color-secondary);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-gold);
  padding-bottom: 0.25rem;
}

.modal-desc {
  font-size: 0.85rem;
  color: var(--color-muted);
  margin-bottom: 1.5rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  text-transform: uppercase;
  color: var(--color-text);
}

.form-input {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
}

.form-input:focus {
  outline: none;
  border-color: var(--color-primary);
}

.form-select {
  width: 100%;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  padding: 0.5rem;
  font-family: inherit;
  font-size: 0.9rem;
  background-color: white;
}

.form-submit-btn {
  width: 100%;
  background: var(--color-primary);
  color: white;
  border: none;
  padding: 0.65rem;
  border-radius: 2px;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.form-submit-btn:hover {
  background: var(--color-secondary);
}

/* Footer Section */
.footer {
  background: #0b1320;
  color: #94a3b8;
  padding: 3rem 0;
  border-top: 5px solid var(--color-secondary);
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: white;
  font-weight: 700;
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  text-decoration: none;
  color: #94a3b8;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
}

.footer-links a:hover {
  color: white;
}

.copyright {
  text-align: center;
  font-size: 0.75rem;
  color: #64748b;
  width: 100%;
  margin-top: 2rem;
  border-top: 1px solid #1e293b;
  padding-top: 1.5rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Responsive Grid Adjustments */
@media (max-width: 1024px) {
  .main-wrapper {
    grid-template-columns: 1fr;
  }
  
  .header-container {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
}

@media (max-width: 768px) {
  .nav-links, .nav-container > .cta-btn-nav {
    display: none;
  }
  
  .menu-toggle {
    display: flex;
  }
  
  .header-text h1 {
    font-size: 1.5rem;
  }
}

/* Primary and Secondary Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  font-family: var(--font-sans);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  border-radius: 2px;
  text-decoration: none;
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-gold);
  color: var(--color-primary);
  border: 1px solid var(--color-gold);
}

.btn-primary:hover {
  background: white;
  color: var(--color-primary);
  border-color: white;
}

.btn-secondary {
  background: transparent;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: white;
}

.content-card .btn-primary {
  background: var(--color-primary);
  color: white;
  border: 1px solid var(--color-primary);
}

.content-card .btn-primary:hover {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
}

.content-card .btn-secondary {
  background: transparent;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

.content-card .btn-secondary:hover {
  background: rgba(15, 30, 54, 0.05);
  color: var(--color-secondary);
  border-color: var(--color-secondary);
}
