/* ============================================================
   Publica con Nosotros — estilos de página
   ------------------------------------------------------------
   Se carga únicamente en publica_con_nosotros.php vía $head_extras.
   NO forma parte de estilos_index.css, que se comparte con index.php,
   publicaciones.php, reseña_historica.php y autores.php.

   Hereda la paleta base de :root en estilos_index.css
   (--verde, --verde-mid, --naranja, --naranja-hover, --gris-claro).
   ============================================================ */

:root {
    --exito: #16a34a;
    --exito-texto: #15803d;
    --exito-bg: #f0fdf4;
    --exito-borde: #bbf7d0;
    --exito-icono-bg: #dcfce7;
    --error: #dc2626;
    --error-bg: #fef2f2;
    --error-borde: #fecaca;
    --campo-borde: #e2e8e5;
    --campo-bg: #f9fafb;
    --gris-texto: #6b7c76;
    --gris-tenue: #9aaaa4;
    --anillo-enfoque: 0 0 0 3px rgba(224, 124, 46, 0.15);
}

/* ── Hero ── */
.page-hero {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 420px;
    background-color: var(--verde);
    background-image: var(--hero-imagen);
    background-size: cover;
    background-position: center;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(13,36,25,0.88) 0%, rgba(26,58,46,0.82) 50%, rgba(26,71,49,0.75) 100%);
}

.page-hero-inner {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 4rem 1.5rem;
    max-width: 700px;
    margin: 0 auto;
}

.page-hero-eyebrow {
    color: rgba(224, 124, 46, 0.9);
}

.page-hero-title {
    font-family: 'Playfair Display', serif;
    color: #fff;
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 700;
    line-height: 1.15;
    margin-top: 0.6rem;
}

.page-hero-title-accent {
    color: var(--naranja);
}

.page-hero-sub {
    color: rgba(255, 255, 255, 0.72);
    font-size: clamp(0.82rem, 1.3vw, 0.95rem);
    line-height: 1.7;
    max-width: 520px;
    margin: 1.2rem auto 0;
}

.page-hero-cta {
    margin-top: 2rem;
    padding: 0.85rem 1.8rem;
    font-size: 0.88rem;
    border-radius: 10px;
    gap: 0.5rem;
}

/* ── Contenedor del formulario ── */
.section--form {
    max-width: 680px;
}

/* ── Indicador de pasos ── */
.step-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 2.5rem 0 2rem;
}

.step-dot {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', serif;
    font-size: 0.88rem;
    font-weight: 700;
    background: #fff;
    border: 1.5px solid var(--campo-borde);
    color: var(--gris-texto);
    transition: all 0.3s;
}

.step-dot.is-active {
    background: var(--naranja);
    border-color: var(--naranja);
    color: #fff;
}

.step-dot.is-done {
    background: var(--exito);
    border-color: var(--exito);
    color: #fff;
}

.step-line {
    width: 60px;
    height: 3px;
    background: var(--campo-borde);
    border-radius: 2px;
    transition: background 0.3s;
}

.step-line.is-done {
    background: var(--exito);
}

/* ── Paneles de paso ── */
.step-panel {
    display: none;
}

.step-panel.is-active {
    display: block;
}

.form-card {
    background: #fff;
    border: 1.5px solid var(--campo-borde);
    border-radius: 20px;
    padding: 2.2rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.form-card--centro {
    text-align: center;
    padding: 2.5rem;
}

.form-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--verde);
    text-align: center;
    margin-bottom: 0.3rem;
}

.form-card-sub {
    font-size: 0.8rem;
    color: var(--gris-texto);
    text-align: center;
    margin-bottom: 1.5rem;
}

/* ── Campos ── */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.form-grid--compact {
    margin-bottom: 1rem;
}

.form-field {
    margin-bottom: 1.2rem;
}

.form-field--last {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--verde);
    margin-bottom: 0.4rem;
}

.form-req {
    color: var(--naranja);
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--campo-borde);
    border-radius: 12px;
    background: var(--campo-bg);
    color: var(--verde);
    font-size: 0.88rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-input:focus,
