/* =========================================================
   Schoolpicker – Apple-inspired Design System
   ========================================================= */

:root {
    --dark-purple: #ffffff;
    --dark-purple-alt: #f5f5f7;
    --dark-purple-light: #e8e8ed;
    --orange: #0071e3;
    --orange-bright: #0077ed;
    --orange-glow: rgba(0, 113, 227, 0.15);
    --white: #ffffff;
    --text-white: #1d1d1f;
    --text-gray: #86868b;
    --text-muted: #86868b;

    --apple-white: #ffffff;
    --apple-light-gray: #f5f5f7;
    --apple-gray: #d2d2d7;
    --apple-dark-gray: #86868b;
    --apple-text: #1d1d1f;
    --apple-blue: #0071e3;
    --apple-blue-hover: #0077ed;
    --apple-blue-dark: #0066cc;
    --apple-black: #000000;

    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-pill: 980px;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base ---- */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', Arial, sans-serif;
    color: var(--apple-text);
    background: var(--apple-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--apple-text);
}
h1, h2 { font-weight: 700; }
h3 { font-weight: 600; }

a { color: var(--apple-blue); transition: var(--transition); }
a:hover { color: var(--apple-blue-hover); }

.wide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Navbar ---- */
.navbar-custom {
    background: var(--apple-white) !important;
    border-bottom: 1px solid var(--apple-gray) !important;
    box-shadow: none !important;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    transition: background 0.3s ease, backdrop-filter 0.3s ease;
}
.navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08) !important;
}

.navbar-top-row-new {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.navbar-brand-logo {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.navbar-brand-text {
    font-weight: 700;
    font-size: 1.5em;
    letter-spacing: -0.5px;
    color: var(--apple-text) !important;
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none !important;
}

.navbar-nav-container {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-link {
    color: var(--apple-text) !important;
    font-weight: 500;
    font-size: 1.05em;
    margin-right: 1.5em;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}
.nav-link.active { color: var(--apple-blue) !important; }
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--apple-blue);
    border-radius: 2px;
}
.nav-link:hover { color: var(--apple-blue) !important; }

.navbar-toggler {
    border: none !important;
    box-shadow: none !important;
}

/* ---- Hero Banner ---- */
.hero-banner {
    background: var(--apple-light-gray) !important;
    padding: 8rem 0 6rem 0;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}
.hero-banner::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 15%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 113, 227, 0.08) 0%, transparent 70%);
    transform: translate(50%, -50%);
    pointer-events: none;
}
.hero-title {
    font-weight: 700;
    letter-spacing: -2px;
    line-height: 1.1;
    color: var(--apple-text);
}
.hero-title-accent { color: var(--apple-blue) !important; font-size: 0.85em; }
.hero-title-main { color: var(--apple-text); font-size: 0.75em; }

/* Hero Search */
.hero-search { max-width: 580px; margin: 0 auto; }
.hero-search-bar {
    display: flex;
    align-items: center;
    background: var(--apple-white);
    border: 1px solid var(--apple-gray);
    border-radius: 60px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.hero-search-bar:focus-within {
    border-color: var(--apple-blue);
    box-shadow: 0 4px 24px rgba(0,113,227,0.15);
}
.hero-search-icon { color: var(--apple-dark-gray); padding-left: 1.2rem; font-size: 1rem; }
.hero-search-bar input {
    background: transparent;
    border: none;
    color: var(--apple-text);
    padding: 0.85em 1em;
    flex: 1;
    font-size: 1em;
    outline: none;
}
.hero-search-bar input::placeholder { color: var(--apple-dark-gray); }
.hero-search-bar button {
    background: var(--apple-blue);
    color: #fff;
    border: none;
    padding: 0.7em 1.8em;
    font-weight: 600;
    cursor: pointer;
    border-radius: 50px;
    margin: 0.3em 0.35em 0.3em 0;
    font-size: 0.95em;
    transition: background 0.2s, transform 0.15s;
}
.hero-search-bar button:hover { background: var(--apple-blue-hover); transform: scale(1.03); }

.hero-subtitle {
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--text-muted) !important;
    line-height: 1.6;
}

