/* =========================================
   GARCÍA & CÍA ABOGADOS - HOJA DE ESTILOS
   Tema: Oscuro / Azul Marino (Responsive)
========================================= */

/* --- VARIABLES GLOBALES (Modo Oscuro) --- */
:root {
    --primario: #0a1128;         /* Azul marino muy oscuro (Fondo principal) */
    --secundario: #060a17;       /* Azul aún más profundo para crear contraste en secciones */
    --acento: #967d59;           /* Bronce / Dorado Envejecido (Conservado) */
    --texto: #f4f4f6;            /* Blanco roto/gris muy claro para el texto principal */
    --texto-secundario: #a0a5b5; /* Gris azulado para textos de apoyo */
    --border: #1d2540;           /* Líneas sutiles en tono azul oscuro */
    --fondo-card: #0d1633;       /* Azul marino un tono más claro para las tarjetas */
}

/* --- RESET Y BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--primario);
    color: var(--texto);
    line-height: 1.6;
    overflow-x: hidden;
    width: 100%;
}

/* --- ANIMACIONES DE BANNER --- */
@keyframes revealLetterSpacing {
    from { 
        opacity: 0; 
        letter-spacing: 25px; 
        filter: blur(10px);
    }
    to { 
        opacity: 1; 
        letter-spacing: clamp(4px, 2vw, 12px); 
        filter: blur(0);
    }
}

@keyframes lineExpand {
    from { width: 0; opacity: 0; }
    to { width: min(120px, 50%); opacity: 1; }
}

@keyframes simpleFade { 
    from { opacity: 0; } 
    to { opacity: 1; } 
}

/* --- REVELADO EN SCROLL --- */
.reveal {
    opacity: 0;
    filter: blur(5px);
    transition: opacity 2s ease, filter 2s ease;
}

.reveal.active {
    opacity: 1;
    filter: blur(0);
}

/* --- NAVEGACIÓN --- */
nav {
    padding: 20px 7%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    position: fixed;
    width: 100%;
    top: 0;
    background: rgba(10, 17, 40, 0.95); /* Azul marino con transparencia */
    backdrop-filter: blur(5px);
    z-index: 1000;
    transition: all 0.5s ease;
}

.logo {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--acento);
    letter-spacing: 2px;
    text-decoration: none;
    z-index: 1002;
}

.nav-links {
    display: flex;
    align-items: center;
}

.nav-links a {
    color: var(--texto);
    text-decoration: none;
    font-size: 0.7rem;
    margin-left: 35px;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: color 0.3s ease;
    font-weight: 400;
}

.nav-links a:hover, .nav-links a.active-link {
    color: var(--acento);
}

/* --- MENÚ HAMBURGUESA --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 6px;
    z-index: 1002;
}

.menu-toggle .bar {
    width: 25px;
    height: 1px;
    background-color: var(--texto);
    transition: all 0.3s ease;
}

/* --- HEADERS (HERO / PAGE HEADER) --- */
.hero, .page-header {
    min-height: 100vh;
    padding: 100px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-position: center;
    background-size: cover;
    background-attachment: scroll;
}

@media (min-width: 1024px) {
    .hero, .page-header { background-attachment: fixed; }
}

.hero, .page-header {
    background-image: linear-gradient(rgba(10, 17, 40, 0.85), rgba(10, 17, 40, 0.85)), 
                      url('https://images.unsplash.com/photo-1589829545856-d10d557cf95f?auto=format&fit=crop&q=80&w=2070');
}

.page-header {
    border-bottom: 1px solid var(--border);
}

.hero h1, .page-header h1 {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.8rem, 7vw, 4rem);
    font-weight: 400;
    color: var(--texto);
    animation: revealLetterSpacing 3s cubic-bezier(0.2, 0, 0.2, 1) forwards;
}

.hero::after, .page-header::after {
    content: "";
    height: 1px;
    background: var(--acento);
    margin-top: 25px;
    animation: lineExpand 3.5s ease-in-out 0.5s forwards;
}

.hero p {
    margin-top: 40px;
    font-weight: 400;
    letter-spacing: 6px;
    color: var(--texto-secundario);
    text-transform: uppercase;
    font-size: 0.85rem;
    opacity: 0;
    animation: simpleFade 2s ease forwards 1.8s;
}

