/* =====================================================
   VARIABLES
===================================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #eff6ff;

    --secondary: #0f172a;

    --text: #334155;
    --text-light: #64748b;

    --background: #ffffff;
    --background-soft: #f8fafc;

    --border: #e2e8f0;

    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;

    --shadow-sm: 0 4px 12px rgba(15, 23, 42, 0.06);
    --shadow-md: 0 12px 30px rgba(15, 23, 42, 0.08);
    --shadow-lg: 0 20px 45px rgba(15, 23, 42, 0.12);

    --container: 1180px;
}


/* =====================================================
   RESET
===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
}

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    color: var(--text);
    background: var(--background);
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

button,
a,
summary {
    -webkit-tap-highlight-color: transparent;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font: inherit;
}


/* =====================================================
   CONTENEDORES
===================================================== */

.header-container,
.footer-container,
.hero-policies-container,
.cta-container {
    width: min(calc(100% - 40px), var(--container));
    margin: 0 auto;
}


/* =====================================================
   HEADER
===================================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;

    background: rgba(255, 255, 255, 0.95);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border-bottom: 1px solid var(--border);
}

.header-container {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}


/* =====================================================
   LOGO
===================================================== */

.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.brand-symbol {
    width: 58px;
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 9px;
    overflow: hidden;
}

.brand-symbol img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.brand-name {
    display: flex;
    align-items: baseline;
    gap: 2px;

    color: var(--secondary);
    font-size: 20px;
    font-weight: 700;
}

.brand-name strong {
    color: #dc2626;
}


/* =====================================================
   NAVEGACIÓN
===================================================== */

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;

    margin-left: auto;
    margin-right: 40px;
}

.nav-item {
    position: relative;

    padding: 26px 0;

    color: var(--text-light);
    font-size: 14px;
    font-weight: 600;

    transition: color 0.2s ease;
}

.nav-item:hover,
.nav-item.active,
.nav-item[aria-current="page"] {
    color: var(--primary);
}

.nav-item.active::after,
.nav-item[aria-current="page"]::after {
    content: "";

    position: absolute;
    bottom: 17px;
    left: 0;

    width: 100%;
    height: 2px;

    background: var(--primary);
    border-radius: 10px;
}


/* =====================================================
   MENÚ MÓVIL
===================================================== */

.mobile-menu {
    display: none;

    width: 42px;
    height: 42px;

    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 8px;

    background: #ffffff;
    color: var(--secondary);

    font-size: 18px;
    cursor: pointer;

    transition:
        border-color 0.2s ease,
        color 0.2s ease,
        background 0.2s ease;
}

.mobile-menu:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}


/* =====================================================
   ETIQUETAS DE SECCIÓN
===================================================== */

.section-tag {
    display: inline-block;

    margin-bottom: 15px;
    padding: 7px 16px;

    border-radius: 30px;

    background: #e2e8f0;
    color: #0f172a;

    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.5px;
}


/* =====================================================
   HERO POLÍTICAS
===================================================== */

.hero-policies {
    position: relative;
    overflow: hidden;
    height: 93vh;
    padding: 100px 0;

    background:
        linear-gradient(
            135deg,
            #eff6ff 0%,
            #ffffff 60%,
            #f8fafc 100%
        );
}

.hero-policies::before {
    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    top: -180px;
    right: -100px;

    border-radius: 50%;
    background: rgba(37, 99, 235, 0.07);

    pointer-events: none;
}

.hero-policies::after {
    content: "";

    position: absolute;

    width: 260px;
    height: 260px;

    bottom: -170px;
    left: 8%;

    border-radius: 50%;
    background: rgba(27, 83, 204, 0.555);

    pointer-events: none;
}

.hero-policies-container {
    position: relative;
    z-index: 1;

    display: grid;
    grid-template-columns: 1.4fr 0.6fr;

    align-items: center;
    gap: 80px;
}

.hero-policies-content {
    max-width: 720px;
}

.hero-policies-content h1 {
    margin-bottom: 25px;

    color: var(--secondary);

    font-size: clamp(42px, 5vw, 68px);
    line-height: 1.08;
    letter-spacing: -2.5px;
}

.hero-policies-content h1 span {
    display: block;
    color: var(--primary);
}

.hero-policies-content > p {
    max-width: 650px;

    color: var(--text-light);

    font-size: 18px;
    line-height: 1.8;
}


