/*
Theme Name:   Astra Child Legalyasocs
Theme URI:    https://legalyasocs.cl
Description:  Child theme de Astra para el proyecto Legalyasocs. Contiene el CSS del concepto Blueprint migrado desde el Customizer.
Author:       Equipo Legalyasocs
Author URI:   https://legalyasocs.cl
Template:     astra
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  astra-child-legalyasocs
*/

/* =========================================
   HERO SECTION: ESTILO BLANCO / BLUEPRINT
   ========================================= */
.hero-blueprint {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 85vh;
    padding: 0 8%;
    background-color: #FFFFFF;
    background-image:
        linear-gradient(#f0f0f0 1px, transparent 1px),
        linear-gradient(90deg, #f0f0f0 1px, transparent 1px);
    background-size: 50px 50px;
    background-position: center center;
}

.hero-content {
    max-width: 50%;
    z-index: 2;
}

.hero-title {
    font-family: 'Aileron', sans-serif;
    font-weight: 800;
    font-size: clamp(3rem, 5vw, 5rem);
    line-height: 1.05;
    color: #1a1a1a;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-family: 'Aileron', sans-serif;
    font-weight: 300;
    font-size: 1.25rem;
    color: #4a4a4a;
    margin-bottom: 40px;
    max-width: 80%;
}

/* =========================================
   BOTÓN PRINCIPAL (Contraste Alto)
   ========================================= */
.btn-primary {
    display: inline-block;
    padding: 16px 32px;
    background-color: #1a1a1a;
    color: #ffffff;
    text-decoration: none;
    font-family: 'Aileron', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.3s ease;
    border: 2px solid #1a1a1a;
}

.btn-primary:hover {
    background-color: transparent;
    color: #1a1a1a;
}

/* =========================================
   CONTENEDOR DE IMAGEN
   ========================================= */
.hero-image {
    max-width: 45%;
    z-index: 2;
}

.hero-image img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.05));
}

/* Ajuste para Móviles */
@media (max-width: 768px) {
    .hero-blueprint {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 100px;
        padding-bottom: 50px;
    }
    .hero-content, .hero-image {
        max-width: 100%;
    }
    .hero-image {
        margin-top: 40px;
    }
}

/* =========================================
   ANIMACIONES DE ENTRADA (FADE-IN UP)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.delay-1 { transition-delay: 0.2s; }
.delay-2 { transition-delay: 0.4s; }
.delay-3 { transition-delay: 0.6s; }
.delay-4 { transition-delay: 0.8s; }

/* =========================================
   SERVICIOS: FLIP CARDS INTERACTIVAS
   ========================================= */
.services-blueprint {
    padding: 100px 5%;
    background-color: #fcfcfc;
}

.services-header {
    margin-bottom: 60px;
    padding: 0 3%;
}

.section-title {
    font-family: 'Aileron', sans-serif;
    font-weight: 800;
    font-size: 2.5rem;
    color: #1a1a1a;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.section-line.reveal {
    display: block;
    opacity: 0;
    width: 0;
    height: 4px;
    background-color: #1a1a1a;
    transform: translateX(-10px);
    transition: width 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.4s,
                opacity 0.8s ease 0.4s,
                transform 0.8s ease 0.4s;
}

.section-line.reveal.active {
    opacity: 1;
    width: 80px;
    transform: translateX(0);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- ESTRUCTURA DE LA TARJETA --- */
.service-card {
    background-color: transparent;
    perspective: 1000px;
    height: 480px;
    cursor: pointer;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: left;
    transition: transform 0.6s cubic-bezier(0.4, 0.2, 0.2, 1);
    transform-style: preserve-3d;
}

.service-card.is-flipped .service-card-inner {
    transform: rotateY(180deg);
}

/* Caras Frontal y Trasera */
.service-card-front, .service-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border: 1px solid #e0e0e0;
    padding: 35px 20px;
    display: flex;
    flex-direction: column;
}

.service-card-front {
    background-color: #ffffff;
}

.service-card-back {
    transform: rotateY(180deg);
    background-color: #050505;
    color: #ffffff;
    border: 1px solid #222;
}

/* --- TIPOGRAFÍAS --- */
.service-icon {
    font-family: 'Aileron', sans-serif;
    font-weight: 300;
    font-size: 1.5rem;
    color: #ccc;
    margin-bottom: 20px;
}

