/* ==========================================================================
   Shoba Day Care & Pre-School - Responsive Design System
   Optimized for: Mobiles (320px–480px), Phablets (481px–600px),
   iPads & Tablets (601px–1024px), Laptops & Desktops (1025px+)
   ========================================================================== */

:root {
  /* Color Palette - Inspired by School Entrance & SmartStart */
  --primary: #ff6b4a;        /* Warm coral-red */
  --primary-dark: #e04f2d;
  --secondary: #00a8cc;      /* Sky cyan-turquoise */
  --secondary-dark: #00829f;
  --accent-yellow: #ffc837;  /* Sunshine yellow */
  --accent-purple: #6a1b9a;  /* SmartStart brand purple */
  --purple-light: #f3e8fa;
  --whatsapp-green: #25d366;
  --whatsapp-dark: #128c7e;

  /* Neutrals */
  --dark-text: #1e293b;
  --light-text: #64748b;
  --bg-cream: #fdfaf6;
  --white: #ffffff;
  --border-color: #e2e8f0;
  --card-bg: #ffffff;

  /* Shadows & Elevations */
  --card-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.05), 0 2px 6px -1px rgba(0, 0, 0, 0.02);
  --hover-shadow: 0 12px 28px -4px rgba(0, 0, 0, 0.1);
  --bottom-bar-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);

  /* Border Radii */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-pill: 9999px;

  /* Touch Target Standard */
  --min-touch-target: 48px;
}

/* Base Reset & Typography */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

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

body {
  font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--dark-text);
  background-color: var(--bg-cream);
  line-height: 1.6;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

/* Fluid Heading Typography using clamp() */
h1, .brand-title {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(1.75rem, 4vw + 0.5rem, 2.6rem);
  line-height: 1.2;
  letter-spacing: 0.3px;
}

h2 {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(1.4rem, 3vw + 0.3rem, 2.2rem);
  line-height: 1.25;
}

h3 {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(1.15rem, 2vw + 0.2rem, 1.5rem);
  line-height: 1.3;
}

h4 {
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: 1.05rem;
}

p {
  font-size: clamp(0.92rem, 1vw + 0.5rem, 1.05rem);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* ==========================================================================
   Header & Top Announcement Bar
   ========================================================================== */
.top-bar {
  background: linear-gradient(90deg, #0f172a, #1e293b);
  color: #e2e8f0;
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  border-bottom: 2px solid var(--accent-yellow);
}

.top-bar-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.top-bar-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-info span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.top-bar-links {
  display: flex;
  align-items: center;
  gap: 15px;
}

.top-bar-links a {
  color: var(--accent-yellow);
  font-weight: 700;
}

.top-bar-links a:hover {
  text-decoration: underline;
}

/* Main Brand Header */
.header-main {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-top {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
}

.logo-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-icon {
  width: 48px;
  height: 48px;
  min-width: 48px;
  background: linear-gradient(135deg, var(--primary), var(--accent-yellow));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 1.6rem;
  font-weight: bold;
  box-shadow: 0 4px 10px rgba(255, 107, 74, 0.3);
}

.logo-text h1 {
  font-size: clamp(1.25rem, 2.5vw, 1.55rem);
  color: var(--primary-dark);
  line-height: 1.05;
}

.logo-text span {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-purple);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  display: block;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   TABS NAVIGATION (Optimized with Swipeable Scroll on Mobile & iPad)
   ========================================================================== */
.tabs-nav-bar {
  background: #f8fafc;
  border-top: 1px solid var(--border-color);
  border-bottom: 2px solid var(--border-color);
  position: relative;
}

/* Visual fade cues on mobile to indicate horizontal swipe */
.tabs-nav-bar::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 25px;
  background: linear-gradient(to right, rgba(248, 250, 252, 0), rgba(248, 250, 252, 1));
  pointer-events: none;
}

.tabs-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  scroll-snap-type: x mandatory;
}

.tabs-nav-container::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: var(--min-touch-target);
  font-family: 'Fredoka', cursive, sans-serif;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  font-weight: 600;
  color: #64748b;
  background: transparent;
  border-top: 4px solid transparent;
  border-bottom: none;
  transition: all 0.2s ease;
  white-space: nowrap;
  scroll-snap-align: start;
  flex-shrink: 0;
}

