/* RCIS Mysore — styles.css
   Replace asset placeholders in HTML with real images.
   Colors chosen to match RCIS brand (adjust if you have exact hexes). */

/* Base variables */
:root{
  --brand-red: #cc1f2b;    /* primary red (rcis-style) */
  --brand-red-dark: #9b1720;
  --brand-blue: #0b5ed7;   /* accent blue */
  --bg: #ffffff;
  --muted: #6c757d;
  --text: #222222;
  --card-bg: #ffffff;
  --box-shadow: 0 6px 18px rgba(16,24,40,0.06);
  --radius-lg: 12px;
  --max-width: 1180px;
  --container-padding: 1.25rem;
  --gradient-hero: linear-gradient(90deg, rgba(204,31,43,0.32), rgba(11,94,215,0.14));
  --font-sans: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
}

* { box-sizing: border-box; }
html,body { height:100%; }
body {
  margin:0;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing:antialiased;
}

/* Topbar */
.topbar {
  background: var(--brand-red);
  color: #fff;
  padding: 6px 0;
  font-size: 0.95rem;
}
.topbar .admissions-badge {
  background: rgba(255,255,255,0.12);
  color: #fff;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight:600;
  font-size:0.85rem;
}
.topbar .topbar-note { opacity:0.95; }

/* Navbar */
.navbar-brand img { height:48px; object-fit:contain; }
.navbar .nav-link { color: var(--muted); margin-left:6px; margin-right:6px; }
.navbar .nav-link:hover { color: var(--text); }

/* Hero */
.hero-section { position: relative; overflow:hidden; }
.hero-bg {
  position:absolute; inset:0; z-index:0;
  background-size: cover; background-position:center;
  min-height:420px;
  filter: brightness(0.6);
}
.hero-overlay {
  position:absolute; inset:0; z-index:1;
  background: var(--gradient-hero);
}
.hero-section .container { position:relative; z-index:2; padding-top:3.5rem; padding-bottom:3.5rem; }

/* Quick facts card */
.quick-facts {
  background:#fff;
  border-radius:10px;
}

/* Main content */
main { max-width: var(--max-width); margin: 0 auto; padding-left: var(--container-padding); padding-right: var(--container-padding); }
h1, h2, h3 { color: var(--text); }
.lead { color: #ffffffcc; }
.card { border: none; border-radius: 10px; box-shadow: var(--box-shadow); }

/* Admission strip */
.admission-strip { background: var(--brand-red); color:#fff; }

/* Buttons */
.btn-primary {
  background: var(--brand-red);
  border-color: var(--brand-red);
  color: #fff;
}
.btn-primary:hover { background: var(--brand-red-dark); border-color: var(--brand-red-dark); }

/* Footer */
.site-footer { background:#f8f9fa; padding:1.25rem 0; }

/* Floating WhatsApp FAB */
.whatsapp-fab {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width:56px;
  height:56px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  background:#25D366;
  color:#fff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.18);
  z-index:1200;
  font-size:20px;
}
.whatsapp-fab .fab-emoji{ margin-left:6px; }

/* Utility */
.muted { color: var(--muted); }
.small { font-size:0.9rem; }

/* Responsive */
@media (max-width: 991px) {
  .hero-bg { min-height: 340px; }
  .hero-section .container { padding-top: 2rem; padding-bottom:2rem; }
  .topbar .topbar-note { display:none; }
}
@media (max-width: 575px) {
  .hero-bg { min-height: 260px; }
}

/* Accessibility focus */
a:focus, button:focus, input:focus {
  outline: 3px solid rgba(11,94,215,0.18);
  outline-offset: 2px;
}

/* Form buttons & feedback */
.was-validated .form-control:invalid, .form-control.is-invalid {
  border-color: #dc3545;
  box-shadow:none;
}

/* small visual polish */
img.rounded { border-radius: 8px; }

/* light gallery grid */
#gallery img { height:180px; object-fit:cover; width:100%; border-radius:8px; }

/* small card spacing */
.card.p-3 { padding: 1rem !important; }

/* quick-fix for sticky-top navbar overlaying anchors */
:target { scroll-margin-top: 96px; }


/* ---------- Top marquee (RCIS style) ---------- */

/* marquee wrapper full width under topbar */
.top-marquee-wrapper {
  width: 100%;
  background: var(--brand-red); /* matches RCIS red */
  color: #fff;
  overflow: hidden;
  border-top: 2px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  font-weight: 600;
  font-size: 0.95rem;
}

/* the moving container */
.top-marquee {
  display: inline-block;
  white-space: nowrap;
  padding: 8px 0;
  will-change: transform;
  /* animation: left-to-right 18s linear infinite;  - we define below */
  animation: marquee-scroll 20s linear infinite;
  /* Add slight letter-spacing for cleaner look */
  letter-spacing: 0.2px;
  padding-left: 2rem;
  padding-right: 2rem;
}

/* slower on large screens, faster on small devices */
@media (max-width: 480px) {
  .top-marquee { animation-duration: 12s; font-size: 0.9rem; }
}
@media (min-width: 1200px) {
  .top-marquee { animation-duration: 26s; font-size: 1rem; }
}

/* marquee keyframes: move from right to left */
@keyframes marquee-scroll {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); } /* note: repeating content helps continuity */
}

/* accessibility: pause animation on focus for keyboard users */
.top-marquee:focus,
.top-marquee-wrapper:focus-within {
  animation-play-state: paused;
  outline: none;
}

/* make sure topbar and marquee visually align with rest of header */
.site-top .topbar { background: var(--brand-red); } /* keep topbar same red */
.topbar .phone-link, .topbar .topbar-note { color: #fff; }


/* Image-only carousel with separate desktop & mobile images */

/* Ensure consistent heights and cropping */
.carousel-image {
  width: 100%;
  height: 520px;          /* desktop height */
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Slightly shorter on medium screens */
@media (max-width: 1199.98px) and (min-width: 768px) {
  .carousel-image { height: 380px; }
}

/* Mobile-specific height */
@media (max-width: 767.98px) {
  .carousel-image {
    height: 240px;       /* mobile height */
  }
}

/* Remove caption area (none used) and keep controls visible */
.carousel .carousel-caption { display: none; }

/* Indicators styling (subtle) */
.carousel-indicators {
  bottom: 12px;
}
.carousel-indicators [data-bs-target] {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: rgba(255,255,255,0.7);
}
.carousel-indicators .active {
  background-color: #fff;
  box-shadow: 0 0 0 6px rgba(255,255,255,0.06);
}

/* Improve control contrast on top of images */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.45));
}

/* Ensure the carousel sits flush under the nav (no top margin) */
section[aria-label="RCIS Mysore image slider"] { margin-top: .4rem; }

