/* ============================================================
   Página de Donaciones — Centro de Bienestar Animal Kely
   Usa las variables de estilo.css (guinda + gold + crema)
   ============================================================ */

.don-pagina { background: var(--crema); }

/* ---------- Portada (dos columnas, fondo claro) ---------- */
.don-portada {
    max-width: 1080px;
    margin: 0 auto;
    padding: 44px 20px 30px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 28px;
}
.don-portada h2 {
    margin: 0 0 12px;
    font-family: var(--fuente-display);
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.12;
    color: var(--guinda);
}
.don-lema {
    margin: 0 0 22px;
    max-width: 480px;
    font-size: 1.02rem;
    color: var(--tinta-suave);
    line-height: 1.55;
}
.don-portada-botones { display: flex; flex-wrap: wrap; gap: 10px; }

.don-portada-mascota { display: flex; justify-content: center; }
.don-mascota-marco {
    width: min(100%, 300px);
    aspect-ratio: 1;
    border-radius: 42% 58% 55% 45% / 52% 44% 56% 48%;
    background: radial-gradient(circle at 30% 25%, var(--guinda-claro), var(--guinda-oscuro));
    box-shadow: var(--sombra);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}
.don-mascota-marco::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: inherit;
    border: 2px dashed var(--gold);
    opacity: 0.7;
}
.don-mascota-marco img { width: 72%; position: relative; z-index: 1; }

