/**
 * Contacto — Dios/Pro Premium
 * Usa variables del color-system del proyecto (--color-primary, --color-accent…).
 */

.contacto-main {
    --ct-primary: var(--color-primary, #2c5aa0);
    --ct-primary-dark: var(--color-primary-dark, #1e3d73);
    --ct-primary-light: var(--color-primary-light, #4a7bc8);
    --ct-accent: var(--color-accent, #d4af37);
    --ct-accent-dark: var(--color-accent-dark, #b8860b);
    --ct-surface: var(--color-surface, #ffffff);
    --ct-ink: #1e293b;
    --ct-muted: #64748b;
    --ct-line: rgba(44, 90, 160, 0.14);
    --ct-soft: linear-gradient(135deg, #EEF3FF 0%, #FFFFFF 100%);
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: clamp(18px, 3vw, 36px) clamp(12px, 3vw, 28px) clamp(40px, 6vw, 64px);
    box-sizing: border-box;
}

.contacto-hero {
    text-align: center;
    margin: 0 auto 28px;
    max-width: 760px;
}

.contacto-hero h2 {
    margin: 0 0 10px;
    font-size: clamp(1.55rem, 4vw, 2.15rem);
    font-weight: 700;
    color: var(--ct-accent) !important;
    letter-spacing: 0.2px;
}

.contacto-lead {
    margin: 0 auto 20px;
    color: var(--ct-muted);
    line-height: 1.6;
    font-size: clamp(0.98rem, 2.2vw, 1.08rem);
}

.contacto-cta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
}

/*
 * Botones Contacto — texto SIEMPRE legible con rotación de tema.
 * El override global `a:not(footer a)` pinta enlaces con --color-primary;
 * aquí forzamos tinta + -webkit-text-fill-color en el botón y en <i>/span.
 */
html body .contacto-main a.contacto-cta,
html body .contacto-main a.contacto-cta:link,
html body .contacto-main a.contacto-cta:visited,
html body .contacto-main a.contacto-cta:hover,
html body .contacto-main a.contacto-cta:active,
html body .contacto-main a.contacto-cta:focus,
html body .contacto-main button.contacto-submit,
html body .contacto-main button.contacto-submit:hover,
html body .contacto-main button.contacto-submit:focus,
html body .contacto-main button.contacto-submit:active {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-decoration: none !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

html body .contacto-main a.contacto-cta {
    min-height: 48px;
    padding: 12px 22px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.2;
    white-space: nowrap;
    transition: transform .15s ease, box-shadow .15s ease, filter .15s ease, background .15s ease, border-color .15s ease;
}

html body .contacto-main a.contacto-cta:hover {
    transform: translateY(-1px);
}

/* Primario (Reservar): fondo dorado/acento, texto e icono siempre blancos */
html body .contacto-main a.contacto-cta--reserve,
html body .contacto-main a.contacto-cta--reserve:link,
html body .contacto-main a.contacto-cta--reserve:visited,
html body .contacto-main a.contacto-cta--reserve:hover,
html body .contacto-main a.contacto-cta--reserve:active,
html body .contacto-main a.contacto-cta--reserve:focus {
    background: linear-gradient(135deg, var(--ct-accent, #d4af37) 0%, var(--ct-accent-dark, #b8860b) 100%) !important;
    background-color: #b8860b !important;
    border: 2px solid transparent !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22) !important;
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.28) !important;
}

html body .contacto-main a.contacto-cta--reserve *,
html body .contacto-main a.contacto-cta--reserve i,
html body .contacto-main a.contacto-cta--reserve .fas,
html body .contacto-main a.contacto-cta--reserve .fa,
html body .contacto-main a.contacto-cta--reserve span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

/* Secundario (Pedidos): superficie clara + borde primario; hover = fondo primario + texto blanco */
html body .contacto-main a.contacto-cta--order,
html body .contacto-main a.contacto-cta--order:link,
html body .contacto-main a.contacto-cta--order:visited {
    background: #ffffff !important;
    background-color: #ffffff !important;
    border: 2px solid var(--ct-primary, #2c5aa0) !important;
    color: #1e3d73 !important;
    -webkit-text-fill-color: #1e3d73 !important;
    text-shadow: none !important;
    box-shadow: 0 4px 14px rgba(44, 90, 160, 0.12) !important;
}

html body .contacto-main a.contacto-cta--order *,
html body .contacto-main a.contacto-cta--order i,
html body .contacto-main a.contacto-cta--order .fas,
html body .contacto-main a.contacto-cta--order .fa,
html body .contacto-main a.contacto-cta--order span {
    color: #1e3d73 !important;
    -webkit-text-fill-color: #1e3d73 !important;
    opacity: 1 !important;
}

html body .contacto-main a.contacto-cta--order:hover,
html body .contacto-main a.contacto-cta--order:active,
html body .contacto-main a.contacto-cta--order:focus {
    background: linear-gradient(135deg, var(--ct-primary, #2c5aa0) 0%, var(--ct-primary-light, #4a7bc8) 100%) !important;
    background-color: var(--ct-primary, #2c5aa0) !important;
    border-color: var(--ct-primary-dark, #1e3d73) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2) !important;
}

html body .contacto-main a.contacto-cta--order:hover *,
html body .contacto-main a.contacto-cta--order:hover i,
html body .contacto-main a.contacto-cta--order:hover .fas,
html body .contacto-main a.contacto-cta--order:hover .fa,
html body .contacto-main a.contacto-cta--order:hover span,
html body .contacto-main a.contacto-cta--order:active *,
html body .contacto-main a.contacto-cta--order:focus * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Layout ancho: info + formulario */
.contacto-grid {
    display: grid;
    grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.45fr);
    gap: clamp(16px, 2.5vw, 28px);
    align-items: stretch;
    width: 100%;
}

.contacto-grid--solo-form {
    grid-template-columns: 1fr;
    max-width: 920px;
    margin: 0 auto;
}

.contacto-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contacto-info__block {
    background: var(--ct-soft);
    border: 1px solid var(--ct-line);
    border-left: 4px solid var(--ct-accent);
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 4px 14px rgba(44, 90, 160, 0.08);
}

.contacto-info__block h3 {
    margin: 0 0 8px;
    font-size: 0.98rem;
    font-weight: 700;
    color: var(--ct-primary) !important;
    display: flex;
    align-items: center;
    gap: 8px;
}

.contacto-info__block h3 i {
    color: var(--ct-accent);
    width: 1.1em;
    text-align: center;
}

.contacto-info__block p {
    margin: 0;
    color: var(--ct-ink);
    line-height: 1.5;
    font-size: 0.98rem;
}

.contacto-link {
    color: var(--ct-primary) !important;
    font-weight: 700;
    text-decoration: none !important;
}

.contacto-link:hover {
    color: var(--ct-primary-dark) !important;
    text-decoration: underline !important;
}

.contacto-form-wrap {
    background: var(--ct-surface);
    border: 1px solid var(--ct-line);
    border-radius: 16px;
    padding: clamp(22px, 3vw, 36px);
    box-shadow: 0 8px 28px rgba(44, 90, 160, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.contacto-form-title {
    margin: 0 0 22px;
    text-align: center;
    font-size: clamp(1.25rem, 3vw, 1.7rem);
    font-weight: 700;
    color: var(--ct-accent) !important;
}

.contacto-form {
    width: 100%;
    max-width: none;
}

.contacto-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px 18px;
    width: 100%;
}

.contacto-field {
    margin: 0;
    min-width: 0;
}

.contacto-field--full {
    grid-column: 1 / -1;
}

.contacto-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.contacto-field input,
.contacto-field textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 14px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px; /* evita zoom iOS */
    font-family: inherit;
    color: #1e293b;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.contacto-field input:focus,
.contacto-field textarea:focus {
    outline: none;
    border-color: var(--ct-accent);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18);
}

.contacto-field textarea {
    min-height: 140px;
    resize: vertical;
}

.contacto-honeypot {
    position: absolute !important;
    left: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Turnstile visible + etiqueta corta (compacto, sin caja excesiva) */
.contacto-turnstile {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 4px 0 2px;
    padding: 8px 10px;
    min-height: 0;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.contacto-turnstile__label {
    margin: 0;
    padding: 0;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.35;
    text-align: center;
    color: #64748b;
}

.contacto-turnstile__label i {
    margin-right: 4px;
    color: #0ea5e9;
}

#contacto-turnstile-widget,
.contacto-turnstile .cf-turnstile {
    width: auto;
    max-width: 100%;
    min-height: 65px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

#contacto-turnstile-widget iframe,
.contacto-turnstile iframe {
    max-width: 100%;
}

html body .contacto-main button.contacto-submit,
html body .contacto-main .contacto-submit {
    grid-column: 1 / -1;
    width: 100%;
    margin-top: 4px;
    border: 0 !important;
    border-radius: 12px;
    padding: 15px 18px;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    cursor: pointer;
    background: linear-gradient(135deg, var(--ct-accent, #d4af37) 0%, var(--ct-accent-dark, #b8860b) 100%) !important;
    background-color: #b8860b !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22) !important;
    box-shadow: 0 8px 20px rgba(184, 134, 11, 0.25) !important;
}

html body .contacto-main button.contacto-submit *,
html body .contacto-main button.contacto-submit i,
html body .contacto-main button.contacto-submit .fas,
html body .contacto-main button.contacto-submit .fa,
html body .contacto-main button.contacto-submit span,
html body .contacto-main .contacto-submit i,
html body .contacto-main .contacto-submit .fas {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    opacity: 1 !important;
}

html body .contacto-main button.contacto-submit:hover:not(:disabled),
html body .contacto-main button.contacto-submit:focus:not(:disabled),
html body .contacto-main .contacto-submit:hover:not(:disabled) {
    filter: brightness(1.05);
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

html body .contacto-main button.contacto-submit:disabled,
html body .contacto-main .contacto-submit:disabled {
    opacity: .65;
    cursor: not-allowed;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.contacto-message {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 0.96rem;
    line-height: 1.45;
}

.contacto-message--ok {
    background: #d4edda;
    border-left: 4px solid #28a745;
    color: #155724;
}

.contacto-message--err {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #721c24;
}

.contacto-form-disabled {
    margin: 0;
    color: var(--ct-muted);
    text-align: center;
    line-height: 1.55;
}

/* Tablets / iPad portrait */
@media (max-width: 1024px) {
    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .contacto-info {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }
}

/* Móvil / iPhone / iPad estrecho */
@media (max-width: 720px) {
    .contacto-fields {
        grid-template-columns: 1fr;
    }

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

    .contacto-form-wrap {
        padding: 20px 16px;
        border-radius: 14px;
    }

    .contacto-cta {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 480px) {
    .contacto-main {
        padding-left: 10px;
        padding-right: 10px;
    }

    .contacto-info__block {
        padding: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contacto-cta,
    .contacto-field input,
    .contacto-field textarea,
    .contacto-submit {
        transition: none;
    }
}
