/* =========================================================================
   MAR EN CALMA — estilos
   Paleta marina tomada del logo. Edita las variables de :root para recolorear.
   ========================================================================= */

:root {
    --navy:   #0f3b7d;   /* azul marino profundo: textos fuertes */
    --navy-2: #1f5aa8;   /* azul medio */
    --blue:   #2472b8;   /* azul enlaces */
    --teal:   #2bbcd6;   /* turquesa: acento, botones */
    --teal-d: #1f9fb8;   /* turquesa hover */
    --aqua:   #8fdbe8;   /* aqua claro */
    --paper:  #ffffff;   /* fondo blanco */
    --paper-2:#f1f9fb;   /* fondo alterno (aqua muy claro) */
    --ink:    #14314f;   /* texto principal */
    --muted:  #5f7488;   /* texto secundario */
    --line:   #dce8ee;   /* líneas / bordes */
    --white:  #ffffff;

    --display: 'Fraunces', Georgia, serif;
    --body: 'Inter', system-ui, -apple-system, sans-serif;

    --maxw: 1140px;
    --radius: 16px;
    --shadow: 0 18px 45px -22px rgba(15,59,125,0.35);

    /* Altura de las etiquetas del footer (alinea el botón de Instagram) */
    --footer-head-h: 1.5rem;

    /* Superficies (necesarias para el modo oscuro) */
    --header-bg:    rgba(255,255,255,0.9);
    --footer-bg:    #14314f;
    --band-bg:      var(--navy);
    --hero-top:     #f6fdff;
    --page-hero-top:#eef9fc;
}

/* =========================================================================
   MODO OSCURO — solo redefine variables; el resto del CSS no cambia
   ========================================================================= */
[data-theme="dark"] {
    --navy:   #9ecbe8;   /* títulos: azul claro sobre fondo oscuro */
    --navy-2: #7fb4d8;
    --blue:   #6bb6e0;   /* enlaces */
    --teal:   #2bbcd6;   /* acento: se mantiene */
    --teal-d: #45cde5;   /* hover más claro en oscuro */
    --aqua:   #8fdbe8;
    --paper:  #0e1c2b;   /* fondo general */
    --paper-2:#152a3d;   /* fondo alterno */
    --ink:    #e4eef6;   /* texto principal */
    --muted:  #9db2c4;   /* texto secundario */
    --line:   #26425c;   /* bordes */
    --white:  #16293c;   /* superficie de tarjetas y campos */

    --shadow: 0 18px 45px -22px rgba(0,0,0,0.7);

    --header-bg:    rgba(14,28,43,0.9);
    --footer-bg:    #0a1520;
    --band-bg:      #10263c;
    --hero-top:     #12283c;
    --page-hero-top:#122536;
}

/* Transición suave al cambiar de tema */
body, .site-header, .card, .teaser, .field input, .field textarea, .site-footer {
    transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; height: 100%; }

body {
    margin: 0;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    font-family: var(--body);
    color: var(--ink);
    background: var(--paper);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

/* Empuja el footer al final de la pantalla en páginas cortas (sin scroll),
   sin afectar a las páginas largas, que siguen creciendo con normalidad. */
.site-main {
    flex: 1 0 auto;
}
.site-footer {
    flex-shrink: 0;
}

/* =========================================================================
   TRANSICIÓN ENTRE PÁGINAS (toda la web, incluido el panel de admin)
   Efecto de zoom: la página que sale se aleja desvaneciéndose y la que
   entra se acerca desde un poco más grande. El header y el footer se
   marcan con view-transition-name para que se mantengan fijos (solo
   cambia el contenido de <main>). En navegadores sin soporte, esto se
   ignora sin más: la navegación sigue funcionando exactamente igual.
   ========================================================================= */
@view-transition {
    navigation: auto;
}
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }

