/* -----------------------------------------------------------
   BAC ABOGADOS - HOJA DE ESTILOS MAESTRA (FINAL)
   ----------------------------------------------------------- */

/* 1. VARIABLES GLOBALES */
:root {
    --bac-navy: #0a192f;
    --bac-gold: #c5a059;
    --bac-text: #333;
}

/* 2. CONFIGURACIÓN GENERAL PARA EVITAR ESPACIOS BLANCOS */
html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden !important; /* CRÍTICO: Evita el scroll lateral */
    position: relative;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--bac-text);
    /* Cursor personalizado */
    cursor: url('images/gavel.png'), auto !important;
}

/* Elementos interactivos */
a, button, .btn, .nav-link, input, textarea, select, label {
    cursor: url('images/gavel.png'), pointer !important;
}

body.hammer-down, 
body.hammer-down a, 
body.hammer-down button,
body.hammer-down .btn {
    cursor: url('images/hammer.png'), auto !important;
}

/* 3. BARRA DE NAVEGACIÓN (FIX PARA MÓVILES) */
.navbar-bac {
    background-color: var(--bac-navy);
    padding: 10px 0;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    width: 100%; /* Asegura que no se desborde */
}

.navbar-brand img {
    max-height: 70px;
    width: auto;
    transition: 0.3s;
    filter: brightness(0) invert(1); 
}

.navbar-brand:hover img {
    opacity: 0.9; 
    transform: scale(1.02);
}

.navbar-brand span { color: var(--bac-gold); }

/* Ajuste de enlaces del menú */
.nav-link { 
    color: rgba(255,255,255,0.9) !important; 
    margin-left: 20px; 
    transition: 0.3s; 
    font-weight: 500; 
    font-size: 1.1rem; 
}
.nav-link:hover { 
    color: var(--bac-gold) !important; 
    transform: translateY(-2px); 
}

/* BOTÓN DE MENÚ (HAMBURGUESA) - FIX */
.navbar-toggler {
    border: none;
    outline: none !important;
    padding-right: 0; /* Evita empujar el margen derecho */
}
.navbar-toggler-icon {
    /* Si quieres cambiar el color de las barritas, usa filter o background */
}

