/* ============================================================
   Scholars Public School - Main Stylesheet
   ============================================================ */

/* --- Google Fonts & Variables --- */
:root {
    --primary: #1a56db;
    --primary-dark: #1040a0;
    --primary-light: rgba(26, 86, 219, 0.10);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.12);
    --success: #16a34a;
    --success-light: rgba(22, 163, 74, 0.12);
    --dark: #111827;
    --text: #374151;
    --text-muted: #6b7280;
    --border: #e5e7eb;
    --bg-light: #f9fafb;
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --radius: 1rem;
    --shadow: 0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --transition: all 0.3s ease;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: #fff;
    overflow-x: hidden;
    font-size: 1rem;
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--dark);
    line-height: 1.25;
}

img { max-width: 100%; }

a { transition: var(--transition); }

/* --- Utilities --- */
.section-padding { padding: 5rem 0; }
.tracking-wide { letter-spacing: 2px; }
.fs-7 { font-size: 0.85rem; }
.fs-8 { font-size: 0.72rem; }

.divider {
    display: block;
    height: 4px;
    width: 64px;
    border-radius: 4px;
}

/* ============================================================
   TOP BAR
   ============================================================ */
.top-bar {
    background: var(--primary) !important;
    font-size: 0.82rem;
}

.top-bar a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
}

.top-bar a:hover { color: #fff; }

.social-icons-top a {
    color: rgba(255,255,255,0.85);
    margin-left: 10px;
    font-size: 0.9rem;
}

.social-icons-top a:hover { color: var(--warning); }

/* ============================================================
   NAVBAR
   ============================================================ */
#main-nav {
    background: #fff !important;
    border-bottom: 1px solid var(--border);
    transition: box-shadow 0.3s;
    z-index: 1030;
}

.navbar-brand {
    font-family: var(--font-heading);
    text-decoration: none;
}

.logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.navbar-nav .nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--dark) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    font-size: 0.95rem;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 1rem;
    right: 1rem;
    height: 2px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s;
    border-radius: 2px;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hero-section {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Slider image height - reduced from 100vh */
.hero-slider-img {
    width: 100%;
    height: 72vh;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* Dark overlay above slider images */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(10,15,40,0.82) 45%, rgba(10,15,40,0.35) 100%);
    z-index: 10;
    pointer-events: none;
}

/* Content layer - sits above overlay */
.hero-content-wrapper {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    pointer-events: none; /* let carousel prev/next buttons receive clicks */
}

.hero-content-wrapper .container,
.hero-content-wrapper .btn {
    pointer-events: auto;
}

/* Carousel controls sit above content */
.hero-section .carousel-control-prev,
.hero-section .carousel-control-next {
    z-index: 30;
    width: 48px;
    opacity: 0.75;
}

.hero-section .carousel-indicators {
    z-index: 30;
    margin-bottom: 1.5rem;
}

.hero-section .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,0.55);
    transition: background 0.3s, transform 0.3s;
}

.hero-section .carousel-indicators button.active {
    background: var(--warning);
    transform: scale(1.3);
}

/* Hero text */
.hero-title { font-size: 3rem; font-weight: 800; line-height: 1.15; }

@media (max-width: 768px) {
    .hero-slider-img { height: 60vh; object-position: center center; }
    .hero-title { font-size: 1.9rem !important; }
    .hero-subtitle { font-size: 0.95rem !important; }
    .hero-content-wrapper { padding: 0 0.5rem; }
}

@media (max-width: 480px) {
    .hero-slider-img { height: 55vh; }
    .hero-title { font-size: 1.5rem !important; }
}

/* ============================================================
   INFO CARDS (floated below hero)
   ============================================================ */
.info-cards { padding-bottom: 3rem; }

.info-card {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    background: #fff;
    box-shadow: var(--shadow) !important;
    transition: transform 0.3s, box-shadow 0.3s;
}

.info-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg) !important;
}

.icon-box {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bg-primary-light  { background-color: var(--primary-light); }
.bg-warning-light  { background-color: var(--warning-light); }
.bg-success-light  { background-color: var(--success-light); }
.text-primary      { color: var(--primary) !important; }
.text-warning      { color: var(--warning) !important; }
.text-success      { color: var(--success) !important; }

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-img-wrap {
    position: relative;
    padding: 1rem;
}

.about-img-wrap img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.experience-badge {
    position: absolute;
    bottom: -1rem;
    left: 0;
    background: var(--primary);
    color: #fff;
    border-radius: var(--radius);
    padding: 1.2rem 1.5rem;
    box-shadow: var(--shadow-lg);
    text-align: center;
    min-width: 110px;
}

.experience-badge h3 { font-size: 2rem; font-weight: 800; color: #fff; margin-bottom: 0; }
.experience-badge p  { font-size: 0.8rem; margin-bottom: 0; opacity: 0.9; }

/* Tab pills */
.custom-pills .nav-link {
    color: var(--dark);
    background: transparent;
    border: 1.5px solid var(--border);
    border-radius: 50px !important;
    padding: 0.4rem 1.1rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
}

.custom-pills .nav-link.active,
.custom-pills .nav-link:hover {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.tab-content-box {
    background: var(--bg-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.tab-content-box .tab-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--primary);
    font-size: 1.3rem;
}

/* ============================================================
   ACADEMICS SECTION
   ============================================================ */
.academic-card {
    border-radius: var(--radius) !important;
    border: none !important;
    box-shadow: var(--shadow) !important;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.academic-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg) !important;
}

.academic-card .card-header-block {
    background: var(--primary);
    color: #fff;
    padding: 2rem;
    text-align: center;
}

.academic-card .card-header-block i { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.academic-card .card-body-block { background: var(--bg-light); padding: 1.5rem; }

.academic-card .custom-list li {
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--border);
    font-size: 0.92rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.academic-card .custom-list li:last-child { border-bottom: none; }

/* ============================================================
   STAFF & ACHIEVEMENTS
   ============================================================ */
.staff-card {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg) !important;
}

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

.achievement-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    background: #fff;
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--warning);
    box-shadow: var(--shadow);
}