.service-name {
    font-family: 'Aileron', sans-serif;
    font-size: 1.1rem;
    font-weight: 800;
    text-transform: uppercase;
    margin-bottom: 20px;
    color: #1a1a1a;
    letter-spacing: -0.5px;
}

.service-name-back {
    font-family: 'Aileron', sans-serif;
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    color: #888;
}

/* --- LISTA FRONTAL --- */
.service-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
}

.service-list li {
    font-family: 'Aileron', sans-serif;
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 12px;
    padding-left: 15px;
    position: relative;
    line-height: 1.35;
}

.service-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: #ccc;
}

/* Trámites Destacados */
.service-list li .trend-highlight {
    background-color: #FFF2CC;
    color: #1a1a1a;
    font-weight: 700;
    display: inline;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    padding: 2px 4px;
    border-radius: 2px;
}

.service-list li:has(.trend-highlight)::before {
    color: #ffd966;
}

/* --- TEXTO TRASERO --- */
.service-card-back .service-text {
    font-family: 'Aileron', sans-serif;
    font-size: 0.95rem;
    line-height: 1.45;
    color: #ddd;
    flex-grow: 1;
}

/* Parche de desborde para textos intactos */
.service-list, .service-card-back .service-text {
    overflow-y: auto;
    padding-right: 8px;
    margin-bottom: 15px;
}

/* Estilo de la barra de scroll (Webkit) */
.service-list::-webkit-scrollbar,
.service-card-back .service-text::-webkit-scrollbar {
    width: 3px;
}
.service-list::-webkit-scrollbar-track,
.service-card-back .service-text::-webkit-scrollbar-track {
    background: transparent;
}
.service-list::-webkit-scrollbar-thumb {
    background: #e0e0e0;
    border-radius: 10px;
}
.service-card-back .service-text::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 10px;
}

/* --- FLECHAS MINIMALISTAS --- */
.flip-arrow {
    font-family: 'Aileron', sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: auto;
    transition: transform 0.3s ease, color 0.3s ease;
}

.front-arrow {
    text-align: right;
    color: #aaa;
}

.back-arrow {
    text-align: left;
    color: #666;
}

.service-card:hover .front-arrow {
    color: #1a1a1a;
    transform: translateX(5px);
}

.service-card.is-flipped:hover .back-arrow {
    color: #fff;
    transform: translateX(-5px);
}

/* --- RESPONSIVE SERVICIOS --- */
@media (max-width: 1024px) {
    .services-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .services-grid { grid-template-columns: 1fr; }

    .service-card {
        height: 400px;
    }

    .service-list li {
        margin-bottom: 16px;
    }

    .service-card-front, .service-card-back {
        padding: 30px 25px;
    }
}

/* =========================================
   METODOLOGÍA: DIAGRAMA DE FLUJO TÉCNICO
   ========================================= */
