
:root {
    --primary-dark: #12316B;
    --primary: #1D4ED8;
    --secondary: #60A5FA;
    --light-blue: #EFF6FF;
    --background: #F8FAFC;
    --text: #172033;
    --muted: #64748B;
    --border: #E2E8F0;
    --white: #FFFFFF;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: var(--background);
    color: var(--text);
}

.contact-page {
    min-height: 75vh;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.contact-hero {
    padding: 85px 0 105px;
    background:
        radial-gradient(circle at 85% 20%, rgba(96,165,250,.18), transparent 30%),
        linear-gradient(120deg, #12316B, #1D4ED8);
    color: white;
}

.section-label {
    display: inline-block;
    margin-bottom: 20px;
    padding: 8px 13px;
    border: 1px solid rgba(255,255,255,.25);
    border-radius: 30px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.contact-hero h1 {
    max-width: 750px;
    margin: 0;
    font-size: clamp(34px, 5vw, 55px);
    line-height: 1.13;
    font-weight: 800;
    letter-spacing: -2px;
}

.contact-hero h1 span {
    display: block;
    color: #BFDBFE;
}

.contact-hero p {
    max-width: 570px;
    margin-top: 22px;
    color: #DBEAFE;
    font-size: 16px;
    line-height: 1.8;
}

.contact-content {
    display: grid;
    grid-template-columns: .85fr 1.15fr;
    gap: 65px;
    padding-top: 75px;
    padding-bottom: 90px;
    align-items: start;
}

.info-heading {
    display: flex;
    align-items: center;
    gap: 14px;
}

.info-heading h2,
.form-heading h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 750;
}

.info-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--light-blue);
    color: var(--primary);
    font-size: 22px;
}

.info-description {
    margin: 18px 0 35px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.8;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 27px;
}

.info-item-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: white;
    border: 1px solid var(--border);
    color: var(--primary);
}

.info-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.info-item p {
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.6;
}

.contact-note {
    margin-top: 38px;
    padding: 22px;
    border: 1px solid #BFDBFE;
    border-radius: 14px;
    background: var(--light-blue);
}

.contact-note strong {
    color: var(--primary-dark);
    font-size: 14px;
}

.contact-note p {
    margin: 9px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}

.contact-form-container {
    padding: 35px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: white;
    box-shadow: 0 12px 40px rgba(15, 23, 42, .04);
}

.form-heading {
    margin-bottom: 30px;
}

.form-heading p {
    margin: 9px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px;
}

.form-group {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 9px;
    margin-bottom: 21px;
}

.form-group label {
    font-size: 13px;
    font-weight: 650;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: white;
    color: var(--text);
    font-family: inherit;
    font-size: 13px;
    transition: border .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(29,78,216,.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 145px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94A3B8;
}

.character-count {
    align-self: flex-end;
    margin-top: -12px;
    color: var(--muted);
    font-size: 11px;
}

.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 5px 0 24px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.6;
}

.privacy-check input {
    margin-top: 3px;
    accent-color: var(--primary);
}

#submitButton {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 16px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .2s;
}

#submitButton:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

#submitButton:disabled {
    opacity: .6;
    cursor: not-allowed;
}

.form-message {
    display: none;
    margin-top: 18px;
    padding: 13px;
    border-radius: 9px;
    font-size: 13px;
    line-height: 1.6;
}

.form-message.success {
    display: block;
    background: #ECFDF5;
    color: #047857;
}

.form-message.error {
    display: block;
    background: #FEF2F2;
    color: #B91C1C;
}

@media (max-width: 800px) {
    .contact-content {
        grid-template-columns: 1fr;
        gap: 45px;
        padding-top: 50px;
    }

    .contact-hero {
        padding: 65px 0 80px;
    }

    .contact-hero h1 {
        letter-spacing: -1.3px;
    }
}

@media (max-width: 550px) {
    .container {
        width: min(100% - 30px, 1120px);
    }

    .contact-hero {
        padding: 55px 0 65px;
    }

    .contact-hero p {
        font-size: 14px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .contact-form-container {
        padding: 22px 17px;
        border-radius: 14px;
    }

    .info-heading h2,
    .form-heading h2 {
        font-size: 21px;
    }
}


/* =========================================
   MODAL DE CONTACTO
========================================= */

[hidden] {
    display: none !important;
}

body.modal-open {
    overflow: hidden;
}

.contact-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(4px);
}

.contact-modal-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    padding: 38px 30px 30px;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    text-align: center;
    box-shadow: 0 25px 80px rgba(15, 23, 42, .2);
    animation: contactModalAppear .2s ease;
}

@keyframes contactModalAppear {
    from {
        opacity: 0;
        transform: translateY(12px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.contact-modal-close {
    position: absolute;
    top: 13px;
    right: 16px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-size: 27px;
    cursor: pointer;
}

.contact-modal-close:hover {
    background: var(--light-blue);
    color: var(--primary);
}

.contact-modal-icon {
    display: grid;
    place-items: center;
    width: 65px;
    height: 65px;
    margin: 0 auto 20px;
    border-radius: 50%;
    font-size: 30px;
    font-weight: 700;
}

.modal-success .contact-modal-icon {
    background: #DCFCE7;
    color: #15803D;
}

.modal-error .contact-modal-icon {
    background: #FEE2E2;
    color: #B91C1C;
}

.contact-modal-card h2 {
    margin: 0 0 12px;
    color: var(--text);
    font-size: 23px;
    font-weight: 750;
}

.contact-modal-card p {
    margin: 0 auto 25px;
    max-width: 320px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.contact-modal-button {
    width: 100%;
    padding: 14px;
    border: 0;
    border-radius: 10px;
    background: var(--primary);
    color: white;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s;
}

.contact-modal-button:hover {
    background: var(--primary-dark);
}

@media (max-width: 480px) {
    .contact-modal-card {
        padding: 35px 22px 24px;
    }
}
