/*
Theme Name: Bal Vatika Vidyalaya Smart School
Theme URI: https://balvatikavidyalaya.com
Author: BVV Development Team
Author URI: https://balvatikavidyalaya.com
Description: A complete Smart School ERP + Website theme for Bal Vatika Vidyalaya, Dehri-on-Sone. Features: Full website with dynamic pages, Student Portal, Teacher Portal, Admin ERP, Online Admission, Payment Portal, Fee Management, Attendance, Results, Notices, Gallery, and more. 100% Elementor compatible and no-code editable.
Version: 2.4.1
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: Private / All Rights Reserved
License URI: https://balvatikavidyalaya.com/license
Text Domain: bal-vatika
Tags: school, education, erp, elementor, responsive, custom-colors, custom-fonts, custom-menu, featured-images, full-width-template, sticky-post, translation-ready

BVV Smart School Theme © 2025 Samridhi Educational Trust
*/

/* ─── CSS VARIABLES ─── */
:root {
  --green-dark:  #1a4731;
  --green-mid:   #256648;
  --green-light: #2e8b57;
  --green-pale:  #d4edda;
  --gold:        #c8922a;
  --gold-light:  #f0c060;
  --gold-pale:   #fdf5e4;
  --cream:       #fefcf5;
  --white:       #ffffff;
  --gray-light:  #f4f6f4;
  --gray-mid:    #e0e6df;
  --gray-text:   #5a6b5a;
  --dark:        #1a2e1a;
  --font-head:   'Playfair Display', Georgia, serif;
  --font-body:   'Nunito Sans', sans-serif;
  --font-alt:    'EB Garamond', Georgia, serif;
  --shadow-sm:   0 2px 8px rgba(26,71,49,0.08);
  --shadow-md:   0 6px 24px rgba(26,71,49,0.12);
  --shadow-lg:   0 12px 48px rgba(26,71,49,0.16);
  --radius-sm:   8px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --transition:  all 0.25s ease;
}

/* ─── RESET ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--dark);
  background: var(--cream);
  overflow-x: hidden;
  line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }
button { cursor: pointer; font-family: var(--font-body); }
input, select, textarea { font-family: var(--font-body); }

/* ─── TYPOGRAPHY ─── */
h1, h2, h3, h4, h5, h6 { font-family: var(--font-head); line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 4vw, 2.5rem); font-weight: 700; }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); font-weight: 600; }
p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ─── CONTAINERS ─── */
.container        { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: 900px;  margin: 0 auto; padding: 0 24px; }
.container-wide   { max-width: 1400px; margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }

/* ─── BUTTONS ─── */
.btn, button.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 700; border-radius: var(--radius-sm);
  font-size: 14px; padding: 12px 26px;
  transition: var(--transition); border: 2px solid transparent;
}
.btn-primary {
  background: var(--gold); color: #fff; border-color: var(--gold);
}
.btn-primary:hover {
  background: var(--gold-light); border-color: var(--gold-light);
  color: var(--dark); transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.btn-secondary {
  background: var(--green-dark); color: #fff; border-color: var(--green-dark);
}
.btn-secondary:hover {
  background: var(--green-mid); border-color: var(--green-mid);
  transform: translateY(-2px);
}
.btn-outline-white {
  background: transparent; color: #fff;
  border-color: rgba(255,255,255,0.5);
}
.btn-outline-white:hover {
  background: rgba(255,255,255,0.15);
  border-color: #fff;
}
.btn-outline-green {
  background: transparent; color: var(--green-dark);
  border-color: var(--green-mid);
}
.btn-outline-green:hover {
  background: var(--green-pale);
}

/* ─── SECTION LABELS ─── */
.section-label {
  display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase; margin-bottom: 10px;
}
.section-label::before,
.section-label::after {
  content: ""; display: block;
  width: 22px; height: 1.5px; background: var(--gold);
}
.section-label.light { color: var(--gold-light); }
.section-label.light::before,
.section-label.light::after { background: var(--gold-light); }

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700; color: var(--green-dark);
  margin-bottom: 14px; line-height: 1.2;
}
.section-sub {
  font-size: 16px; color: var(--gray-text);
  max-width: 600px; line-height: 1.7;
}
.section-head {
  text-align: center; margin-bottom: 52px;
}
.section-head .section-sub {
  margin: 0 auto;
}