/* Hero Buttons */
.hero-btn-primary {
    background: var(--apple-blue) !important;
    color: #ffffff !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    font-size: 1.1rem;
    border: none !important;
    padding: 0.75rem 2rem;
    transition: var(--transition);
}
.hero-btn-primary:hover {
    background: var(--apple-blue-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.3);
}
.hero-btn-secondary {
    border-radius: var(--radius-pill) !important;
    font-weight: 500;
    font-size: 1.1rem;
    border: 2px solid var(--apple-blue) !important;
    color: var(--apple-blue) !important;
    background: transparent !important;
    padding: 0.75rem 2rem;
    transition: var(--transition);
}
.hero-btn-secondary:hover {
    background: rgba(0, 113, 227, 0.08) !important;
    border-color: var(--apple-blue-hover) !important;
}

/* ---- Search Bar ---- */
.search-bar-wrapper {
    max-width: 600px;
    margin: 0 auto;
}
.search-bar-wrapper .form-control {
    border-radius: var(--radius-pill);
    border: 1px solid var(--apple-gray);
    padding: 0.75rem 1.5rem;
    font-size: 1.05rem;
    background: var(--apple-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.search-bar-wrapper .form-control:focus {
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}
.search-bar-wrapper .btn {
    border-radius: var(--radius-pill);
}

/* ---- Cards ---- */
.glass-card {
    background: var(--apple-white);
    border: 1px solid var(--apple-gray);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.glass-card:hover {
    border-color: var(--apple-blue);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-card {
    text-align: center;
    padding: 2rem;
    border-radius: var(--radius-lg);
    background: var(--apple-white);
    border: 1px solid var(--apple-gray);
    height: 100%;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}
.feature-card:hover {
    transform: translateY(-6px);
    border-color: var(--apple-blue);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}
.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.25rem;
    background: var(--apple-blue);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.feature-icon i { color: #ffffff !important; font-size: 1.6rem; }
.feature-card h4, .feature-card h5 { color: var(--apple-text) !important; font-weight: 600; }
.feature-card p { color: var(--text-muted) !important; margin-bottom: 0; }

/* Tool cards */
.tool-card {
    background: var(--apple-white);
    border: 1px solid rgba(0,113,227,0.1);
    border-radius: var(--radius-md);
    transition: var(--transition);
    height: 100%;
}
.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--apple-blue);
}
.tool-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}

/* School / directory cards */
.school-card {
    background: var(--apple-white);
    border: 1px solid #e9ecef;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.school-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.region-card {
    background: var(--apple-white);
    border: 1px solid var(--apple-gray);
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.region-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--apple-blue);
}

/* ---- Buttons ---- */
.btn-primary {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    border-radius: var(--radius-sm);
    font-weight: 500;
    transition: var(--transition);
}
.btn-primary:hover {
    background: var(--apple-blue-hover);
    border-color: var(--apple-blue-hover);
}
.btn-outline-primary {
    color: var(--apple-blue);
    border-color: var(--apple-blue);
}
.btn-outline-primary:hover {
    background: var(--apple-blue);
    border-color: var(--apple-blue);
    color: #fff;
}

/* ---- Marketing / CTA Sections ---- */
.marketing-section {
    background: var(--apple-light-gray) !important;
    padding: 5rem 0;
}
.marketing-title {
    color: var(--apple-text) !important;
    font-weight: 700;
    letter-spacing: -1px;
}
.marketing-subtitle {
    color: var(--text-muted) !important;
    max-width: 700px;
    margin: 0 auto;
}

.cta-section {
    background: var(--apple-white) !important;
    padding: 5rem 0;
}
.cta-title {
    font-weight: 700;
    letter-spacing: -1px;
    color: var(--apple-text) !important;
}
.cta-subtitle {
    font-size: 1.3rem;
    color: var(--text-muted) !important;
    max-width: 600px;
    margin: 0 auto;
}
.cta-btn {
    background: var(--apple-blue) !important;
    color: #ffffff !important;
    border-radius: var(--radius-pill) !important;
    font-weight: 600;
    font-size: 1.1rem;
    border: none !important;
    padding: 0.75rem 2rem;
    transition: var(--transition);
}
.cta-btn:hover {
    background: var(--apple-blue-hover) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 113, 227, 0.3);
}

