/* ===================================
   VIKALP PUBLIC SCHOOL - MAIN STYLES
   =================================== */

/* --- Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&family=Merriweather:wght@300;400;700&family=Nunito:wght@400;600;700;800&display=swap');

/* --- CSS Variables --- */
:root {
  --blue-dark:    #0a2d6e;
  --blue-main:    #1a50b8;
  --blue-mid:     #2563cc;
  --blue-light:   #3b82f6;
  --blue-pale:    #dbeafe;
  --blue-xpale:   #eff6ff;
  --white:        #ffffff;
  --off-white:    #f8faff;
  --gray-light:   #f1f5f9;
  --gray-mid:     #94a3b8;
  --gray-text:    #475569;
  --text-dark:    #1e293b;
  --gold:         #f59e0b;
  --gold-light:   #fef3c7;
  --red-accent:   #e53e3e;

  --shadow-sm:  0 1px 3px rgba(0,0,0,0.1);
  --shadow-md:  0 4px 16px rgba(26,80,184,0.12);
  --shadow-lg:  0 8px 32px rgba(26,80,184,0.18);
  --shadow-xl:  0 16px 48px rgba(26,80,184,0.22);

  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  28px;

  --transition: 0.3s ease;
  --font-main:  'Poppins', sans-serif;
  --font-serif: 'Merriweather', serif;
  --font-fun:   'Nunito', sans-serif;
}

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.75; /* Polish #2 */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased; /* Polish #1 */
  -moz-osx-font-smoothing: grayscale;
}

/* Polish #4: Selection color */
::selection {
  background: var(--blue-main);
  color: var(--white);
}

/* Polish #6: Distinct bold tags */
strong, b {
  color: var(--blue-dark);
  font-weight: 700;
}

img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }
ul { list-style: none; }

h1, h2, h3, h4, h5 {
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.01em; /* Polish #3 */
}

/* ============================
   TOPBAR (above header)
   ============================ */
.topbar {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.78);
  font-size: 0.78rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.topbar-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.topbar-left { display: flex; align-items: center; gap: 24px; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.topbar-item {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255,255,255,0.72);
  transition: color var(--transition);
  font-weight: 400;
  letter-spacing: 0.01em;
}
.topbar-item i {
  font-size: 0.7rem;
  color: var(--blue-light);
  opacity: 1;
}
.topbar a { color: rgba(255,255,255,0.72); transition: color var(--transition); }
.topbar a:hover,
.topbar-item:hover { color: var(--white); }
.topbar-admission {
  color: var(--gold) !important;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topbar-admission:hover { color: #fbbf24 !important; }

/* ============================
   HEADER / NAVBAR
   ============================ */
header {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Polish #18 */
}
header.scrolled {
  background: rgba(255,255,255,0.98);
  box-shadow: 0 4px 32px rgba(10,45,110,0.12); /* Polish #24 */
  border-bottom: 1px solid rgba(26,80,184,0.08); /* Polish #62 */
}

.header-inner {
  max-width: 1260px;
  margin: 0 auto;
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px; /* Base height */
  transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  gap: 24px;
}
header.scrolled .header-inner {
  height: 64px; /* Polish #61: Shrink on scroll */
}

/* --- Logo --- */
.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}
.logo-area img {
  height: 52px;
  width: auto;
}
.logo-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.logo-text .school-name {
  font-family: var(--font-fun);
  font-size: 1.15rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--blue-dark);
  line-height: 1.1;
  letter-spacing: 0.05em;
}
.logo-text .school-tag {
  font-size: 0.65rem;
  color: var(--blue-main);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.8;
}

/* --- NAV --- */
nav {
  display: flex;
  align-items: center;
}
nav ul {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
}
nav ul li {
  position: relative;
}

/* Base nav link */
nav ul li > a,
nav ul li > span {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--gray-text);
  border-radius: 0;
  transition: color var(--transition);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  letter-spacing: 0.01em;
}

/* Underline hover effect */
nav ul li > a::before,
nav ul li > span::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--blue-main);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--transition);
}
nav ul li > a:hover,
nav ul li > span:hover {
  color: var(--blue-dark);
}
nav ul li > a:hover::before,
nav ul li > span:hover::before { transform: scaleX(1); }

/* Active state */
nav ul li.active > a {
  color: var(--blue-main);
  font-weight: 600;
}
nav ul li.active > a::before { transform: scaleX(1); }

/* Dropdown chevron */
.dropdown > a > i.fa-chevron-down,
.dropdown > span > i.fa-chevron-down {
  font-size: 0.6rem;
  transition: transform var(--transition);
  opacity: 0.6;
  margin-left: 1px;
}
.dropdown:hover > a > i.fa-chevron-down,
.dropdown:hover > span > i.fa-chevron-down {
  transform: rotate(180deg);
  opacity: 1;
}