::view-transition-old(root),
::view-transition-new(root) {
    animation-duration: .3s;
}
::view-transition-old(root) {
    animation-name: vt-salida;
    animation-timing-function: cubic-bezier(.4, 0, 1, 1);
}
::view-transition-new(root) {
    animation-name: vt-entrada;
    animation-timing-function: cubic-bezier(0, 0, .2, 1);
}
@keyframes vt-salida {
    to   { transform: scale(1.06); opacity: 0; }
}
@keyframes vt-entrada {
    from { transform: scale(.94); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }
}

h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.14; margin: 0 0 .5em; color: var(--navy); }
h1 { font-size: clamp(2.3rem, 5.5vw, 3.9rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); letter-spacing: -0.01em; }
h3 { font-size: 1.25rem; }
p  { margin: 0 0 1rem; }
a  { color: var(--blue); }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

.eyebrow {
    font-family: var(--body);
    text-transform: uppercase;
    letter-spacing: .18em;
    font-size: .74rem;
    font-weight: 600;
    color: var(--teal-d);
    margin-bottom: 1rem;
    display: inline-block;
}

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; gap: .5rem;
    padding: .85rem 1.6rem; border-radius: 999px;
    font-weight: 600; font-size: .95rem; text-decoration: none;
    border: 1.5px solid transparent; cursor: pointer;
    transition: transform .15s ease, background .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-d); }
.btn-ghost { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-ghost:hover { background: var(--navy); color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; }
.brand-mark { display: flex; align-items: center; text-decoration: none; }
.brand-mark img {
    height: 70px;
    width: 70px;
    object-fit: cover;
    border-radius: 50%;
    display: block;
}
.nav-links { display: flex; align-items: center; gap: 1.6rem; }
.nav-links a {
    text-decoration: none; color: var(--ink); font-size: .92rem; font-weight: 500; position: relative;
}
.nav-links a.active { color: var(--teal-d); }
.nav-links a:not(.btn)::after {
    content: ''; position: absolute; left: 0; bottom: -6px; height: 2px; width: 0;
    background: var(--teal); transition: width .2s ease;
}
.nav-links a:not(.btn):hover::after, .nav-links a.active:not(.btn)::after { width: 100%; }
.nav-right { display: flex; align-items: center; gap: 1.2rem; }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }

/* Botón día / noche */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; padding: 0;
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--ink);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}
.theme-toggle:hover {
    background: var(--teal); border-color: var(--teal); color: #fff; transform: rotate(-15deg);
}
.theme-toggle svg { width: 18px; height: 18px; }
/* Luna en modo claro, sol en modo oscuro */
.theme-toggle .icon-sun  { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun  { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: .2s; }

/* ---------- Wave divider ---------- */
.wave-divider { line-height: 0; }
.wave-divider svg { width: 100%; height: 60px; display: block; }

/* ---------- Hero portada ---------- */
.hero {
    padding: clamp(3rem, 7vw, 5.5rem) 0 clamp(2rem, 4vw, 3.5rem);
    text-align: center;
    background: linear-gradient(180deg, var(--hero-top) 0%, var(--paper) 100%);
}
.hero .hero-logo { width: min(260px, 62vw); height: auto; margin: 0 auto 1.5rem; display: block; }
.hero h1 { color: var(--navy); }
.hero h1 em { font-style: italic; color: var(--teal-d); }
.hero-lead { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin: 0 auto 2rem; }
.hero-cta { display: flex; gap: 1rem; flex-wrap: wrap; justify-content: center; }

/* ---------- Page hero (páginas internas) ---------- */
.page-hero {
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
    text-align: center;
    background: linear-gradient(180deg, var(--page-hero-top) 0%, var(--paper) 100%);
}
.page-hero h1 { color: var(--navy); margin-bottom: .4rem; }
.page-hero p { color: var(--muted); max-width: 52ch; margin: 0 auto; }

/* ---------- Banda de intención ---------- */
.band { background: var(--band-bg); color: #fff; padding: clamp(3rem, 6vw, 4.5rem) 0; }
.band h2 { color: #fff; max-width: 22ch; margin-left: auto; margin-right: auto; }
.band p { color: rgba(255,255,255,.85); max-width: 62ch; margin-left: auto; margin-right: auto; }
.band.center { text-align: center; }
.band .btn-primary { margin-top: 1rem; }
.band .eyebrow { color: var(--aqua); }

/* ---------- Secciones ---------- */
.section { padding: clamp(3rem, 6vw, 5rem) 0; }
.section.alt { background: var(--paper-2); }
.section-head { max-width: 640px; margin: 0 auto 3rem; text-align: center; }
.section-head p { color: var(--muted); }

/* ---------- Teasers de portada ---------- */
.teasers { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.4rem; }
.teaser {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 1.6rem; text-align: center; text-decoration: none; color: var(--ink);
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.teaser:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--aqua); }
.teaser .t-icon {
    width: 48px; height: 48px; margin: 0 auto 1rem; border-radius: 50%;
    background: var(--paper-2); display: flex; align-items: center; justify-content: center; color: var(--teal-d);
}
.teaser h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.teaser p { font-size: .9rem; color: var(--muted); margin: 0; }
.teaser .t-link { display: inline-block; margin-top: 1rem; color: var(--teal-d); font-weight: 600; font-size: .88rem; }

/* Sobre mí */
.about-grid { display: grid; grid-template-columns: .7fr 2.0fr; gap: 3rem; align-items: stretch; }
/* Mismo tono que el resto de textos de la web */
.about-grid p { color: var(--muted); }
.about-photo {
    height: 70%;              /* se estira hasta igualar la altura del texto */
    min-height: 320px;         /* altura mínima si el texto es corto */
    border-radius: 22px;
    overflow: hidden;
    background: var(--paper-2);
    border: 1px solid var(--line);
}
.about-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;         /* recorta sin deformar */
    object-position: center 95%;   /* usa 'center 30%' si te corta la cara */
    display: block;
}

/* Frase destacada (Sobre mí) */
.frase {
    margin: 2.5rem auto;
    padding: 0 1rem;
    max-width: 34ch;
    text-align: center;
    font-family: var(--display);
    font-style: italic;
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.45;
    color: var(--navy);
    position: relative;
}
/* Comillas decorativas */
.frase::before,
.frase::after {
    content: '“';
    font-family: var(--display);
    font-size: 2.4rem;
    line-height: 0;
    color: var(--teal);
    opacity: .45;
    vertical-align: -.35em;
}
.frase::after { content: '”'; }

/* Servicios */
.svc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.4rem; }
.card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 1.8rem; transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h4 { font-family: var(--display); font-size: 1.15rem; margin: 0 0 .5rem; color: var(--navy); }
.card p { font-size: .92rem; color: var(--muted); margin: 0; }
.svc-note { margin-top: 2rem; font-size: .85rem; color: var(--muted); font-style: italic; text-align: center; }

/* Testimonios */
.testimonials { text-align: center; }
.quote {
    max-width: 760px; margin: 0 auto; font-family: var(--display); font-style: italic;
    font-size: clamp(1.2rem, 2.5vw, 1.7rem); line-height: 1.42; color: var(--navy);
}
.quote-author { margin-top: 1.4rem; font-family: var(--body); font-style: normal; font-weight: 600; color: var(--teal-d); font-size: .95rem; }
.quote-dots { display: flex; gap: .5rem; justify-content: center; margin-top: 2rem; }
.quote-dots button { width: 10px; height: 10px; border-radius: 50%; border: 0; background: var(--line); cursor: pointer; padding: 0; }
.quote-dots button.active { background: var(--teal); }

/* Formularios */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .82rem; font-weight: 600; margin-bottom: .35rem; color: var(--ink); }
.field input, .field textarea {
    width: 100%; padding: .8rem 1rem; border: 1px solid var(--line); border-radius: 10px;
    font-family: var(--body); font-size: .95rem; background: var(--white); color: var(--ink);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); }
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: .78rem; color: var(--muted); margin-top: .8rem; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: start; }