/* =====================================================
   ICONO DEL HERO
===================================================== */

.hero-policies-icon {
    width: 220px;
    height: 220px;

    display: flex;
    align-items: center;
    justify-content: center;

    justify-self: center;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: 35px;

    color: var(--primary);
    font-size: 88px;

    box-shadow: var(--shadow-lg);

    transform: rotate(3deg);

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.hero-policies-icon:hover {
    transform: rotate(0deg) translateY(-5px);
    box-shadow: 0 25px 50px rgba(15, 23, 42, 0.14);
}


/* =====================================================
   SECCIÓN DE POLÍTICAS
===================================================== */

.policies-section {
    padding: 100px 0;
    background: var(--background);
}

.policies-container {
    width: min(calc(100% - 40px), 920px);
    margin: 0 auto;
}

.policies-heading {
    max-width: 760px;
    margin: 0 auto 45px;
    text-align: center;
}

.policies-heading h2 {
    margin-bottom: 15px;

    color: var(--secondary);

    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.policies-heading > p {
    color: var(--text-light);
    font-size: 16px;
    line-height: 1.7;
}


/* =====================================================
   LISTA DE POLÍTICAS
===================================================== */

.policies-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}


/* =====================================================
   TARJETAS DESPLEGABLES
===================================================== */

.policy-card {
    position: relative;

    overflow: hidden;

    background: #ffffff;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    box-shadow: var(--shadow-sm);

    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.25s ease;
}

.policy-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
}

.policy-card[open] {
    border-color: #bfdbfe;
    box-shadow: var(--shadow-md);
}


/* =====================================================
   ENCABEZADO DE CADA TARJETA
===================================================== */

.policy-summary {
    position: relative;

    display: flex;
    align-items: center;
    gap: 18px;

    min-height: 100px;
    padding: 22px 25px;

    list-style: none;
    cursor: pointer;

    background: #ffffff;

    transition: background 0.25s ease;
}

/* Ocultar el marcador predeterminado */

.policy-summary::-webkit-details-marker {
    display: none;
}

.policy-summary::marker {
    content: "";
}

.policy-summary:hover {
    background: var(--background-soft);
}

.policy-card[open] .policy-summary {
    background: #f8fbff;
}


/* =====================================================
   ICONO DE CADA POLÍTICA
===================================================== */

