/* NowMyMail: diseño "claro y directo". Fuentes del sistema (nada externo), un solo color de
   acento (el verde de la marca), primero para el celular. */

:root {
    --texto: #1d1d1f;
    --texto-suave: #5f5e5a;
    --texto-tenue: #888780;
    --fondo: #ffffff;
    --fondo-suave: #f7f6f2;
    --linea: #e8e6df;
    --verde: #3b6d11;
    --verde-oscuro: #27500a;
    --verde-texto: #173404;
    --verde-claro: #eaf3de;
    --verde-borde: #c0dd97;
    --aviso-fondo: #faeeda;
    --aviso-texto: #633806;
    --aviso-borde: #ef9f27;
    --rojo: #a32d2d;
    --radio: 8px;
    --ancho: 58rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--texto);
    background: var(--fondo);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { color: var(--verde); }
a:hover { color: var(--verde-oscuro); }
:focus-visible { outline: 3px solid var(--verde-borde); outline-offset: 2px; }

h1, h2, h3 { line-height: 1.25; font-weight: 600; }
h1 { font-size: 1.75rem; margin: 0 0 0.5rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 0.75rem; }

.icono { display: inline-block; vertical-align: -0.25em; flex-shrink: 0; }

/* --- Encabezado y pie --- */

.encabezado { border-bottom: 1px solid var(--linea); }
.encabezado-contenido, .pie-contenido, main {
    width: 100%;
    max-width: var(--ancho);
    margin: 0 auto;
    padding: 0 1rem;
}
.encabezado-contenido {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 1.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}
.marca {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--verde);
    text-decoration: none;
}
.marca .icono { width: 26px; height: 26px; }
.menu { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; font-size: 0.95rem; }
.menu a { color: var(--texto-suave); text-decoration: none; }
.menu a:hover, .menu a[aria-current="page"] { color: var(--verde); }
.menu .destacado { color: var(--verde); font-weight: 600; }

main { flex: 1; padding-top: 1.5rem; padding-bottom: 3rem; }

.pie { border-top: 1px solid var(--linea); background: var(--fondo-suave); font-size: 0.875rem; color: var(--texto-suave); }
.pie-contenido { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 1.5rem; padding-top: 1rem; padding-bottom: 1rem; }
.pie a { color: var(--texto-suave); }
/* Botones con aspecto de enlace (el de "No vender…" del pie). */
button.enlace { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
button.enlace[hidden] { display: none; }
.pie nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1rem; }

/* --- Avisos --- */

.aviso {
    margin: 0 0 1.5rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--aviso-borde);
    border-radius: var(--radio);
    background: var(--aviso-fondo);
    color: var(--aviso-texto);
}

/* --- Botones y formularios --- */

