/* ============================================================
   GOKOMERE HIGH SCHOOL — HOMEPAGE STYLESHEET
   ============================================================ */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary:    #003087;
  --accent:     #C9A227;
  --deep:       #8B1F3A;
  --bg:         #F6F3EC;
  --dark:       #0B0F1F;
  --white:      #FFFFFF;
  --text:       #2C2C2C;
  --gray:       #7A8296;
  --border:     #E6E0D2;
  --radius:     8px;
  --shadow:     0 4px 20px rgba(0,0,0,0.08);
  --shadow-lg:  0 18px 48px rgba(0,0,0,0.16);
  --transition: 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: 1240px; margin: 0 auto; padding: 0 32px; }

/* ============================================================
   HEADER + MEGA MENU
   ============================================================ */
.main-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 900;
  transition: box-shadow var(--transition);
}
.main-header.scrolled { box-shadow: 0 2px 20px rgba(0,0,0,0.08); }

.header-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 32px 0;
  position: relative;
}
.header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
}
.logo-block { display: flex; align-items: center; gap: 12px; }
.logo-crest {
  width: 52px; height: 52px;
  background: var(--primary);
  border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
  font-size: 22px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.logo-crest img { width: 100%; height: 100%; object-fit: contain; }
.logo-text { display: flex; flex-direction: column; line-height: 1.15; }
.logo-text .name {
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700; letter-spacing: 2px;
  color: var(--primary);
}
.logo-text .sub {
  font-size: 10px; font-weight: 600; letter-spacing: 4px;
  color: var(--primary); opacity: 0.7;
}
.utility-links { display: flex; align-items: center; gap: 22px; }
.utility-links a {
  font-size: 11px; font-weight: 600; color: var(--primary);
  letter-spacing: 0.3px; transition: color var(--transition);
}
.utility-links a:hover { color: var(--accent); }
.search-icon {
  width: 18px; height: 18px;
  border: 1.6px solid var(--primary);
  border-radius: 50%; position: relative;
}
.search-icon::after {
  content: ''; position: absolute;
  width: 7px; height: 1.6px; background: var(--primary);
  transform: rotate(45deg); bottom: -3px; right: -4px;
}
.header-nav {
  display: flex; justify-content: center; gap: 30px;
  padding-bottom: 14px; position: relative;
}
.header-nav > a.nav-item {
  font-size: 13px; font-weight: 700; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--primary);
  padding: 6px 0; position: relative;
  transition: color var(--transition);
}
.header-nav > a.nav-item::after {
  content: ''; position: absolute; left: 0; bottom: 0;
  width: 0; height: 2.5px; background: var(--primary);
  transition: width var(--transition);
}
.header-nav > a.nav-item:hover::after,
.header-nav > a.nav-item.active::after { width: 100%; }
.header-nav > a.nav-item.active { font-weight: 800; }

