/* Aster Institute of Education — Main Stylesheet */
:root {
  --primary: #0a2e5c;
  --primary-light: #1a4a8a;
  --primary-dark: #061e3d;
  --accent: #c9a227;
  --accent-light: #e8c84a;
  --text: #1a1a2e;
  --text-muted: #5a6270;
  --bg: #ffffff;
  --bg-alt: #f4f6f9;
  --bg-dark: #0a2e5c;
  --border: #dde2ea;
  --success: #1a7f4b;
  --shadow: 0 4px 24px rgba(10, 46, 92, 0.08);
  --shadow-lg: 0 12px 48px rgba(10, 46, 92, 0.15);
  --radius: 8px;
  --radius-lg: 16px;
  --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: Georgia, 'Times New Roman', serif;
  --max-width: 1200px;
  --header-height: 80px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent); }

h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--primary-dark);
}

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 24px; }

/* Top bar */
.top-bar {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.85);
  font-size: 0.8125rem;
  padding: 6px 0;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar a { color: rgba(255,255,255,0.85); }
.top-bar a:hover { color: var(--accent-light); }
.top-bar-links { display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }

.aster-auth-widget {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-left: 8px;
  padding-left: 12px;
  border-left: 1px solid rgba(255,255,255,0.2);
}

.aster-auth-actions { display: inline-flex; align-items: center; gap: 12px; }

.aster-help-link,
.aster-auth-login,
.aster-auth-user,
.aster-auth-logout {
  color: rgba(255,255,255,0.85);
  font-size: inherit;
  white-space: nowrap;
}

.aster-auth-user {
  color: var(--accent-light);
  font-weight: 600;
}

.aster-auth-login:hover,
.aster-auth-user:hover,
.aster-auth-logout:hover,
.aster-help-link:hover {
  color: var(--accent-light);
}

/* Header */
.site-header {
  background: var(--bg);
  border-bottom: 3px solid var(--accent);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-emblem {
  width: 56px;
  height: 56px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--accent);
}

.logo-emblem svg { width: 36px; height: 36px; }

.logo-text h1 {
  font-size: 1.125rem;
  color: var(--primary);
  font-weight: 700;
  line-height: 1.2;
}

.logo-text span {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font);
  font-weight: 400;
}

.main-nav { display: flex; align-items: center; gap: 4px; }

.main-nav a {
  padding: 8px 14px;
  color: var(--text);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--radius);
  white-space: nowrap;
}

.main-nav a:hover, .main-nav a.active {
  background: var(--bg-alt);
  color: var(--primary);
}

.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  padding: 8px 0;
  z-index: 100;
}

.nav-dropdown:hover .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
  display: block;
  padding: 10px 20px;
  border-radius: 0;
}

.nav-dropdown-menu a:hover { background: var(--bg-alt); }

.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}

.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--primary);
  margin: 5px 0;
  transition: 0.3s;
}

/* Hero */
.hero {
  position: relative;
  min-height: 520px;
  display: flex;
  align-items: center;
  color: #fff;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
}

.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(6,30,61,0.92) 0%, rgba(10,46,92,0.75) 50%, rgba(26,74,138,0.6) 100%);
}

.hero .container { position: relative; z-index: 1; padding: 80px 24px; }

.hero-tag {
  display: inline-block;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 6px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: clamp(2rem, 5vw, 3.25rem);
  color: #fff;
  margin-bottom: 20px;
  max-width: 700px;
}

.hero p {
  font-size: 1.125rem;
  opacity: 0.9;
  max-width: 560px;
  margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  font-family: var(--font);
}

.btn-primary {
  background: var(--accent);
  color: var(--primary-dark);
  border-color: var(--accent);
}

.btn-primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  color: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,0.6);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: #fff;
  color: #fff;
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.btn-secondary:hover {
  background: var(--primary-light);
  border-color: var(--primary-light);
  color: #fff;
}

