/* =========================================================
   1. VARIABLES Y CONFIGURACIÓN (:ROOT)
   ========================================================= */
:root {
    /* --- PALETA DE COLORES --- */
    --brand-primary: #378FAE;    /* Azul Petróleo Principal */
    --brand-secondary: #2C3E50;  /* Gris Pizarra (Oscuro - Navbar/Footer/Contacto) */
    --brand-accent: #4DD0E1;     /* Cian Claro (Detalles/Hover) */
    
    --brand-light: #F4F6F7;      /* Fondo General */
    --brand-white: #ffffff;
    
    /* Texto: Gris Oscuro Profundo para máxima legibilidad */
    --brand-text: #212529;       

    /* --- OVERRIDES DE BOOTSTRAP 5.3 --- */
    --bs-primary: #378FAE; 
    --bs-primary-rgb: 55, 143, 174; 
    
    --bs-secondary: #2C3E50;
    --bs-secondary-rgb: 44, 62, 80;

    --bs-body-color: #212529;
    --bs-link-color: #378FAE;
    --bs-link-hover-color: #2C3E50;
    
    /* --- TIPOGRAFÍA (Opción 2: Solidez Corporativa) --- */
    --font-heading: 'Montserrat', sans-serif; /* Geométrica, Moderna */
    --font-body: 'Roboto', sans-serif;        /* Neutra, Muy Legible */
}

/* =========================================================
   2. ESTILOS BASE Y TIPOGRAFÍA
   ======================================================== */
body {
    font-family: var(--font-body);
    background-color: var(--brand-light);
    color: var(--brand-text);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; 
    font-size: 16px;
    line-height: 1.6; 
}

/* Títulos con Montserrat */
h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: var(--font-heading);
    color: var(--brand-primary) !important; 
    font-weight: 700; 
    letter-spacing: -0.5px; 
}

/* Subtítulos (Lead) */
.lead {
    font-family: var(--font-body);
    font-weight: 300; 
    color: #495057 !important;
}

.bi { color: var(--brand-primary); }

/* =========================================================
   3. NAVEGACIÓN (NAVBAR)
   ======================================================== */
.navbar {
    background-color: var(--brand-secondary) !important;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    padding: 0.8rem 0;
}

.navbar-brand {
    color: var(--brand-white) !important;
    font-size: 1.35rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.navbar-toggler { border: 1px solid rgba(255,255,255,0.1); }
.navbar-toggler-icon { filter: invert(1); }

.nav-link {
    font-family: var(--font-heading);
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 600;
    margin-left: 15px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover, .nav-link.active {
    color: var(--brand-accent) !important;
    transform: translateY(-1px);
}

.btn-nav-contact {
    background-color: var(--brand-primary);
    color: var(--brand-white) !important;
    padding: 8px 24px;
    border-radius: 4px;
    font-weight: 700;
    border: 1px solid var(--brand-primary);
    transition: all 0.3s ease;
}

.btn-nav-contact:hover {
    background-color: var(--brand-white);
    color: var(--brand-primary) !important;
}

/* =========================================================
   4. HERO CAROUSEL (PARALLAX SLIDER)
   ======================================================== */
#heroCarousel {
    background-color: var(--brand-secondary);
}

/* Configuración de cada Slide para Parallax */
.parallax-slide {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    
    /* Altura completa de la pantalla */
    height: 100vh; 
    width: 100%;
    position: relative;
}

/* Overlay degradado */
.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(55, 143, 174, 0.85) 0%, rgba(44, 62, 80, 0.9) 100%);
    z-index: 1;
}

/* Contenido del texto (asegurar que esté encima del overlay) */
.hero-content { 
    position: relative; 
    z-index: 2; 
}

/* Ajustes de texto en el slider */
#heroCarousel h1, #heroCarousel h2 { 
    color: var(--brand-white) !important;
    font-weight: 800; 
    text-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

#heroCarousel p, #heroCarousel .lead { 
    color: rgba(255,255,255,0.95) !important; 
}

/* Indicadores del carrusel */
.carousel-indicators button {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50%;
    background-color: var(--brand-accent) !important;
    opacity: 0.5;
    margin: 0 5px;
    border: none;
}

.carousel-indicators button.active {
    opacity: 1;
    transform: scale(1.2);
    background-color: var(--brand-white) !important;
}

/* Ajuste Móvil: Desactivar parallax fixed para evitar bugs en iOS/Android */
@media (max-width: 768px) {
    .parallax-slide {
        background-attachment: scroll;
        background-position: center center;
    }
    #heroCarousel h1, #heroCarousel h2 { font-size: 2.5rem !important; }
}

/* =========================================================
   5. TARJETAS (IDENTIDAD Y SERVICIOS)
   ======================================================== */
.service-card img {
    max-height: 150px;
    object-fit: cover;
    width: 100%;
}

