/* =========================================================
   CONTACT.CSS
   Dynamic School Contact Page
   ========================================================= */


/* =========================================================
   1. HERO
   ========================================================= */

.contact-page-hero {
    position: relative;
    overflow: hidden;

    background:
        radial-gradient(
            circle at 15% 20%,
            rgba(34, 197, 94, 0.18),
            transparent 32%
        ),
        radial-gradient(
            circle at 85% 25%,
            rgba(14, 165, 233, 0.12),
            transparent 30%
        ),
        linear-gradient(
            135deg,
            #07150d,
            var(--primary-dark),
            var(--primary)
        );
}

.contact-page-hero::before {
    content: "";

    position: absolute;
    inset: 0;

    background-image:
        linear-gradient(
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035) 1px,
            transparent 1px
        );

    background-size: 45px 45px;

    pointer-events: none;
}

.contact-page-hero::after {
    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    right: -130px;
    bottom: -180px;

    background: rgba(255, 255, 255, 0.05);

    border-radius: 50%;
}

.contact-page-hero .container,
.contact-page-hero .page-hero-content {
    position: relative;
    z-index: 2;
}

.contact-hero-badge {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 15px;
    padding: 8px 14px;

    color: var(--secondary);

    background: rgba(255, 255, 255, 0.08);

    border: 1px solid rgba(255, 255, 255, 0.12);

    border-radius: var(--radius-full);

    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;

    text-transform: uppercase;

    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}


/* =========================================================
   2. CONTACT INFO CARDS
   ========================================================= */

.contact-info-section {
    padding: 45px 0 20px;

    background: var(--white);
}

.contact-info-grid {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 18px;
}

.contact-info-card {
    min-height: 175px;

    padding: 24px;

    display: flex;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;

    color: var(--dark);

    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f8fafc
        );

    border: 1px solid var(--border);

    border-radius: 19px;

    box-shadow: var(--shadow-sm);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-5px);

    border-color: rgba(34, 197, 94, 0.22);

    box-shadow: var(--shadow-lg);
}

.contact-info-icon {
    width: 50px;
    height: 50px;

    margin-bottom: 16px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--primary),
            var(--primary-light)
        );

    border-radius: 15px;

    font-size: 19px;

    box-shadow:
        0 12px 28px
        rgba(20, 83, 45, 0.18);
}

.contact-info-card > span {
    display: block;

    margin-bottom: 4px;

    color: var(--primary);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.5px;

    text-transform: uppercase;
}

.contact-info-card > strong {
    display: block;

    max-width: 100%;

    margin-bottom: 4px;

    color: var(--dark);

    font-size: 14px;

    word-break: break-word;
}

.contact-info-card > small {
    display: block;

    color: var(--text-light);

    font-size: 9px;
    line-height: 1.6;

    word-break: break-word;
}


/* =========================================================
   3. MAIN SECTION
   ========================================================= */

.contact-main-section {
    background:
        linear-gradient(
            180deg,
            var(--bg-soft),
            var(--white)
        );
}

.contact-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(300px, 0.36fr);

    align-items: start;

    gap: 28px;
}


/* =========================================================
   4. FORM CARD
   ========================================================= */

.contact-form-card {
    padding: 32px;

    background: var(--white);

    border: 1px solid var(--border);

    border-radius: 23px;

    box-shadow:
        0 18px 50px
        rgba(15, 23, 42, 0.07);
}

.contact-form-heading {
    margin-bottom: 26px;
}

.contact-form-heading h2 {
    margin-bottom: 8px;

    font-size:
        clamp(
            26px,
            4vw,
            36px
        );
}

.contact-form-heading p {
    max-width: 650px;

    color: var(--text-light);

    font-size: 12px;
    line-height: 1.8;
}


/* =========================================================
   5. ALERTS
   ========================================================= */

.contact-success-alert,
.contact-error-alert {
    margin-bottom: 22px;
    padding: 15px 16px;

    display: flex;
    align-items: flex-start;

    gap: 11px;

    border-radius: 13px;
}

.contact-success-alert {
    color: #166534;

    background: #f0fdf4;

    border: 1px solid #bbf7d0;
}

.contact-error-alert {
    color: #991b1b;

    background: #fef2f2;

    border: 1px solid #fecaca;
}

.contact-success-alert > i,
.contact-error-alert > i {
    margin-top: 2px;

    font-size: 18px;
}

.contact-success-alert strong,
.contact-error-alert strong {
    display: block;

    margin-bottom: 3px;

    font-size: 11px;
}

.contact-success-alert p {
    font-size: 10px;
    line-height: 1.7;
}

.contact-error-alert ul {
    margin: 6px 0 0 17px;
}

