/*
=========================================================
ADNI ISLAMIC SCHOOL — GLOBAL CSS
=========================================================
MASTER FILE

Used by:
- Homepage
- All Inner Pages

Contains ONLY:
1. Global / Brand / Typography
2. Header / Navbar
3. Footer
4. Floating UI
5. Shared buttons / utilities

DO NOT PUT:
- Homepage hero
- Homepage sections
- Inner-page hero
- Page-specific sections
- Page-specific animations

Those belong in:
- homepage.css
- PAGENAME.css
=========================================================
*/

/* =======================================================
   00. GLOBAL / BRAND
   ======================================================= */

:root {
    --primary: #273480;
    --primary-light: #3b4ea3;
    --secondary: #c5a253;
    --secondary-light: #d4af37;

    --neutral-white: #ffffff;
    --neutral-soft-grey: #f1f5f9;
    --neutral-dark-slate: #273480;

    --bg-warm: #f8fafc;
    --text-body: #475569;

    --shadow-soft: 0 10px 40px -10px rgba(39, 52, 128, 0.2);
    --shadow-card: 0 4px 20px -5px rgba(0,0,0,0.08);

    --transition-base: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--bg-warm);
    color: var(--text-body);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--neutral-dark-slate);
    font-weight: 700;
    letter-spacing: -0.02em;
}

.display-1,
.display-2,
.display-3,
.display-4 {
    font-weight: 800;
    letter-spacing: -0.03em;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

.bg-primary {
    background-color: var(--primary) !important;
}

.bg-secondary {
    background-color: var(--secondary) !important;
}

.bg-warm {
    background-color: var(--bg-warm) !important;
}

/* =======================================================
   01. SHARED BUTTONS
   ======================================================= */

.btn {
    font-weight: 600;
    padding: 0.85rem 2rem;
    border-radius: 50px;
    transition: var(--transition-base);
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 10px 25px -10px rgba(39, 52, 128, 0.5);
}

.btn-primary:hover {
    background-color: var(--primary-light);
    border-color: var(--primary-light);
    transform: translateY(-3px);
}

.btn-secondary {
    background-color: var(--secondary);
    border-color: var(--secondary);
    color: #fff;
}

.btn-secondary:hover {
    background-color: #b38f42;
    border-color: #b38f42;
    color: #fff;
    transform: translateY(-3px);
}

.btn-outline-secondary {
    border-color: var(--secondary);
    color: var(--secondary);
    background: transparent;
}

.btn-outline-secondary:hover {
    background-color: var(--secondary);
    color: #fff;
    transform: translateY(-3px);
}

.btn-light {
    background-color: #fff;
    color: var(--primary);
    border: 1px solid transparent;
}

.btn-light:hover {
    background-color: var(--neutral-soft-grey);
    transform: translateY(-3px);
}

/* =======================================================
   02. HEADER / NAVBAR
   WHITE BACKGROUND — BLUE FONT
   ======================================================= */

.navbar {
    background: #fff !important;
    transition: background-color .3s ease, box-shadow .3s ease, padding .3s ease;
    z-index: 1030 !important;
    visibility: visible !important;
    opacity: 1 !important;
    padding: 1rem 0;
}

.navbar.scrolled {
    background: #fff !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    padding: 0.65rem 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.navbar-brand {
    padding: 0;
    margin-right: 40px;
    flex-shrink: 0;
}

.navbar-logo {
    height: 70px;
    width: auto;
    display: block;
    transition: height .3s ease;
}

.navbar.scrolled .navbar-brand img {
    height: 45px;
}

.navbar-nav {
    align-items: center;
}

.nav-link,
.navbar.scrolled .nav-link {
    font-weight: 600;
    font-size: 0.90rem;
    color: var(--primary) !important;
    margin: 0 0.55rem;
    padding: 0.65rem 0.45rem !important;
    position: relative;
    white-space: nowrap;
}

/* Underline for normal links only.
   Dropdown links keep Bootstrap's dropdown arrow. */
.nav-link:not(.dropdown-toggle)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    display: block;
    margin-top: 4px;
    right: 0;
    background: var(--secondary);
    transition: width .3s ease;
}