/* ---------- Botones ---------- */
.don-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    border-radius: 12px;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 700;
    border: 2px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s ease;
}
.don-btn:hover { transform: translateY(-2px); box-shadow: var(--sombra-suave); }
.don-btn-oro { background: var(--gold); color: #4a3300; }
.don-btn-linea { background: transparent; color: var(--guinda); border-color: var(--guinda); }
.don-btn-guinda { background: var(--guinda); color: var(--crema); }
.don-btn-guinda:hover { background: var(--guinda-oscuro); color: #fff; }
.don-btn-ancho { width: 100%; }

/* ---------- Secciones ---------- */
.don-seccion { max-width: 1080px; margin: 0 auto; padding: 36px 20px; }
.don-titulo {
    margin: 0 0 8px;
    text-align: center;
    font-family: var(--fuente-display);
    font-size: 1.55rem;
    color: var(--guinda);
}
.don-titulo-claro { color: var(--gold-claro); }
.don-titulo-izq { text-align: left; }
.don-subtitulo {
    margin: 0 auto 26px;
    max-width: 520px;
    text-align: center;
    font-size: 0.92rem;
    color: var(--tinta-suave);
}
.don-subtitulo-izq { text-align: left; margin: 0; }

/* ---------- Selector (pestañas) ---------- */
.don-selector {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}
.don-opcion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    text-align: left;
    font: inherit;
    color: var(--tinta);
    background: var(--blanco);
    border: 2px solid var(--crema-oscuro);
    border-radius: var(--radio);
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease, color 0.2s ease;
}
.don-opcion:hover { border-color: var(--gold); transform: translateY(-2px); }
.don-opcion:focus-visible { outline: 3px solid var(--gold-claro); outline-offset: 2px; }
.don-opcion-icono {
    flex: 0 0 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--crema-oscuro);
    color: var(--guinda);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, color 0.2s ease;
}
.don-opcion-icono svg { width: 26px; height: 26px; }
.don-opcion-texto { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.don-opcion-texto strong { font-size: 0.92rem; }
.don-opcion-texto small { font-size: 0.74rem; color: var(--tinta-suave); margin-top: 2px; }

.don-opcion.activa {
    background: var(--guinda);
    border-color: var(--guinda);
    color: var(--crema);
    box-shadow: var(--sombra);
}
.don-opcion.activa .don-opcion-icono { background: var(--gold); color: var(--guinda-oscuro); }
.don-opcion.activa .don-opcion-texto small { color: rgba(250,246,239,0.8); }

/* ---------- Paneles ---------- */
.don-paneles { margin-top: 14px; }
.don-panel {
    display: none;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 0;
    background: var(--blanco);
    border: 2px solid var(--crema-oscuro);
    border-radius: var(--radio);
    overflow: hidden;
    box-shadow: var(--sombra-suave);
}
.don-panel.activo { display: grid; animation: don-aparecer 0.3s ease; }
@keyframes don-aparecer { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.don-panel-izq { padding: 24px; }
.don-panel-izq h3 {
    margin: 0 0 6px;
    font-family: var(--fuente-display);
    font-size: 1.25rem;
    color: var(--guinda);
}
.don-panel-izq p { margin: 0 0 14px; color: var(--tinta-suave); font-size: 0.93rem; }
.don-etiqueta {
    margin: 0 0 8px !important;
    font-size: 0.7rem !important;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold-oscuro) !important;
}
.don-chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.don-chips li {
    padding: 7px 14px;
    border-radius: 18px;
    background: #f5edd8;
    color: #6b4e00;
    font-size: 0.84rem;
    font-weight: 600;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

.don-panel-der {
    padding: 24px;
    background: linear-gradient(180deg, #fbf3dc, #f5e8c4);
    border-left: 2px dashed var(--gold);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 14px;
}
.don-nota { margin: 0; font-size: 0.86rem; color: #5b4400; line-height: 1.5; }

/* Datos de cuenta */
.don-cuenta { background: var(--blanco); border-radius: var(--radio-chico); padding: 14px; border: 1px solid var(--gold-claro); }
.don-cuenta .don-etiqueta { margin-bottom: 10px !important; }
.don-dato {
    display: grid;
    grid-template-columns: 70px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--crema-oscuro);
    font-size: 0.86rem;
}
.don-dato:last-child { border-bottom: none; }
.don-dato span { color: var(--tinta-suave); font-size: 0.76rem; }
.don-dato b { word-break: break-all; color: var(--tinta); }
.don-copiar {
    font: inherit;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 5px 11px;
    border-radius: 12px;
    border: 1.5px solid var(--guinda);
    background: var(--blanco);
    color: var(--guinda);
    cursor: pointer;
}
.don-copiar:hover { background: rgba(107,21,48,0.07); }
.don-copiar.copiado { background: var(--verde-salud); border-color: var(--verde-salud); color: #fff; }
.don-cuenta-vacia { margin: 0; font-size: 0.86rem; color: var(--tinta-suave); }

/* ---------- Pasos (banda guinda, línea de tiempo) ---------- */
.don-pasos-banda {
    background: linear-gradient(160deg, var(--guinda-oscuro), var(--guinda));
    margin-top: 10px;
}
.don-seccion-pasos { padding-top: 40px; padding-bottom: 46px; }
.don-pasos {
    list-style: none;
    margin: 26px 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    position: relative;
    counter-reset: none;
}
/* Línea punteada entre pasos: ::before = base apagada, ::after = luz que se enciende */
.don-pasos li:not(:last-child)::before,
.don-pasos li:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 22px;
    left: calc(50% + 30px);
    width: calc(100% + 18px - 60px);
    border-top: 2px dashed var(--gold);
    pointer-events: none;
}
.don-pasos li:not(:last-child)::before { opacity: 0.3; }
.don-pasos li:not(:last-child)::after {
    border-top-color: var(--gold-claro);
    filter: drop-shadow(0 0 5px var(--gold)) drop-shadow(0 0 10px var(--gold));
}
.don-pasos li { text-align: center; position: relative; color: var(--crema); }
.don-paso-num {
    width: 46px;
    height: 46px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--gold);
    color: var(--guinda-oscuro);
    font-family: var(--fuente-display);
    font-weight: 700;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px var(--guinda);
    position: relative;
}
.don-pasos h3 { margin: 0 0 4px; font-size: 1.02rem; color: var(--gold-claro); }
.don-pasos p { margin: 0 auto; max-width: 230px; font-size: 0.86rem; color: rgba(250,246,239,0.85); }

/* ---------- Animación de pasos: 1 → luz → 2 → luz → 3 ---------- */
.don-pasos li:nth-child(1) { --d: 0s;   --l: 0.8s; }
.don-pasos li:nth-child(2) { --d: 1.6s; --l: 2.4s; }
.don-pasos li:nth-child(3) { --d: 3.2s; }

.js .don-pasos:not(.animar) li { opacity: 0; transform: scale(0.6); }
.js .don-pasos:not(.animar) li::after { clip-path: inset(-12px 100% -12px 0); }

.js .don-pasos.animar li {
    animation: don-paso-crece 0.8s cubic-bezier(0.2, 0.9, 0.3, 1.15) var(--d) both;
}
.js .don-pasos.animar li .don-paso-num {
    animation: don-num-luz 1.4s ease-out var(--d) both;
}
.js .don-pasos.animar li::after {
    animation: don-linea-luz 0.8s ease-in-out var(--l, 0s) both;
}

@keyframes don-paso-crece {
    from { opacity: 0; transform: scale(0.6); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes don-num-luz {
    0%   { box-shadow: 0 0 0 6px var(--guinda), 0 0 0 6px rgba(240,200,90,0); }
    40%  { box-shadow: 0 0 0 6px var(--guinda), 0 0 26px 12px rgba(240,200,90,0.85); }
    100% { box-shadow: 0 0 0 6px var(--guinda), 0 0 14px 4px rgba(240,200,90,0.45); }
}
@keyframes don-linea-luz {
    from { clip-path: inset(-12px 100% -12px 0); }
    to   { clip-path: inset(-12px -12px -12px 0); }
}

/* ---------- Ventana emergente: duda sobre la donación ---------- */
.don-modal-fondo {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(43, 38, 34, 0.6);
    backdrop-filter: blur(2px);
}
.don-modal-fondo[hidden] { display: none; }
body.don-modal-abierto { overflow: hidden; }
.don-modal {
    position: relative;
    width: 100%;
    max-width: 480px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    background: var(--crema);
    border-radius: var(--radio);
    border-top: 5px solid var(--gold);
    padding: 26px 24px 24px;
    box-shadow: 0 20px 50px rgba(43, 38, 34, 0.35);
    animation: don-aparecer 0.25s ease;
}
.don-modal h2 {
    margin: 0 28px 6px 0;
    font-family: var(--fuente-display);
    font-size: 1.25rem;
    color: var(--guinda);
}
.don-modal-sub { margin: 0 0 16px; font-size: 0.9rem; color: var(--tinta-suave); }
.don-modal-cerrar {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 34px;
    height: 34px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--tinta-suave);
    font-size: 1.1rem;
    cursor: pointer;
}
.don-modal-cerrar:hover { background: var(--crema-oscuro); color: var(--guinda); }
.don-campo { margin-bottom: 14px; }
.don-campo label { display: block; margin-bottom: 5px; font-size: 0.82rem; font-weight: 600; color: var(--tinta); }
.don-campo label span { font-weight: 400; font-size: 0.75rem; color: var(--tinta-suave); }
.don-campo input,
.don-campo select,
.don-campo textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1.5px solid var(--crema-oscuro);
    border-radius: var(--radio-chico);
    font: inherit;
    font-size: 0.95rem;
    background: var(--blanco);
    color: var(--tinta);
}
.don-campo textarea { resize: vertical; min-height: 96px; }
.don-campo input:focus,
.don-campo select:focus,
.don-campo textarea:focus {
    outline: none;
    border-color: var(--guinda);
    box-shadow: 0 0 0 3px rgba(107, 21, 48, 0.12);
}
.don-campo input[readonly] { background: var(--crema-oscuro); color: var(--tinta-suave); cursor: default; }
.don-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.don-modal-error {
    margin: 0 0 12px;
    padding: 9px 12px;
    border-radius: var(--radio-chico);
    background: #f1e3e3;
    color: var(--rojo-alerta);
    font-size: 0.86rem;
    font-weight: 600;
}
.don-modal-error[hidden], .don-modal-exito[hidden], #don-form-duda[hidden], #don-form-donativo[hidden] { display: none; }
.don-btn:disabled { opacity: 0.65; cursor: wait; transform: none; box-shadow: none; }
.don-modal-exito { text-align: center; padding: 10px 0 4px; }
.don-modal-exito h2 { margin-right: 0; }
.don-modal-exito p { margin: 0 0 18px; color: var(--tinta-suave); font-size: 0.93rem; }
.don-modal-exito .don-modal-aviso {
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 10px;
    background: var(--crema-oscuro);
    color: var(--guinda);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.45;
}
.don-modal-exito-icono {
    width: 56px;
    height: 56px;
    margin: 0 auto 12px;
    border-radius: 50%;
    background: var(--verde-salud);
    color: #fff;
    font-size: 1.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}
@media (max-width: 480px) {
    .don-modal { padding: 22px 16px 18px; }
}

/* ---------- Contacto ---------- */
.don-contacto {
    display: grid;
    grid-template-columns: 1.1fr 1fr auto;
    align-items: center;
    gap: 22px;
    background: var(--blanco);
    border: 2px solid var(--crema-oscuro);
    border-radius: var(--radio);
    padding: 24px;
}
.don-contacto .don-titulo { font-size: 1.25rem; }
.don-contacto-datos { list-style: none; margin: 0; padding: 0; font-size: 0.88rem; color: var(--tinta-suave); display: grid; gap: 6px; }

/* ---------- Responsivo ---------- */
@media (max-width: 860px) {
    .don-selector { grid-template-columns: 1fr 1fr; }
    .don-panel.activo { grid-template-columns: 1fr; }
    .don-panel-der { border-left: none; border-top: 2px dashed var(--gold); }
    .don-contacto { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
    .don-portada { grid-template-columns: 1fr; text-align: center; padding-top: 28px; }
    .don-lema { margin-left: auto; margin-right: auto; }
    .don-portada-botones { justify-content: center; }
    .don-portada-mascota { order: -1; }
    .don-mascota-marco { width: 190px; }
    .don-pasos { grid-template-columns: 1fr; gap: 22px; }
    .don-pasos li::before, .don-pasos li::after { display: none !important; }
    .don-pasos li:nth-child(2) { --d: 0.8s; }
    .don-pasos li:nth-child(3) { --d: 1.6s; }
}
@media (max-width: 440px) {
    .don-selector { grid-template-columns: 1fr; }
    .don-dato { grid-template-columns: 60px 1fr; }
    .don-dato .don-copiar { grid-column: 2; justify-self: start; }
}

/* Sin JavaScript: se muestran todos los paneles */
html:not(.js) .don-panel { display: grid; margin-bottom: 12px; }
html:not(.js) .don-selector { display: none; }

@media (prefers-reduced-motion: reduce) {
    .don-panel.activo, .don-btn, .don-opcion, .don-modal { animation: none; transition: none; }
    .js .don-pasos li, .js .don-pasos li .don-paso-num, .js .don-pasos li::after { animation: none !important; }
    .js .don-pasos:not(.animar) li { opacity: 1; transform: none; }
    .js .don-pasos:not(.animar) li::after { clip-path: none; }
}
.btn-acceso-admin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 14px;
    margin-right: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    background: rgba(107,21,48,0.08);
    color: #6b1530;
    font-size: 0.78rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background 0.2s ease;
}
.btn-acceso-admin:hover { background: rgba(107,21,48,0.16); }
