/* =========================================
   VARIABLES DE MARCA (BRANDBOOK AGILAW)
   ========================================= */
:root {
    --azul-agilaw: #34304e; /* Eje visual principal, autoridad */
    --terracota: #b9836c;   /* Acentos, storytelling, humanidad */
    --arena: #c5a27f;       /* Recursos editoriales, detalles cálidos */
    --beige-piedra: #d9ccbe;/* Rigor visual, arquitectura de marca */
    --marfil: #f6f2ec;      /* Fondo principal, luz mediterránea */
    --taupe: #b59c88;       /* Fondos destacados, calidez */
    
    --font-display: 'Bodoni Moda', serif;
    --font-body: 'General Sans', sans-serif;
}

/* =========================================
   SISTEMA MULTILENGUAJE POR CLASES CSS
   ========================================= */
body.lang-es .lang-en { display: none !important; }
body.lang-en .lang-es { display: none !important; }

/* =========================================
   RESET Y BASE
   ========================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--marfil);
    color: var(--azul-agilaw);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: var(--font-display);
    font-weight: 500;
    color: var(--azul-agilaw);
    -webkit-font-smoothing: antialiased; 
    -moz-osx-font-smoothing: grayscale;  
    font-variation-settings: "opsz" 14; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* =========================================
   HEADER / NAVBAR & SELECTOR IDIOMA
   ========================================= */
header {
    background-color: transparent;
    padding: 2rem 0;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(52, 48, 78, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo img {
    height: 50px; 
    width: auto;
    display: block;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--azul-agilaw);
    font-size: 0.9rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--terracota);
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--azul-agilaw);
    margin-left: 1rem;
}

.lang-btn {
    background: none;
    border: none;
    color: var(--azul-agilaw);
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 500;
    opacity: 0.4;
    padding: 0 2px;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.lang-btn:hover, .lang-btn.active {
    opacity: 1;
}

.lang-btn.active {
    font-weight: 600;
    color: var(--terracota);
}

.lang-divider {
    opacity: 0.3;
    pointer-events: none;
}

/* =========================================
   BOTONES
   ========================================= */
.btn-primary {
    background-color: var(--azul-agilaw);
    color: var(--marfil);
    padding: 1.2rem 2.5rem;
    text-decoration: none;
    display: inline-block;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: background-color 0.4s ease;
}

.btn-primary:hover:not(:disabled) {
    background-color: var(--terracota);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-outline {
    border: 1px solid var(--azul-agilaw);
    padding: 0.8rem 1.5rem;
}

.btn-outline:hover {
    background-color: var(--azul-agilaw);
    color: var(--marfil) !important;
}

.link-terracota {
    color: var(--terracota);
    text-decoration: none;
    font-family: var(--font-body);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.85rem;
    padding: 0.6rem 1.2rem;
    border: 1px solid var(--terracota);
    border-radius: 2px;
    display: inline-block;
    transition: all 0.3s ease;
}

.link-terracota:hover {
    background-color: var(--terracota);
    color: var(--marfil);
}

/* =========================================
   HERO CON COMPOSICIÓN DE BLOBS
   ========================================= */
.hero {
    padding: 14rem 0 6rem 0;
    overflow: hidden; 
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr; 
    gap: 5rem;
    align-items: center;
}

.hero-content {
    text-align: left; 
}

.hero h1 {
    font-size: 3.8rem; 
    margin: 0 0 2rem 0;
    line-height: 1.15;
}

.hero .subtitle {
    font-size: 1.15rem;
    margin: 0 0 3rem 0;
    color: rgba(52, 48, 78, 0.8);
}

.hero-blobs-wrapper {
    position: relative;
    width: 100%;
    height: 530px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-blob {
    position: absolute;
    transition: all 0.5s ease-in-out;
}

.blob-bg-1 {
    width: 320px;
    height: 320px;
    background-color: var(--terracota);
    opacity: 0.25;
    top: 5%;
    left: 0%;
    animation: floatBlob1 12s infinite ease-in-out;
}

.blob-bg-2 {
    width: 290px;
    height: 290px;
    background-color: var(--arena);
    opacity: 0.3;
    bottom: 5%;
    right: 2%;
    animation: floatBlob2 14s infinite ease-in-out;
}

.blob-portrait {
    width: 400px;
    height: 480px;
    overflow: hidden;
    z-index: 3;
    box-shadow: 0 25px 50px rgba(52, 48, 78, 0.15);
    border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%; 
}

.blob-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    object-position: center top; 
}

/* =========================================
   ANIMACIONES MICRO-MOVIMIENTO 
   ========================================= */
@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); border-radius: 42% 58% 70% 30% / 45% 45% 55% 55%; }
    50% { transform: translate(15px, -15px) rotate(20deg); border-radius: 65% 35% 50% 50% / 50% 40% 60% 50%; }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) rotate(0deg); border-radius: 70% 30% 52% 48% / 60% 40% 60% 40%; }
    50% { transform: translate(-20px, 10px) rotate(-15deg); border-radius: 45% 55% 35% 65% / 55% 45% 55% 45%; }
}