/* ─── TOPBAR ─── */
.bvv-topbar {
  background: var(--green-dark);
  color: rgba(255,255,255,0.85);
  font-size: 12.5px; padding: 7px 0;
  border-bottom: 2px solid var(--gold);
  position: relative; z-index: 1001;
}
.bvv-topbar .inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.topbar-left  { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.topbar-left a { color: rgba(255,255,255,0.8); }
.topbar-left a:hover { color: var(--gold-light); }
.topbar-right { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.topbar-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  color: #fff; font-size: 11px; transition: var(--transition);
}
.topbar-social a:hover { background: var(--gold); }

/* ─── HEADER / NAVIGATION ─── */
.bvv-header {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 999;
}
.bvv-header .header-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center;
  justify-content: space-between; gap: 24px; min-height: 78px;
}
.site-logo { display: flex; align-items: center; gap: 14px; }
.logo-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--green-mid); overflow: hidden;
  border: 3px solid var(--gold); flex-shrink: 0;
}
.logo-icon img { width: 100%; height: 100%; object-fit: cover; }
.logo-text h1 {
  font-family: var(--font-head); font-size: 20px;
  font-weight: 700; color: var(--green-dark);
  line-height: 1.1; letter-spacing: 0.2px;
  margin-bottom: 0;
}
.logo-text .tagline {
  font-size: 10.5px; color: var(--gold); font-weight: 600;
  letter-spacing: 1.4px; text-transform: uppercase; margin-top: 2px;
}

/* Navigation */
.main-nav { display: flex; align-items: center; gap: 2px; list-style: none; }
.main-nav > li {
  position: relative;
  list-style: none; /* see comment above .main-nav — this is the actual fix */
}
.main-nav > li::marker { content: none; }
.main-nav > li > a,
.main-nav > li > span {
  font-size: 13.5px; font-weight: 600; color: var(--green-dark);
  padding: 10px 13px; border-radius: 6px;
  display: block; white-space: nowrap;
  transition: var(--transition); cursor: pointer;
}
.main-nav > li > a:hover,
.main-nav > li:hover > span,
.main-nav > li > a.current-menu-item {
  background: var(--green-pale); color: var(--green-mid);
}
.main-nav > li > a.active { color: var(--gold); }

/* Dropdown */
.main-nav .sub-menu {
  position: absolute; top: calc(100% + 4px); left: 0;
  background: var(--white); border: 1px solid var(--gray-mid);
  border-radius: var(--radius-md); min-width: 200px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: var(--transition); z-index: 100;
  list-style: none;
}
.main-nav .sub-menu li { list-style: none; }
.main-nav li:hover .sub-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.main-nav .sub-menu li a {
  display: block; padding: 10px 18px; font-size: 13px;
  color: var(--dark); border-bottom: 1px solid var(--gray-mid);
  font-weight: 500;
}
.main-nav .sub-menu li:last-child a { border-bottom: none; }
.main-nav .sub-menu li a:hover {
  background: var(--green-pale); color: var(--green-mid);
}

/* Mobile hamburger */
.nav-toggle {
  display: none; background: none; border: none;
  font-size: 26px; color: var(--green-dark); cursor: pointer;
}

