@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Libre+Baskerville:wght@700&display=swap');

:root {
  --ink: #172d32;
  --muted: #5e7072;
  --line: #dce5e2;
  --paper: #f4f7f5;
  --white: #fff;
  --green: #23684f;
  --green-dark: #174a3c;
  --gold: #e0b14d;
  --blue: #346b88;
  --red: #a44e48;
  --shadow: 0 12px 30px rgba(24, 47, 42, .08);
}

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: 'DM Sans', sans-serif;
  line-height: 1.6;
}

body::before { content: none; }

.hero-section {
  min-height: 390px;
  padding: 64px 24px;
  color: var(--white);
  text-align: left;
  background: linear-gradient(90deg, rgba(15, 48, 43, .94), rgba(20, 58, 51, .72) 62%, rgba(19, 50, 48, .38)), url('Background.jpg') center 46% / cover no-repeat;
  display: flex;
  align-items: center;
}

.hero-section::before { content: none; }

.hero-content {
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.school-logo-large {
  float: left;
  width: 88px;
  height: 88px;
  margin: 2px 24px 12px 0;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .22));
}

.hero-title {
  max-width: 820px;
  margin: 0 0 8px;
  color: var(--white);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  line-height: 1.16;
}

.hero-subtitle {
  margin: 0 0 14px;
  color: #f3ca70;
  font-size: 1rem;
  font-weight: 700;
}

.hero-description {
  max-width: 680px;
  margin: 0;
  color: rgba(255, 255, 255, .88);
  font-size: 1.05rem;
  line-height: 1.7;
}

.hero-actions { clear: both; padding-top: 26px; }

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-radius: 4px;
  color: var(--white);
  background: rgba(255, 255, 255, .08);
  font-size: .95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease;
}

.cta-btn:hover { border-color: var(--gold); background: rgba(255, 255, 255, .16); }
.cta-btn span { color: var(--gold); font-size: 1.2rem; }

.portal-access-section {
  width: min(calc(100% - 48px), 1120px);
  margin: 0 auto !important;
  padding: 58px 0 68px;
}

.section-heading {
  margin: 0 0 26px !important;
  color: var(--ink) !important;
  font-size: 1.75rem !important;
  font-weight: 700;
  text-align: left !important;
}

.portals-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
}

.portal-card {
  min-width: 0;
  padding: 24px 22px 20px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--green);
  border-radius: 6px;
  background: var(--white);
  box-shadow: var(--shadow);
  text-align: left;
  backdrop-filter: none;
  opacity: 1;
  transform: none;
  animation: dashboardReveal .48s ease-out both;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.portal-card.admin { border-top-color: var(--blue); }
.portal-card.teacher { border-top-color: var(--green); }
.portal-card.student { border-top-color: #bd8726; }
.portals-grid .portal-card:nth-child(1) { animation-delay: .04s; }
.portals-grid .portal-card:nth-child(2) { animation-delay: .12s; }
.portals-grid .portal-card:nth-child(3) { animation-delay: .2s; }
.portal-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(24, 47, 42, .13); }
.portal-card::before { display: none; }

.portal-icon {
  display: grid;
  width: 44px;
  height: 44px;
  margin: 0 0 18px;
  place-items: center;
  border-radius: 6px;
  background: #edf4f1;
  font-size: 1.55rem;
}

