:root {
    --brand: #1a4c25;
    --brand-600: #15401f;
    --brand-50: #e6efe9;
    --gold: #c9a646;
    --text: #1b1b1b;
    --muted: #6b7280;
    --border: #e5e7eb;
    --bg: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, .06);
    --radius: 16px;
    --radius-lg: 22px;
    --space: clamp(16px, 2vw, 24px);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Outfit", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 600px at 10% -20%, var(--brand-50), transparent) #f9fafb;
    line-height: 1.5;
}

main {
    padding-top: 10rem;
    padding-bottom: 4rem;
}


.contenedor {
    max-width: 1650px;
    margin: 0 auto;
    padding: 0 2rem;
}

.encabezado {
    background: rgba(253, 253, 253, 0.121);
    padding: 2rem 0;
    position: fixed;
    width: 95%;
    max-width: 1650px;
    z-index: 1000;
    top: 2rem;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 35px;
    backdrop-filter: blur(5px);
    transition: all .6s;
    transform-origin: center;
}

.encabezado:hover {
    background: rgba(233, 233, 233, 0.091);
    box-shadow: 1px 50px 55px rgba(0, 0, 0, 0.193);
    backdrop-filter: blur(15px);
    scale: 1.02;
    transform-origin: center;
}

.encabezado .contenedor {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contenedor h1 {
    font-size: 7rem;
}

.logo-imagen img {
    height: 50px;
    display: block;
}

.navegacion a {
    color: #339e3c;
    text-decoration: none;
    padding: 1rem;
    font-weight: 600;
    transition: color 0.3s ease;
}


.navegacion a {
    position: relative;
    display: inline-block;
    padding-bottom: 0.25rem;
    transition: color 250ms ease;
}

.navegacion a::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    background: #e4b44d;
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .7s cubic-bezier(.2, .9, .3, 1), opacity 220ms ease;
    opacity: 0;
    border-radius: 3px;
}

.navegacion a:hover::after,
.navegacion a:focus::after,
.navegacion a.active::after {
    transform: scaleX(1);
    opacity: 1;
}

.navegacion a:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(49, 190, 98, 0.08);
    border-radius: 4px;
}

.navegacion a:hover {
    color: #e4b44d;
}