/* --- SECCIONES --- */
.content-section { padding: clamp(80px, 12vw, 120px) 10%; }
.dark-bg { background-color: var(--secundario); }

.section-title {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.4rem, 4vw, 1.8rem);
    color: var(--acento);
    text-align: center;
    margin-bottom: clamp(40px, 10vw, 80px);
    letter-spacing: 5px;
}

.mission-text {
    font-family: 'Cinzel', serif;
    font-size: clamp(1.1rem, 3vw, 1.4rem);
    color: var(--texto-secundario);
    font-style: italic;
    max-width: 850px;
    margin: 0 auto;
    line-height: 2;
    text-align: center;
}

/* --- GRIDS Y TARJETAS ORIGINALES (Para otras páginas) --- */
.grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* --- MIEMBROS DEL EQUIPO (Añadido) --- */
.team-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas en escritorio */
    gap: 30px; 
}

.card {
    padding: 60px 40px;
    border: 1px solid var(--border);
    background: var(--fondo-card);
    transition: all 0.6s ease;
}

.card:hover { border-color: var(--acento); transform: translateY(-5px); }
.card h3 { font-family: 'Cinzel', serif; margin-bottom: 20px; font-size: 1.1rem; color: var(--acento); letter-spacing: 2px; }
.card p { font-weight: 200; font-size: 0.9rem; color: var(--texto-secundario); }


/* =========================================
   NUEVO: CARRUSEL DE ÁREAS (INTERACTIVO) - CORREGIDO
========================================= */
.carousel-container {
    position: relative;
    width: 100%;
    min-height: clamp(350px, 40vh, 500px); /* Ajuste automático de altura según pantalla */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 60px;
    padding-bottom: 40px; /* Espacio para los puntos indicadores fuera del texto */
}

.areas-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px 15%; /* REDUCIDO padding lateral para que el texto se extienda más */
    box-sizing: border-box;
    background: transparent; /* Remueve el fondo azul para verse sobre el dark-bg */
    border: none;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
    position: relative; /* Evita que el contenedor colapse */
}

.carousel-slide h3 { 
    font-family: 'Cinzel', serif;
    font-size: clamp(1.2rem, 3.5vw, 1.8rem); /* REDUCIDO tamaño de fuente del título */
    margin-bottom: 30px; 
    letter-spacing: 3px; 
    color: var(--acento);
}

.carousel-slide p { 
    font-size: clamp(0.9rem, 1.8vw, 1rem); /* REDUCIDO tamaño de fuente del párrafo */
    max-width: 900px; 
    line-height: 2; 
    color: var(--texto-secundario); 
    font-weight: 200; 
}

/* --- Botones del Carrusel (Flechas) - POSICIONAMIENTO CORREGIDO --- */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    color: var(--acento);
    border: 1px solid var(--acento);
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-btn:hover {
    background: var(--acento);
    color: var(--primario);
}

.carousel-btn.prev { left: 20px; } /* MOVIDO hacia el borde izquierdo */
.carousel-btn.next { right: 20px; } /* MOVIDO hacia el borde derecho */