/* ─── MARQUEE ─── */
.bvv-marquee {
  background: var(--gold-pale);
  border-top: 1px solid #e8d8a0;
  border-bottom: 1px solid #e8d8a0;
  padding: 8px 0; overflow: hidden;
}
.marquee-inner { display: flex; align-items: center; }
.marquee-label {
  background: var(--gold); color: #fff;
  font-size: 11px; font-weight: 700;
  padding: 4px 14px; letter-spacing: 1px;
  text-transform: uppercase; white-space: nowrap;
  flex-shrink: 0; z-index: 1;
}
.marquee-track { overflow: hidden; flex: 1; }
.marquee-text {
  display: flex; gap: 48px;
  animation: bvvMarquee 32s linear infinite;
  white-space: nowrap;
}
.marquee-text span { font-size: 13px; color: var(--green-dark); font-weight: 600; }
.marquee-text span::before { content: "✦"; margin-right: 12px; color: var(--gold); }
@keyframes bvvMarquee {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* ─── HERO ─── */
.bvv-hero {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-mid) 55%, #1d6b45 100%);
  position: relative; overflow: hidden;
  min-height: 580px; display: flex; align-items: center;
}
.hero-pattern {
  position: absolute; inset: 0; opacity: 0.06;
  background-image: repeating-linear-gradient(
    45deg, rgba(255,255,255,0.5) 0px, rgba(255,255,255,0.5) 1px,
    transparent 1px, transparent 24px
  );
  pointer-events: none;
}
.hero-circle-1 {
  position: absolute; right: -100px; top: -100px;
  width: 500px; height: 500px; border-radius: 50%;
  background: rgba(200,146,42,0.15); pointer-events: none;
}
.hero-circle-2 {
  position: absolute; right: 80px; bottom: -80px;
  width: 300px; height: 300px; border-radius: 50%;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  pointer-events: none;
}
.hero-inner {
  max-width: 1200px; margin: 0 auto; padding: 60px 24px;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 48px; align-items: center; position: relative; z-index: 1;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(200,146,42,0.25);
  border: 1px solid rgba(200,146,42,0.5);
  color: var(--gold-light); font-size: 12px; font-weight: 700;
  padding: 6px 14px; border-radius: 20px;
  letter-spacing: 1px; text-transform: uppercase; margin-bottom: 20px;
}
.hero-title {
  font-family: var(--font-head); font-size: clamp(2rem, 5vw, 2.875rem);
  font-weight: 800; line-height: 1.12;
  margin-bottom: 16px; color: #fff;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.hero-title span { color: var(--gold-light); }
.hero-desc {
  font-size: 16px; line-height: 1.7;
  color: rgba(255,255,255,0.82);
  margin-bottom: 28px; max-width: 480px;
}
.hero-btns { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 36px; }
.hero-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.hero-stat { }
.hero-stat .num {
  font-family: var(--font-head); font-size: 32px;
  font-weight: 800; color: var(--gold-light);
}
.hero-stat .lbl {
  font-size: 11.5px; color: rgba(255,255,255,0.7);
  text-transform: uppercase; letter-spacing: 0.8px;
}
.hero-cards { display: flex; flex-direction: column; gap: 14px; }
.hero-card {
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-md); padding: 18px 22px;
  backdrop-filter: blur(4px); transition: var(--transition);
}
.hero-card:hover { transform: translateX(-4px); }
.hero-card .card-title {
  font-family: var(--font-head); font-size: 15px;
  font-weight: 600; color: var(--gold-light); margin-bottom: 5px;
}
.hero-card .card-desc {
  font-size: 13px; color: rgba(255,255,255,0.78); line-height: 1.5;
}