.identity-card, .service-card {
    background: var(--brand-white);
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 5px 20px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 8px;
    border-bottom: 4px solid transparent; /* Base transparente */
}

/* Línea de color inferior solo en las Service Cards o al Hover */
.service-card { border-bottom: 4px solid var(--brand-primary); }

.identity-card:hover, .service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(55, 143, 174, 0.15);
    /* En hover reforzamos el borde */
    border-bottom: 4px solid var(--brand-primary);
}

.icon-circle {
    width: 80px; height: 80px;
    background-color: var(--brand-primary);
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(55, 143, 174, 0.3);
    margin-top: -10px;
    transition: transform 0.3s ease;
}

.identity-card:hover .icon-circle {
    transform: scale(1.1);
    background-color: var(--brand-secondary);
}

.quote-box {
    background-color: #f8f9fa;
    border-left-color: var(--brand-primary) !important;
}

.quote-box p {
    font-family: var(--font-heading);
    font-weight: 600;
    font-style: italic;
    color: var(--brand-secondary);
}

/* =========================================================
   6. BOTONES
   ======================================================== */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: var(--brand-white) !important;
    border-radius: 4px;
    padding: 12px 30px;
    font-weight: 700;
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 6px rgba(55, 143, 174, 0.25);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #2a7a96 !important;
    border-color: #2a7a96 !important;
    transform: translateY(-2px);
}

.btn-outline-sage {
    color: var(--brand-primary);
    border: 2px solid var(--brand-primary);
    font-weight: 600;
    padding: 8px 24px;
    border-radius: 50px; 
    background: transparent;
    transition: all 0.3s ease;
    font-family: var(--font-heading);
}

.btn-outline-sage:hover {
    background-color: var(--brand-primary);
    color: var(--brand-white);
}

/* =========================================================
   7. MODALES (TÍTULOS BLANCOS)
   ======================================================== */
.modal-header {
    background-color: var(--brand-primary) !important;
    border-bottom: none;
}

/* Forzar color blanco en títulos dentro del header azul */
.modal-header .modal-title, 
.modal-header h1, .modal-header h2, .modal-header h3, .modal-header h4 {
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(0,0,0,0.15);
}

.modal-header .btn-close { 
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 1;
}

.modal-body p {
    font-size: 1.05rem;
    color: var(--brand-text) !important;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    border-top: 1px solid #eee;
}

.modal-footer .btn {
    min-width: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 576px) {
    .modal-footer .btn { width: 100%; margin: 5px 0; }
    .modal-footer { flex-direction: column; }
}

/* =========================================================
   8. SECCIÓN CONTACTO (FONDO OSCURO)
   ======================================================== */
#contacto {
    background-color: var(--brand-secondary) !important;
    background: linear-gradient(135deg, var(--brand-secondary) 0%, #1a252f 100%) !important;
}

#contacto h2 { color: #ffffff !important; }
#contacto p { color: rgba(255,255,255,0.8) !important; }

#contacto .form-control:focus {
    background-color: #fff;
    box-shadow: 0 0 0 4px rgba(55, 143, 174, 0.2);
}

#contacto form {
    box-shadow: 0 15px 35px rgba(0,0,0,0.2) !important;
}

/* =========================================================
   9. FOOTER
   ======================================================== */
footer {
    background-color: var(--brand-secondary) !important;
    color: rgba(255, 255, 255, 0.6);
    padding: 3rem 0;
    border-top: 5px solid var(--brand-primary);
    font-size: 0.9rem;
}

/* =========================================
   NUEVO ESTILO PARA BADGE "BIENVENIDOS"
   ========================================= */
.hero-welcome-badge {
    display: inline-block;
    /* Tipografía: Usamos Montserrat Extra Bold para impacto */
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.1rem; /* Tamaño de texto mucho más grande */
    text-transform: uppercase;
    letter-spacing: 3px; /* Espaciado elegante entre letras */
    
    /* Colores (Manteniendo tu paleta) */
    background-color: var(--brand-accent); /* Fondo Cian Claro */
    color: var(--brand-secondary); /* Texto Gris Oscuro */
    
    /* Forma y Espacio */
    padding: 12px 35px; /* Más "aire" alrededor del texto */
    border-radius: 50px; /* Forma de píldora */

    /* SOMBRAS Y BORDES (El cambio principal) */
    /* Sombra 1 (oscura): Da profundidad contra el fondo oscuro */
    /* Sombra 2 (color): Da un efecto de resplandor cian */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3), 0 0 35px rgba(77, 208, 225, 0.6);
    
    /* Borde sutil blanco para definir el contorno */
    border: 3px solid rgba(255, 255, 255, 0.8);
    
    /* Un pequeño ajuste para que se vea centrado verticalmente con el borde */
    line-height: 1;
}