/* ========================================
   RUDRA THE PRACTICAL SCHOOL
   Global Design System
   ======================================== */

/* ===== Google Fonts preloaded in head.ejs ===== */

/* ===== CSS Custom Properties ===== */
:root {
  /* Primary Colors */
  --green-primary: #1a5632;
  --green-dark: #0f3d22;
  --green-darker: #0a2b18;
  --green-light: #2d7a4a;
  --green-lighter: #e8f5e9;
  --green-pale: #f0f9f2;

  /* Accent Colors */
  --gold: #c9a84c;
  --gold-light: #e8d48b;
  --orange-accent: #e67e22;
  --red-accent: #e74c3c;

  /* Neutrals */
  --white: #ffffff;
  --off-white: #f8f9fa;
  --gray-50: #f5f5f5;
  --gray-100: #eeeeee;
  --gray-200: #e0e0e0;
  --gray-300: #bdbdbd;
  --gray-400: #9e9e9e;
  --gray-500: #757575;
  --gray-600: #616161;
  --gray-700: #424242;
  --gray-800: #2c2c2c;
  --gray-900: #1a1a1a;

  /* Typography */
  --font-primary: 'Poppins', sans-serif;
  --font-heading: 'Playfair Display', serif;

  /* Font Sizes - Fluid Responsive Scaling */
  --text-xs: clamp(0.7rem, 2vw, 0.75rem);
  --text-sm: clamp(0.8rem, 2.2vw, 0.875rem);
  --text-base: clamp(0.9rem, 2.5vw, 1rem);
  --text-lg: clamp(1rem, 2.8vw, 1.125rem);
  --text-xl: clamp(1.1rem, 3.2vw, 1.25rem);
  --text-2xl: clamp(1.25rem, 3.8vw, 1.5rem);
  --text-3xl: clamp(1.4rem, 4.5vw, 1.875rem);
  --text-4xl: clamp(1.65rem, 5.5vw, 2.25rem);
  --text-5xl: clamp(1.9rem, 6.8vw, 3rem);
  --text-6xl: clamp(2.2rem, 8vw, 3.75rem);

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --space-24: 6rem;

  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px rgba(0, 0, 0, 0.15);
  --shadow-green: 0 4px 14px rgba(26, 86, 50, 0.15);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-base: 300ms ease;
  --transition-slow: 500ms ease;

  /* Container & Layout */
  --container-max: 1320px;
  --container-padding: 1.5rem;
  --header-height: 80px;
  --topbar-height: 40px;
  --mobile-bottom-bar-height: 60px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  max-width: 100%;
  overflow-x: clip;
}

body {
  font-family: var(--font-primary);
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--gray-800);
  background-color: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  max-width: 100%;
  overflow-x: clip;
  position: relative;
}

/* Responsive media containment */
img, svg, video, canvas, audio, iframe, embed, object {
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

/* Touch controls & iOS auto-zoom prevention */
input, select, textarea, button {
  font-family: inherit;
  font-size: 16px; /* iOS Safari auto-zoom prevention */
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul, ol {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  outline: none;
  border: none;
}

button {
  cursor: pointer;
  background: none;
}

/* ===== Selection ===== */
::selection {
  background-color: var(--green-primary);
  color: var(--white);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--green-primary);
  border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-dark);
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--gray-900);
}

h1 { font-size: var(--text-5xl); }
h2 { font-size: var(--text-4xl); }
h3 { font-size: var(--text-3xl); }
h4 { font-size: var(--text-2xl); }
h5 { font-size: var(--text-xl); }
h6 { font-size: var(--text-lg); }

p {
  margin-bottom: var(--space-4);
  color: var(--gray-600);
}

/* ===== Container ===== */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

/* ===== Section ===== */
.section {
  padding: var(--space-20) 0;
}

.section-sm {
  padding: var(--space-12) 0;
}

.section-lg {
  padding: var(--space-24) 0;
}

/* ===== Section Header ===== */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--green-primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: var(--space-3);
}

.section-label::before {
  content: '';
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--green-primary);
  border-radius: 2px;
  transform: rotate(45deg);
}

.section-title {
  font-size: var(--text-4xl);
  color: var(--gray-900);
  margin-bottom: var(--space-4);
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--gray-500);
  max-width: 600px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 12px 28px;
  font-family: var(--font-primary);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  cursor: pointer;
  white-space: nowrap;
}