@keyframes floatPortrait {
    0%, 100% { transform: translateY(0) rotate(0deg); border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%; }
    50% { transform: translateY(-12px) rotate(2deg); border-radius: 48% 52% 60% 40% / 52% 48% 52% 48%; }
}

/* =========================================
   ESPECIALIZACIÓN (SISTEMA ACORDEÓN ANIMADO)
   ========================================= */
.services {
    padding: 8rem 0;
    background-color: var(--marfil);
}

.section-title {
    font-size: 3rem;
    margin-bottom: 4rem;
    text-align: center;
}

.services-list {
    max-width: 950px; 
    margin: 0 auto;
}

.accordion {
    border-top: 1px solid var(--beige-piedra);
    padding: 2.5rem 0;
    transition: all 0.3s ease;
}

.accordion:last-child {
    border-bottom: 1px solid var(--beige-piedra);
}

.accordion-header {
    display: flex;
    align-items: center;
    gap: 2rem;
    cursor: pointer;
    list-style: none; /* Elimina la flecha nativa */
}

.accordion-header::-webkit-details-marker {
    display: none;
}

.accordion-number {
    font-family: var(--font-display);
    font-size: 1.8rem;
    color: var(--arena);
    min-width: 50px;
    -webkit-font-smoothing: auto;
}

.accordion-title {
    font-family: var(--font-display);
    font-size: 2.2rem;
    color: var(--azul-agilaw);
    margin: 0;
    flex-grow: 1;
    -webkit-font-smoothing: auto; 
}

.accordion-icon {
    font-size: 2rem;
    color: var(--terracota);
    font-weight: 300;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Se utiliza la clase controlada por JS en lugar del atributo [open] */
.accordion.is-open .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    padding-left: calc(50px + 2rem);
    max-height: 0;
    opacity: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    /* Transición suave para el efecto deslizable */
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion.is-open .accordion-content {
    opacity: 1;
    padding-top: 1.5rem;
    padding-bottom: 0.5rem;
}

.accordion-content p {
    color: rgba(52, 48, 78, 0.7);
    max-width: 650px;
    font-size: 1.05rem; 
    line-height: 1.6;
}

/* =========================================
   INTERNACIONAL (SPLIT SECTION)
   ========================================= */
.international {
    background-color: var(--azul-agilaw);
    color: var(--marfil);
}

.international-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
    width: 100%;
    max-width: 100%;
}

.intl-text {
    padding: 6rem 10%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.intl-text h2 {
    color: var(--marfil);
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.intl-text p {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-bottom: 3rem;
    max-width: 450px;
}

.intl-text .btn-primary {
    background-color: var(--marfil);
    color: var(--azul-agilaw);
}

.intl-text .btn-primary:hover {
    background-color: var(--terracota);
    color: var(--marfil);
}

.intl-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* =========================================
   EL MÉTODO
   ========================================= */
.method {
    padding: 0; 
    background-color: var(--taupe);
    color: var(--azul-agilaw);
}

.method-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; 
    gap: 0; 
    align-items: stretch; 
}

.method-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
}