/* 4. BOTONES Y UTILIDADES */
.btn-gold {
    background: var(--bac-gold);
    color: white;
    font-weight: 700;
    border: none;
    transition: 0.4s;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 6px;
}
.btn-gold:hover {
    background: var(--bac-navy);
    transform: translateY(-3px);
    color: #fff;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.divider { width:60px; height:3px; background:var(--bac-gold); }
.text-gold { color: var(--bac-gold) !important; }
.letter-spacing-2 { letter-spacing: 2px; }

/* 5. SECCIONES HERO */

/* Hero Principal (Index) */
.hero-wrap {
    width: 100%;
    /* En escritorio usamos viewport height */
    height: 95vh; 
    position: relative;
    /* Ajuste de margen para quedar detrás del menú transparente si fuera el caso */
    margin-top: -80px; 
    background-image: url('images/slider3.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hero Páginas Internas */
.page-hero {
    background-image: url('images/page-hero.jpg');
    background-size: cover; 
    background-position: center;
    height: 450px; 
    position: relative; 
    margin-top: -10px;
    display: flex; 
    align-items: center; 
    justify-content: center;
    width: 100%; /* Asegurar ancho */
}

.overlay, .hero-overlay {
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(10,25,47,0.9) 0%, rgba(10,25,47,0.8) 100%);
    z-index: 1;
}

.hero-content, .hero-title, .hero-text {
    position: relative; 
    z-index: 2; 
    text-align: center; 
    color: white; 
    padding: 20px; 
    max-width: 900px;
    width: 100%; /* Para evitar desbordes de texto */
}

.hero-content h1 { font-size: 3.5rem; font-weight: 800; margin-bottom: 20px; line-height: 1.1; }
.hero-title h1, .hero-text h1 { font-size: 3.5rem; font-weight: 700; margin-bottom: 15px; }

@media (min-width: 992px) { 
    .hero-content h1 { font-size: 4.5rem; } 
}

.breadcrumb { background: transparent; padding: 0; justify-content: center; margin-bottom: 0;}
.breadcrumb-item a { color: var(--bac-gold); text-decoration: none; }
.breadcrumb-item.active { color: rgba(255,255,255,0.7); }

/* 6. COMPONENTES */

/* Formulario Flotante (Escritorio - Flotando) */
.getaquote-form {
    background: #ffffff; padding: 40px; border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.15);
    border-top: 6px solid var(--bac-gold);
    /* RESTAURADO: Valor original para escritorio */
    margin-top: -100px; 
    position: relative; 
    z-index: 10;
}

/* Espacio entre campos */
.getaquote-form .form-group {
    margin-bottom: 30px; 
}

.form-control { background: #f4f6f8; border: 1px solid #e1e1e1; height: 50px; }

/* Contenedor Corporativo */
.corporate-highlight {
    background: var(--bac-navy);
    background-image: url('https://www.transparenttextures.com/patterns/cubes.png');
    color: white;
    padding: 40px;
    border-radius: 12px;
    border: 2px solid var(--bac-gold);
    box-shadow: 0 20px 50px rgba(10, 25, 47, 0.3);
    position: relative;
    overflow: hidden;
}
.corporate-highlight h3 { color: var(--bac-gold); font-weight: 800; letter-spacing: 1px; }
.corporate-list { list-style: none; padding: 0; margin-top: 20px; }
.corporate-list li { margin-bottom: 10px; font-size: 1rem; display: flex; align-items: flex-start; color: rgba(255,255,255,0.9); }
.corporate-list li i { color: var(--bac-gold); margin-right: 15px; margin-top: 5px; }

/* Tarjetas Servicios */
.service-card {
    background: #fff; padding: 30px 20px; border-radius: 12px; height: 100%;
    transition: 0.4s; border-bottom: 3px solid transparent; box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.service-card:hover { transform: translateY(-5px); border-bottom: 3px solid var(--bac-gold); box-shadow: 0 20px 40px rgba(0,0,0,0.1); }
.icon-circle, .service-icon-box {
    width: 60px; height: 60px; background: rgba(10, 25, 47, 0.05); color: var(--bac-navy);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 15px; transition: 0.5s;
}
.service-icon-box { width: 80px; height: 80px; font-size: 2rem; margin-bottom: 25px; }
.service-card:hover .icon-circle, .service-card:hover .service-icon-box { background: var(--bac-gold); color: white; transform: rotate(360deg); }
.service-title { font-weight: 700; color: var(--bac-navy); margin-bottom: 20px; font-size: 1.5rem; position: relative; padding-bottom: 15px; }
.service-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; background: var(--bac-gold); }
.service-list { list-style: none; padding: 0; margin: 0; color: #555; text-align: left; }
.service-list li { margin-bottom: 12px; position: relative; padding-left: 20px; font-size: 0.95rem; line-height: 1.6; }
.service-list li::before { content: '\f00c'; font-family: 'Font Awesome 5 Free'; font-weight: 900; position: absolute; left: 0; top: 2px; color: var(--bac-gold); font-size: 0.8rem; }

/* Clientes */
.client-card {
    border: 1px solid #eee; padding: 15px; text-align: center; border-radius: 12px;
    background: white; transition: all 1s ease; height: 100%;
    display: flex; flex-direction: column; align-items: center; justify-content: flex-start;
    filter: grayscale(100%); opacity: 0.6; text-decoration: none; color: inherit;
}
.client-card:hover, .client-card.lit-up {
    border-color: var(--bac-gold); box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    filter: grayscale(0%); opacity: 1; transform: scale(1.02); text-decoration: none; color: inherit;
}
.client-img-wrapper { height: 100px; width: 100%; display: flex; align-items: center; justify-content: center; margin-bottom: 15px; padding: 10px; }
.client-img-wrapper img { max-height: 100%; max-width: 100%; object-fit: contain; transition: 1s; }
.client-desc { font-size: 0.85rem; color: #777; line-height: 1.4; margin-top: auto; }

/* Director y Equipo */
.director-card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1); display: flex; flex-wrap: wrap;
    border-top: 5px solid var(--bac-gold);
}
.director-img { flex: 1; min-width: 300px; background-size: cover; background-position: center; min-height: 450px; }
.director-info { flex: 1.5; padding: 50px; display: flex; flex-direction: column; justify-content: center; }
.team-card { background: #fff; border: 1px solid #eee; border-radius: 8px; padding: 30px 20px; text-align: center; transition: 0.4s; height: 100%; }
.team-card:hover { transform: translateY(-10px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-bottom: 4px solid var(--bac-gold); }
.team-img-circle { width: 140px; height: 140px; border-radius: 50%; background-color: #f0f0f0; margin: 0 auto 20px; overflow: hidden; border: 4px solid var(--bac-gold); }
.team-img-circle img { width: 100%; height: 100%; object-fit: cover; }

/* Contacto y Legal */
.contact-card {
    background: #fff; padding: 40px; border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08); text-align: center; height: 100%;
    transition: 0.3s; border-top: 4px solid var(--bac-navy);
}
.contact-card:hover { transform: translateY(-5px); border-top-color: var(--bac-gold); }
.contact-icon { font-size: 2.5rem; color: var(--bac-gold); margin-bottom: 20px; }
.map-container { height: 450px; border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); width: 100%; }

.legal-content {
    background: #fff; padding: 50px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05); border-top: 5px solid var(--bac-gold);
}
.legal-content h2 { color: var(--bac-navy); font-weight: 800; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 1px; }
.legal-content p { color: #555; line-height: 1.8; margin-bottom: 20px; text-align: justify; }

/* Footer Styles */
footer { background: #050d1a; color: #888; padding: 70px 0; text-align: center; margin-top: auto; width: 100%; }
.footer-logo { height: 120px; width: auto; margin-bottom: 20px; }
.footer-social { color: white !important; font-size: 1.5rem; transition: 0.3s; }
.footer-social:hover { color: var(--bac-gold) !important; }
.footer-divider { border-color: rgba(255,255,255,0.1); }
.privacy-link { color: #888; text-decoration: underline; }
.privacy-link:hover { color: var(--bac-gold); }

/* ==========================================================
   8. CORRECCIONES RESPONSIVE (MÓVILES)
   ========================================================== */

@media (max-width: 991px) {
    /* Navbar: Logo ajustado y colapso */
    .navbar-brand img { max-height: 50px; }
    
    .navbar-collapse {
        background: var(--bac-navy);
        padding: 20px;
        margin-top: 10px;
        border-radius: 6px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    .nav-link { margin-left: 0; margin-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.05); }
    
    /* El botón toggler debe alinearse a la derecha sin empujar el ancho */
    .navbar-toggler {
        margin-right: 0 !important;
    }

    /* Heros en tablets/móviles */
    .hero-wrap { 
        margin-top: -75px; 
        height: auto; 
        min-height: 600px;
        padding-top: 120px;
        padding-bottom: 60px;
        background-attachment: scroll; /* Fix: scroll en móviles evita saltos */
    }
}

@media (max-width: 768px) {
    /* TEXTOS */
    h1 { font-size: 2rem !important; word-wrap: break-word; } /* Evita desbordamiento de texto largo */
    h2 { font-size: 1.6rem !important; }
    
    /* MÁRGENES DE SEGURIDAD */
    .container {
        padding-left: 15px;
        padding-right: 15px;
        overflow: hidden; /* Corta contenido interno que se desborde */
    }
    
    .row {
        margin-left: -15px; /* Restaura comportamiento standard bootstrap */
        margin-right: -15px;
    }

    /* CAMBIO: Separación del formulario en MÓVILES */
    .getaquote-form {
        margin-top: 40px; /* Aquí está el espacio extra para separar de la imagen azul */
        margin-bottom: 40px;
        padding: 25px 20px;
    }
    
    /* Tarjetas */
    .director-card { flex-direction: column; }
    .director-img { min-height: 300px; }
    .director-info { padding: 30px 20px; }
    
    /* Ajustes visuales */
    .page-hero { height: 250px; margin-top: 0; }
    .hero-title { padding: 20px 0; }
    
    /* Footer */
    footer { padding: 40px 0; }
    .footer-logo { height: 90px; }
}