.btn-primary {
  background: var(--green-primary);
  color: var(--white);
  border: 2px solid var(--green-primary);
}

.btn-primary:hover {
  background: var(--green-dark);
  border-color: var(--green-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-green);
}

.btn-outline {
  background: transparent;
  color: var(--gray-800);
  border: 2px solid var(--gray-300);
}

.btn-outline:hover {
  border-color: var(--green-primary);
  color: var(--green-primary);
  transform: translateY(-2px);
}

.btn-white {
  background: var(--white);
  color: var(--green-primary);
  border: 2px solid var(--white);
}

.btn-white:hover {
  background: transparent;
  color: var(--white);
}

.btn-sm {
  padding: 8px 20px;
  font-size: var(--text-xs);
}

.btn-lg {
  padding: 16px 36px;
  font-size: var(--text-base);
}

.btn i {
  font-size: 0.85em;
  transition: transform var(--transition-fast);
}

.btn:hover i {
  transform: translateX(3px);
}

/* ===== Cards ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-base);
  box-shadow: var(--shadow-sm);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
}

.card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  background: var(--gray-100);
}

.card-body {
  padding: var(--space-6);
}

.card-title {
  font-size: var(--text-xl);
  margin-bottom: var(--space-2);
}

.card-text {
  font-size: var(--text-sm);
  color: var(--gray-500);
}

/* ===== Badge ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 16px;
  font-size: var(--text-xs);
  font-weight: 600;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-green {
  background: var(--green-lighter);
  color: var(--green-primary);
}

.badge-gold {
  background: rgba(201, 168, 76, 0.15);
  color: var(--gold);
}

/* ===== Placeholder Image ===== */
.placeholder-img {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--green-lighter) 0%, var(--gray-100) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  font-size: var(--text-sm);
  font-weight: 500;
}

.placeholder-img i {
  font-size: 2rem;
  margin-bottom: var(--space-2);
  opacity: 0.5;
}

/* ===== Grid Utilities ===== */
.grid {
  display: grid;
  gap: var(--space-6);
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

/* ===== Flex Utilities ===== */
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }

/* ===== Text Utilities ===== */
.text-center { text-align: center; }
.text-green { color: var(--green-primary); }
.text-gold { color: var(--gold); }
.text-white { color: var(--white); }
.text-muted { color: var(--gray-500); }
.font-heading { font-family: var(--font-heading); }
.fw-400 { font-weight: 400; }
.fw-500 { font-weight: 500; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

/* ===== Spacing Utilities ===== */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }

/* ===== Scroll Animations ===== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1), transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible,
.animate-on-scroll.animated {
  opacity: 1 !important;
  transform: translateY(0) !important;
}

.animate-delay-1 { transition-delay: 0.1s; }
.animate-delay-2 { transition-delay: 0.2s; }
.animate-delay-3 { transition-delay: 0.3s; }
.animate-delay-4 { transition-delay: 0.4s; }

/* ===== Page Banner ===== */
.page-banner {
  background: linear-gradient(135deg, var(--green-dark) 0%, var(--green-primary) 50%, var(--green-light) 100%);
  padding: var(--space-20) 0 var(--space-16);
  position: relative;
  overflow: hidden;
}

.page-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.page-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -5%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 70%);
  border-radius: 50%;
}

.page-banner .container {
  position: relative;
  z-index: 1;
}

.page-banner-title {
  font-size: var(--text-5xl);
  color: var(--white);
  margin-bottom: var(--space-4);
}

.page-banner-subtitle {
  font-size: var(--text-lg);
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
}

.page-banner .breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, 0.7);
}

.page-banner .breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
}

.page-banner .breadcrumb a:hover {
  color: var(--white);
}

.page-banner .breadcrumb .separator {
  font-size: 0.7em;
}

.page-banner .breadcrumb .current {
  color: var(--gold-light);
}

/* ===== Responsive Tables ===== */
.table-responsive {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: var(--space-6);
  border-radius: var(--radius-lg);
}

/* ===== Responsive ===== */

@media (max-width: 1200px) {
  :root {
    --text-5xl: 2.5rem;
    --text-4xl: 2rem;
    --text-3xl: 1.5rem;
  }
}

@media (max-width: 992px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-5 { grid-template-columns: repeat(3, 1fr); }

  .section {
    padding: var(--space-16) 0;
  }
}

