/**
 * Flagship Public School Website Stylesheet
 * Optimized for Indian K-12 Institutions (CBSE / ICSE / State Board)
 * 100% Mobile, Tablet & Desktop Responsive with Zero-Gap Polish
 */

:root {
  --ps-primary: #042f2e;
  --ps-accent: #0d9488;
  --ps-accent-light: #2dd4bf;
  --ps-secondary: #f59e0b;
  --ps-secondary-hover: #d97706;
  --ps-dark: #0f172a;
  --ps-gray: #64748b;
  --ps-light-bg: #f8fafc;
  --ps-card-bg: #ffffff;
  --ps-border: #e2e8f0;
  --ps-radius: 12px;
  --ps-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
  --ps-shadow-hover: 0 12px 30px rgba(13, 148, 136, 0.15);
}

/* Global Font & Resets */
body.public-school-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: #1e293b;
  background-color: #ffffff;
  line-height: 1.6;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* 1. Top Utility Header (Accreditation & Portals) */
.ps-topbar {
  background: #022c22;
  color: #e2e8f0;
  font-size: 0.8rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ps-topbar a {
  color: #cbd5e1;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.ps-topbar a:hover {
  color: #ffffff;
}

.ps-affiliation-pill {
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.2px;
  color: #fde68a;
}

.ps-portal-btn {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  margin-left: 6px;
  transition: all 0.2s ease;
}

.ps-portal-btn.btn-admin {
  background: #0d9488;
  color: #ffffff !important;
}

.ps-portal-btn.btn-admin:hover {
  background: #0f766e;
}

.ps-portal-btn.btn-teacher {
  background: #f59e0b;
  color: #0f172a !important;
}

.ps-portal-btn.btn-student {
  background: #2563eb;
  color: #ffffff !important;
}

/* 2. Main Sticky Navigation Bar */
.ps-navbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ps-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
  position: sticky;
  top: 0;
  z-index: 1050;
  transition: all 0.25s ease;
  padding: 10px 0;
}

.ps-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none !important;
  margin-right: 1.5rem;
  padding-right: 1.5rem;
  border-right: 1px solid #e2e8f0;
  flex-shrink: 0;
}

@media (max-width: 1199px) {
  .ps-brand {
    border-right: none;
    margin-right: 0;
    padding-right: 0;
  }
}

.ps-brand-logo {
  max-height: 48px;
  width: auto;
  object-fit: contain;
}

.ps-brand-crest {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #042f2e, #0d9488);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(13, 148, 136, 0.25);
  flex-shrink: 0;
}

.ps-brand-info {
  display: flex;
  flex-direction: column;
}

.ps-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
  line-height: 1.2;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.ps-brand-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  line-height: 1.25;
  max-width: 250px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.ps-nav-link {
  font-size: 0.86rem;
  font-weight: 600;
  color: #334155 !important;
  padding: 6px 11px !important;
  border-radius: 6px;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.ps-nav-link:hover {
  color: #0d9488 !important;
  background-color: rgba(13, 148, 136, 0.08);
}

.ps-nav-link.active {
  color: #0d9488 !important;
  background-color: rgba(13, 148, 136, 0.12);
  font-weight: 700;
}

.ps-btn-admission {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 7px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  text-decoration: none !important;
}

.ps-btn-admission:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

/* 3. Urgent Marquee Ticker */
.ps-ticker-wrap {
  background: #fffbeb;
  border-bottom: 1px solid #fde68a;
  padding: 8px 0;
  font-size: 0.84rem;
}

.ps-ticker-label {
  background: #f59e0b;
  color: #0f172a;
  font-weight: 800;
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 4px;
  margin-right: 12px;
  white-space: nowrap;
}

.ps-ticker-content a {
  color: #92400e;
  text-decoration: none;
  font-weight: 600;
  margin-right: 32px;
}

.ps-ticker-content a:hover {
  text-decoration: underline;
}

/* 4. Hero Carousel Banner */
.ps-hero-section {
  position: relative;
  background: #042f2e;
  overflow: hidden;
}

.ps-hero-slide {
  min-height: 520px;
  display: flex;
  align-items: center;
  position: relative;
  padding: 80px 0;
  color: #ffffff;
  background-size: cover;
  background-position: center;
}

.ps-hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(4, 47, 46, 0.94) 0%, rgba(4, 47, 46, 0.78) 55%, rgba(13, 148, 136, 0.5) 100%);
  z-index: 1;
}

.ps-hero-content {
  position: relative;
  z-index: 2;
  max-width: 680px;
}

.ps-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 158, 11, 0.2);
  border: 1px solid rgba(245, 158, 11, 0.5);
  color: #fde68a;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 30px;
  margin-bottom: 16px;
}