/* Alerts (flash) */
.flash-wrap { position: fixed; top: 88px; left: 50%; transform: translateX(-50%); z-index: 100; width: min(92%, 520px); }
.alert { padding: .9rem 1.1rem; border-radius: 10px; font-size: .92rem; margin-bottom: .6rem; box-shadow: var(--shadow); }
.alert-success { background: #e2f5f0; color: #0f5c4e; border: 1px solid #b6e3d7; }
.alert-danger  { background: #f6e4e2; color: #8a2f24; border: 1px solid #e2b7b0; }
.alert-info    { background: #e2eef7; color: #1f4e79; border: 1px solid #b6d2ea; }

/* ---------- Ventana de confirmación (sustituye al confirm() del navegador) ---------- */
.confirm-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}
.confirm-modal.abierto { display: flex; }
.confirm-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 21, 32, .55);
    backdrop-filter: blur(2px);
}
.confirm-modal-box {
    position: relative;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.8rem 1.8rem 1.5rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    animation: confirm-modal-in .18s ease;
}
@keyframes confirm-modal-in {
    from { opacity: 0; transform: scale(.94); }
    to   { opacity: 1; transform: scale(1); }
}
.confirm-modal-texto {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    color: var(--ink);
    line-height: 1.5;
}
.confirm-modal-acciones {
    display: flex;
    justify-content: center;
    gap: .7rem;
}
@media (prefers-reduced-motion: reduce) {
    .confirm-modal-box { animation: none; }
}

/* ---------- Footer ---------- */
.site-footer {
    background: var(--footer-bg);
    color: rgba(255,255,255,.7);
    padding: 3.5rem 0 1.75rem;
}

/* Fila principal: marca | Instagram (centrado) | legal + contacto */
.footer-grid {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2.5rem;
    flex-wrap: wrap;
    padding-bottom: 2.25rem;
}

/* Izquierda: marca */
.footer-brand {
    font-family: var(--display);
    font-size: 1.5rem;
    color: #fff;
    line-height: 1.2;
}
.footer-tagline {
    font-size: .95rem;
    color: rgba(255,255,255,.65);
    margin: .45rem 0 0;
}

/* Centro: Instagram, alineado con la línea de los enlaces */
.footer-middle {
    flex: 1;
    display: flex;
    justify-content: center;
    margin-top: var(--footer-head-h);
}
.ig-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .42rem .95rem;
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 999px;
    color: rgba(255,255,255,.8);
    text-decoration: none;
    font-size: .85rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all .18s ease;
}
.ig-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.ig-link:hover { background: var(--teal); border-color: var(--teal); color: #fff; }

/* Derecha: legal + contacto */
.footer-right { display: flex; gap: 3.5rem; flex-wrap: wrap; }
.footer-col { display: flex; flex-direction: column; }
.footer-col h4 {
    font-family: var(--body);
    font-size: .74rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .14em;
    color: rgba(255,255,255,.5);
    margin: 0 0 .9rem;
    line-height: 1.2;
}
.footer-col a {
    color: rgba(255,255,255,.75);
    text-decoration: none;
    font-size: .92rem;
    margin-bottom: .55rem;
    width: fit-content;
    transition: color .18s ease;
}
.footer-col a:last-child { margin-bottom: 0; }
.footer-col a:hover { color: var(--aqua); }

/* Barra inferior */
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 1.5rem;
    font-size: .82rem;
    color: rgba(255,255,255,.55);
}

/* =========================================================================
   TESTIMONIOS ENVIADOS POR VISITANTES
   ========================================================================= */
.testimonio {
    display: flex;
    flex-direction: column;
    overflow-anchor: none;   /* evita que el navegador reajuste el scroll solo */
}

/* Cabecera: inicial + nombre + ciudad */
/* Cada testimonio crece por su cuenta, sin estirar a los vecinos */
.testimonios-grid { align-items: start; }