.contact-error-alert li {
    margin: 3px 0;

    font-size: 10px;
}


/* =========================================================
   6. FORM GRID
   ========================================================= */

.contact-form-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.contact-form-group {
    display: grid;
    gap: 7px;
}

.contact-form-full {
    grid-column: 1 / -1;
}

.contact-form-group label {
    color: var(--dark);

    font-size: 10px;
    font-weight: 700;
}

.contact-form-group label > span {
    color: var(--danger);
}

.contact-input-wrapper {
    position: relative;
}

.contact-input-wrapper > i {
    position: absolute;

    left: 14px;
    top: 50%;

    z-index: 2;

    transform: translateY(-50%);

    color: var(--primary);

    font-size: 11px;

    pointer-events: none;
}

.contact-textarea-wrapper > i {
    top: 16px;

    transform: none;
}

.contact-input-wrapper input,
.contact-input-wrapper textarea {
    width: 100%;

    padding:
        11px
        14px
        11px
        40px;

    color: var(--dark);

    background: #fbfcfd;

    border: 1px solid #dfe5ea;

    border-radius: 11px;

    outline: none;

    font-family: inherit;
    font-size: 11px;

    transition:
        border-color 0.2s ease,
        background 0.2s ease,
        box-shadow 0.2s ease;
}

.contact-input-wrapper input {
    min-height: 49px;
}

.contact-input-wrapper textarea {
    min-height: 145px;

    resize: vertical;

    line-height: 1.7;
}

.contact-input-wrapper input:hover,
.contact-input-wrapper textarea:hover {
    border-color: #cbd5e1;
}

.contact-input-wrapper input:focus,
.contact-input-wrapper textarea:focus {
    background: var(--white);

    border-color: var(--primary);

    box-shadow:
        0 0 0 3px
        rgba(34, 197, 94, 0.09);
}

.contact-input-wrapper input::placeholder,
.contact-input-wrapper textarea::placeholder {
    color: #9ca3af;
}


/* =========================================================
   7. VALIDATION STATE
   ========================================================= */

.contact-input-wrapper input.field-error,
.contact-input-wrapper textarea.field-error {
    border-color: var(--danger);

    background: #fffafa;

    box-shadow:
        0 0 0 3px
        rgba(220, 38, 38, 0.06);
}

.contact-field-error {
    display: block;

    margin-top: 5px;

    color: var(--danger);

    font-size: 9px;
    font-weight: 600;
}


/* =========================================================
   8. SUBMIT ROW
   ========================================================= */

.contact-submit-row {
    margin-top: 25px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;
}

.contact-security-note {
    display: flex;
    align-items: center;

    gap: 7px;

    color: var(--text-light);

    font-size: 9px;
}

.contact-security-note i {
    color: var(--primary);
}

.contact-submit-btn {
    min-width: 190px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.contact-submit-btn:disabled {
    opacity: 0.7;

    cursor: not-allowed;

    transform: none !important;
}

.contact-submit-btn.is-loading i {
    animation:
        contactSpinner
        0.8s linear infinite;
}

@keyframes contactSpinner {
    to {
        transform: rotate(360deg);
    }
}


/* =========================================================
   9. SIDEBAR
   ========================================================= */

.contact-sidebar {
    position: sticky;

    top: 110px;

    display: grid;
    gap: 20px;
}

.contact-school-card,
.contact-help-card {
    border-radius: 20px;

    box-shadow: var(--shadow-sm);
}

.contact-school-card {
    padding: 26px;

    background: var(--white);

    border: 1px solid var(--border);
}

.contact-sidebar-label {
    display: block;

    margin-bottom: 4px;

    color: var(--primary);

    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.6px;

    text-transform: uppercase;
}

.contact-school-card > h2 {
    margin-bottom: 23px;

    font-size: 21px;
}

.contact-school-detail {
    display: flex;
    align-items: flex-start;

    gap: 11px;

    padding: 14px 0;

    border-bottom: 1px solid var(--border);
}

.contact-school-detail:last-child {
    border-bottom: 0;
}

.contact-school-detail > span {
    flex: 0 0 auto;

    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--primary);

    background:
        rgba(34, 197, 94, 0.08);

    border-radius: 11px;

    font-size: 13px;
}

.contact-school-detail strong {
    display: block;

    margin-bottom: 3px;

    color: var(--dark);

    font-size: 10px;
}

.contact-school-detail p,
.contact-school-detail a {
    color: var(--text-light);

    font-size: 9px;
    line-height: 1.65;
}

.contact-school-detail a:hover {
    color: var(--primary);
}


/* =========================================================
   10. HELP CARD
   ========================================================= */