.method-image img {
    position: absolute; 
    top: 0;             
    left: 0;            
    width: 100%;
    height: 100%;
    object-fit: cover;  
    display: block;
}

.method-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between; 
    gap: 4rem;
    padding: 10rem 0 10rem 6rem; 
    width: 100% !important; 
    max-width: 100% !important; 
    margin: 0 !important; 
}

.method-content > * {
    max-width: 900px; 
    margin-left: 0;
    margin-right: auto;
}

.method-quote {
    text-align: left;
}

.method-quote h2 {
    font-size: 2.8rem;
    line-height: 1.25;
    margin-bottom: 1.5rem;
}

.method-author {
    display: block;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--azul-agilaw);
    opacity: 0.6;
}

.method-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    text-align: left;
    border-top: 1px solid rgba(52, 48, 78, 0.15);
    padding-top: 3rem;
}

.pillar h4 {
    font-size: 1.6rem;
    margin-bottom: 1rem;
}

.pillar p {
    font-size: 1rem;
    opacity: 0.85;
}

/* =========================================
   CONTACTO (CONCIERGE FORM)
   ========================================= */
.contact {
    padding: 8rem 0;
    background-color: var(--marfil);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6rem;
}

.contact-info h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.contact-info p {
    font-size: 1.1rem;
    margin-bottom: 3rem;
    color: rgba(52, 48, 78, 0.8);
}

.contact-details p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-top: 1rem;
}

.input-group {
    position: relative;
    width: 100%;
}

.input-group input,
.input-group select,
.input-group textarea {
    width: 100%;
    padding: 1rem 0;
    font-family: var(--font-body);
    font-size: 1.1rem;
    border: none;
    border-bottom: 1px solid var(--beige-piedra);
    background-color: transparent;
    color: var(--azul-agilaw);
    transition: border-color 0.3s ease;
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    outline: none;
    border-bottom-color: var(--terracota);
}

/* CASILLA DE PRIVACIDAD */
.privacy-group {
    margin-top: 0.5rem;
    margin-bottom: 0.5rem;
}

.privacy-group label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 0.85rem;
    color: rgba(52, 48, 78, 0.8);
    cursor: pointer;
}

.privacy-group input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 1px solid var(--beige-piedra);
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.privacy-group input[type="checkbox"]:checked {
    background-color: var(--terracota);
    border-color: var(--terracota);
}