/* Hide the old ▾ pseudo-element */
.dropdown > a::after,
.dropdown > span::after { display: none; }

/* Dropdown panel */
.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  background: var(--white);
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(10,45,110,0.14), 0 1px 4px rgba(0,0,0,0.06);
  min-width: 210px;
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 200;
  border: 1px solid rgba(26,80,184,0.08);
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* Right-align dropdown for last-child (login) */
.dropdown:last-child .dropdown-menu {
  left: auto;
  right: 0;
}

.dropdown-menu li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--gray-text);
  border-radius: 8px;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.01em;
}
.dropdown-menu li a::before { display: none; }
.dropdown-menu li a:hover {
  background: var(--blue-xpale);
  color: var(--blue-dark);
}
.dropdown-menu li a i {
  width: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: var(--blue-main);
  flex-shrink: 0;
}

/* Divider inside dropdown */
.dropdown-menu li + li { margin-top: 1px; }

/* --- Login Button --- */
.btn-login {
  display: inline-flex !important;
  align-items: center;
  gap: 7px;
  background: var(--blue-dark) !important;
  color: var(--white) !important;
  padding: 8px 18px !important;
  border-radius: 50px !important;
  font-size: 0.82rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.02em;
  transition: background var(--transition), box-shadow var(--transition) !important;
  box-shadow: 0 2px 8px rgba(10,45,110,0.18);
}
.btn-login:hover {
  background: var(--blue-main) !important;
  box-shadow: 0 4px 16px rgba(26,80,184,0.3) !important;
  transform: none !important;
}
.btn-login::before { display: none !important; }
.btn-login::after  { display: none !important; }

/* Red disclosure link */
nav .disclosure-link {
  color: var(--red-accent) !important;
  font-weight: 600 !important;
}
nav .disclosure-link::before { background: var(--red-accent); }

/* --- Hamburger --- */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px;
  border-radius: 10px;
  background: transparent;
  border: none;
  transition: background var(--transition);
}
.hamburger:hover { background: var(--blue-xpale); }
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--blue-dark);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


/* ============================
   PAGE HERO BANNER
   ============================ */
.page-hero {
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-main) 60%, var(--blue-light) 100%);
  color: var(--white);
  text-align: center;
  padding: 72px 24px 60px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero h1 {
  font-size: 2.4rem;
  font-weight: 800;
  margin-bottom: 12px;
  position: relative;
}
.page-hero p {
  font-size: 1.05rem;
  opacity: 0.88;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  font-size: 0.88rem;
  opacity: 0.8;
  position: relative;
}
.breadcrumb a { color: var(--white); opacity: 0.75; }
.breadcrumb a:hover { opacity: 1; }
.breadcrumb span { opacity: 0.5; }

/* ============================
   SECTION STYLES
   ============================ */
section { padding: 80px 0; }
.hero-editorial { padding-top: 0; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 52px;
}
.section-badge {
  display: inline-block;
  background: rgba(26,80,184,0.06);
  color: var(--blue-main);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 12px;
  border: 1px solid rgba(26,80,184,0.1);
}
.section-title {
  font-size: clamp(2rem, 3.5vw, 2.6rem);
  color: var(--blue-dark);
  margin-bottom: 24px;
  font-weight: 800;
}
.section-title span { color: var(--blue-main); }
.section-sub {
  font-size: 1.05rem;
  color: var(--gray-text);
  max-width: 650px;
  margin: 0 auto 48px;
  text-wrap: balance;
}
.divider {
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--blue-main), var(--blue-light));
  border-radius: 4px;
  margin: 18px auto 0;
}

/* ============================
   CARDS
   ============================ */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(26,80,184,0.07);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* ============================
   BUTTONS
   ============================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-family: var(--font-main);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(1px); }