.testimonio-cabecera {
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--line);
}
.testimonio-nombre {
    font-family: var(--display);
    font-size: 1.05rem;
    color: var(--navy);
    line-height: 1.2;
}
.testimonio-ciudad {
    font-size: .8rem;
    color: var(--muted);
    letter-spacing: .04em;
}

/* Texto recortado a 6 líneas hasta que se pulsa "Leer más" */
.testimonio-texto {
    font-family: var(--display);
    font-style: italic;
    font-size: 1.02rem;
    line-height: 1.55;
    color: var(--ink);
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.testimonio-texto.abierto {
    -webkit-line-clamp: unset;
    overflow: visible;
}

.testimonio-mas {
    align-self: flex-start;
    margin-top: .8rem;
    padding: 0;
    background: none;
    border: 0;
    color: var(--teal-d);
    font-family: var(--body);
    font-size: .85rem;
    font-weight: 600;
    cursor: pointer;
}
.testimonio-mas:hover { text-decoration: underline; }

/* Contador de caracteres del formulario */
.contador {
    font-size: .78rem;
    color: var(--muted);
    margin: .4rem 0 0;
}
.contador.corto { color: #c0392b; }

/* Campo trampa anti-bot: fuera de la vista pero accesible para los bots */
.hp-field {
    position: absolute !important;
    left: -9999px !important;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* =========================================================================
   PANEL DE ADMINISTRACIÓN
   ========================================================================= */
.admin-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}
.admin-nav {
    display: flex;
    gap: .3rem;
    flex-wrap: wrap;
    margin-bottom: 2.5rem;
    padding-bottom: 0;
    border-bottom: 1px solid var(--line);
}
.admin-nav a {
    padding: .7rem 1rem;
    text-decoration: none;
    color: var(--muted);
    font-weight: 600;
    font-size: .88rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    transition: color .15s ease, border-color .15s ease;
}
.admin-nav a:hover { color: var(--ink); }
.admin-nav a.active { color: var(--teal-d); border-color: var(--teal); }
.admin-sec {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin: 2.5rem 0 1.25rem;
    padding-bottom: .6rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.15rem;
}
.admin-count {
    font-family: var(--body);
    font-size: .75rem;
    font-weight: 600;
    color: #fff;
    background: var(--teal);
    border-radius: 999px;
    padding: .1rem .6rem;
    line-height: 1.5;
}
.admin-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.25rem 1.4rem;
    margin-bottom: 1rem;
}
.admin-item-off { opacity: .6; }
.admin-meta {
    font-size: .85rem;
    color: var(--muted);
    margin-bottom: .6rem;
}
.admin-meta strong { color: var(--ink); }
.admin-fecha { float: right; font-size: .78rem; opacity: .8; }
.admin-texto {
    margin: 0 0 1rem;
    font-size: .95rem;
    line-height: 1.6;
    white-space: pre-line;   /* respeta los saltos de línea de quien escribe */
}
.admin-acciones { display: flex; gap: .6rem; flex-wrap: wrap; }
.admin-acciones form { margin: 0; }
.admin-vacio { color: var(--muted); font-style: italic; }

.btn-sm { padding: .45rem 1rem; font-size: .85rem; }
.btn-danger { color: #c0392b; border-color: #e2b7b0; }
.btn-danger:hover { background: #c0392b; border-color: #c0392b; color: #fff; }

@media (max-width: 600px) {
    .admin-fecha { float: none; display: block; margin-top: .25rem; }
}

/* ---------- Mensajes de contacto: filas compactas y desplegables ---------- */
.msg-item {
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 1rem;
    overflow: hidden;
}
.msg-cabecera {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 1.4rem;
    cursor: pointer;
}
.msg-item:has(.msg-cuerpo) .msg-cabecera:hover { background: var(--paper-2); }
.msg-info {
    display: flex;
    align-items: baseline;
    gap: .6rem;
    flex-wrap: wrap;
    font-size: .88rem;
    color: var(--muted);
    min-width: 0;
}
.msg-info strong { color: var(--ink); font-size: .95rem; }
.msg-info a { color: var(--blue); }
.msg-tel::before { content: '· '; }
.msg-info .admin-fecha { float: none; font-size: .78rem; }
.msg-acciones {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-shrink: 0;
}
.msg-acciones form { margin: 0; }

/* Tick verde: marcar como leído directamente desde la barra */
.msg-tick {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; padding: 0;
    border-radius: 50%;
    border: 1.5px solid #2fa86a;
    background: transparent;
    color: #2fa86a;
    cursor: pointer;
    transition: background .18s ease, color .18s ease, transform .15s ease;
}
.msg-tick svg { width: 17px; height: 17px; }
.msg-tick:hover { background: #2fa86a; color: #fff; transform: scale(1.06); }

/* Cuerpo del mensaje: oculto y se despliega hacia abajo */
.msg-cuerpo {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows .25s ease;
}
.msg-cuerpo-inner { overflow: hidden; min-height: 0; }
.msg-item.abierto .msg-cuerpo { grid-template-rows: 1fr; }
.msg-cuerpo .admin-texto {
    margin: 0 1.4rem 1.2rem;
    padding-top: .9rem;
    border-top: 1px solid var(--line);
}

@media (max-width: 600px) {
    .msg-cabecera { padding: .9rem 1.1rem; }
    .msg-cuerpo .admin-texto { margin: 0 1.1rem 1rem; }
}

/* El deslizamiento al cambiar de página se hace por JavaScript
   (Web Animations API), así no depende de las transiciones del CSS. */

/* Paginación de testimonios */
.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .4rem;
    margin-top: 2.5rem;
}
.pag-num, .pag-flecha {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 .5rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    background: var(--white);
    transition: all .18s ease;
}
.pag-num:hover, .pag-flecha:hover {
    border-color: var(--teal);
    color: var(--teal-d);
}
.pag-num.actual {
    background: var(--teal);
    border-color: var(--teal);
    color: #fff;
    font-weight: 600;
}
.pag-flecha { font-size: 1.2rem; line-height: 1; }
.pag-flecha.desactivada {
    opacity: .35;
    background: transparent;
    cursor: default;
}
.pag-info {
    text-align: center;
    margin: .9rem 0 0;
    font-size: .8rem;
    color: var(--muted);
}

/* Responsive */
@media (max-width: 860px) {
    .about-grid, .contact-grid { grid-template-columns: 1fr; }
    .about-photo { max-width: 480px; min-height: 380px; }
    .footer-grid { flex-direction: column; gap: 2.25rem; }
    .footer-middle { justify-content: flex-start; margin-top: 0; }
    .footer-right { gap: 2.5rem; }
    /* Menú desplegable móvil: tarjeta flotante redondeada anclada a la
       derecha, debajo del botón de menú (en vez de una barra a todo lo ancho). */
    .nav-links {
        position: fixed;
        top: 86px; right: 20px; left: auto;
        flex-direction: column; align-items: stretch;
        background: var(--paper);
        border: 1px solid var(--line);
        border-radius: 18px;
        padding: .7rem 1.3rem;
        gap: .2rem;
        min-width: 190px;
        box-shadow: var(--shadow);
        z-index: 95;
        transform-origin: top right;
        transform: scale(.92) translateY(-6px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform .2s ease, opacity .2s ease, visibility 0s linear .2s;
    }
    .nav-links.open {
        transform: scale(1) translateY(0);
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transition: transform .2s ease, opacity .2s ease, visibility 0s;
    }
    .nav-links a:not(.btn) {
        padding: .75rem .1rem;
        text-align: left;
    }
    .nav-links a:not(.btn):not(:last-of-type) { border-bottom: 1px solid var(--line); }
    .nav-links a:not(.btn)::after { display: none; }
    .nav-links a.btn { margin: .55rem 0 .15rem; justify-content: center; }
    .nav-toggle { display: block; }
    .form-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    * { scroll-behavior: auto; transition: none !important; }
}