/* --- Indicadores (Puntos) - POSICIONAMIENTO CORREGIDO --- */
.carousel-indicators {
    position: absolute;
    bottom: 30px; /* MOVIDO hacia abajo para estar afuera del área de texto principal */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.dot {
    width: 10px;
    height: 10px;
    background-color: var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.dot.active, .dot:hover {
    background-color: var(--acento);
    transform: scale(1.3);
}

/* --- MIEMBROS DEL EQUIPO (Añadido) --- */
.member-card {
    border: 1px solid var(--border);
    background: var(--secundario);
    transition: all 0.6s ease;
    overflow: hidden;
}

.member-card:hover { border-color: var(--acento); }

.member-img-container {
    width: 100%;
    height: 400px;
    filter: grayscale(100%);
    transition: filter 0.8s ease;
}

.member-card:hover .member-img-container { filter: grayscale(0%); }
.member-img-container img { width: 100%; height: 100%; object-fit: cover; }

.member-info { padding: 40px; text-align: center; }
.member-info h3 { font-family: 'Cinzel', serif; color: var(--acento); margin-bottom: 5px; font-weight: 700; }
.member-position { font-size: 0.65rem; text-transform: uppercase; color: var(--texto-secundario); letter-spacing: 3px; margin-bottom: 25px; display: block; }
.member-bio { font-size: 0.85rem; color: var(--texto); font-weight: 200; line-height: 1.8; }

/* --- CONTACTO / PROTOCOLO --- */
.contact-box {
    max-width: 850px; /* Aumentado max-width para escritorio */
    margin: 0 auto;
    border: 1px solid var(--border);
    padding: clamp(50px, 10vw, 90px) clamp(20px, 5vw, 50px);
    background-color: var(--secundario);
    text-align: center;
}

/* =========================================
   ESTILOS DEL FORMULARIO WEB3FORMS (CORREGIDO)
========================================= */
.contact-form {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 800px; /* Aumentado max-width del formulario en escritorio */
    margin-left: auto;
    margin-right: auto;
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
}

.form-group input, 
.form-group textarea {
    width: 100%;
    padding: 18px;
    background: var(--primario); /* Tono contrastante con la caja */
    border: 1px solid var(--border);
    color: var(--texto);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 1px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input:focus, 
.form-group textarea:focus {
    border-color: var(--acento);
    box-shadow: 0 0 10px rgba(150, 125, 89, 0.1);
}

.cta-button {
    display: inline-block;
    padding: 18px 50px;
    border: 1px solid var(--acento);
    color: var(--acento);
    text-decoration: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 3px;
    font-weight: 400;
    transition: all 0.5s ease;
    margin-top: 15px;
    background: transparent;
    cursor: pointer;
    width: 100%; /* Adaptado para la caja de webform */
}

.cta-button:hover {
    background: var(--acento);
    color: var(--primario);
}

.location-tag {
    margin-top: 60px;
    font-size: 0.8rem;
    color: var(--acento);
    font-family: 'Cinzel', serif;
    letter-spacing: 5px;
    text-transform: uppercase;
    font-weight: 700;
}

/* --- FOOTER --- */
footer {
    padding: 80px 10% 40px;
    background-color: var(--secundario);
    border-top: 1px solid var(--border);
    color: var(--texto-secundario);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 60px;
}

.footer-logo { font-family: 'Cinzel', serif; color: var(--acento); font-size: 1.2rem; font-weight: 700; letter-spacing: 2px; margin-bottom: 20px; }
.footer-column h4 { font-family: 'Cinzel', serif; color: var(--texto); font-size: 0.8rem; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 2px; font-weight: 700; }
.footer-column p, .footer-column a { font-size: 0.85rem; color: var(--texto-secundario); text-decoration: none; display: block; margin-bottom: 12px; font-weight: 200; }
.footer-column a:hover { color: var(--acento); }

.footer-bottom {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.7rem;
    color: var(--texto-secundario);
}

/* =========================================
   RESPONSIVIDAD (MEDIA QUERIES)
========================================= */

/* --- TABLETS Y PANTALLAS MEDIANAS --- */
@media (max-width: 1024px) {
    .grid, .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .content-section { padding: 80px 5%; }
}

/* --- MÓVILES (CELULARES) --- */
@media (max-width: 768px) {
    .grid, .team-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    nav { padding: 20px 5%; }
    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: var(--primario);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1);
        gap: 40px;
        z-index: 1001;
    }

    .nav-links.active { right: 0; }
    .nav-links a { margin-left: 0; font-size: 1.1rem; }

    /* Animación del Menú Hamburguesa a "X" */
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* Ajustes visuales para móvil */
    .section-title { font-size: 1.4rem; letter-spacing: 3px; }
    .mission-text { font-size: 1rem; }
    .member-img-container { height: 300px; }
    
    /* Carrusel en móviles: Flechas visibles y ajustadas */
    .carousel-btn { 
        display: flex; /* Mantiene las flechas visibles */
        width: 35px; /* Flechas más pequeñas en móvil */
        height: 35px;
        font-size: 1rem;
        display: none;

    }
    .carousel-btn.prev { left: 5px; } /* Ajuste de posición */
    .carousel-btn.next { right: 5px; } /* Ajuste de posición */
    .carousel-slide { padding: 30px 10%; } /* Ajuste de padding para no pisar el texto con las flechas */
    
    /* Formulario en móviles: Ocupa todo el ancho */
    .contact-form {
        width: 100%; /* Asegura que el formulario ocupe el ancho disponible en la caja */
    }
    .form-group input, 
    .form-group textarea {
        width: 100%;
    }

    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}