.methodology-blueprint {
    padding: 100px 8%;
    background-color: #000000;
    background-image:
        linear-gradient(repeating-linear-gradient(to right, #444 0, #444 1px, transparent 1px, transparent 60px)),
        linear-gradient(repeating-linear-gradient(to bottom, #444 0, #444 1px, transparent 1px, transparent 60px));
    color: #FFFFFF;
}

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

.method-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-tag {
    font-family: 'Aileron', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #AFAFAF;
    text-transform: uppercase;
    letter-spacing: 3px;
    margin-top: 10px;
}

.method-flow {
    display: flex;
    justify-content: space-between;
    position: relative;
}

/* Línea conectora de fondo */
.method-flow::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: repeating-linear-gradient(to right, #AFAFAF 0, #AFAFAF 5px, transparent 5px, transparent 10px);
    z-index: 1;
}

.method-step {
    flex: 1;
    padding: 0 20px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.step-number {
    width: 50px;
    height: 50px;
    background-color: #FFFFFF;
    color: #000000;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Aileron', sans-serif;
    font-weight: 700;
    margin: 0 auto 25px auto;
    font-size: 1.1rem;
    outline: 8px solid #000000;
}

.step-title {
    font-family: 'Aileron', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    color: #FFFFFF;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.step-desc {
    font-family: 'Aileron', sans-serif;
    font-weight: 300;
    font-size: 0.95rem;
    color: #AFAFAF;
    line-height: 1.5;
    margin: 0;
}

/* Responsive Metodología */
@media (max-width: 768px) {
    .method-flow {
        flex-direction: column;
        align-items: center;
    }
    .method-flow::before {
        display: none;
    }
    .method-step {
        margin-bottom: 50px;
        max-width: 320px;
    }
    .step-number {
        margin-bottom: 15px;
    }
}

/* =========================================
   FOOTER: ESTILO BLUEPRINT (VALPARAÍSO)
   ========================================= */
.footer-blueprint {
    padding: 80px 8% 40px 8%;
    background-color: #ffffff;
    border-top: 1px solid #e0e0e0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 60px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-blueprint .footer-logo,
.footer-blueprint img.footer-logo,
.footer-blueprint .footer-col img {
    width: 80px !important;
    max-width: 80px !important;
    height: auto !important;
    margin-bottom: 18px !important;
    display: block !important;
}

.footer-description {
    font-family: 'Aileron', sans-serif;
    font-weight: 300;
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
    max-width: 300px;
}

.footer-title {
    font-family: 'Aileron', sans-serif;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #1a1a1a;
    margin-bottom: 25px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    font-family: 'Aileron', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: #1a1a1a;
    padding-left: 5px;
}

.footer-info {
    font-family: 'Aileron', sans-serif;
    font-weight: 400;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.footer-mail {
    color: #1a1a1a;
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    transition: border-color 0.3s ease;
}

.footer-mail:hover {
    border-bottom-color: #1a1a1a;
}

/* Cierre inferior y copyright */
.footer-bottom {
    margin-top: 80px;
    text-align: center;
}

.bottom-line {
    width: 100%;
    height: 1px;
    background-color: #f0f0f0;
    margin-bottom: 30px;
}

.footer-bottom p {
    font-family: 'Aileron', sans-serif;
    font-weight: 300;
    font-size: 0.75rem;
    color: #aaa;
    letter-spacing: 1px;
}

/* Responsive Footer */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-blueprint {
        padding: 60px 5% 30px 5%;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    .footer-logo {
        margin: 0 auto 25px auto;
    }
    .footer-description {
        margin: 0 auto;
    }
}

/* ============================================================
   HEADER: RESET Y ESTRUCTURA GLOBAL
   ============================================================ */
.header-blueprint, .header-blueprint * {
    box-sizing: border-box;
}

.header-blueprint {
    background-color: #000000 !important;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 10000;
    border-bottom: 1px solid #222;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 8%;
    height: 80px;
}

/* LOGO */
.header-logo img {
    height: 40px;
    width: auto;
    display: block;
}

/* ============================================================
   HEADER DESKTOP (PC) - ESTILO TÉCNICO HORIZONTAL
   ============================================================ */
@media (min-width: 993px) {
    .menu-toggle { display: none !important; }

    .header-nav {
        display: block !important;
    }

    .nav-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 40px;
        list-style: none;
        margin: 0;
        padding: 0;
    }

    .nav-list a {
        color: #ffffff;
        text-decoration: none;
        font-family: 'Aileron', sans-serif;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        transition: color 0.3s;
    }

    .nav-list a:hover { color: #888; }

    /* Dropdown Desktop */
    .dropdown-mobile { position: relative; }
    .menu-label {
        color: #fff;
        cursor: default;
        font-size: 0.8rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 2px;
        font-family: 'Aileron', sans-serif;
    }

    .sub-menu-mobile {
        position: absolute;
        top: 100%;
        left: 0;
        background: #000;
        border: 1px solid #222;
        min-width: 250px;
        padding: 10px 0;
        list-style: none;
        display: none;
    }

    .dropdown-mobile:hover .sub-menu-mobile { display: block; }

    .sub-menu-mobile li a {
        padding: 10px 20px;
        display: block;
        font-size: 0.75rem !important;
        text-transform: none !important;
    }
}

/* ============================================================
   HEADER MOBILE - OVERLAY PREMIUM
   ============================================================ */
@media (max-width: 992px) {
    .header-container { height: 70px; padding: 0 5%; }

    /* Botón hamburguesa */
    .menu-toggle {
        display: block;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 10px;
        z-index: 10001;
    }

    .hamburger-box {
        width: 25px;
        height: 18px;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
    }
    .line {
        display: block;
        width: 100%;
        height: 2px;
        background-color: #fff;
        transition: 0.3s;
    }

    /* Animación a X */
    .is-active .line:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .is-active .line:nth-child(2) { opacity: 0; }
    .is-active .line:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* Menú overlay */
    .header-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0,0,0,0.98);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        visibility: hidden;
        opacity: 0;
        transition: all 0.4s ease;
        z-index: 9999;
    }

    .header-nav.active { visibility: visible; opacity: 1; }

    .nav-list { list-style: none; padding: 0; text-align: center; }
    .nav-list > li { margin: 25px 0; }
    .nav-list a {
        font-size: 1.4rem;
        color: #fff;
        text-decoration: none;
        font-family: 'Aileron', sans-serif;
        letter-spacing: 3px;
        text-transform: uppercase;
    }

    /* Áreas Prácticas Mobile */
    .menu-label {
        display: block;
        color: #666;
        font-size: 0.8rem;
        margin-bottom: 15px;
        font-weight: 800;
    }
    .sub-menu-mobile {
        list-style: none;
        padding: 0;
        border-left: 1px solid #333;
        margin-left: 10px;
    }
    .sub-menu-mobile li { margin: 10px 0; padding-left: 15px; }
    .sub-menu-mobile a {
        font-size: 0.9rem !important;
        color: #aaa !important;
        text-transform: none !important;
        letter-spacing: 1px !important;
    }
}

/* ============================================================
   CONTACTO: FICHA DE REQUERIMIENTO TÉCNICA (WPFORMS 214)
   ============================================================ */
.contact-blueprint {
    padding: 120px 8%;
    background-color: #ffffff;
    text-align: center;
}

.contact-header {
    max-width: 800px;
    margin: 0 auto 60px auto;
}

.contact-subtitle {
    font-family: 'Aileron', sans-serif;
    font-size: 1rem;
    color: #888;
    margin-top: 20px;
}

.contact-container-centered {
    max-width: 800px;
    margin: 0 auto;
    text-align: left;
}

/* Estructura de columnas (Desktop) */
@media (min-width: 768px) {
    #wpforms-214-field_0-container,
    #wpforms-214-field_1-container {
        width: 48% !important;
        float: left !important;
        margin-right: 4% !important;
        clear: none !important;
        margin-bottom: 40px !important;
    }
    #wpforms-214-field_1-container {
        margin-right: 0 !important;
    }
    #wpforms-214-field_2-container {
        clear: both !important;
    }
}

/* Etiquetas técnicas */
#wpforms-214 .wpforms-field-label {
    display: block !important;
    font-family: 'Aileron', sans-serif !important;
    font-weight: 800 !important;
    font-size: 0.7rem !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    color: #1a1a1a !important;
    margin-bottom: 12px !important;
}

/* Inputs, selects, textareas */
#wpforms-214 .wpforms-field input,
#wpforms-214 .wpforms-field select,
#wpforms-214 .wpforms-field textarea {
    width: 100% !important;
    border: none !important;
    border-bottom: 1px solid #e0e0e0 !important;
    padding: 12px 0 !important;
    font-family: 'Aileron', sans-serif !important;
    font-size: 1rem !important;
    background: transparent !important;
    border-radius: 0 !important;
    transition: all 0.3s !important;
    box-shadow: none !important;
}