.form-select:focus {
    border-color: var(--naranja);
    box-shadow: var(--anillo-enfoque);
}

.form-input::placeholder {
    color: var(--gris-tenue);
}

.form-select-wrap {
    position: relative;
}

.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: 2.5rem;
}

.form-select-chevron {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: var(--gris-tenue);
}

.form-hint {
    font-size: 0.7rem;
    color: var(--gris-tenue);
}

/* ── Dropzone ── */
.dropzone {
    position: relative;
    border: 2px dashed var(--campo-borde);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.dropzone:hover {
    border-color: var(--naranja);
    background: #fff7ed;
}

.dropzone.is-filled {
    border-color: var(--exito);
    background: var(--exito-bg);
}

.dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone-icon {
    margin: 0 auto 0.5rem;
    color: var(--gris-tenue);
}

.dropzone-label {
    font-size: 0.82rem;
    color: var(--gris-texto);
    margin-bottom: 0.2rem;
    word-break: break-all;
}

/* ── Acciones ── */
.form-actions {
    display: flex;
    gap: 0.75rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.88rem;
    border-radius: 12px;
}

.btn-back {
    flex: 0.4;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.85rem;
    border: 1.5px solid var(--campo-borde);
    border-radius: 12px;
    background: #fff;
    color: var(--verde);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-back:hover {
    border-color: var(--naranja);
    color: var(--naranja);
}

.btn-next {
    flex: 0.6;
    justify-content: center;
    padding: 0.85rem;
    font-size: 0.88rem;
    border-radius: 12px;
}

.btn-enviar {
    background: var(--exito);
}

.btn-enviar:hover {
    background: var(--exito-texto);
}

/* ── Resumen (generado por JS) ── */
.resumen {
    background: var(--campo-bg);
    border: 1.5px solid var(--campo-borde);
    border-radius: 14px;
    padding: 1.2rem 1.4rem;
    margin-bottom: 1.5rem;
}

.resumen-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem;
}

.resumen-item--full {
    grid-column: 1 / -1;
}

.resumen-label {
    font-size: 0.68rem;
    color: var(--gris-tenue);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.2rem;
}

.resumen-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--verde);
}

.resumen-value--adjunto {
    color: var(--gris-tenue);
}

.resumen-value--adjunto.is-set {
    color: var(--naranja);
}

/* ── Alertas ── */
.form-alert {
    text-align: center;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-alert--centro {
    padding: 0;
    margin-bottom: 1.5rem;
}

.form-alert--ok {
    background: var(--exito-bg);
    border: 1px solid var(--exito-borde);
}

.form-alert--error {
    background: var(--error-bg);
    border: 1px solid var(--error-borde);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    margin-top: 1rem;
    margin-bottom: 0;
}

.form-alert-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: var(--exito-icono-bg);
    color: var(--exito);
}

.form-alert--centro .form-alert-icon {
    width: 80px;
    height: 80px;
    margin-bottom: 1.2rem;
}

.form-alert-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--exito-texto);
    margin-bottom: 0.4rem;
}

.form-alert--centro .form-alert-title {
    font-size: 1.5rem;
    color: var(--verde);
}

.form-alert-text {
    font-size: 0.85rem;
    color: var(--exito);
}

.form-alert--centro .form-alert-text {
    font-size: 0.88rem;
    color: var(--gris-texto);
    max-width: 380px;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

.form-error-text {
    font-size: 0.82rem;
    color: var(--error);
    text-align: center;
}

/* ── Loader ── */
.loader {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.45);
}

.loader.is-visible {
    display: flex;
}

.loader-box {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #fff;
    border-radius: 20px;
    padding: 2rem 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.loader-label {
    color: var(--verde);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ── Animaciones ── */
.fade-in {
    animation: publicaFadeIn 0.4s ease-in-out;
}

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

@keyframes publicaSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

.spin {
    animation: publicaSpin 1s linear infinite;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    /* 16px mínimo: por debajo iOS Safari hace zoom al enfocar */
    .form-input,
    .form-select {
        font-size: 1rem;
    }

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

    .form-card {
        padding: 1.5rem;
    }

    .page-hero {
        min-height: 360px;
    }

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