.btn i { transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.btn:hover i { transform: translateX(4px); }

.btn-primary {
  background: linear-gradient(135deg, var(--blue-main), var(--blue-mid));
  color: var(--white);
  box-shadow: 0 4px 12px rgba(26,80,184,0.3);
  background-size: 200% auto;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover {
  background-position: right center;
  color: var(--white);
  box-shadow: 0 8px 20px rgba(26,80,184,0.4);
}
.btn-outline {
  background: transparent;
  color: var(--blue-main);
  border: 2px solid var(--blue-main);
}
.btn-outline:hover {
  background: var(--blue-main);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-white {
  background: var(--white);
  color: var(--blue-dark);
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.btn-white:hover {
  background: var(--blue-dark);
  color: var(--white);
  transform: translateY(-2px);
}

/* ============================
   NOTICE BOARD
   ============================ */
.notice-board {
  background: var(--blue-dark);
  color: var(--white);
  padding: 56px 0;
}
.notice-board .section-header { margin-bottom: 36px; }
.notice-board .section-title { color: var(--white); }
.notice-board .section-badge { background: rgba(255,255,255,0.15); color: var(--white); border-color: rgba(255,255,255,0.2); }
.notice-list { display: flex; flex-direction: column; gap: 14px; }
.notice-item {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
  transition: background var(--transition);
}
.notice-item:hover { background: rgba(255,255,255,0.14); }
.notice-date {
  background: var(--blue-light);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  text-align: center;
  min-width: 56px;
  flex-shrink: 0;
}
.notice-date .day { font-size: 1.2rem; font-weight: 800; line-height: 1; }
.notice-date .month { font-size: 0.72rem; font-weight: 500; opacity: 0.9; }
.notice-content h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: 4px; }
.notice-content p { font-size: 0.82rem; opacity: 0.75; }
.notice-tag {
  display: inline-block;
  background: rgba(255,255,255,0.15);
  padding: 2px 10px;
  border-radius: 50px;
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 6px;
}

/* ============================
   FOOTER
   ============================ */
footer {
  background: var(--blue-dark);
  color: rgba(255,255,255,0.85);
}
.footer-main {
  padding: 64px 0 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 48px;
}
.footer-brand .logo-area { margin-bottom: 18px; }
.footer-brand .logo-text .school-name { color: var(--white); }
.footer-brand .logo-text .school-tag { color: rgba(255,255,255,0.6); }
.footer-brand p {
  font-size: 0.88rem;
  line-height: 1.8;
  color: rgba(255,255,255,0.7);
  margin-bottom: 22px;
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 38px;
  height: 38px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 0.85rem;
  transition: all var(--transition);
}
.footer-social a:hover {
  background: var(--blue-light);
  transform: translateY(-2px);
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
  position: relative;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--blue-light);
  border-radius: 2px;
}
.footer-links li {
  margin-bottom: 10px;
}
.footer-links li a {
  color: rgba(255,255,255,0.68);
  font-size: 0.88rem;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  gap: 8px;
}
.footer-links li a:hover {
  color: var(--white);
  padding-left: 4px;
}
.footer-links li a i {
  font-size: 0.7rem;
  color: var(--blue-light);
}

.footer-contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.footer-contact-item i {
  width: 32px;
  height: 32px;
  background: rgba(255,255,255,0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: var(--blue-light);
  flex-shrink: 0;
  margin-top: 2px;
}
.footer-contact-item div {
  font-size: 0.86rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.6;
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.5);
}
.footer-bottom a { color: rgba(255,255,255,0.7); }
.footer-bottom a:hover { color: var(--white); }

/* ============================
   UTILITY CLASSES
   ============================ */
.text-center { text-align: center; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.bg-blue-pale { background: var(--blue-xpale); }
.bg-gray { background: var(--gray-light); }
.text-blue { color: var(--blue-main); }

/* ============================
   ANIMATIONS
   ============================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.05); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: translateX(0); }
}

.animate-fadeup {
  animation: fadeInUp 0.7s ease both;
}
.anim-delay-1 { animation-delay: 0.1s; }
.anim-delay-2 { animation-delay: 0.2s; }
.anim-delay-3 { animation-delay: 0.3s; }
.anim-delay-4 { animation-delay: 0.4s; }

/* ============================
   SCROLL-REVEAL (JS-driven)
   ============================ */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .section-title { font-size: 1.8rem; }
}
@media (max-width: 768px) {
  .topbar { display: none; }
  .hamburger { display: flex; }
  nav {
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 12px 40px rgba(10,45,110,0.12);
    padding: 16px;
    transform: translateX(-100%);
    transition: transform var(--transition);
    overflow-y: auto;
    max-height: calc(100vh - 70px);
    z-index: 999;
    border-top: 1px solid var(--gray-light);
  }
  nav.open { transform: translateX(0); }
  nav ul {
    flex-direction: column;
    gap: 2px;
    width: 100%;
  }
  nav ul li { width: 100%; }
  nav ul li > a,
  nav ul li > span {
    width: 100%;
    padding: 11px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    font-weight: 500;
  }
  nav ul li > a::before,
  nav ul li > span::before { display: none; }
  nav ul li > a:hover,
  nav ul li > span:hover {
    background: var(--blue-xpale);
    color: var(--blue-dark);
  }
  nav ul li.active > a {
    background: var(--blue-xpale);
    color: var(--blue-main);
  }
  .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: var(--blue-xpale);
    border-radius: 10px;
    margin-top: 4px;
    margin-left: 12px;
  }
  .dropdown:last-child .dropdown-menu { right: auto; left: 0; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 20px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-col h4 { font-size: 0.9rem; }
  .footer-links li a { font-size: 0.82rem; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 6px; }
  .page-hero h1 { font-size: 1.8rem; }
  .section-title { font-size: 1.55rem; }
}

@media (max-width: 480px) {
  .logo-text .school-name { font-size: 0.98rem; }
  .logo-area img { height: 46px; }
}