/* ---- Directory Hero ---- */
.dir-hero {
    background: linear-gradient(135deg, #1a6fa0 0%, #4899D5 50%, #7ec8e3 100%);
    padding: 3em 0 2.5em;
    text-align: center;
    color: #fff;
}
.dir-hero h1 { font-size: 2.2em; font-weight: 800; margin-bottom: 0.3em; color: #fff; }
.dir-hero p { font-size: 1.15em; opacity: 0.9; margin-bottom: 1.5em; }

.dir-search-bar {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.12);
    border: 2px solid rgba(255,255,255,0.35);
    border-radius: 60px;
    overflow: hidden;
    backdrop-filter: blur(8px);
    max-width: 600px;
    margin: 0 auto;
    transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}
.dir-search-bar:focus-within {
    background: rgba(255,255,255,0.2);
    border-color: rgba(255,255,255,0.7);
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.dir-search-bar input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 0.8em 1.5em;
    flex: 1;
    font-size: 1em;
    outline: none;
}
.dir-search-bar input::placeholder { color: rgba(255,255,255,0.7); }
.dir-search-bar button {
    background: #fff;
    color: #1a6fa0;
    border: none;
    padding: 0.7em 1.6em;
    font-weight: 700;
    cursor: pointer;
    border-radius: 50px;
    margin: 0.35em 0.4em 0.35em 0;
    font-size: 0.95em;
    transition: background 0.2s, transform 0.15s;
}
.dir-search-bar button:hover {
    background: #e8f4fd;
    transform: scale(1.04);
}

/* ---- Tools Hero ---- */
.tools-hero {
    background: linear-gradient(135deg, #0071e3 0%, #00b4d8 100%);
    padding: 3rem 0;
    text-align: center;
    color: #fff;
}
.tools-hero h1 { font-size: 2.2em; font-weight: 800; margin-bottom: 0.3em; color: #fff; }
.tools-hero p { font-size: 1.15em; opacity: 0.9; }

/* ---- Forms ---- */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border: 1px solid var(--apple-gray);
    font-size: 1em;
    padding: 0.6em 1em;
    background: var(--apple-white);
    color: var(--apple-text);
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    outline: none;
    border-color: var(--apple-blue);
    box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.15);
}

/* ---- Badges ---- */
.badge { font-weight: 600; letter-spacing: 0.01em; }

/* ---- Map ---- */
#map, #school-map { border-radius: var(--radius-md); z-index: 1; }

/* ---- Footer ---- */
.footer-custom {
    background: var(--apple-light-gray) !important;
    border-top: 1px solid var(--apple-gray);
    padding: 3rem 0 2rem 0;
    color: var(--apple-text) !important;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
    margin-bottom: 3rem;
}
.footer-section h5 {
    color: var(--apple-blue);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: -0.3px;
}
.footer-section ul { list-style: none; padding: 0; margin: 0; }
.footer-section ul li { margin-bottom: 0.4rem; }
.footer-section ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}
.footer-section ul li a:hover { color: var(--apple-blue); }

.social-links { margin-bottom: 1rem; }
.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--apple-blue);
    color: #ffffff;
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    margin-right: 0.5rem;
}
.social-link:hover {
    background: var(--apple-blue-hover);
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--apple-gray);
    padding-top: 2rem;
}
.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}
.copyright { font-weight: 400; color: var(--text-muted); }
.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    margin-left: 1.5rem;
    font-size: 0.9rem;
}
.footer-links a:hover { color: var(--apple-blue); }
.footer-disclaimer {
    font-size: 0.8rem;
    line-height: 1.5;
    color: var(--text-muted);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

/* ---- Accordion (FAQ) ---- */
.accordion-button:not(.collapsed) {
    background: rgba(0,113,227,0.05);
    color: var(--apple-blue);
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: 0 0 0 3px rgba(0,113,227,0.15);
}

/* ---- Animations ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.fade-in-up { opacity: 0; animation: fadeInUp 0.6s ease forwards; }
.fade-in-up.delay-1 { animation-delay: 0.1s; }
.fade-in-up.delay-2 { animation-delay: 0.2s; }
.fade-in-up.delay-3 { animation-delay: 0.3s; }
.fade-in-up.delay-4 { animation-delay: 0.4s; }

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .navbar-nav-container { display: none; }
    .navbar-collapse { display: block !important; }
    .navbar-top-row-new { flex-wrap: wrap; }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .hero-banner { padding: 5rem 0 3rem 0; }
    .hero-title { font-size: 2.2rem !important; letter-spacing: -1px; }
    #map { height: 300px !important; position: static !important; }
    .footer-content { grid-template-columns: 1fr; }
    .footer-bottom-content { flex-direction: column; gap: 0.5rem; text-align: center; }
    .footer-links a { margin-left: 0; margin-right: 1rem; }
}