.nav-tab:hover {
  color: var(--primary);
  background: rgba(255, 107, 74, 0.05);
}

.nav-tab.active {
  color: var(--primary-dark);
  background: var(--white);
  border-top: 4px solid var(--primary);
  border-left: 1px solid var(--border-color);
  border-right: 1px solid var(--border-color);
  font-weight: 700;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.03);
}

.nav-tab .tab-icon {
  font-size: 1.15rem;
}

/* ==========================================================================
   Buttons & Interactive Elements (Touch Targets >= 48px)
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  min-height: var(--min-touch-target);
  font-weight: 700;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.98rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  border: none;
  white-space: nowrap;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(255, 107, 74, 0.28);
}

.btn-primary:hover, .btn-primary:active {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(255, 107, 74, 0.38);
}

.btn-whatsapp {
  background: var(--whatsapp-green);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.28);
}

.btn-whatsapp:hover, .btn-whatsapp:active {
  background: #20bd5a;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(37, 211, 102, 0.38);
}

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

.btn-secondary:hover, .btn-secondary:active {
  background: var(--secondary-dark);
  transform: translateY(-2px);
}

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

.btn-outline:hover, .btn-outline:active {
  background: var(--primary);
  color: var(--white);
}

/* ==========================================================================
   Page Banners & Layouts
   ========================================================================== */
.page-banner {
  background: linear-gradient(135deg, #fff7ed 0%, #f0fdfa 100%);
  padding: clamp(30px, 5vw, 55px) 20px;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.page-banner-container {
  max-width: 850px;
  margin: 0 auto;
}

.page-tag {
  display: inline-block;
  background: var(--purple-light);
  color: var(--accent-purple);
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  font-weight: 800;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin-bottom: 12px;
}

.content-wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding: clamp(35px, 6vw, 65px) 20px;
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto clamp(25px, 4vw, 45px);
}

.section-header .tag {
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--primary);
  margin-bottom: 6px;
  display: inline-block;
}

.section-header h2 {
  color: #1e293b;
  margin-bottom: 10px;
}

.section-header p {
  color: var(--light-text);
}

/* ==========================================================================
   Responsive Grids (Auto-Adapting to Mobile, Tablet/iPad & Laptop)
   ========================================================================== */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 3vw, 35px);
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(18px, 2.5vw, 25px);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(16px, 2vw, 22px);
}

.content-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: clamp(20px, 3.5vw, 32px);
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

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