/* Utility */
.container {
    width: min(1100px, 92%);
    margin-inline: auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.skip-link {
    position: absolute;
    left: 0;
    top: 0;
    transform: translateY(-100%);
    background: var(--brand);
    color: #fff;
    padding: .5rem .75rem;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    transform: translateY(0);
}

/* Header */
.site-header {
    background: linear-gradient(180deg, #fff, #f8faf9);
    border-bottom: 1px solid var(--border);
}

.site-header .container {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
    padding: 16px var(--space);
}

@media (min-width:768px) {
    .site-header .container {
        grid-template-columns: 1fr auto;
        align-items: center;
    }
}

.brand {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.logo {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background:
        radial-gradient(circle at 30% 30%, #fff, rgba(255, 255, 255, .6) 30%, transparent 60%),
        linear-gradient(135deg, var(--gold), #8a6e2f);
    color: #0f172a;
    display: grid;
    place-items: center;
    font-weight: 800;
    box-shadow: var(--shadow);
}

.brand-text strong {
    letter-spacing: .5px;
    font-weight: 800;
    font-size: 1.1rem;
}

.brand-text span {
    display: block;
    color: var(--muted);
    font-size: .9rem;
}

.header-meta {
    color: var(--muted);
    font-size: .95rem;
}

.header-meta .meta-line {
    margin: 0;
}

.hero {
    padding: 28px 0 8px;
}

.page-title {
    font-size: clamp(1.6rem, 2.6vw, 2.2rem);
    line-height: 1.2;
    margin: 0 0 .25rem 0;
}

.subtitle {
    margin: 0 0 18px 0;
    color: var(--muted);
    max-width: 70ch;
}

/* Search */
.search {
    position: sticky;
    top: 0;
    z-index: 5;
    padding: 10px 0 18px;
    backdrop-filter: blur(8px);
}

.search input {
    width: 100%;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 14px 16px;
    font-size: 1rem;
    outline: none;
    box-shadow: var(--shadow);
    transition: border-color .2s, box-shadow .2s;
}

.search input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 12%, transparent);
}

.search-count {
    display: inline-block;
    margin-top: 8px;
    font-size: .95rem;
    color: var(--muted);
}

/* FAQ groups */
.faq {
    padding: 8px 0 60px;
}

.faq-heading {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    margin: 26px 0 12px;
    padding-left: 16px;
    border-left: 4px solid #e4b44d;
    margin-top: 50px;
}

/* FAQ item (details/summary accordion) */
.faq-item {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 10px;
    overflow: clip;
}

.faq-item>summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    font-weight: 600;
    user-select: none;
}

.faq-item>summary::-webkit-details-marker {
    display: none;
}

.faq-item .q {
    display: inline-block;
    color: #0f172a;
}

.faq-item .icon {
    inline-size: 26px;
    block-size: 26px;
    border-radius: 9px;
    border: 1.5px solid var(--border);
    display: grid;
    place-items: center;
    position: relative;
    transition: transform .25s ease, background .25s ease, border-color .25s ease;
}

.faq-item .icon::before,
.faq-item .icon::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
}

.faq-item .icon::after {
    transform: rotate(90deg);
}

.faq-item[open] .icon {
    background: color-mix(in oklab, var(--brand) 12%, #fff);
    border-color: color-mix(in oklab, var(--brand) 30%, var(--border));
}

.faq-item[open] .icon::after {
    opacity: 0;
}


.faq-item .answer {
    padding: 0 18px 16px;
    color: #111827;
    transform-origin: top;
    animation: fadeIn .28s ease;
}

@keyframes fadeIn {
    from {
        opacity: .7;
        transform: translateY(-2px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Animaciones e interacción para FAQ ---------- */

@keyframes faqEntry {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.faq-item {
    opacity: 0;
    transform: translateY(6px);
    animation: faqEntry .48s cubic-bezier(.2, .9, .3, 1) forwards;
    animation-delay: .06s;
}

.faq-item:nth-child(1) {
    animation-delay: .04s;
}

.faq-item:nth-child(2) {
    animation-delay: .08s;
}

.faq-item:nth-child(3) {
    animation-delay: .12s;
}

.faq-item:nth-child(4) {
    animation-delay: .16s;
}

.faq-item:nth-child(5) {
    animation-delay: .20s;
}

.faq-item:nth-child(6) {
    animation-delay: .24s;
}

.faq-item:nth-child(7) {
    animation-delay: .28s;
}

.faq-item:nth-child(8) {
    animation-delay: .32s;
}

/* Suavizar hover y focus del summary */
.faq-item>summary {
    transition: transform .18s cubic-bezier(.16, .9, .3, 1), box-shadow .18s, background .18s, color .12s;
    will-change: transform, box-shadow;
}

.faq-item>summary:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

/* Focus visible accesible */
.faq-item>summary:focus-visible {
    outline: none;
    box-shadow: 0 0 0 6px rgba(49, 190, 98, 0.08);
    border-radius: 12px;
}

/* Icon animation (cross -> rotate/scale) */
.faq-item .icon,
.faq-item .icon::before,
.faq-item .icon::after {
    transition: transform .28s cubic-bezier(.2, .9, .25, 1), opacity .2s ease, background .18s;
    will-change: transform, opacity;
}

.faq-item .icon {
    transform-origin: center;
}

/* Cuando se abre: realce y elevación */
.faq-item[open] {
    transform: translateY(-6px);
    box-shadow: 0 22px 60px rgba(15, 23, 42, 0.08);
    border-color: color-mix(in oklab, var(--brand) 10%, var(--border));
}

.faq-item .answer {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: max-height .46s cubic-bezier(.2, .9, .25, 1), opacity .28s ease, padding .28s ease;
    will-change: max-height, opacity, padding;
}

.faq-item[open] .answer {
    max-height: 640px;
    opacity: 1;
    padding-top: 8px;
    padding-bottom: 16px;
}

.faq-item .answer li {
    transform-origin: left center;
    transition: transform .28s cubic-bezier(.2, .9, .25, 1), opacity .28s;
    opacity: 0.9;
}

.faq-item[open] .answer li {
    transform: translateX(0);
    opacity: 1;
}

.faq-item>summary:active {
    transform: translateY(-2px) scale(.997);
}

.faq-item[open] .icon {
    background: color-mix(in oklab, var(--brand) 10%, #fff);
    transform: rotate(6deg) scale(1.02);
}

.faq-item .icon::after {
    transition: opacity .18s ease, transform .28s;
}

.pie-pagina {
    background-color: #1a1a1a;
    color: #f0f0f0;
    padding-top: 60px;
}

.grid-footer {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 60px;
}

.pie-pagina h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 25px;
    position: relative;
}

.pie-pagina h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -8px;
    width: 50px;
    height: 3px;
    background-color: #31be62;
}

.info-footer .logo-imagen-footer img {
    max-width: 200px;
    margin-bottom: 15px;
}

.info-footer p {
    color: #b3b3b3;
    line-height: 1.6;
}

.navegacion-footer a,
.redes-sociales a {
    color: #f0f0f0;
    text-decoration: none;
    display: block;
    margin-bottom: 12px;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.navegacion-footer a:hover,
.redes-sociales a:hover {
    color: #31be62;
    padding-left: 8px;
}

.contacto-footer p {
    margin-bottom: 12px;
    line-height: 1.7;
}

.derechos-reservados {
    background-color: #0d0d0d;
    text-align: center;
    padding: 20px 10px;
    border-top: 1px solid #d8a25e;
}

.derechos-reservados p {
    margin: 0;
    font-size: 0.9rem;
    color: #8c8c8c;
}


@media (prefers-reduced-motion: reduce) {

    .faq-item,
    .faq-item>summary,
    .faq-item .icon,
    .faq-item .answer,
    .faq-item .answer li {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ---------- Fin animaciones FAQ ---------- */

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: #fff;
    color: #334155;
}

.footer-grid {
    padding: 24px var(--space) 40px;
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width:640px) {
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Focus states */
:focus-visible {
    outline: 3px solid color-mix(in oklab, var(--brand) 30%, transparent);
    outline-offset: 2px;
}

/* Small niceties */
.faq-item:hover>summary {
    background: linear-gradient(0deg, #fff, #fff) padding-box,
        radial-gradient(120% 140% at 100% -20%, color-mix(in oklab, var(--gold) 30%, transparent), transparent) border-box;
}

/* Dark mode (auto) */
@media (prefers-color-scheme: dark) {
    :root {
        --text: #e5e7eb;
        --muted: #a3a3a3;
        --border: #26323a;
        --bg: #0c1116;
    }

    body {
        background: radial-gradient(1200px 600px at 10% -20%, #0f1a13, transparent) #0a0f14;
    }

    .site-header {
        background: linear-gradient(180deg, #0c1116, #0c1116);
        border-bottom-color: var(--border);
    }

    .footer-grid {
        background: #0c1116;
    }

    .faq-item .icon::before,
    .faq-item .icon::after {
        background: #e5e7eb;
    }
}


/* ===== RESPONSIVE + MENÚ HAMBURGUESA ===== */

.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 32px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
    margin-right: 15px;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: #a0a0a0; /* usa color primario definido en vStyles */
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    position: absolute;
    left: 0;
}

.menu-toggle:active span {
    background: #21861e; /* cambia a blanco cuando está activo */
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.menu-toggle span:nth-child(3) { bottom: 0; }

/* Estado 'X' cuando está activo */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Navegación móvil: overlay y animación de links */
@media screen and (max-width: 992px) {
    .menu-toggle {
        display: flex;
    }

    .navegacion {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(135deg, rgb(26, 76, 37), rgba(13, 38, 19, 0.918));
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        backdrop-filter: blur(50px);
        -webkit-backdrop-filter: blur(10px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        border-radius: 25px;
    }

    .navegacion.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;

    }

    .navegacion a {
        margin: 1rem 0;
        font-size: 1.2rem;
        color: #fff;
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }

    .navegacion.active a {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger animation para los links */
    .navegacion.active a:nth-child(1) { transition-delay: 0.08s; }
    .navegacion.active a:nth-child(2) { transition-delay: 0.16s; }
    .navegacion.active a:nth-child(3) { transition-delay: 0.24s; }
    .navegacion.active a:nth-child(4) { transition-delay: 0.32s; }
    .navegacion.active a:nth-child(5) { transition-delay: 0.40s; }

    .logo-imagen img {
        height: 30px;
    }

}

/* Respeto prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .menu-toggle span,
    .navegacion,
    .navegacion a {
        transition: none !important;
    }
}

/* Título centrado solo en móviles */
.header-title-mobile {
  display: none;
  font-weight: 800;
  letter-spacing: .06em;
  color: #ffffff;
  text-transform: uppercase;
  pointer-events: none;
}

@media (max-width: 768px) {
  .header-title-mobile {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.05rem;
  }
}