.boton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 2.5rem;
    padding: 0.5rem 1.1rem;
    border: 1px solid var(--verde);
    border-radius: var(--radio);
    background: var(--fondo);
    color: var(--verde);
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}
.boton:hover { background: var(--verde-claro); color: var(--verde-oscuro); }
.boton-principal { background: var(--verde); color: #ffffff; }
.boton-principal:hover { background: var(--verde-oscuro); color: #ffffff; }
.boton-grande { min-height: 3.25rem; padding: 0.75rem 2rem; font-size: 1.125rem; }
.boton-icono { min-height: 2.25rem; padding: 0.4rem; border-color: transparent; color: var(--texto-tenue); background: transparent; }
.boton-icono:hover { color: var(--rojo); background: var(--fondo-suave); }
.boton-peligro { border-color: var(--rojo); color: var(--rojo); }
.boton-peligro:hover { background: #fcebeb; color: var(--rojo); }

label { display: block; margin: 1rem 0 0.35rem; font-weight: 600; }
input[type="text"], input[type="email"], textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font: inherit;
    color: var(--texto);
    background: var(--fondo);
    border: 1px solid #d3d1c7;
    border-radius: var(--radio);
}
input:focus, textarea:focus { border-color: var(--verde); outline: 3px solid var(--verde-claro); outline-offset: 0; }
.formulario { max-width: 34rem; }
.formulario .boton { margin-top: 1.25rem; }
.g-recaptcha { margin-top: 1.25rem; }

/* --- Inicio --- */

.portada { text-align: center; padding: 2rem 0 1rem; }
.portada p { margin: 0 auto 1.75rem; max-width: 32rem; color: var(--texto-suave); font-size: 1.1rem; }
.portada .g-recaptcha { display: inline-block; margin: 0 0 1rem; }
.portada form { margin: 0; }
.abrir { margin: 1.25rem auto 0; max-width: 28rem; text-align: center; }
.abrir summary { display: inline-block; color: var(--verde); cursor: pointer; font-weight: 600; }
.abrir summary::-webkit-details-marker { display: none; }
.abrir form { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.abrir input { flex: 1 1 14rem; }
.abrir label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.abrir .boton { flex: 0 0 auto; }
.portada .ir-casilla { margin: 0.75rem 0 0; }

.ventajas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
    margin: 2.5rem 0 1rem;
}
.ventaja { padding: 1.1rem 1.25rem; border: 1px solid var(--linea); border-radius: var(--radio); }
.ventaja .icono { width: 26px; height: 26px; color: var(--verde); }
.ventaja h3 { margin: 0.5rem 0 0.25rem; font-size: 1rem; }
.ventaja p { margin: 0; color: var(--texto-suave); font-size: 0.95rem; }

.texto { max-width: 42rem; }
.texto p, .texto li, .texto dd { color: #3d3c39; }

/* --- Bandeja --- */

.tarjeta-casilla {
    padding: 1.1rem 1.25rem;
    border: 1px solid var(--verde-borde);
    border-radius: var(--radio);
    background: var(--verde-claro);
    color: var(--verde-texto);
}
.tarjeta-casilla .etiqueta { margin: 0; font-size: 0.9rem; color: var(--verde); font-weight: 600; }
.direccion { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem; margin: 0.25rem 0 0.75rem; }
.direccion strong { font-size: clamp(1rem, 4.2vw, 1.35rem); font-weight: 600; overflow-wrap: break-word; }
.direccion .boton { min-height: 2.25rem; padding: 0.3rem 0.8rem; font-size: 0.9rem; }
.estado { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; font-size: 0.95rem; }
.estado .reloj { font-variant-numeric: tabular-nums; font-weight: 700; }
.estado a { display: inline-flex; align-items: center; gap: 0.3rem; font-weight: 600; text-decoration: none; }
.ayuda { margin: 0.75rem 0 0; font-size: 0.875rem; color: var(--texto-suave); }

.titulo-lista { display: flex; align-items: baseline; justify-content: space-between; }
.titulo-lista span { color: var(--texto-tenue); font-size: 0.9rem; }
.mensajes { list-style: none; margin: 0; padding: 0; border: 1px solid var(--linea); border-radius: var(--radio); }
.mensajes li { display: flex; align-items: center; border-top: 1px solid var(--linea); }
.mensajes li:first-child { border-top: 0; }
.mensajes a.fila {
    flex: 1;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0 1rem;
    padding: 0.75rem 0 0.75rem 1rem;
    color: inherit;
    text-decoration: none;
}
.mensajes a.fila:hover { background: var(--fondo-suave); }
.mensajes .de { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mensajes .asunto { grid-column: 1; color: var(--texto-suave); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mensajes .hora { grid-column: 2; grid-row: 1; color: var(--texto-tenue); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.mensajes form { margin: 0 0.5rem; }
.vacio { padding: 2rem 1rem; border: 1px dashed #d3d1c7; border-radius: var(--radio); text-align: center; color: var(--texto-suave); }
.vacio .icono { width: 32px; height: 32px; color: var(--texto-tenue); }
.vacio p { margin: 0.25rem 0 0; }
.vacio strong { color: var(--texto); }

/* --- Mensaje --- */

.volver { display: inline-flex; align-items: center; gap: 0.35rem; margin-bottom: 1rem; font-weight: 600; text-decoration: none; }
.mensaje-cabecera { padding: 1rem 1.25rem; border: 1px solid var(--linea); border-radius: var(--radio); }
.mensaje-cabecera h1 { font-size: 1.35rem; overflow-wrap: anywhere; }
.datos { display: grid; grid-template-columns: minmax(0, 1fr); margin: 0; font-size: 0.95rem; }
.datos dt { margin-top: 0.4rem; color: var(--texto-tenue); font-size: 0.8rem; }
.datos dd { margin: 0; overflow-wrap: break-word; }
.adjuntos { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 0; padding: 0; list-style: none; }
.adjuntos li { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.25rem 0.6rem; border-radius: 999px; background: var(--fondo-suave); font-size: 0.875rem; color: var(--texto-suave); }
iframe.cuerpo { display: block; width: 100%; height: 70vh; min-height: 22rem; margin: 1rem 0; border: 1px solid var(--linea); border-radius: var(--radio); background: #ffffff; }
.acciones { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: space-between; align-items: center; }
.acciones form { margin: 0; }

/* --- FAQ y política --- */

.preguntas dt { margin-top: 1.25rem; font-weight: 600; }
.preguntas dd { margin: 0.25rem 0 0; }
.texto ol { padding-left: 1.25rem; }
.texto ol li { margin: 0.5rem 0; }

@media (min-width: 40rem) {
    h1 { font-size: 2.25rem; }
    .portada { padding-top: 3rem; }
    .datos { grid-template-columns: auto minmax(0, 1fr); gap: 0.2rem 1rem; }
    .datos dt { margin-top: 0; font-size: inherit; }
}
.nota { margin: 0.5rem 0 0; font-size: 0.85rem; color: var(--texto-tenue); }
.texto ul, .texto ol { padding-left: 1.25rem; }
.texto ul li, .texto ol li { margin: 0.35rem 0; }
.importante { margin-top: 1.5rem; padding: 0.75rem 1rem; border-left: 4px solid var(--aviso-borde); border-radius: 0; background: var(--aviso-fondo); color: var(--aviso-texto); }

/* Botón de intercambio de enlaces (inicio). */
.intercambio { margin: 2.5rem 0 0; text-align: center; }
.intercambio img { display: inline-block; vertical-align: bottom; }
