/* Schools & Organizations Page Styles
   Matches homepage design system: shadows, clamp() typography, responsive spacing */

/* ========================================
   HERO — Split layout: copy left, SVG right
   ======================================== */
.schools-hero {
    margin-top: 72px;
    padding: var(--space-5xl) 0 var(--space-4xl);
    background: var(--bg-white);
    position: relative;
    overflow: hidden;
}

.schools-hero .schools-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: var(--space-3xl);
}

.hero-copy {
    text-align: left;
}

.hero-eyebrow {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--green-primary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: var(--space-md);
}

.schools-headline {
    font-family: var(--font-family);
    font-size: var(--text-4xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
}

.schools-subheadline {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    font-weight: var(--font-normal);
    line-height: var(--leading-relaxed);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 28px;
    border-radius: 999px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    font-family: var(--font-family);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.hero-btn--primary {
    background: var(--text-primary);
    color: #fff;
}

.hero-btn--primary:hover {
    background: var(--green-primary);
}

.hero-btn--secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--gray-300);
}

.hero-btn--secondary:hover {
    border-color: var(--text-primary);
}

/* School building visual — kept from original */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.school-visual {
    max-width: 320px;
    margin: 0 auto;
    position: relative;
}

.school-building {
    width: 100%;
    height: 220px;
    position: relative;
}

.building-main {
    width: 200px;
    height: 120px;
    background: white;
    border: 1.5px solid var(--gray-300);
    border-radius: 4px;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.building-roof {
    width: 0;
    height: 0;
    border-left: 100px solid transparent;
    border-right: 100px solid transparent;
    border-bottom: 40px solid var(--text-primary);
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
}

.window {
    width: 20px;
    height: 20px;
    border: 1.5px solid var(--gray-300);
    background: var(--gray-100);
    border-radius: 3px;
    position: absolute;
}

.window:nth-child(1) { top: 20px; left: 30px; }
.window:nth-child(2) { top: 20px; right: 30px; }
.window:nth-child(3) { top: 50px; left: 30px; }
.window:nth-child(4) { top: 50px; right: 30px; }

.door {
    width: 30px;
    height: 40px;
    background: var(--gray-100);
    border: 1.5px solid var(--gray-300);
    border-radius: 3px 3px 0 0;
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.school-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    z-index: 2;
}

.school-icon svg {
    width: 100%;
    height: 100%;
}

.school-floor {
    width: 280px;
    height: 2px;
    background: var(--gray-300);
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
}

.landscape {
    position: absolute;
    bottom: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: #FFFFFF;
    border-radius: 6px;
}

/* ========================================
   CONTAINER — 1200px, consistent padding
   ======================================== */
.schools-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: relative;
    z-index: 1;
}

/* ========================================
   TRUST BAR — Horizontal stats strip
   ======================================== */
.trust-bar {
    background: var(--gray-100);
    padding: var(--space-2xl) 0;
    border-top: 1px solid var(--gray-200);
    border-bottom: 1px solid var(--gray-200);
}

.trust-bar__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    text-align: center;
}

.trust-bar__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.trust-bar__number {
    font-size: var(--text-2xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    line-height: 1;
}

.trust-bar__label {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: var(--font-medium);
}

/* ========================================
   TAB BAR — Sticky, wider, with SVG icons
   ======================================== */
.schools-tab-bar {
    display: flex;
    justify-content: center;
    gap: 0;
    border-bottom: 1px solid var(--gray-200);
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--container-padding);
    position: sticky;
    top: 72px;
    background: #fff;
    z-index: 90;
}

.schools-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    font-family: var(--font-family);
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

.schools-tab:hover {
    color: var(--text-primary);
}

.schools-tab[aria-selected="true"] {
    color: var(--green-primary);
    border-bottom-color: var(--green-primary);
    font-weight: var(--font-semibold);
}