/* Mega menu */
.mega-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  width: 448px;
  background: #FFFFFF;
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0,0,0,0.16);
  padding: 22px;
  display: grid;
  grid-template-columns: 188px 1fr;
  gap: 22px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, visibility 0.28s ease;
  z-index: 950;
  text-transform: none;
  letter-spacing: 0;
}
.nav-item.has-menu:hover .mega-menu,
.mega-menu:hover {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.nav-item.menu-align-left  .mega-menu { left: 0;     transform: translateY(10px); }
.nav-item.menu-align-right .mega-menu { left: auto; right: 0; transform: translateY(10px); }
.nav-item.menu-align-left:hover  .mega-menu { transform: translateY(0); }
.nav-item.menu-align-right:hover .mega-menu { transform: translateY(0); }

.mega-menu-image {
  width: 188px; height: 220px;
  border-radius: 6px; overflow: hidden;
  background: #1A1F35;
}
.mega-menu-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mega-menu-links {
  display: flex; flex-direction: column;
  gap: 4px; justify-content: center;
}
.mega-menu-links a {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  color: #2C2C2C;
  padding: 5px 0;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  transition: color 0.25s ease, padding-left 0.25s ease;
}
.mega-menu-links a:hover { color: var(--accent); padding-left: 6px; }
.mega-menu-links a::after { display: none !important; }

.mobile-toggle {
  display: none; background: none; border: none;
  flex-direction: column; gap: 5px; padding: 4px;
}
.mobile-toggle span {
  width: 24px; height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

/* ============================================================
   VIDEO HERO
   ============================================================ */
.video-hero { background: var(--dark); padding: 30px 0; }
.video-hero-inner { max-width: 100%; margin: 0 auto; padding: 0; }
.video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px; overflow: hidden;
  background: #1A1F35; cursor: pointer;
}
.video-frame img.poster {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
}
.video-frame:hover img.poster { transform: scale(1.03); filter: brightness(0.85); }
.video-title-bar {
  position: absolute; top: 16px; left: 16px;
  display: flex; align-items: center; gap: 12px;
  color: var(--white); z-index: 2;
}
.video-title-bar .avatar {
  width: 30px; height: 30px;
  background: var(--primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.video-title-bar .meta { line-height: 1.2; }
.video-title-bar .meta .title { font-size: 14px; font-weight: 700; }
.video-title-bar .meta .channel { font-size: 11px; opacity: 0.75; margin-top: 2px; }
.video-play-button {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 90px; height: 62px; background: #CC0000;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--transition), background var(--transition);
  z-index: 2; border: none;
}
.video-play-button::after {
  content: ''; width: 0; height: 0;
  border-left: 22px solid var(--white);
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  margin-left: 5px;
}
.video-frame:hover .video-play-button {
  transform: translate(-50%, -50%) scale(1.08);
  background: #E60000;
}
.video-watch-pill {
  position: absolute; bottom: 16px; right: 16px;
  background: rgba(0,0,0,0.75); color: var(--white);
  font-size: 11px; font-weight: 600;
  padding: 8px 16px; border-radius: 6px;
  display: flex; align-items: center; gap: 8px; z-index: 2;
}
.video-watch-pill .yt-icon { font-weight: 800; color: #FF0000; letter-spacing: -1px; }
.video-duration {
  position: absolute; bottom: 16px; left: 16px;
  color: rgba(255,255,255,0.85);
  font-size: 11px; letter-spacing: 1px; z-index: 2;
}

/* ============================================================
   MOTTO HERO
   ============================================================ */
.motto-hero { padding: 110px 0 90px; background: var(--bg); text-align: center; }
.motto-hero .line-1 {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-size: clamp(26px, 4vw, 36px);
  color: var(--deep); margin-bottom: 6px;
}
.motto-hero .line-2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(42px, 7vw, 64px);
  font-weight: 700; color: var(--primary);
  line-height: 1.1; margin-bottom: 36px;
}
.motto-hero .paragraph {
  max-width: 760px; margin: 0 auto;
  font-size: 16px; line-height: 1.85; color: #3A3A3A;
}

/* ============================================================
   HOSTELS
   ============================================================ */
.hostels { padding: 90px 0 100px; background: var(--bg); }
.section-label {
  text-align: center;
  font-size: 12px; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; color: var(--deep);
  margin-bottom: 10px;
}
.hostels .section-label {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 20px; font-weight: 400;
  letter-spacing: 1px; text-transform: none;
}
.section-title {
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: clamp(28px, 4vw, 38px);
  font-weight: 700; color: var(--primary);
  margin-bottom: 48px;
}
.hostel-group-label {
  display: flex; align-items: center; gap: 18px;
  margin: 40px 0 22px;
  font-size: 12px; font-weight: 800; letter-spacing: 3px;
  text-transform: uppercase; color: var(--primary);
}
.hostel-group-label.girls { color: var(--deep); }
.hostel-group-label::after {
  content: ''; flex: 1; height: 1.5px;
  background: currentColor; opacity: 0.25;
}
.hostel-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
.hostel-card {
  position: relative;
  aspect-ratio: 3 / 3.3;
  border-radius: 6px; overflow: hidden;
  background: #1A1F35;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
  opacity: 0; transform: translateY(40px);
}
.hostel-card.revealed { opacity: 1; transform: translateY(0); }
.hostel-card img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s ease;
}
.hostel-card::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, rgba(0,0,0,0.15) 55%, rgba(0,0,0,0.35) 100%);
  transition: background var(--transition);
}
.hostel-card:hover { transform: translateY(-12px); box-shadow: var(--shadow-lg); }
.hostel-card:hover img { transform: scale(1.06); }
.hostel-card-inner {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center;
  padding: 24px 16px; text-align: center;
}
.hostel-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--white); margin-bottom: 8px;
  transition: transform var(--transition);
}
.hostel-card:hover h3 { transform: translateY(-4px); }
.hostel-card .form {
  font-size: 11px; font-weight: 600; letter-spacing: 2px;
  text-transform: uppercase; color: #E6E0D2; margin-bottom: 4px;
}
.hostel-card .tag {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--transition), transform var(--transition);
}
.hostel-card:hover .tag { opacity: 1; transform: translateY(0); }