#wpforms-214 .wpforms-field input:focus,
#wpforms-214 .wpforms-field textarea:focus {
    outline: none !important;
    border-bottom: 1px solid #000 !important;
}

/* Botón de envío */
#wpforms-214 .wpforms-submit-container {
    margin-top: 20px !important;
    padding: 0 !important;
    text-align: right !important;
}

#wpforms-214 .wpforms-submit {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    padding: 18px 50px !important;
    font-family: 'Aileron', sans-serif !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 2px !important;
    cursor: pointer !important;
    transition: 0.3s !important;
}

#wpforms-214 .wpforms-submit:hover {
    background: #333 !important;
    transform: translateY(-3px);
}

/* Nota legal (bypass exterior) */
.form-legal-note {
    font-family: 'Aileron', sans-serif;
    font-size: 0.75rem;
    color: #aaa;
    max-width: 400px;
    line-height: 1.4;
    margin-top: -55px;
    position: relative;
    pointer-events: none;
}

/* Limpieza de errores y branding */
.wpforms-branding { display: none !important; }
.wpforms-error {
    font-size: 0.7rem !important;
    text-transform: uppercase;
    color: #ff0000 !important;
}

/* Ajuste móvil formulario */
@media (max-width: 767px) {
    #wpforms-214-field_0-container,
    #wpforms-214-field_1-container {
        width: 100% !important;
        margin-right: 0 !important;
    }
    .form-legal-note {
        margin-top: 20px;
        text-align: center;
        max-width: 100%;
    }
    #wpforms-214 .wpforms-submit-container {
        text-align: center !important;
    }
}