.tab-icon {
    width: 20px;
    height: 20px;
    opacity: 0.4;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.schools-tab:hover .tab-icon {
    opacity: 0.7;
}

.schools-tab[aria-selected="true"] .tab-icon {
    opacity: 1;
}

.schools-tab .tab-label-short {
    display: none;
}

/* ========================================
   TAB PANELS
   ======================================== */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Progressive enhancement: without JS, show all panels stacked */
.no-js .schools-tab-bar {
    display: none;
}

.no-js .tab-panel {
    display: block;
}

.no-js .tab-panel + .tab-panel {
    border-top: 1px solid var(--gray-200);
    padding-top: var(--space-3xl);
}

/* ========================================
   PANEL INTRO — Centered headline + subtext
   ======================================== */
.panel-intro {
    text-align: center;
    padding: var(--space-4xl) 0 var(--space-3xl);
    max-width: 760px;
    margin: 0 auto;
}

.panel-intro__heading {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
    letter-spacing: var(--tracking-normal);
}

.panel-intro__text {
    font-size: var(--text-base);
    color: var(--text-body);
    line-height: var(--leading-relaxed);
    text-align: left;
    margin-bottom: var(--space-lg);
}

.panel-intro__uses {
    font-size: var(--text-base);
    color: var(--text-body);
    line-height: var(--leading-relaxed);
    text-align: left;
    margin-top: var(--space-lg);
}

/* ========================================
   FEATURE CARDS — 3-col grid, shadow-based
   ======================================== */
.features-section {
    padding: 0 0 var(--space-4xl);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.info-card {
    background: white;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.info-card:hover {
    box-shadow: var(--shadow-md);
}

.info-card__icon {
    width: 44px;
    height: 44px;
    margin-bottom: var(--space-lg);
}

.info-card__icon img {
    width: 100%;
    height: 100%;
}

.info-title {
    font-size: var(--text-lg);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.info-description {
    color: var(--text-body);
    line-height: var(--leading-relaxed);
    font-size: var(--text-base);
    flex-grow: 1;
}

.info-description a {
    color: var(--green-primary);
    font-weight: var(--font-medium);
    text-decoration: none;
    transition: color 0.15s ease;
}

.info-description a:hover {
    color: var(--green-hover);
    text-decoration: underline;
}

/* ========================================
   CONTACT STRIP — Email + Schedule cards
   ======================================== */
.contact-section {
    padding: var(--space-3xl) 0;
    background: var(--gray-100);
}

.contact-section .section-label {
    font-size: var(--text-sm);
    font-weight: var(--font-semibold);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: center;
    margin-bottom: var(--space-xl);
}

.contact-methods {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-xl);
    max-width: 720px;
    margin: 0 auto;
}

.contact-card {
    background: white;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Schedule card — green accent */
.contact-card--schedule {
    border-top: 3px solid var(--green-primary);
    box-shadow: var(--shadow-md);
}

.contact-card__icon {
    width: 48px;
    height: 48px;
    margin: 0 auto var(--space-lg);
    display: flex;
    align-items: center;
    justify-content: center;
}

.contact-card__icon svg {
    width: 100%;
    height: 100%;
}

.contact-title {
    font-size: var(--text-xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.contact-card__desc {
    color: var(--text-secondary);
    margin-bottom: var(--space-lg);
    font-size: var(--text-base);
    line-height: var(--leading-relaxed);
}

.contact-link {
    color: var(--green-primary);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: var(--text-sm);
    transition: color 0.15s ease;
    word-break: break-word;
}

.contact-link:hover {
    color: var(--green-hover);
    text-decoration: underline;
}

.schedule-button {
    display: inline-block;
    background: var(--text-primary);
    color: white;
    padding: 12px 28px;
    border-radius: 999px;
    font-weight: var(--font-semibold);
    font-size: var(--text-base);
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.schedule-button:hover {
    background: var(--green-primary);
}

/* ========================================
   SECTION TITLE — Reusable
   ======================================== */
.section-title {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: var(--text-primary);
    margin-bottom: var(--space-2xl);
    text-align: center;
    letter-spacing: var(--tracking-normal);
}

/* ========================================
   BOTTOM CTA — Dark background
   ======================================== */
.bottom-cta {
    padding: var(--space-5xl) 0;
    background: var(--text-primary);
    color: white;
    text-align: center;
    display: none;
}

.bottom-cta.active {
    display: block;
}

.no-js .bottom-cta {
    display: block;
}

.bottom-cta h2 {
    font-size: var(--text-2xl);
    font-weight: var(--font-semibold);
    color: white;
    margin-bottom: var(--space-md);
}

.bottom-cta p {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2xl);
    color: rgba(255, 255, 255, 0.75);
}

.bottom-cta .cta-pill {
    display: inline-block;
    background: white;
    color: var(--text-primary);
    padding: 18px 52px;
    border-radius: 999px;
    font-family: var(--font-family);
    font-weight: var(--font-semibold);
    font-size: var(--text-lg);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bottom-cta .cta-pill:hover {
    background: var(--green-primary);
    color: white;
}

/* ========================================
   RESPONSIVE — 768px
   ======================================== */
@media (max-width: 768px) {
    .schools-hero .schools-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-copy {
        text-align: center;
    }

    .schools-subheadline {
        max-width: 100%;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .school-visual {
        max-width: 200px;
    }

    .school-building {
        height: 160px;
    }

    .building-main {
        width: 140px;
        height: 85px;
    }

    .building-roof {
        border-left-width: 70px;
        border-right-width: 70px;
        border-bottom-width: 28px;
        top: 32px;
    }

    .window {
        width: 14px;
        height: 14px;
    }

    .window:nth-child(1) { top: 14px; left: 20px; }
    .window:nth-child(2) { top: 14px; right: 20px; }
    .window:nth-child(3) { top: 36px; left: 20px; }
    .window:nth-child(4) { top: 36px; right: 20px; }

    .door {
        width: 22px;
        height: 30px;
    }

    .school-icon {
        width: 28px;
        height: 28px;
    }

    .school-floor {
        width: 200px;
    }

    .trust-bar__grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-xl);
    }

    .schools-tab-bar {
        padding: 0 var(--space-sm);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .schools-tab {
        padding: 12px 14px;
        font-size: var(--text-xs);
    }

    .schools-tab .tab-label-full {
        display: none;
    }

    .schools-tab .tab-label-short {
        display: inline;
    }

    .tab-icon {
        width: 16px;
        height: 16px;
    }

    .info-grid {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .contact-methods {
        grid-template-columns: 1fr;
    }

    .panel-intro {
        padding: var(--space-3xl) var(--container-padding) var(--space-2xl);
    }
}

/* ========================================
   RESPONSIVE — 480px
   ======================================== */
@media (max-width: 480px) {
    .schools-hero {
        padding: var(--space-3xl) 0 var(--space-2xl);
    }

    .hero-actions {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        justify-content: center;
    }

    .trust-bar__number {
        font-size: var(--text-xl);
    }
}

/* ========================================
   CONTACT MODAL
   ======================================== */
.contact-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.contact-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.contact-modal {
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(20px) scale(0.97);
    transition: transform 0.25s ease;
    position: relative;
}

.contact-modal-overlay.active .contact-modal {
    transform: translateY(0) scale(1);
}

.contact-modal__header {
    padding: var(--space-2xl) var(--space-2xl) 0;
}

.contact-modal__title {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-modal__subtitle {
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.contact-modal__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: background 0.15s ease;
}

.contact-modal__close:hover {
    background: var(--gray-200);
}

.contact-modal__form {
    padding: var(--space-xl) var(--space-2xl) var(--space-2xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contact-modal__field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-modal__label {
    font-size: var(--text-sm);
    font-weight: var(--font-medium);
    color: var(--text-primary);
}

.contact-modal__input,
.contact-modal__select,
.contact-modal__textarea {
    font-family: var(--font-family);
    font-size: var(--text-base);
    padding: 12px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: 10px;
    background: var(--bg-white);
    color: var(--text-primary);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.contact-modal__select {
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%236B655A' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
}

.contact-modal__input:focus,
.contact-modal__select:focus,
.contact-modal__textarea:focus {
    border-color: var(--green-primary);
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.contact-modal__textarea {
    resize: vertical;
    min-height: 100px;
}

.contact-modal__row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.contact-modal__submit {
    font-family: var(--font-family);
    padding: 14px 32px;
    background: var(--green-primary);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: background 0.15s ease, transform 0.1s ease;
}

.contact-modal__submit:hover {
    background: var(--green-hover);
}

.contact-modal__submit:active {
    transform: scale(0.98);
}

.contact-modal__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.contact-modal__success {
    text-align: center;
    padding: var(--space-4xl) var(--space-2xl);
}

.contact-modal__success-icon {
    width: 56px;
    height: 56px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.contact-modal__success h3 {
    font-size: var(--text-xl);
    font-weight: var(--font-bold);
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.contact-modal__success p {
    font-size: var(--text-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

.contact-modal__success-close {
    font-family: var(--font-family);
    padding: 12px 32px;
    background: var(--green-primary);
    color: white;
    border: none;
    border-radius: 999px;
    font-size: var(--text-base);
    font-weight: var(--font-semibold);
    cursor: pointer;
    transition: background 0.15s ease;
}

.contact-modal__success-close:hover {
    background: var(--green-hover);
}

.contact-modal__error {
    background: #fef2f2;
    color: #991b1b;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: var(--text-sm);
    display: none;
}

@media (max-width: 480px) {
    .contact-modal__row {
        grid-template-columns: 1fr;
    }

    .contact-modal {
        max-height: 95vh;
    }

    .contact-modal__header {
        padding: var(--space-xl) var(--space-xl) 0;
    }

    .contact-modal__form {
        padding: var(--space-lg) var(--space-xl) var(--space-xl);
    }
}

/* ========================================
   ANIMATIONS
   ======================================== */
.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