.nav-link:not(.dropdown-toggle):hover::after {
    width: 100%;
    left: 0;
}

/* Dropdown arrow */
.nav-link.dropdown-toggle::after {
    margin-left: 0.45rem;
    vertical-align: 0.12em;
    border-top-color: var(--primary);
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: 15px;
    box-shadow: var(--shadow-soft);
    padding: 0.75rem;
    min-width: 290px;
    margin-top: 0.6rem !important;
}

.dropdown-item {
    border-radius: 8px;
    padding: 0.7rem 1rem;
    font-weight: 500;
    font-size: 0.88rem;
    color: var(--primary);
    transition: background-color .2s ease, color .2s ease, padding-left .2s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--neutral-soft-grey);
    color: var(--primary);
    padding-left: 1.15rem;
}

.navbar-toggler {
    border: 2px solid var(--primary);
    box-shadow: none !important;
    padding: .35rem .5rem;
    color: var(--primary) !important;
    z-index: 9999;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar.mobile-open {
    background: #fff !important;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

/* Apply Now button inside the header */
#mainNav .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

/* Desktop dropdown opens cleanly without affecting mobile Bootstrap collapse */
@media (min-width: 992px) {
    #mainNav .dropdown:hover > .dropdown-menu {
        display: block;
        margin-top: 0;
    }

    #mainNav .dropdown > .dropdown-toggle {
        cursor: pointer;
    }
}

/* Tablet / mobile */
@media (max-width: 991px) {
    .navbar {
        padding: 0.7rem 0;
    }

    .navbar-logo {
        height: 55px;
    }

    .navbar-brand {
        margin-right: 0;
    }

    .navbar-collapse {
        background: #fff;
        margin-top: 0.75rem;
        padding: 0.75rem 0 1rem;
        border-radius: 14px;
        box-shadow: 0 10px 30px rgba(0,0,0,.08);
    }

    .navbar-nav {
        align-items: stretch;
    }

    .nav-link,
    .navbar.scrolled .nav-link {
        margin: 0;
        padding: 0.75rem 1rem !important;
        white-space: normal;
    }

    .nav-link:not(.dropdown-toggle)::after {
        display: none;
    }

    .dropdown-menu {
        min-width: 100%;
        margin-top: 0 !important;
        padding: 0.35rem;
        border-radius: 10px;
        box-shadow: none;
        background: var(--neutral-soft-grey);
    }

    .dropdown-item {
        padding: 0.7rem 0.9rem;
    }

    #mainNav .btn {
        display: block;
        width: 100%;
        margin-top: 0.75rem;
    }
}

/* =======================================================
   03. FOOTER
   ======================================================= */

.footer-section {
    background: var(--neutral-dark-slate);
    color: rgba(255,255,255,0.7);
    padding: 5rem 0 2rem;
}

.footer-link {
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: var(--transition-base);
    display: block;
    margin-bottom: 0.75rem;
}

.footer-link:hover {
    color: var(--secondary);
    transform: translateX(5px);
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 0.5rem;
    transition: var(--transition-base);
}

.social-icon:hover {
    background: var(--secondary);
    color: #fff;
    transform: translateY(-3px);
}

/* =======================================================
   04. FLOATING UI
   ======================================================= */

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.4);
    z-index: 999;
    transition: var(--transition-base);
    text-decoration: none;
}

.floating-whatsapp:hover {
    transform: scale(1.1) rotate(5deg);
    color: white;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 10px 20px rgba(39, 52, 128, 0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 575px) {
    .floating-whatsapp {
        width: 52px;
        height: 52px;
        bottom: 20px;
        left: 20px;
    }

    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
    }
}

/* =======================================================
   END GLOBAL CSS
   ======================================================= */