.contact-help-card {
    position: relative;

    padding: 27px;

    color: var(--white);

    background:
        linear-gradient(
            145deg,
            #07150d,
            var(--primary-dark),
            var(--primary)
        );

    overflow: hidden;
}

.contact-help-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -90px;
    bottom: -100px;

    background: rgba(255, 255, 255, 0.05);

    border-radius: 50%;
}

.contact-help-card > * {
    position: relative;
    z-index: 2;
}

.contact-help-icon {
    width: 53px;
    height: 53px;

    margin-bottom: 17px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: var(--dark);

    background:
        linear-gradient(
            135deg,
            #fde68a,
            var(--secondary)
        );

    border-radius: 15px;

    font-size: 20px;
}

.contact-help-card > span {
    display: block;

    margin-bottom: 4px;

    color: var(--secondary);

    font-size: 8px;
    font-weight: 800;

    text-transform: uppercase;
}

.contact-help-card h3 {
    margin-bottom: 8px;

    color: var(--white);

    font-size: 19px;
}

.contact-help-card p {
    margin-bottom: 18px;

    color: rgba(255, 255, 255, 0.65);

    font-size: 10px;
    line-height: 1.75;
}


/* =========================================================
   11. MAP
   ========================================================= */

.contact-map-section {
    padding: 20px 0 75px;

    background: var(--white);
}

.contact-map-heading {
    margin-bottom: 24px;
}

.contact-map-card {
    min-height: 420px;

    background: var(--bg-soft);

    border: 1px solid var(--border);

    border-radius: 22px;

    box-shadow: var(--shadow-sm);

    overflow: hidden;
}

.contact-map-card iframe {
    width: 100% !important;
    height: 420px !important;

    display: block;

    border: 0 !important;
}


/* =========================================================
   12. FINAL CTA
   ========================================================= */

.contact-final-cta {
    padding: 15px 0 25px;

    background: var(--white);
}

.contact-final-card {
    position: relative;

    min-height: 220px;

    padding: 38px 42px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 35px;

    color: var(--white);

    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(34, 197, 94, 0.18),
            transparent 32%
        ),
        linear-gradient(
            135deg,
            #07150d,
            var(--primary-dark),
            var(--primary)
        );

    border-radius: 25px;

    box-shadow:
        0 25px 55px
        rgba(20, 83, 45, 0.18);

    overflow: hidden;
}

.contact-final-card::before {
    content: "";

    position: absolute;

    width: 230px;
    height: 230px;

    right: -100px;
    bottom: -140px;

    background: rgba(255, 255, 255, 0.05);

    border-radius: 50%;
}

.contact-final-card > * {
    position: relative;
    z-index: 2;
}

.contact-final-card > div {
    max-width: 720px;
}

.contact-final-card span {
    display: block;

    margin-bottom: 5px;

    color: var(--secondary);

    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.6px;

    text-transform: uppercase;
}

.contact-final-card h2 {
    margin-bottom: 8px;

    color: var(--white);

    font-size:
        clamp(
            27px,
            4vw,
            39px
        );
}

.contact-final-card p {
    color: rgba(255, 255, 255, 0.67);

    font-size: 11px;
    line-height: 1.75;
}


/* =========================================================
   13. RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {

    .contact-info-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {

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

    .contact-sidebar {
        position: static;

        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {

    .contact-form-card {
        padding: 25px 22px;
    }

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

    .contact-form-full {
        grid-column: auto;
    }

    .contact-submit-row {
        flex-direction: column;
        align-items: stretch;
    }

    .contact-security-note {
        justify-content: center;

        text-align: center;
    }

    .contact-submit-btn {
        width: 100%;
    }

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

    .contact-final-card {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 520px) {

    .contact-page-hero h1 {
        font-size: 31px;
    }

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

    .contact-info-card {
        min-height: 145px;
    }

    .contact-form-card {
        border-radius: 18px;
    }

    .contact-map-card,
    .contact-map-card iframe {
        min-height: 320px;
        height: 320px !important;
    }

    .contact-final-card {
        padding: 30px 23px;
    }

    .contact-final-card .btn {
        width: 100%;
    }
}


/* =========================================================
   14. REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .contact-info-card,
    .contact-input-wrapper input,
    .contact-input-wrapper textarea {
        transition: none;
    }

    .contact-submit-btn.is-loading i {
        animation: none;
    }
}


/* =========================================================
   15. PRINT
   ========================================================= */

@media print {

    .contact-page-hero,
    .contact-form-card,
    .contact-help-card,
    .contact-map-section,
    .contact-final-cta {
        display: none !important;
    }

    .contact-layout {
        display: block;
    }

    .contact-sidebar {
        position: static;
    }

    .contact-school-card {
        box-shadow: none;
    }
}