@media (max-width: 768px) {
  :root {
    --text-5xl: 2rem;
    --text-4xl: 1.75rem;
    --text-3xl: 1.375rem;
    --container-padding: 1rem;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .grid-4 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }

  .section {
    padding: var(--space-12) 0;
  }

  .page-banner {
    padding: var(--space-16) 0 var(--space-12);
  }

  .page-banner-title {
    font-size: var(--text-3xl);
  }
}

@media (max-width: 480px) {
  :root {
    --container-padding: 0.85rem;
  }

  .grid-5 { grid-template-columns: 1fr; }

  .btn {
    padding: 10px 20px;
    min-height: 44px;
  }
}

/* ===== Mobile Sticky Bottom Quick-Action Bar ===== */
.mobile-bottom-bar {
  display: none;
}

@media (max-width: 768px) {
  body {
    padding-bottom: calc(var(--mobile-bottom-bar-height) + var(--safe-area-bottom));
  }

  .mobile-bottom-bar {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: calc(var(--mobile-bottom-bar-height) + var(--safe-area-bottom));
    padding-bottom: var(--safe-area-bottom);
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 990;
    align-items: center;
    justify-content: space-around;
  }

  .mobile-bar-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1;
    height: 100%;
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.72rem;
    font-weight: 600;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: color 0.15s;
    touch-action: manipulation;
  }

  .mobile-bar-btn.primary-action {
    color: #15803d;
  }

  .mobile-bar-btn svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
  }

  .mobile-bar-btn:active {
    background: #f8fafc;
    color: var(--green-primary);
  }
}


/* ========================================
   120 FPS ULTRA-SMOOTH HARDWARE ACCELERATION
   ======================================== */
:root {
  --ease-120fps: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Hardware accelerated elements for 120 FPS buttery-smooth rendering */
.card,
.btn,
.nav-link,
.enquiry-btn,
.stat-card,
.facility-card,
.wing-card,
.photo-card,
.feature-card,
.calendar-day,
.live-chat-toggle,
.live-chat-modal {
  transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  perspective: 1000px;
}

/* High-framerate micro-interactions */
.btn {
  transition: transform 0.2s var(--ease-120fps), box-shadow 0.2s var(--ease-120fps), background-color 0.15s ease !important;
}

.btn:active {
  transform: scale(0.97) translate3d(0, 0, 0) !important;
}

/* Card hover transitions without layout thrashing */
.card,
.wing-card,
.facility-card,
.stat-card,
.photo-card {
  transition: transform 0.3s var(--ease-120fps), box-shadow 0.3s var(--ease-120fps);
}

.card:hover,
.wing-card:hover,
.facility-card:hover,
.stat-card:hover {
  will-change: transform, box-shadow;
}

/* Zero Jank Custom Scrollbar */
::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: #f8fafc;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
  border: 2px solid #f8fafc;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--green-primary);
}

/* ============================================================
   CRITICAL HERO STYLES (Guarantees zero-FOUC & instant crisp rendering)
   ============================================================ */
.hero-section {
  padding: 24px 0 40px;
  background: #f8faf9;
  position: relative;
}

.hero-outer-container {
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 20px;
}

.hero-card-banner {
  position: relative;
  border-radius: 32px;
  min-height: 600px;
  background-color: #072c21;
  background-repeat: no-repeat;
  background-position: center right;
  background-size: cover;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
  color: #ffffff;
}

.hero-bg-overlay {
  position: absolute;
  inset: 0;
  border-radius: 32px;
  background: linear-gradient(90deg, rgba(7, 44, 33, 0.96) 0%, rgba(7, 44, 33, 0.90) 35%, rgba(7, 44, 33, 0.50) 62%, rgba(7, 44, 33, 0.05) 86%);
  z-index: 1;
  pointer-events: none;
}

.hero-main-content {
  position: relative;
  z-index: 2;
  padding: 50px 56px 90px;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 40px;
  align-items: flex-start;
}

.hero-left-column {
  color: #ffffff;
}

.hero-main-title {
  font-family: var(--font-heading, 'Playfair Display', serif);
  font-size: 3.4rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  margin-bottom: 14px;
}

.hero-main-title .text-mint {
  color: #4ade80;
}

.hero-subtitle {
  font-size: 1.18rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 18px;
}

.hero-text-desc {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.86);
  max-width: 500px;
  margin-bottom: 30px;
}