.privacy-group input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    color: var(--marfil);
    font-size: 12px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.privacy-group a {
    color: var(--azul-agilaw);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.privacy-group a:hover {
    color: var(--terracota);
}

/* CAPTCHA DESLIZABLE */
.captcha-container {
    width: 100%;
    margin-top: 0.5rem;
    user-select: none;
    -webkit-user-select: none;
}

.captcha-track {
    position: relative;
    width: 100%;
    height: 56px;
    background-color: rgba(52, 48, 78, 0.03);
    border: 1px solid var(--beige-piedra);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.captcha-bg-text {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--azul-agilaw);
    opacity: 0.5;
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease, color 0.3s ease;
}

.captcha-handle {
    position: absolute;
    left: 0;
    top: 0;
    width: 56px;
    height: 100%;
    background-color: var(--azul-agilaw);
    color: var(--marfil);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 2;
}

.captcha-handle:active {
    cursor: grabbing;
}

.captcha-handle svg {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
}

.captcha-track.verified {
    background-color: rgba(185, 131, 108, 0.08);
    border-color: var(--terracota);
}

.captcha-track.verified .captcha-bg-text {
    color: var(--terracota);
    opacity: 1;
    font-weight: 600;
}

.captcha-track.verified .captcha-handle {
    background-color: var(--terracota);
    cursor: default;
    pointer-events: none;
}

.captcha-track.verified .captcha-handle svg {
    transform: rotate(360px);
}

.contact-form .btn-primary {
    margin-top: 1rem;
    align-self: flex-start;
}

/* =========================================
   FOOTER
   ========================================= */
footer {
    background-color: var(--marfil);
    padding: 4rem 0;
    border-top: 1px solid var(--beige-piedra);
    text-align: center;
}

.footer-logo {
    margin-bottom: 1.5rem;
    display: flex;
    justify-content: center;
}

.footer-logo img {
    height: 40px; 
    width: auto;
    opacity: 0.9;
}

footer p {
    color: var(--arena);
    margin-bottom: 1rem;
}

.footer-legal a {
    color: var(--azul-agilaw);
    text-decoration: none;
    font-size: 0.85rem;
    margin: 0 0.5rem;
    opacity: 0.7;
}

.footer-legal a:hover {
    opacity: 1;
}

/* =========================================
   PÁGINA DE TEXTOS LEGALES
   ========================================= */
.legal-header {
    background-color: var(--marfil);
    position: relative; /* Quita el absolute para que no pise el texto */
    border-bottom: 1px solid var(--beige-piedra);
}

.legal-main {
    padding: 6rem 0;
    max-width: 800px; /* Ancho de lectura óptimo */
}

.legal-document {
    padding-top: 2rem; /* Espacio para que el ancla # no quede oculta por el navegador */
}

.legal-document h1 {
    font-size: 3rem;
    margin-bottom: 3rem;
    color: var(--terracota);
}

.legal-document h2 {
    font-size: 1.5rem;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--azul-agilaw);
}

.legal-document p {
    font-size: 1.05rem;
    margin-bottom: 1.5rem;
    color: rgba(52, 48, 78, 0.85);
}

.legal-document ul {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
    color: rgba(52, 48, 78, 0.85);
}

.legal-document li {
    margin-bottom: 0.5rem;
}

.legal-divider {
    border: 0;
    height: 1px;
    background-color: var(--beige-piedra);
    margin: 5rem 0;
}

/* RESPONSIVO MÓVILES */
@media (max-width: 768px) {
    .nav-links { display: none; }
    
    /* Ajustes acordeón móvil */
    .accordion-header { gap: 1rem; }
    .accordion-title { font-size: 1.6rem; }
    .accordion-content { padding-left: 0; }
    
    .link-terracota { display: inline-block; margin-top: 1rem; }
    .international-container, .contact-container { grid-template-columns: 1fr; gap: 3rem; }
    
    .method-grid { grid-template-columns: 1fr; gap: 0; }
    .method-image { height: 50vh; min-height: 400px; order: 2; }
    .method-content { order: 1; padding: 4rem 5%; }
    .method-pillars { grid-template-columns: 1fr; gap: 3rem; }

    .hero {
        padding-top: 10rem;
        padding-bottom: 4rem;
    }

    .hero-grid {
        grid-template-columns: 1fr; 
        gap: 3.5rem;
    }

    .hero-content {
        text-align: center; 
    }

    .hero h1 {
        font-size: 2.6rem;
    }

    .hero-blobs-wrapper {
        height: 430px; 
    }

    .blob-portrait {
        width: 310px;  
        height: 380px; 
        border-radius: 55% 45% 55% 45% / 45% 55% 45% 55%; 
    }

    .blob-bg-1 {
        width: 230px;
        height: 230px;
    }

    .blob-bg-2 {
        width: 210px;
        height: 210px;
    }

    .section-title { 
        font-size: 2rem; 
        margin-bottom: 2.5rem; 
    }

    .intl-text { 
        padding: 4rem 5%; 
    }
    .intl-text h2 { 
        font-size: 2.2rem; 
        word-break: break-word; 
    }
    .intl-text p {
        font-size: 1rem;
    }

    .method-quote h2 { 
        font-size: 1.8rem; 
    }

    .contact-info h2 { 
        font-size: 2.2rem; 
    }
}