/* ============================================================
   ACHIEVEMENTS
   ============================================================ */
.achievements {
  padding: 90px 0; background: var(--white);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.achievements-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
}
.achievement-card {
  text-align: center; padding: 40px 20px;
  border-radius: 8px; background: var(--bg);
  transition: transform var(--transition), box-shadow var(--transition);
}
.achievement-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); }
.achievement-card .number {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 4vw, 44px);
  font-weight: 700; color: var(--primary);
  line-height: 1; margin-bottom: 14px;
}
.achievement-card .label {
  font-size: 13px; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.achievement-card .sub {
  font-size: 10px; font-weight: 600; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--deep);
}

/* ============================================================
   NEWS
   ============================================================ */
.news { padding: 90px 0; background: var(--bg); }
.news-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px;
}
.news-card {
  background: var(--white);
  border-radius: 8px; overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  opacity: 0; transform: translateY(30px);
}
.news-card.revealed { opacity: 1; transform: translateY(0); }
.news-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); }
.news-card-image {
  width: 100%; aspect-ratio: 16 / 10;
  overflow: hidden; background: #1A1F35;
}
.news-card-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s ease;
}
.news-card:hover .news-card-image img { transform: scale(1.06); }
.news-card-body { padding: 24px; }
.news-card .tag {
  display: inline-block;
  font-size: 10px; font-weight: 800; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--accent);
  margin-bottom: 10px;
}
.news-card h3 {
  font-family: 'Playfair Display', serif;
  font-size: 19px; font-weight: 700; color: var(--text);
  line-height: 1.35; margin-bottom: 10px;
}
.news-card p {
  font-size: 14px; color: var(--gray);
  line-height: 1.65; margin-bottom: 16px;
}
.news-card .read-more {
  font-size: 13px; font-weight: 700;
  color: var(--primary);
  transition: color var(--transition);
}
.news-card .read-more:hover { color: var(--accent); }

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  position: relative;
  padding: 120px 0; text-align: center;
  overflow: hidden;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--primary);
}
.cta-banner::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,48,135,0.88) 0%, rgba(11,15,31,0.82) 100%);
}
.cta-content {
  position: relative; z-index: 1; color: var(--white);
  max-width: 720px; margin: 0 auto; padding: 0 32px;
}
.cta-content h2 {
  font-family: 'Playfair Display', serif;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 700; margin-bottom: 14px;
}
.cta-content p { font-size: 17px; opacity: 0.9; margin-bottom: 36px; }
.cta-buttons {
  display: flex; gap: 16px;
  justify-content: center; flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-block; padding: 15px 34px;
  border-radius: 6px; font-size: 14px; font-weight: 700;
  letter-spacing: 0.5px;
  transition: all var(--transition);
  border: 2px solid transparent;
}
.btn-primary {
  background: var(--accent); color: var(--dark);
  border-color: var(--accent);
}
.btn-primary:hover {
  background: #DDB43A; border-color: #DDB43A;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,162,39,0.35);
}
.btn-outline-light {
  background: transparent; color: var(--white);
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-light:hover {
  background: rgba(255,255,255,0.12);
  border-color: var(--white);
}

/* ============================================================
   FOOTER
   ============================================================ */
.main-footer {
  background: var(--dark);
  color: rgba(255,255,255,0.75);
  padding: 70px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 48px; padding-bottom: 56px;
}
.footer-col h4 {
  color: var(--white); font-size: 12px; font-weight: 800;
  letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 20px;
}
.footer-col p { font-size: 14px; line-height: 1.8; margin-bottom: 6px; }
.footer-col a {
  display: block; font-size: 14px; margin-bottom: 10px;
  transition: color var(--transition);
}
.footer-col a:hover { color: var(--accent); }
.footer-logo {
  display: flex; align-items: center; gap: 12px; margin-bottom: 20px;
}
.footer-logo .crest {
  width: 46px; height: 46px;
  background: var(--primary); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  flex-shrink: 0; overflow: hidden;
}
.footer-logo .crest img { width: 100%; height: 100%; object-fit: contain; }
.footer-logo .name {
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700;
  color: var(--white); letter-spacing: 1.5px;
}
.footer-motto {
  font-family: 'Playfair Display', serif;
  font-style: italic; font-size: 18px;
  color: var(--accent); margin-top: 16px;
}
.footer-motto small {
  display: block; font-family: 'Inter', sans-serif;
  font-style: normal; font-size: 11px;
  letter-spacing: 1.5px; opacity: 0.6;
  margin-top: 4px; color: rgba(255,255,255,0.7);
}
.social-links { display: flex; flex-direction: column; gap: 10px; }
.social-links a {
  display: flex; align-items: center; gap: 10px;
  font-size: 13px; margin-bottom: 0;
}
.social-links a::before {
  content: ''; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent); flex-shrink: 0;
}
.lang-select {
  width: 100%; padding: 11px 14px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
  color: var(--white);
  font-family: inherit; font-size: 13px; margin-top: 8px;
}
.lang-select option { color: var(--dark); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 24px 0;
}
.footer-bottom .container {
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p { font-size: 12px; opacity: 0.5; }

/* ============================================================
   VIDEO MODAL
   ============================================================ */
.video-modal {
  position: fixed; inset: 0; z-index: 2000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.video-modal.open { opacity: 1; visibility: visible; }
.video-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(5, 8, 18, 0.92);
  backdrop-filter: blur(4px);
}
.video-modal-content {
  position: relative;
  width: 90%; max-width: 960px;
  aspect-ratio: 16 / 9; z-index: 1;
}
.video-modal-frame {
  width: 100%; height: 100%;
  border-radius: 8px; overflow: hidden; background: #000;
}
.video-modal-frame iframe { width: 100%; height: 100%; border: 0; }
.video-modal-close {
  position: absolute; top: -48px; right: 0;
  background: none; border: none;
  color: var(--white); font-size: 22px;
  opacity: 0.8;
  transition: opacity var(--transition), transform var(--transition);
}
.video-modal-close:hover { opacity: 1; transform: rotate(90deg); }

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed; bottom: 32px; right: 32px;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary); color: var(--white);
  border: none; font-size: 18px;
  box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translateY(16px);
  transition: all var(--transition);
  z-index: 800;
}
.back-to-top.visible {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.back-to-top:hover { background: var(--accent); color: var(--dark); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .hostel-grid { grid-template-columns: repeat(2, 1fr); }
  .achievements-grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: repeat(2, 1fr); gap: 36px; }
}
@media (max-width: 768px) {
  .container, .header-inner { padding: 0 20px; }
  .utility-links { display: none; }
  .header-nav {
    position: fixed; top: 0; right: -100%;
    width: 280px; height: 100vh;
    background: var(--white);
    flex-direction: column; align-items: flex-start;
    padding: 80px 32px 32px; gap: 20px;
    box-shadow: -4px 0 20px rgba(0,0,0,0.15);
    transition: right var(--transition);
    z-index: 1000;
  }
  .header-nav.open { right: 0; }
  .header-nav a.nav-item { color: var(--dark) !important; font-size: 1rem; }
  .mega-menu { display: none; }
  .hamburger, .mobile-toggle { display: flex; z-index: 1001; }
  .hostel-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .achievements-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .news-grid { grid-template-columns: 1fr; }
  .cta-banner { padding: 80px 0; }
  .footer-grid { grid-template-columns: 1fr; gap: 36px; }
  .video-play-button { width: 70px; height: 50px; }
  .video-play-button::after {
    border-left-width: 18px;
    border-top-width: 11px;
    border-bottom-width: 11px;
  }
  .back-to-top { bottom: 20px; right: 20px; }
}
@media (max-width: 480px) {
  .hostel-grid { grid-template-columns: 1fr; }
  .hostel-card { aspect-ratio: 4 / 3; }
  .achievements-grid { grid-template-columns: 1fr; }
  .cta-buttons { flex-direction: column; align-items: stretch; }
}