
/* =======================
   SAIFA Professional Polish
   ======================= */
:root{
  --brand:#006EE6;
  --brand-2:#00B4D8;
  --radius:16px;
  --radius-pill:999px;
  --shadow:0 6px 22px rgba(0,0,0,.08);
  --shadow-lg:0 12px 40px rgba(0,0,0,.12);
  --ring:0 0 0 4px rgba(0,110,230,.2);
}

html{scroll-behavior:smooth}
body{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
.container{max-width:1140px}

/* Navbar */
.navbar.sticky-top{background:rgba(255,255,255,.88)!important; backdrop-filter:blur(8px); border-bottom:1px solid rgba(0,0,0,.06)!important}
.navbar-brand{font-weight:800;letter-spacing:.2px}
.navbar .nav-link{font-weight:600; color:#222!important; opacity:.85; position:relative; padding:.75rem 1rem}
.navbar .nav-link:hover,.navbar .nav-link:focus{opacity:1}
.navbar .nav-link.active{opacity:1}
.navbar .nav-link.active::after,.navbar .nav-link:hover::after{content:''; position:absolute; left:1rem; right:1rem; bottom:.35rem; height:3px; border-radius:2px; background:linear-gradient(90deg,var(--brand),var(--brand-2))}

/* Buttons */
.btn{border-radius:12px; font-weight:700; letter-spacing:.2px; transition:transform .18s ease, box-shadow .18s ease, background-color .18s ease, color .18s ease}
.btn:active{transform:translateY(1px)}
.btn:focus-visible{box-shadow:var(--ring)!important; outline:none}
.btn-cta{border-radius:var(--radius-pill); background:linear-gradient(135deg,var(--brand),var(--brand-2)); color:#fff; border:0; box-shadow:0 6px 16px rgba(0,110,230,.25); padding:.55rem 1rem}
.btn-cta:hover{filter:brightness(1.05); box-shadow:0 8px 20px rgba(0,110,230,.3); color:#fff}

/* Hero video contained */
.hero{position:relative; min-height:78vh; display:flex; align-items:center; padding-top:4rem; padding-bottom:4rem; overflow:hidden; border-bottom-left-radius:24px; border-bottom-right-radius:24px}
.hero .container{position:relative; z-index:2}
.hero-bg{position:absolute; inset:0; z-index:0; overflow:hidden}
.hero-bg video{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:brightness(.9); will-change:transform; transform:translateZ(0); backface-visibility:hidden; pointer-events:none}
.hero-overlay{position:absolute; inset:0; z-index:1; background:linear-gradient(180deg, rgba(0,0,0,.35) 0%, rgba(0,0,0,.25) 45%, rgba(0,0,0,.55) 100%)}
.hero-audio{position:absolute; right:18px; bottom:18px; z-index:3; display:flex; align-items:center; gap:.5rem; background:rgba(0,0,0,.6); color:#fff; border:0; border-radius:999px; padding:.6rem .9rem; font-weight:600; backdrop-filter: blur(2px)}
.hero-audio .state{font-size:.9rem; opacity:.9}
.hero-audio:hover{background:rgba(0,0,0,.75)}

/* Cards & visuals */
.card{border-radius:var(--radius); border:1px solid rgba(0,0,0,.06); box-shadow:var(--shadow)}
.card.card-premium{box-shadow:var(--shadow-lg)}
.card:hover{transform:translateY(-1px); box-shadow:0 8px 24px rgba(0,0,0,.12)}
.badge-soft{background:rgba(0,110,230,.08); color:#08448f; border-radius:999px; padding:.45em .8em; font-weight:700}

/* Forms */
.form-control, .form-select{border-radius:12px; border-color:rgba(0,0,0,.12); padding:.6rem .8rem}
.form-control:focus, .form-select:focus{border-color:var(--brand); box-shadow:var(--ring)}

/* Tables */
.table thead th{background:#f6f7fb; font-weight:800}
.table tbody tr:hover{background:#fafbff}

/* Mobile video: keep video ON (plays inline) */
@media (max-width: 768px){
  .hero{min-height:62vh; border-bottom-left-radius:16px; border-bottom-right-radius:16px}
  .hero-bg video{display:block; object-position:center center}
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .hero-bg video{display:none!important}
}



/* Mobile: show full video (letterboxed), use safe viewport height */
@media (max-width: 768px){
  .hero{min-height:100svh; height:100svh; border-bottom-left-radius:16px; border-bottom-right-radius:16px}
  .hero-bg{background:linear-gradient(180deg,#E6F3FF 0%, #F0FAFF 100%);}
  .hero-bg video{
    display:block !important;
    width:100%; height:100%;
    object-fit:contain !important;
    object-position:center center;
  }
}




/* ===== Mobile Scaling & Integrated Hero Background Enhancements ===== */

/* Fluid type scale */
:root{
  --fs-hero-title: clamp(26px, 5.6vw, 36px);
  --fs-hero-lead: clamp(15px, 3.8vw, 18px);
}
.hero .display-5, .hero h1{font-size:var(--fs-hero-title) !important; line-height:1.12}
.hero .lead{font-size:var(--fs-hero-lead) !important; line-height:1.35}

/* Improve container padding on mobile */
@media (max-width: 768px){
  .container{padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right))}
  .hero{padding-top: calc(1.2rem + env(safe-area-inset-top)); padding-bottom: 1.4rem}
  .card{margin-bottom: .5rem}
  .btn{touch-action: manipulation}
}

/* Integrated hero background so it feels native to the site */
.hero{background: linear-gradient(180deg, rgba(240,250,255,.6) 0%, rgba(255,255,255,0) 40%)}
.hero .container{position:relative; z-index:4}
.hero-bg{position:absolute; inset:0; z-index:0; overflow:hidden}
.hero-bg video{z-index:1; position:absolute; inset:0; width:100%; height:100%; object-fit:cover; filter:brightness(.95) contrast(1.04) saturate(1.08); opacity:.98; transform:translateZ(0)}
/* Brand-tinted overlays to merge video colors with theme */
.hero-bg::before,
.hero-bg::after{
  content:''; position:absolute; left:0; right:0; z-index:2; pointer-events:none;
}
/* Soft brand tint across the whole video */
.hero-bg::before{
  top:0; bottom:0;
  background:
    radial-gradient(120% 85% at 50% 0%, rgba(0,110,230,.18) 0%, rgba(0,180,216,.12) 40%, rgba(255,255,255,0) 70%),
    linear-gradient(180deg, rgba(0,110,230,.09) 0%, rgba(0,180,216,.07) 50%, rgba(255,255,255,0) 80%);
  mix-blend-mode:multiply;
}
/* Gentle bottom fade into page bg so it feels native */
.hero-bg::after{
  height:22vh; bottom:0;
  background: linear-gradient(180deg, rgba(244,249,255,0) 0%, #F0FAFF 100%);
}
/* Keep existing hero-overlay above the tints for readability */
.hero-overlay{z-index:3}

/* Audio pill polish */
.hero-audio{user-select:none; touch-action:manipulation; box-shadow:0 6px 22px rgba(0,0,0,.18)}

/* Mobile letterbox background stays themed (from earlier) */
@media (max-width: 768px){
  .hero{min-height:100svh; height:100svh}
  .hero-bg{background: linear-gradient(180deg,#E6F3FF 0%, #F0FAFF 100%);}
  .hero-bg video{object-fit:contain !important; object-position:center center}
}

/* Mobile: tighten sections below hero */
@media (max-width: 768px){
  section + section{margin-top:.35rem}
  .section-title{font-size: clamp(18px, 4.8vw, 22px)}
  .section-sub{font-size: clamp(13px, 3.6vw, 16px)}
  .timeline .timeline-item{padding:.5rem 0}
  .badge-soft{font-size:.85em}
}

/* Nav toggler and dropdown touch area */
.navbar-toggler{padding:.55rem .8rem; border-radius:12px}
.dropdown-item{padding:.7rem 1rem}



/* === SAIFA Additive Overrides (2025-10-15C) === */
/* Mobile: video free-space (top & bottom) must be white */
@media (max-width: 768px){
  .hero{min-height:100svh; height:100svh;}
  .hero-bg{background:#fff !important;}
  .hero-mobile-topband{ background:#fff !important; }
  .hero-mobile-bottomband{ background:#fff !important; }
}
/* Match fade to white background */
.hero-bg::after{background: linear-gradient(180deg, rgba(255,255,255,0) 0%, #fff 100%) !important;}
/* Safety: page background to white */
body{background:#fff !important;}

/* Mobile: Upcoming Events dot alignment fix (additive only) */
@media (max-width: 768px){
  .timeline,
  .events-list,
  .upcoming-events,
  .event-list {
    list-style: none;
    padding-left: 1rem !important;
    margin-left: 0 !important;
  }
  .timeline .timeline-item,
  .events-list li,
  .upcoming-events li,
  .event-list li {
    position: relative;
    padding-left: 1rem;
    margin: .4rem 0;
    line-height: 1.25;
  }
  .timeline .timeline-item::before,
  .events-list li::before,
  .upcoming-events li::before,
  .event-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: .72em;
    width: .46em;
    height: .46em;
    border-radius: 999px;
    background: #006EE6;
  }
  .timeline{ border-left: 0 !important; }
}




/* === SAIFA Additive Overrides (2025-10-15D): mobile white free-space & event dot === */
@media (max-width: 768px){
  /* Force white around the contained video (top/bottom free space) */
  .hero{ background:#fff !important; }
  .hero-bg{ background:#fff !important; }
  .hero-mobile-topband{ background:#fff !important; }
  .hero-mobile-bottomband{ background:#fff !important; }
  .hero-overlay{ background: transparent !important; }
  .hero-bg::before,
  .hero-bg::after{ background: transparent !important; }
  .hero-bg video{ filter: none !important; }

  /* Upcoming Events: robust dot alignment */
  .timeline, .events-list, .upcoming-events, .event-list {
    list-style: none;
    padding-left: 1rem !important; margin-left: 0 !important;
  }
  .timeline .timeline-item, .events-list li, .upcoming-events li, .event-list li {
    position: relative; padding-left: 1rem; margin: .45rem 0; line-height: 1.3;
  }
  .timeline .timeline-item::before, .events-list li::before, .upcoming-events li::before, .event-list li::before {
    content:''; position:absolute; left:0;
    top: 0.82em; transform: translateY(-50%);
    width:.48em; height:.48em; border-radius:50%; background:#006EE6;
  }
  /* Remove vertical border on small screens if present */
  .timeline{ border-left: 0 !important; }
}