.portal-card.admin .portal-icon { background: #edf3f7; }
.portal-card.student .portal-icon { background: #fbf3e5; }
.portal-title {
  margin: 0 0 9px;
  color: var(--ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.portal-description {
  min-height: 78px;
  margin: 0 0 20px;
  color: var(--muted);
  font-size: .94rem;
  line-height: 1.6;
}

.portal-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid var(--green);
  border-radius: 4px;
  color: var(--white);
  background: var(--green);
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background .18s ease, border-color .18s ease;
}

.portal-card.admin .portal-btn { border-color: var(--blue); background: var(--blue); }
.portal-card.student .portal-btn { border-color: #a87920; background: #a87920; }
.portal-btn:hover { filter: brightness(.92); transform: none; box-shadow: none; }

.features-section, .info-section { padding: 54px 24px; background: var(--white); }
.features-title, .gallery-title {
  margin: 0 0 30px;
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.8rem;
  text-align: left;
}

.features-grid, .info-grid {
  width: min(100%, 1120px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 28px;
}

.feature-card {
  padding: 20px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-left: 0;
  border-radius: 0;
  background: transparent;
  transition: none;
}

.feature-card:hover { transform: none; border-left-color: transparent; }
.feature-icon { margin-bottom: 9px; font-size: 1.6rem; }
.feature-card h4 { margin: 0 0 6px; color: var(--ink); font-size: 1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .92rem; }

.gallery-section { padding: 56px 0; background: #eaf0ed; }
.gallery-title { max-width: 1120px; margin: 0 auto 10px; padding: 0 24px; }
.gallery-subtitle {
  max-width: 1120px;
  margin: 0 auto 24px;
  padding: 0 24px;
  color: var(--muted);
  font-size: .98rem;
  text-align: left;
}

.gallery-slider-wrapper { width: min(100%, 1168px); padding: 0 24px; }
.gallery-grid {
  gap: 12px;
  padding: 0 0 14px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.gallery-item {
  flex-basis: min(72%, 760px);
  aspect-ratio: 16 / 9;
  border-radius: 5px;
  box-shadow: none;
}

.gallery-image { transition: transform .35s ease; }
.gallery-overlay { align-items: flex-start; padding: 28px; text-align: left; }
.gallery-title-small { font-size: 1.25rem; }
.gallery-description { max-width: 620px; }
.gallery-nav {
  top: 42%;
  width: 42px;
  height: 42px;
  border-radius: 4px;
  color: var(--ink);
  font-size: 1.4rem;
}
.gallery-nav.prev { left: 32px; }
.gallery-nav.next { right: 32px; }

.quote-section { padding: 54px 24px; background: #f4f7f5; text-align: center; }
.quote-section > div { max-width: 780px !important; }
.quote-section blockquote {
  margin: 0 0 16px;
  color: var(--ink);
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.6;
}
.quote-section cite { color: var(--green); font-size: .95rem; font-style: normal; font-weight: 700; }

.info-section { background: var(--white); }
.info-section .container { max-width: 1120px; margin: 0 auto; }
.info-section .section-heading { margin-bottom: 24px !important; }
.info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.info-card {
  padding: 20px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
}
.info-card h3 { margin: 0 0 12px; color: var(--green); font-size: 1.12rem; }
.info-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.65; }

.achievement-section {
  padding: 52px 24px !important;
  color: var(--white) !important;
  background: var(--green-dark) !important;
  text-align: left !important;
}
.achievement-section > .section-heading {
  width: min(100%, 1120px);
  margin: 0 auto 28px !important;
  color: var(--white) !important;
}
.achievement-section > div { max-width: 1120px !important; margin-left: auto !important; margin-right: auto !important; }
.achievement-section > div > div { gap: 18px !important; }
.achievement-section .stat-item { text-align: left; }
.achievement-section .stat-item > div:first-child { color: #f3ca70 !important; font-size: 2.3rem !important; }
.achievement-section #studentCount,
.achievement-section #teacherCount,
.achievement-section #classroomCount,
.achievement-section #yearsCount { color: #f3ca70 !important; }
.achievement-section > div > div > div { border-radius: 5px !important; }

.footer { padding: 44px 24px 24px; color: #dce7e2; background: #12382f; }
.footer-content { max-width: 1120px; }
.footer-grid { grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-section h3 { color: #f3ca70; font-size: 1rem; }
.footer-section p, .footer-section a { color: #dce7e2; font-size: .92rem; line-height: 1.8; }
.footer-section a:hover { color: #f3ca70; }
.footer-divider { border-color: rgba(255, 255, 255, .16); }
.footer-copyright { font-size: .85rem; }

@keyframes dashboardReveal {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 800px) {
  .hero-section { min-height: 350px; padding: 50px 24px; }
  .portals-grid { grid-template-columns: 1fr; }
  .portal-description { min-height: 0; }
  .features-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gallery-item { flex-basis: 88%; }
  .info-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .hero-section { min-height: 0; padding: 42px 20px; background-position: 58% center; }
  .school-logo-large { float: none; width: 68px; height: 68px; margin: 0 0 18px; }
  .hero-title { font-size: 1.9rem; }
  .hero-description { font-size: .98rem; }
  .hero-actions { padding-top: 20px; }
  .portal-access-section { width: calc(100% - 40px); padding: 40px 0 48px; }
  .section-heading, .features-title, .gallery-title { font-size: 1.45rem !important; }
  .features-section, .info-section { padding: 40px 20px; }
  .features-grid { grid-template-columns: 1fr; }
  .gallery-section { padding: 40px 0; }
  .gallery-title, .gallery-subtitle { padding-right: 20px; padding-left: 20px; }
  .gallery-slider-wrapper { padding: 0 20px; }
  .gallery-item { flex-basis: 100%; aspect-ratio: 4 / 3; }
  .gallery-overlay { padding: 18px; }
  .gallery-description { font-size: .84rem; }
  .gallery-nav.prev { left: 24px; }
  .gallery-nav.next { right: 24px; }
  .quote-section { padding: 38px 20px; }
  .quote-section blockquote { font-size: 1.08rem; }
  .achievement-section { padding: 40px 20px !important; }
  .achievement-section > div > div { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .achievement-section > div > div > div { min-width: 0 !important; padding: 14px !important; }
  .footer { padding: 38px 20px 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}