/* SmartStart Callout */
.smartstart-callout {
  background: linear-gradient(135deg, var(--accent-purple), #4a148c);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(25px, 4.5vw, 42px);
  margin: clamp(30px, 4vw, 45px) 0;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 25px;
  align-items: center;
  box-shadow: var(--card-shadow);
}

.smartstart-callout h3 {
  color: var(--accent-yellow);
  margin-bottom: 10px;
}

.smartstart-callout p {
  opacity: 0.95;
  margin-bottom: 16px;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 0.8rem;
}

.badge-blue { background: #e0f2fe; color: #0369a1; }
.badge-orange { background: #ffedd5; color: #c2410c; }
.badge-purple { background: var(--purple-light); color: var(--accent-purple); }
.badge-green { background: #dcfce7; color: #15803d; }

/* Responsive Table */
.custom-table-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  border: 1px solid var(--border-color);
  margin-bottom: 30px;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.custom-table {
  width: 100%;
  min-width: 550px; /* guarantees readable columns on small mobile without squishing */
  border-collapse: collapse;
  text-align: left;
}

.custom-table th {
  background: #1e293b;
  color: var(--white);
  padding: 14px 18px;
  font-family: 'Fredoka', sans-serif;
  font-size: 0.98rem;
}

.custom-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.92rem;
}

.custom-table tr:last-child td {
  border-bottom: none;
}

.custom-table tr:nth-child(even) {
  background-color: #f8fafc;
}

/* FAQ Accordion */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 850px;
  margin: 0 auto;
}

.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.faq-question {
  width: 100%;
  text-align: left;
  padding: 16px 20px;
  min-height: var(--min-touch-target);
  background: var(--white);
  border: none;
  font-family: 'Fredoka', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.faq-question:hover {
  background: #f8fafc;
}

.faq-answer {
  display: none;
  padding: 0 20px 18px;
  color: var(--light-text);
  font-size: 0.95rem;
  border-top: 1px dashed var(--border-color);
  padding-top: 14px;
}

.faq-item.active .faq-answer {
  display: block;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.faq-toggle {
  font-size: 1.3rem;
  color: var(--primary);
  transition: transform 0.2s ease;
  flex-shrink: 0;
}

/* ==========================================================================
   Sticky Mobile Quick-Action Bottom Bar (Mobiles & Small Tablets)
   ========================================================================== */
.mobile-bottom-bar {
  display: none; /* hidden on laptops/desktops */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: var(--bottom-bar-shadow);
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
  z-index: 1001;
}

.mobile-bottom-container {
  max-width: 600px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.mobile-bottom-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  min-height: 46px;
  border-radius: var(--radius-pill);
  font-family: 'Fredoka', sans-serif;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.mobile-btn-call {
  background: #f1f5f9;
  color: #1e293b;
  border: 1px solid #cbd5e1;
}

.mobile-btn-wa {
  background: var(--whatsapp-green);
  color: var(--white);
  box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background: #0f172a;
  color: #94a3b8;
  padding: clamp(40px, 5vw, 60px) 20px 25px;
  margin-top: 50px;
}

.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: clamp(20px, 3vw, 35px);
  padding-bottom: 35px;
  border-bottom: 1px solid #334155;
}

.footer-brand h2 {
  color: var(--white);
  font-size: 1.45rem;
  margin-bottom: 12px;
}

.footer-brand p {
  font-size: 0.9rem;
  line-height: 1.6;
  max-width: 320px;
}

.footer-col h4 {
  color: var(--white);
  font-size: 1.05rem;
  margin-bottom: 14px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-bottom {
  max-width: 1200px;
  margin: 22px auto 0;
  text-align: center;
  font-size: 0.85rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ==========================================================================
   DEVICE-SPECIFIC MEDIA QUERIES
   ========================================================================== */

/* LAPTOPS & DESKTOPS (1025px and up) */
@media (min-width: 1025px) {
  .hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: center;
  }
}

/* IPADS & TABLETS (Landscape & Portrait: 768px to 1024px) */
@media (max-width: 1024px) {
  .hero-container {
    grid-template-columns: 1fr;
    gap: 35px;
  }
  .smartstart-callout {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .footer-container {
    grid-template-columns: 1.5fr 1fr 1fr;
  }
  .grid-2 {
    gap: 24px;
  }
}

/* PHABLETS & LARGE PHONES (601px to 767px) */
@media (max-width: 767px) {
  /* Add bottom padding so fixed mobile bar doesn't obscure content */
  body {
    padding-bottom: 70px;
  }

  .mobile-bottom-bar {
    display: block;
  }

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

  .footer-container {
    grid-template-columns: 1fr 1fr;
  }

  .header-top {
    flex-direction: row;
    justify-content: space-between;
  }

  .header-actions .btn-outline {
    display: none; /* keep header light on mobile, available via sticky bottom bar */
  }

  .top-bar-info span:nth-child(2) {
    display: none; /* hide secondary info on small screens */
  }
}

/* MOBILE PHONES (320px to 600px, e.g. iPhone SE, iPhone 15, Galaxy A26) */
@media (max-width: 600px) {
  .top-bar-container {
    justify-content: center;
    text-align: center;
  }
  
  .top-bar-links {
    display: none; /* provided by sticky bottom bar */
  }

  .header-top {
    padding: 10px 14px 6px;
  }

  .logo-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    font-size: 1.4rem;
  }

  .header-actions .btn {
    padding: 8px 14px;
    font-size: 0.88rem;
    min-height: 40px;
  }

  .nav-tab {
    padding: 10px 14px;
    font-size: 0.92rem;
  }

  .hero-cta {
    flex-direction: column;
    width: 100%;
  }

  .hero-cta .btn {
    width: 100%;
  }

  .hero-stat-row {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px;
    text-align: center;
  }

  .footer-container {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}