.policy-icon {
    width: 52px;
    height: 52px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: var(--primary-light);
    color: var(--primary);

    font-size: 21px;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.policy-card[open] .policy-icon {
    background: var(--primary);
    color: #ffffff;

    transform: scale(1.04);
}


/* =====================================================
   TÍTULO Y DESCRIPCIÓN
===================================================== */

.policy-title {
    display: flex;
    flex-direction: column;
    flex: 1;

    min-width: 0;
    gap: 4px;
}

.policy-title strong {
    color: var(--secondary);

    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;

    transition: color 0.2s ease;
}

.policy-summary:hover .policy-title strong,
.policy-card[open] .policy-title strong {
    color: var(--primary);
}

.policy-title small {
    color: var(--text-light);

    font-size: 13px;
    line-height: 1.5;
}


/* =====================================================
   FLECHA DESPLEGABLE
===================================================== */

.policy-arrow {
    width: 36px;
    height: 36px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid var(--border);
    border-radius: 50%;

    background: #ffffff;
    color: var(--text-light);

    font-size: 12px;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.policy-card[open] .policy-arrow {
    transform: rotate(180deg);

    background: var(--primary-light);
    border-color: #bfdbfe;
    color: var(--primary);
}


/* =====================================================
   CONTENIDO DESPLEGABLE
===================================================== */

.policy-content {
    padding: 0 30px 28px 95px;

    border-top: 1px solid transparent;

    animation: policyReveal 0.3s ease both;
}

.policy-card[open] .policy-content {
    border-top-color: #eff6ff;
}

.policy-content p {
    margin-top: 20px;

    color: var(--text-light);

    font-size: 15px;
    line-height: 1.85;
}

.policy-content p:first-child {
    margin-top: 22px;
}

.policy-content h3 {
    margin-top: 25px;
    margin-bottom: 10px;

    color: var(--secondary);

    font-size: 17px;
    line-height: 1.4;
}

.policy-content h4 {
    margin-top: 20px;
    margin-bottom: 8px;

    color: var(--secondary);
    font-size: 15px;
}

.policy-content ul,
.policy-content ol {
    margin: 15px 0 20px;
    padding-left: 22px;

    color: var(--text-light);

    font-size: 14px;
    line-height: 1.85;
}

.policy-content li {
    padding-left: 5px;
    margin-bottom: 8px;
}

.policy-content li::marker {
    color: var(--primary);
}

.policy-content a {
    color: var(--primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.policy-content a:hover {
    color: var(--primary-dark);
}


/* =====================================================
   ANIMACIÓN DE APERTURA
===================================================== */

@keyframes policyReveal {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

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


/* =====================================================
   NOTA INFORMATIVA
===================================================== */

.policies-note {
    display: flex;
    align-items: flex-start;
    gap: 14px;

    margin-top: 35px;
    padding: 22px 24px;

    background: var(--primary-light);

    border: 1px solid #dbeafe;
    border-radius: var(--radius-md);
}

.policies-note > i {
    flex-shrink: 0;

    margin-top: 3px;

    color: var(--primary);
    font-size: 19px;
}

.policies-note p {
    color: var(--text-light);

    font-size: 13px;
    line-height: 1.8;
}


/* =====================================================
   CTA
===================================================== */

.cta-section {
    padding: 80px 0;
    background: var(--secondary);
}

.cta-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
}

.cta-content {
    max-width: 700px;
}

.cta-content .section-tag {
    background: #1e293b;
    color: #93c5fd;
}

.cta-content h2 {
    margin-bottom: 15px;

    color: #ffffff;

    font-size: clamp(32px, 4vw, 46px);
    line-height: 1.15;
    letter-spacing: -1.5px;
}

.cta-content p {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.8;
}

.cta-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}


/* =====================================================
   BOTONES
===================================================== */

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 48px;
    padding: 0 22px;

    border-radius: 10px;

    font-size: 14px;
    font-weight: 700;

    transition:
        transform 0.2s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.primary-button {
    background: var(--primary);
    color: #ffffff;
}

.primary-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.secondary-button {
    background: #ffffff;
    color: var(--secondary);
    border: 1px solid var(--border);
}

.secondary-button:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
}

.cta-section .secondary-button {
    background: transparent;
    border-color: #475569;
    color: #ffffff;
}

.cta-section .secondary-button:hover {
    border-color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}


/* =====================================================
   FOOTER
===================================================== */

.main-footer {
    background: #020617;
    color: #ffffff;
}

.footer-container {
    display: grid;

    grid-template-columns:
        1.5fr
        1fr
        1fr
        1fr;

    gap: 50px;
    padding: 70px 0;
}

.footer-brand .logo {
    display: inline-block;
    margin-bottom: 15px;

    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
}

.footer-brand p {
    max-width: 300px;

    color: #94a3b8;
    font-size: 14px;
    line-height: 1.8;
}

.footer-links,
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.footer-links h3,
.footer-contact h3 {
    margin-bottom: 18px;
    font-size: 15px;
}

.footer-links a,
.footer-contact a {
    margin-bottom: 10px;

    color: #94a3b8;
    font-size: 14px;

    transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: #ffffff;
}

.footer-links a[aria-current="page"] {
    color: #93c5fd;
}


/* =====================================================
   REDES SOCIALES
===================================================== */

.footer-socials {
    display: flex;
    align-items: center;
    gap: 9px;
}

.footer-socials a {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid #1e293b;
    border-radius: 10px;

    color: #94a3b8;
    font-size: 15px;

    transition:
        color 0.2s ease,
        border-color 0.2s ease,
        background 0.2s ease,
        transform 0.2s ease;
}

.footer-socials a:hover {
    color: #ffffff;
    border-color: #475569;
    background: #0f172a;
    transform: translateY(-2px);
}


/* =====================================================
   FOOTER INFERIOR
===================================================== */

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 22px 20px;
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 12px;
}


/* =====================================================
   TABLET
===================================================== */

@media (max-width: 1000px) {

    .main-nav {
        gap: 20px;
        margin-right: 20px;
    }

    .hero-policies-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .hero-policies-icon {
        width: 150px;
        height: 150px;
        justify-self: start;
        font-size: 60px;
        border-radius: 25px;
    }

    .cta-container {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* =====================================================
   HEADER MÓVIL
   COINCIDE CON EL JS DE menu.js
===================================================== */

@media (max-width: 900px) {

    .header-container {
        min-height: 68px;
        position: relative;
    }

    .main-nav {
        display: none;

        position: absolute;
        top: calc(100% + 1px);

        left: 0;
        right: 0;

        width: 100%;
        margin: 0;
        padding: 12px 20px 18px;

        flex-direction: column;
        align-items: stretch;
        gap: 0;

        background: #ffffff;

        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);

        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.10);

        z-index: 999;
    }

    .main-nav.active {
        display: flex;
    }

    .nav-item {
        display: flex;
        align-items: center;

        width: 100%;
        min-height: 48px;
        padding: 12px 10px;

        border-radius: 8px;
        font-size: 14px;
    }

    .nav-item:hover {
        background: var(--primary-light);
    }

    .nav-item.active,
    .nav-item[aria-current="page"] {
        background: var(--primary-light);
        color: var(--primary);
    }

    .nav-item.active::after,
    .nav-item[aria-current="page"]::after {
        display: none;
    }

    .mobile-menu {
        display: flex;
        flex-shrink: 0;
    }
}


/* =====================================================
   MÓVIL
===================================================== */

@media (max-width: 750px) {

    .header-container,
    .footer-container,
    .hero-policies-container,
    .cta-container {
        width: min(calc(100% - 30px), var(--container));
    }

    .hero-policies {
        padding: 75px 0;
    }

    .hero-policies-content h1 {
        font-size: 42px;
        letter-spacing: -1.8px;
    }

    .hero-policies-content > p {
        font-size: 16px;
    }

    .hero-policies-icon {
        width: 120px;
        height: 120px;
        font-size: 48px;
        border-radius: 22px;
    }

    .policies-section {
        padding: 70px 0;
    }

    .policies-container {
        width: min(calc(100% - 30px), 920px);
    }

    .policies-heading {
        margin-bottom: 35px;
    }

    .policies-heading h2 {
        font-size: 34px;
        letter-spacing: -1px;
    }

    .policies-heading > p {
        font-size: 15px;
    }

    .policy-summary {
        min-height: 88px;
        padding: 18px;
        gap: 13px;
    }

    .policy-icon {
        width: 46px;
        height: 46px;
        border-radius: 11px;
        font-size: 18px;
    }

    .policy-title strong {
        font-size: 14px;
    }

    .policy-title small {
        font-size: 12px;
    }

    .policy-arrow {
        width: 31px;
        height: 31px;
        font-size: 10px;
    }

    .policy-content {
        padding: 0 22px 24px;
    }

    .policy-content p {
        font-size: 14px;
        line-height: 1.8;
    }

    .policies-note {
        padding: 18px;
        gap: 12px;
    }

    .cta-section {
        padding: 65px 0;
    }

    .cta-actions {
        width: 100%;
        flex-direction: column;
    }

    .cta-actions a {
        width: 100%;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 35px;
        padding: 55px 0;
    }
}


/* =====================================================
   MÓVIL PEQUEÑO
===================================================== */

@media (max-width: 480px) {

    .brand-symbol {
        width: 50px;
        height: 50px;
    }

    .brand-name {
        font-size: 18px;
    }

    .hero-policies-content h1 {
        font-size: 35px;
    }

    .hero-policies-icon {
        width: 100px;
        height: 100px;
        font-size: 40px;
    }

    .policies-heading h2 {
        font-size: 30px;
    }

    .policies-list {
        gap: 12px;
    }

    .policy-summary {
        padding: 15px 12px;
        gap: 10px;
    }

    .policy-icon {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }

    .policy-title strong {
        font-size: 13px;
    }

    .policy-title small {
        font-size: 11px;
    }

    .policy-arrow {
        width: 27px;
        height: 27px;
    }

    .policy-content {
        padding: 0 16px 20px;
    }

    .policy-content ul,
    .policy-content ol {
        padding-left: 19px;
    }

    .policies-note {
        padding: 16px;
    }

    .footer-socials a {
        width: 40px;
        height: 40px;
    }
}


/* =====================================================
   ACCESIBILIDAD
===================================================== */

.policy-summary:focus-visible,
.mobile-menu:focus-visible,
.nav-item:focus-visible,
.primary-button:focus-visible,
.secondary-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.45);
    outline-offset: 4px;
}


/* =====================================================
   REDUCIR ANIMACIONES
===================================================== */

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

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