.achievement-item .ach-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--warning);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    font-size: 1.2rem;
}

.achievement-item.success-border { border-left-color: var(--success); }
.achievement-item.success-border .ach-icon { background: var(--success); }

.achievement-item h6 { font-weight: 700; margin-bottom: 0.2rem; font-size: 0.95rem; }
.achievement-item p  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0; }

/* ============================================================
   GALLERY SECTION
   ============================================================ */
.gallery-item {
    display: block;
    border-radius: var(--radius);
    overflow: hidden;
    position: relative;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s ease;
    display: block;
}

.gallery-item.tall img { height: 460px; }

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: rgba(26, 86, 219, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-item:hover img { transform: scale(1.06); }
.gallery-item:hover .gallery-overlay { opacity: 1; }

/* ============================================================
   NEWS & EVENTS
   ============================================================ */
.news-card {
    border-radius: var(--radius) !important;
    border: 1px solid var(--border) !important;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.news-card .news-img {
    width: 100%;
    height: 100%;
    min-height: 160px;
    object-fit: cover;
}

.notice-board {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
}

.notice-item {
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--border);
}

.notice-item:last-child { border-bottom: none; }

/* ============================================================
   ADMISSIONS & FACILITIES
   ============================================================ */
.admission-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.admission-card .big-icon {
    position: absolute;
    right: -1rem;
    top: -1.5rem;
    font-size: 9rem;
    opacity: 0.07;
    pointer-events: none;
}

.admission-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.admission-list li {
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
}

.facility-card {
    border-radius: var(--radius);
    border: 1px solid var(--border) !important;
    background: var(--bg-light);
    padding: 1.5rem;
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

.facility-card:hover {
    background: var(--primary);
    border-color: var(--primary) !important;
    transform: translateY(-4px);
    box-shadow: var(--shadow) !important;
}

.facility-card:hover i,
.facility-card:hover h5,
.facility-card:hover p { color: #fff !important; }

.facility-card i { font-size: 2rem; transition: var(--transition); }
.facility-card h5 { font-size: 0.95rem; font-weight: 700; margin: 0.75rem 0 0.4rem; }
.facility-card p  { font-size: 0.82rem; color: var(--text-muted); margin: 0; transition: var(--transition); }

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border);
}

.contact-card iframe { border: none; display: block; }

.form-floating .form-control,
.form-floating .form-select {
    border-radius: 0.6rem;
    border: 1.5px solid var(--border);
    font-size: 0.93rem;
}

.form-floating .form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-floating label { color: var(--text-muted); font-size: 0.88rem; }

/* ============================================================
   FOOTER
   ============================================================ */
footer {
    background: #0d1117 !important;
    color: rgba(255,255,255,0.75);
}

footer h5 { color: #fff; font-weight: 700; }

.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.footer-links a:hover { color: #fff; }

.footer-contact-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.85rem;
    font-size: 0.88rem;
    color: rgba(255,255,255,0.65);
}

.footer-contact-item i {
    color: var(--primary);
    margin-top: 3px;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.social-icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.7);
    font-size: 0.85rem;
    transition: var(--transition);
    text-decoration: none;
    margin-right: 6px;
}

.social-icon-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    transition: var(--transition);
    letter-spacing: 0.3px;
}

.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
}

/* ============================================================
   SCROLL-TO-TOP BUTTON
   ============================================================ */
#scrollTop {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 999;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: var(--transition);
}

#scrollTop:hover { background: var(--primary-dark); transform: translateY(-3px); }
#scrollTop.visible { display: flex; }

/* ============================================================
   RESPONSIVE FIXES
   ============================================================ */
@media (max-width: 991.98px) {
    .section-padding { padding: 3.5rem 0; }
    .about-img-wrap img { height: 300px; }
    .experience-badge { display: none !important; }
}

@media (max-width: 575.98px) {
    .section-padding { padding: 2.5rem 0; }
    .gallery-item img { height: 160px; }
    .gallery-item.tall img { height: 260px; }
    .admission-card { padding: 1.5rem; }
}