/* ─── NOTICE BOARD ─── */
.bvv-notices {
  background: var(--gold-pale);
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
  padding: 52px 0;
}
.notices-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 24px;
  display: grid; grid-template-columns: 280px 1fr;
  gap: 40px; align-items: start;
}
.notice-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 14px 0; border-bottom: 1px dashed #e8d8a0;
}
.notice-item:last-child { border-bottom: none; }
.notice-item-pinned { background: var(--gold-pale, #fdf6e3); border-radius: 8px; padding: 14px 12px; margin: 0 -12px; }
.notice-pin { margin-right: 4px; }
.notice-item-empty { padding: 24px 0; border-bottom: none; }
.notice-date {
  background: var(--gold); color: #fff; border-radius: var(--radius-sm);
  padding: 6px 10px; text-align: center; flex-shrink: 0; min-width: 52px;
}
.notice-date .day {
  font-family: var(--font-head); font-size: 22px;
  font-weight: 800; line-height: 1;
}
.notice-date .mon { font-size: 10px; text-transform: uppercase; letter-spacing: 0.8px; }
.notice-tag {
  font-size: 10.5px; font-weight: 700; padding: 2px 8px;
  border-radius: 10px; display: inline-block; margin-top: 4px;
}
.notice-tag.new   { background: #dcfce7; color: #15803d; }
.notice-tag.exam  { background: #fef9c3; color: #854d0e; }
.notice-tag.event { background: #dbeafe; color: #1d4ed8; }

/* ─── MESSAGE CARDS ─── */
.messages-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px;
}
.msg-card {
  background: var(--white); border-radius: 14px;
  border: 1px solid var(--gray-mid); overflow: hidden;
  box-shadow: var(--shadow-sm); transition: var(--transition);
}
.msg-card:hover {
  transform: translateY(-6px); box-shadow: var(--shadow-lg);
}
.msg-card-top {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  padding: 28px 24px 20px; position: relative; overflow: hidden;
}
.msg-avatar {
  width: 72px; height: 72px; border-radius: 50%;
  border: 3px solid var(--gold); overflow: hidden; margin-bottom: 12px;
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-card-top h3 {
  font-family: var(--font-head); font-size: 18px;
  color: #fff; margin-bottom: 3px;
}
.msg-card-top .role { font-size: 12px; color: var(--gold-light); font-weight: 600; }
.msg-body { padding: 22px 24px; }
.msg-body p {
  font-family: var(--font-alt); font-size: 15px;
  color: var(--gray-text); line-height: 1.75; font-style: italic;
}

/* ─── ABOUT ─── */
.about-section { background: var(--gray-light); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: center;
}
.about-visual {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  border-radius: var(--radius-lg); padding: 40px;
  position: relative; overflow: hidden;
}
.about-visual::before {
  content: "1972"; position: absolute; top: 16px; right: 20px;
  font-family: var(--font-head); font-size: 80px; font-weight: 800;
  color: rgba(255,255,255,0.06); line-height: 1;
}
.about-visual img {
  width: 100%; border-radius: var(--radius-md);
  object-fit: cover; height: 200px; margin-bottom: 20px;
}
.about-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.about-stat {
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-md); padding: 18px;
}
.about-stat .n {
  font-family: var(--font-head); font-size: 30px;
  font-weight: 800; color: var(--gold-light);
}
.about-stat .l {
  font-size: 12px; color: rgba(255,255,255,0.7);
  margin-top: 2px; text-transform: uppercase; letter-spacing: 0.6px;
}
.about-points { list-style: none; margin-top: 8px; }
.about-points li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px; color: var(--dark); padding: 8px 0;
  border-bottom: 1px solid var(--gray-mid);
}
.about-points li:last-child { border-bottom: none; }
.about-points .chk {
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-pale); color: var(--green-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; flex-shrink: 0; font-weight: 700;
}

/* ─── ACADEMICS ─── */
.academics-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.acad-card {
  background: var(--white); border-radius: 14px;
  border: 1px solid var(--gray-mid); overflow: hidden;
  transition: var(--transition);
}
.acad-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.acad-icon {
  width: 52px; height: 52px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: 14px;
}
.acad-icon.green { background: var(--green-pale); }
.acad-icon.gold  { background: var(--gold-pale); }
.acad-icon.blue  { background: #e8f4ff; }

/* ─── FACILITIES ─── */
.facilities-section { background: var(--green-dark); }
.facilities-section .section-title,
.facilities-section h2 { color: #fff; }
.facilities-section .section-sub { color: rgba(255,255,255,0.7); }
.facilities-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.fac-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius-md); padding: 28px 20px;
  text-align: center; transition: var(--transition);
}
.fac-card:hover {
  background: rgba(200,146,42,0.2); transform: translateY(-4px);
}
.fac-icon {
  width: 60px; height: 60px; border-radius: 50%;
  background: rgba(200,146,42,0.2);
  border: 1px solid rgba(200,146,42,0.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; margin: 0 auto 14px;
}
.fac-card h3 { font-family: var(--font-head); font-size: 16px; color: #fff; margin-bottom: 6px; }
.fac-card p  { font-size: 12.5px; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* ─── FEE TABLE ─── */
.fee-table-wrap { overflow-x: auto; margin-bottom: 24px; }
.fee-table { width: 100%; border-collapse: collapse; }
.fee-table th {
  background: var(--green-dark); color: #fff;
  padding: 12px 16px; font-family: var(--font-head);
  font-size: 14px; text-align: left;
}
.fee-table td { padding: 11px 16px; border-bottom: 1px solid var(--gray-mid); font-size: 14px; }
.fee-table tr:hover td { background: var(--green-pale); }

/* ─── CONTACT ─── */
.contact-section { background: var(--gray-light); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
.contact-item {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 0; border-bottom: 1px solid var(--gray-mid);
}
.contact-item:last-child { border-bottom: none; }
.contact-icon {
  width: 44px; height: 44px; border-radius: var(--radius-sm);
  background: var(--green-pale); display: flex;
  align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}
.map-wrap { border-radius: 14px; overflow: hidden; height: 320px; }
.map-wrap iframe { width: 100%; height: 100%; border: none; }

/* ─── FOOTER ─── */
.bvv-footer { background: var(--green-dark); color: rgba(255,255,255,0.8); }
.footer-top {
  padding: 60px 24px 40px; max-width: 1200px; margin: 0 auto;
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px;
}
.footer-col h4 {
  font-family: var(--font-head); font-size: 16px; font-weight: 600;
  color: #fff; margin-bottom: 16px; padding-bottom: 10px;
  border-bottom: 1px solid rgba(200,146,42,0.3);
}
.footer-col ul li { padding: 5px 0; font-size: 13.5px; }
.footer-col ul li a { color: rgba(255,255,255,0.65); }
.footer-col ul li a:hover { color: var(--gold-light); }
.footer-social { display: flex; gap: 10px; margin-top: 18px; }
.footer-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,0.1); color: #fff;
  font-size: 13px; transition: var(--transition);
}
.footer-social a:hover { background: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 18px 24px; max-width: 1200px; margin: 0 auto;
  display: flex; justify-content: space-between;
  align-items: center; flex-wrap: wrap; gap: 10px;
}
.footer-bottom p { font-size: 13px; color: rgba(255,255,255,0.5); }

/* ─── PAYMENT PORTAL ─── */
.payment-hero, .fees-hero, .page-hero {
  background: linear-gradient(135deg, var(--green-dark), var(--green-mid));
  padding: 60px 24px; text-align: center; color: #fff;
  position: relative; overflow: hidden;
}
.payment-card {
  background: var(--white); border-radius: 18px;
  box-shadow: var(--shadow-lg); overflow: hidden;
  display: grid; grid-template-columns: 340px 1fr;
  border: 1px solid var(--gray-mid);
}

/* ─── PINE LABS PAYMENT METHODS STRIP (Fix B) ─── */
.bvv-payment-methods {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  margin-top: 20px; padding: 14px 18px;
  background: var(--green-pale, #eef5ee); border-radius: 10px;
}
.bvv-pm-item { font-size: 13px; font-weight: 600; color: var(--green-dark); white-space: nowrap; }
.bvv-pm-secured {
  margin-left: auto; font-size: 12px; color: #666;
  display: flex; align-items: center; gap: 4px; white-space: nowrap;
}
.bvv-pm-secured strong { color: var(--green-dark); }

.bvv-upi-quickpay {
  margin-top: 16px; padding: 16px; border: 1px dashed var(--gold);
  border-radius: 10px; background: var(--gold-pale, #fdf6e3);
}
.bvv-upi-quickpay-label { font-size: 13px; color: #6b4a00; margin: 0 0 10px; }
.bvv-upi-app-row { display: flex; gap: 10px; flex-wrap: wrap; }
.bvv-upi-app-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--gray-mid);
  border-radius: 8px; padding: 8px 16px;
  font-size: 13px; font-weight: 600; color: var(--dark);
  cursor: pointer; transition: var(--transition);
}
.bvv-upi-app-btn:hover { border-color: var(--gold); background: var(--gold-pale, #fdf6e3); }

.payment-left {
  background: linear-gradient(160deg, var(--green-dark), var(--green-mid));
  padding: 40px 32px; color: #fff;
  display: flex; flex-direction: column; gap: 20px;
  align-items: center; text-align: center;
}
.pm-icon {
  background: var(--white); border-radius: 6px;
  padding: 6px 12px; font-size: 12px; font-weight: 700; color: var(--dark);
}
.payment-right { padding: 36px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label { font-size: 13px; font-weight: 600; color: var(--green-dark); }
.form-group input,
.form-group select,
.form-group textarea {
  border: 1.5px solid var(--gray-mid); border-radius: var(--radius-sm);
  padding: 11px 14px; font-size: 14px; color: var(--dark);
  background: var(--white); transition: var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none; border-color: var(--green-mid);
  box-shadow: 0 0 0 3px rgba(37,102,72,0.1);
}
.faq-item { border: 1px solid var(--gray-mid); border-radius: var(--radius-md); margin-bottom: 12px; overflow: hidden; }
.faq-q {
  padding: 16px 20px; font-weight: 600; font-size: 14.5px;
  color: var(--green-dark); cursor: pointer;
  display: flex; justify-content: space-between;
  align-items: center; background: var(--white);
}
.faq-q:hover, .faq-item.open .faq-q { background: var(--green-pale); }
.faq-a { padding: 0 20px 16px; font-size: 14px; color: var(--gray-text); line-height: 1.7; display: none; }
.faq-item.open .faq-a { display: block; }

/* ─── PORTAL / ERP ─── */
.portal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  z-index: 9999; display: flex; align-items: center;
  justify-content: center; backdrop-filter: blur(4px);
}
.portal-modal {
  background: var(--white); border-radius: 20px;
  padding: 40px; width: 90%; max-width: 440px;
  position: relative; box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  animation: slideUp 0.3s ease;
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.portal-tabs-btn {
  display: flex; border: 1.5px solid var(--green-mid);
  border-radius: var(--radius-md); overflow: hidden; margin-bottom: 24px;
}
.ptab {
  flex: 1; padding: 10px; font-size: 13px; font-weight: 600;
  color: var(--green-dark); background: var(--white);
  border: none; cursor: pointer; transition: var(--transition);
}
.ptab.active { background: var(--green-mid); color: #fff; }

/* ─── ADMISSION FORM ─── */
.adm-form {
  background: var(--white); border-radius: 18px;
  padding: 40px; box-shadow: var(--shadow-md);
  border: 1px solid var(--gray-mid); max-width: 800px; margin: 0 auto;
}
.adm-form h3 {
  font-family: var(--font-head); font-size: 22px;
  color: var(--green-dark); margin-bottom: 20px;
  padding-bottom: 12px; border-bottom: 2px solid var(--green-pale);
}
.adm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ─── RESPONSIVE ─── */

/* Global safety net (Fix D): prevents any fixed-width element from any
   section — including third-party Elementor content — from forcing
   horizontal scroll on narrow viewports. */
html, body { overflow-x: hidden; max-width: 100%; }

@media (max-width: 1024px) {
  .messages-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .payment-card { grid-template-columns: 1fr; }

  /* Fix D: header CTA/Portal button text was never given any mobile
     handling — on tablet widths the two full-text buttons plus the logo
     and hamburger were already tight. Trim padding/font before fully
     hiding text on phones below. */
  .header-cta, #portal-open-btn {
    padding: 8px 12px !important; font-size: 12px !important;
  }
}

@media (max-width: 768px) {
  section { padding: 48px 0; }
  .hero-inner, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .messages-grid, .academics-grid { grid-template-columns: 1fr; }
  .facilities-grid { grid-template-columns: 1fr 1fr; }
  .notices-inner { grid-template-columns: 1fr; }
  .form-grid, .adm-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 2rem; }

  /* Fix E/F: horizontal desktop nav / hamburger mobile nav.
     .main-nav itself is hidden and replaced by the toggle below; the
     dropdown position is now derived from the actual header height via a
     CSS variable set in header.php, instead of a hardcoded "top: 80px"
     that could mismatch whenever the topbar wraps to two lines on a very
     narrow phone (e.g. a long address + many social icons). */
  .main-nav { display: none; }
  .nav-toggle { display: block; }
  .main-nav.open {
    display: flex; flex-direction: column;
    position: fixed; top: var(--bvv-header-height, 80px); left: 0; right: 0;
    background: var(--white); padding: 16px;
    box-shadow: var(--shadow-lg); z-index: 1000;
    max-height: calc(100vh - var(--bvv-header-height, 80px));
    overflow-y: auto;
  }
  .main-nav.open > li { width: 100%; }
  .main-nav.open .sub-menu {
    position: static; box-shadow: none; padding-left: 16px;
    display: block; opacity: 1; visibility: visible; pointer-events: auto;
  }

  /* Fix D: header CTA/Portal buttons — collapse to icon-only on phones so
     they no longer compete for space with the logo and hamburger. The
     emoji icon (already in the button markup) is kept; the text label is
     visually hidden but stays in the DOM for screen readers. */
  .header-cta .btn-label-text, #portal-open-btn .btn-label-text { display: none; }
  .header-cta, #portal-open-btn {
    padding: 8px 10px !important; min-width: 40px; justify-content: center;
  }

  /* Fix: topbar overflow on mobile. .bvv-topbar .inner already wraps
     .topbar-left and .topbar-right onto separate lines via flex-wrap, but
     within .topbar-right the social icons + Admissions button had no room
     to breathe at phone widths. Tighten spacing and let it wrap too. */
  .bvv-topbar .inner { padding: 0 14px; gap: 8px; }
  .topbar-left { gap: 12px; font-size: 11.5px; }
  .topbar-right { gap: 8px; width: 100%; justify-content: space-between; }
  .topbar-social { gap: 6px; }
  .topbar-admit-btn { font-size: 11px !important; padding: 5px 10px !important; }

  /* Fix B responsive: payment method strip wraps cleanly instead of the
     "secured by" badge being pushed off to one side awkwardly. */
  .bvv-payment-methods { justify-content: flex-start; }
  .bvv-pm-secured { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
  .facilities-grid { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .hero-stats { gap: 16px; }

  /* Fix D: on very small phones, drop the header logo's tagline so the
     remaining space goes to the school name + the now icon-only buttons,
     instead of three competing text elements truncating awkwardly. */
  .logo-text .tagline { display: none; }
  .logo-icon { width: 46px; height: 46px; }

  .bvv-upi-app-row { flex-direction: column; }
  .bvv-upi-app-btn { width: 100%; justify-content: center; }

  /* Fix: on the narrowest phones, the topbar still has a lot competing for
     space — drop the email link (phone + WhatsApp already cover direct
     contact) and shrink the social icon circles so the row reliably fits
     without forcing a horizontal scrollbar. */
  .topbar-left a[href^="mailto:"] { display: none; }
  .topbar-left span { width: 100%; font-size: 11px; }
  .topbar-social a { width: 22px; height: 22px; }
  .topbar-admit-btn { font-size: 10.5px !important; padding: 4px 8px !important; }
}

/* ─── ELEMENTOR OVERRIDES ─── */
.elementor-section { padding: 0 !important; }
.elementor-widget-wrap { padding: 0 !important; }
.bvv-section-pad { padding: 72px 0; }

/* ─── WORDPRESS DEFAULTS ─── */
.wp-block-image img { border-radius: var(--radius-md); }
.aligncenter { margin: 0 auto; display: block; }
.alignright  { float: right; margin-left: 24px; }
.alignleft   { float: left;  margin-right: 24px; }

/* ─── ACCESSIBILITY ─── */
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ─── PRINT ─── */
@media print {
  .bvv-topbar, .bvv-header, .bvv-marquee,
  .bvv-footer, .nav-toggle, .portal-overlay { display: none !important; }
  body { font-size: 12pt; }
  .fee-table th { background: #333; }
}