.ps-hero-title {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.ps-hero-title .highlight {
  color: #2dd4bf;
}

.ps-hero-subtitle {
  font-size: 1.1rem;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 28px;
}

.ps-hero-cta-btn {
  padding: 12px 28px;
  border-radius: 30px;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.ps-hero-cta-btn.btn-primary-hero {
  background: #2dd4bf;
  color: #042f2e;
}

.ps-hero-cta-btn.btn-primary-hero:hover {
  background: #14b8a6;
  transform: translateY(-2px);
}

.ps-hero-cta-btn.btn-secondary-hero {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.ps-hero-cta-btn.btn-secondary-hero:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* 5. Statistics Counters Bar */
.ps-stats-bar {
  background: #ffffff;
  border-bottom: 1px solid var(--ps-border);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
  padding: 30px 0;
  position: relative;
  z-index: 10;
}

.ps-stat-item {
  text-align: center;
  padding: 12px;
}

.ps-stat-number {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ps-accent);
  line-height: 1;
  margin-bottom: 4px;
}

.ps-stat-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* 6. Section Utilities */
.ps-section {
  padding: 70px 0;
}

.ps-section-gray {
  background-color: var(--ps-light-bg);
}

.ps-section-title {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--ps-dark);
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.ps-section-subtitle {
  font-size: 1rem;
  color: var(--ps-gray);
  max-width: 650px;
  margin: 0 auto 40px auto;
}

.ps-pill-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--ps-accent);
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

/* 7. Card Components */
.ps-card {
  background: #ffffff;
  border-radius: var(--ps-radius);
  border: 1px solid var(--ps-border);
  box-shadow: var(--ps-shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  overflow: hidden;
  height: 100%;
}

.ps-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--ps-shadow-hover);
  border-color: #99f6e4;
}

.ps-card-img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.ps-card-body {
  padding: 24px;
}

/* 8. Academic Wings (5+3+3+4) */
.ps-wing-card {
  border-radius: var(--ps-radius);
  border: 1px solid var(--ps-border);
  background: #ffffff;
  padding: 26px;
  transition: all 0.2s ease;
  box-shadow: var(--ps-shadow);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.ps-wing-card:hover {
  transform: translateY(-4px);
  border-color: var(--ps-accent);
  box-shadow: var(--ps-shadow-hover);
}

.ps-wing-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #ffffff;
  margin-bottom: 18px;
}

.wing-emerald { background: linear-gradient(135deg, #059669, #10b981); }
.wing-blue    { background: linear-gradient(135deg, #0284c7, #38bdf8); }
.wing-amber   { background: linear-gradient(135deg, #d97706, #f59e0b); }
.wing-purple  { background: linear-gradient(135deg, #7c3aed, #a78bfa); }

/* 9. Achievers Hall of Fame Card */
.ps-achiever-card {
  background: #ffffff;
  border-radius: var(--ps-radius);
  border: 1px solid var(--ps-border);
  padding: 24px;
  text-align: center;
  box-shadow: var(--ps-shadow);
  transition: all 0.2s ease;
}

.ps-achiever-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(16, 185, 129, 0.15);
  border-color: #86efac;
}

.ps-achiever-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #10b981;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
  margin: 0 auto 14px auto;
}

/* 10. Floating WhatsApp Widget */
.ps-whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25d366;
  color: #ffffff !important;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  z-index: 1040;
  text-decoration: none !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ps-whatsapp-float:hover {
  transform: scale(1.08);
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.55);
}

/* 11. Footer */
.ps-footer {
  background: #022c22;
  color: #cbd5e1;
  padding: 60px 0 20px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ps-footer h5 {
  color: #ffffff;
  font-weight: 700;
  font-size: 1.05rem;
  margin-bottom: 20px;
  position: relative;
}

.ps-footer h5::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 32px;
  height: 2px;
  background: #2dd4bf;
  border-radius: 2px;
}

.ps-footer a {
  color: #94a3b8;
  text-decoration: none !important;
  transition: color 0.15s ease, padding-left 0.15s ease;
}

.ps-footer a:hover {
  color: #2dd4bf;
  padding-left: 4px;
}

.ps-footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  margin-top: 40px;
  font-size: 0.8rem;
  color: #64748b;
}

/* 12. Mobile & Responsive Setup */
@media (max-width: 991.98px) {
  .ps-hero-title {
    font-size: 2.2rem;
  }
  .ps-hero-slide {
    min-height: 420px;
    padding: 60px 0;
  }
  .ps-topbar .container {
    flex-direction: column;
    gap: 6px;
    text-align: center;
  }
  .ps-stat-item {
    margin-bottom: 20px;
  }
}

@media (max-width: 575.98px) {
  .ps-hero-title {
    font-size: 1.85rem;
  }
  .ps-hero-cta-btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 10px;
  }
  .ps-brand-title {
    font-size: 1.05rem;
  }
}

/* Laptops (1200–1439px): the full menu, school name and admission button must fit on one line. */
@media (min-width: 1200px) and (max-width: 1439.98px) {
  .ps-navbar .container, .ps-navbar .container-fluid { flex-wrap: nowrap; }
  .ps-navbar .navbar-collapse { min-width: 0; }
  .ps-brand { flex-shrink: 1; min-width: 0; margin-right: .75rem; padding-right: .75rem; }
  .ps-brand-info { min-width: 0; }
  .ps-brand-title { font-size: 1rem; max-width: 240px; overflow: hidden; text-overflow: ellipsis; }
  .ps-brand-subtitle { display: none; }
  .ps-nav-link { font-size: .8rem; padding: 6px 7px !important; }
  .ps-btn-admission { font-size: .78rem; padding: 6px 12px; }
  .ps-navbar .navbar-nav .nav-item.ml-xl-3 { margin-left: .5rem !important; }
}