/* Stats bar */
.stats-bar {
  background: var(--primary);
  color: #fff;
  padding: 40px 0;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  text-align: center;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: var(--font-heading);
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat-label { font-size: 0.875rem; opacity: 0.85; }

/* Sections */
section { padding: 80px 0; }
section.alt { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 48px;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 12px;
}

.section-header p {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.section-header .accent-line {
  width: 60px;
  height: 3px;
  background: var(--accent);
  margin: 16px auto 0;
}

/* Cards grid */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.card {
  background: var(--bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  border: 1px solid var(--border);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-image { height: 200px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s; }
.card:hover .card-image img { transform: scale(1.05); }

.card-body { padding: 24px; }
.card-tag {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary-light);
  background: var(--bg-alt);
  padding: 4px 10px;
  border-radius: 4px;
  margin-bottom: 12px;
}

.card-body h3 { font-size: 1.125rem; margin-bottom: 10px; }
.card-body p { color: var(--text-muted); font-size: 0.9375rem; margin-bottom: 16px; }
.card-link { font-weight: 600; font-size: 0.875rem; color: var(--primary); }
.card-link:hover { color: var(--accent); }

/* News list */
.news-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.news-item {
  display: flex;
  gap: 20px;
  padding: 20px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.news-item:hover { box-shadow: var(--shadow); }

.news-date {
  flex-shrink: 0;
  width: 64px;
  text-align: center;
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius);
  padding: 10px 8px;
}

.news-date .day { font-size: 1.5rem; font-weight: 700; line-height: 1; }
.news-date .month { font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.05em; }

.news-content h3 { font-size: 1rem; margin-bottom: 6px; }
.news-content p { font-size: 0.875rem; color: var(--text-muted); }

/* Feature boxes */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

.feature-box {
  text-align: center;
  padding: 32px 24px;
}

.feature-icon {
  width: 64px;
  height: 64px;
  background: var(--primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  color: var(--accent);
  font-size: 1.5rem;
}

.feature-box h3 { font-size: 1.125rem; margin-bottom: 10px; }
.feature-box p { color: var(--text-muted); font-size: 0.9375rem; }

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.two-col.reverse { direction: rtl; }
.two-col.reverse > * { direction: ltr; }

.content-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.content-image img { width: 100%; height: 360px; object-fit: cover; }

/* Page header */
.page-header {
  background: var(--primary);
  color: #fff;
  padding: 48px 0;
}

.page-header h1 {
  font-size: 2.25rem;
  color: #fff;
  margin-bottom: 8px;
}

.breadcrumb {
  font-size: 0.875rem;
  opacity: 0.8;
}

.breadcrumb a { color: rgba(255,255,255,0.85); }
.breadcrumb a:hover { color: var(--accent-light); }

.page-content { padding: 60px 0; }

/* Sidebar layout */
.with-sidebar {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  align-self: start;
}

.sidebar-nav {
  background: var(--bg-alt);
  border-radius: var(--radius-lg);
  padding: 8px;
  border: 1px solid var(--border);
}

.sidebar-nav a {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  font-size: 0.9375rem;
  border-radius: var(--radius);
  border-left: 3px solid transparent;
}

.sidebar-nav a:hover, .sidebar-nav a.active {
  background: var(--bg);
  color: var(--primary);
  border-left-color: var(--accent);
  font-weight: 600;
}

/* Tables */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
  margin: 24px 0;
}

.data-table th, .data-table td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  background: var(--primary);
  color: #fff;
  font-weight: 600;
}

.data-table tr:nth-child(even) { background: var(--bg-alt); }
.data-table tr:hover { background: #eef2f7; }

/* Info boxes */
.info-box {
  padding: 20px 24px;
  border-radius: var(--radius);
  margin: 24px 0;
  border-left: 4px solid;
}

.info-box.notice { background: #eef4fb; border-color: var(--primary-light); }
.info-box.warning { background: #fef9e7; border-color: var(--accent); }
.info-box.success { background: #eaf6ef; border-color: var(--success); }

.info-box h4 { margin-bottom: 8px; font-size: 1rem; }

/* Forms */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 0.9375rem;
  transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(26, 74, 138, 0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

/* Timeline */
.timeline { position: relative; padding-left: 32px; }

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 32px;
  padding-left: 24px;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -28px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-date {
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--primary-light);
  margin-bottom: 4px;
}

/* Faculty list */
.faculty-list { list-style: none; }

.faculty-list li {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faculty-list li:last-child { border-bottom: none; }

.faculty-list a { font-weight: 600; color: var(--primary); font-size: 1.0625rem; }

/* Footer */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.8);
  margin-top: auto;
}

.footer-main { padding: 60px 0 40px; }

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p { font-size: 0.875rem; margin-top: 16px; line-height: 1.7; }

.footer-col h4 {
  color: var(--accent);
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
  font-family: var(--font);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: rgba(255,255,255,0.75); font-size: 0.875rem; }
.footer-col a:hover { color: var(--accent-light); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 20px 0;
  font-size: 0.8125rem;
}

.footer-bottom .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

/* Subsite themes */
.theme-admission { --primary: #1a3a6b; --accent: #e67e22; }
.theme-college { --primary: #0d4f4f; --accent: #00b4a0; }

.subsite-banner {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  padding: 12px 0;
  font-size: 0.8125rem;
  text-align: center;
}

.subsite-banner a { color: var(--accent-light); font-weight: 600; }

/* Program cards */
.program-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  background: var(--bg);
  transition: box-shadow 0.2s;
}

.program-card:hover { box-shadow: var(--shadow-lg); }

.program-card .degree {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.program-card h3 { margin-bottom: 12px; }
.program-meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.program-meta span { font-size: 0.8125rem; color: var(--text-muted); }

/* Team grid */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 28px;
}

.team-member {
  text-align: center;
  padding: 24px;
  background: var(--bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.team-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto 16px;
  border: 3px solid var(--accent);
}

.team-photo img { width: 100%; height: 100%; object-fit: cover; }
.team-member h4 { font-size: 1rem; margin-bottom: 4px; }
.team-member .title { font-size: 0.8125rem; color: var(--text-muted); }

/* Responsive */
@media (max-width: 1024px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .with-sidebar { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 768px) {
  .menu-toggle { display: block; }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    padding: 16px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
  }

  .main-nav.open { display: flex; }
  .nav-dropdown-menu { position: static; box-shadow: none; border: none; padding-left: 16px; }
  .nav-dropdown:hover .nav-dropdown-menu { display: block; }

  .two-col { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .hero { min-height: 420px; }
}
