:root {
    --azul-principal: #00348a;
    --gris-secundario: #4f5561;
    --rojo-resaltar: #a81e01;
    --blanco: #ffffff;
    --gris-claro: #f8f9fa;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--gris-secundario);
    line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    color: var(--azul-principal);
}

/* --- AJUSTE: Anclaje del menú --- */
.scroll-section {
    scroll-margin-top: 100px;
}

/* --- Barra Superior (AJUSTADA PARA CENTRAR Y OCULTAR) --- */
.top-bar {
    background-color: #4f5561;
    color: var(--blanco);
    padding: 4px 0;
    font-size: 0.9rem;
    transition: margin-top 0.4s ease-in-out; /* Animación para ocultar */
}
body.scrolled .top-bar {
    margin-top: -50px; /* Desliza la barra hacia arriba para ocultarla */
}
.top-bar .container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 35px;
}
.top-bar .contact-info span {
    margin: 0 15px;
}
.top-bar .contact-info i {
    margin-right: 8px;
    color: #e1e1e1;
}
.top-bar .social-links {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
}
.top-bar .social-links a {
    color: var(--blanco);
    margin-left: 15px;
    font-size: 1rem;
    transition: color 0.3s ease;
}
.top-bar .social-links a:hover {
    color: var(--rojo-resaltar);
}

/* --- Estilo para Logo Superpuesto (MÁS GRANDE) --- */
.navbar-brand.logo-container {
    position: relative;
    padding-left: 70px;
    height: 50px; 
    display: flex;
    align-items: center;
}
.logo-circle {
    position: absolute;
    top: -40px;
    left: 0;
    width: 120px;
    height: 120px;
    background-color: var(--blanco);
    border-radius: 50%; 
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    border: 4px solid var(--gris-claro);
    transition: width 0.3s ease-in-out, height 0.3s ease-in-out, top 0.3s ease-in-out, transform 0.3s ease-out;
}
.logo-circle img {
    height: 95px;
    width: auto;
    transition: height 0.3s ease-in-out;
}
.logo-container:hover .logo-circle {
    transform: scale(1.05) rotate(3deg);
}

/* --- Estilos del encabezado al hacer scroll --- */
.navbar.scrolled .logo-circle {
    top: -15px;
    width: 80px;
    height: 80px;
}
.navbar.scrolled .logo-circle img {
    height: 55px;
}
.navbar-nav {
    margin-left: 65px;
}

/* --- Navegación (CORREGIDO CON BORDE AZUL) --- */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: border-color 0.3s ease;
    border-bottom: 3px solid transparent; /* Borde inicial transparente */
}
.navbar.scrolled {
    border-bottom-color: var(--azul-principal); /* Borde azul al hacer scroll */
}
.nav-item {
    position: relative;
    margin: 0 5px;
}
.navbar-nav .nav-item:not(:last-child)::after {
    content: '|';
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    color: #ddd;
}
.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--gris-secundario) !important;
    padding: 8px 15px !important;
    transition: color 0.3s ease;
}
.nav-link.active, .nav-link:hover {
    color: var(--azul-principal) !important;
    font-weight: 700;
}

/* --- Estilos Unificados para Botones --- */
.btn-primary,
.btn-secondary {
    background-color: var(--azul-principal);
    border-color: var(--azul-principal);
    color: var(--blanco);
    transition: all 0.3s ease;
}
.btn-primary:hover,
.btn-secondary:hover {
    background-color: var(--rojo-resaltar);
    border-color: var(--rojo-resaltar);
    color: var(--blanco) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}
.btn-outline-light:hover {
    background-color: var(--rojo-resaltar);
    border-color: var(--rojo-resaltar);
    color: var(--blanco);
}
.nav-item-btn .btn {
    padding: 8px 25px;
    font-size: 0.9rem;
}

/* style.css (Reemplazar este bloque completo) */

/* --- Slider de Inicio (CORREGIDO Y OPTIMIZADO) --- */
@keyframes kenburns {
    0% { transform: scale(1) translate(0, 0); }
    100% { transform: scale(1.1) translate(-2%, 1%); }
}

#inicio .carousel-item {
    height: 85vh;
    max-height: 800px;
    min-height: 450px;
    overflow: hidden; /* Muy importante para el efecto Ken Burns */
}

/* Estructura CORRECTA de Pseudo-elementos para el slider */
#inicio .carousel-item::before { /* ANTES: para la imagen de fondo animada */
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center;
    background-image: var(--bg-image); /* Imagen asignada por JS */
    z-index: 0; /* Capa inferior */
}

#inicio .carousel-item::after { /* DESPUÉS: para el overlay de gradiente oscuro */
    content: '';
    position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1; /* Capa intermedia, encima de la imagen */
}

#inicio .carousel-item.active::before {
    animation: kenburns 15s ease-out forwards;
}

#inicio .carousel-caption {
    bottom: 20%; 
    z-index: 2; /* Capa superior, encima de todo */
}

#inicio .carousel-caption h1 {
    font-size: 4rem;
    color: var(--blanco); 
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
    font-weight: 700;
}

#inicio .carousel-caption p {
    font-size: 1.2rem; 
    color: var(--blanco);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.highlight-text {
    font-family: 'Damion', cursive;
    font-weight: 400;
    color: #ffc107;
    display: inline-block;
    position: relative;
}

.highlight-text::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--rojo-resaltar);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s ease-in-out 0.4s;
}

.carousel-item.active .highlight-text::after {
    transform: scaleX(1);
}

.carousel-indicators {
    position: absolute; bottom: 20px; left: 20px; right: auto; margin: 0; justify-content: flex-start; counter-reset: carousel-indicator; z-index: 2;
}

.carousel-indicators button {
    width: 50px !important; height: 30px !important; background-color: transparent !important; border: none !important; opacity: 0.6; text-indent: unset !important; font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--blanco); font-size: 1rem; position: relative; transition: opacity 0.3s ease;
}

.carousel-indicators button::before {
    counter-increment: carousel-indicator; content: '0' counter(carousel-indicator);
}

.carousel-indicators .active {
    opacity: 1;
}

.carousel-indicators .active::after {
    content: ''; position: absolute; bottom: 0; left: 0; width: 100%; height: 3px; background-color: var(--rojo-resaltar);
}

/* --- Secciones generales --- */
section {
    padding: 80px 0;
}
.section-title::after {
    content: ''; position: absolute; display: block; width: 60px; height: 3px; background: var(--rojo-resaltar); bottom: 0; left: 50%; transform: translateX(-50%);
}
.section-title.white::after { background: var(--blanco); }

/* --- Sección Marcas (Grid) --- */
.bg-primary-custom {
    background-color: var(--azul-principal);
}
#marcas h2, #marcas p {
    color: var(--blanco);
}
.marcas-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    margin-top: 3rem;
}
.marca-item {
    background-color: var(--blanco);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 150px;
    height: 110px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.marca-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}
.marca-item img {
    max-width: 120px;
    max-height: 80px;
    object-fit: contain;
}

/* --- Estilos para Tarjetas de Reseñas de Google (Actualizado) --- */
.review-card .card-body {
    padding-bottom: 0;
}

.google-review-logo {
    height: 40px; /* Ajusta el tamaño de la imagen de Google */
    width: auto;
    margin-bottom: 15px;
}

.review-card .card-text {
    font-style: italic;
    color: #555;
    margin-top: 10px;
    padding: 0;
    border: none; /* Quitamos el borde anterior */
}

.review-card .card-footer {
    background-color: transparent;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.review-card .card-footer strong {
    font-size: 1rem; /* Tamaño normal para el nombre */
    font-weight: 700; /* Mantiene el nombre en negrita */
    color: var(--gris-secundario); /* Color principal del texto */
    margin-right: auto; /* Empuja el nombre a la izquierda */
}

.review-source {
    font-size: 0.85rem; /* Hacemos el texto más pequeño */
    font-weight: 100;   /* Quitamos la negrita */
    color: #acacac;        /* Un color gris más claro para menor énfasis */
}

.review-source img {
    height: 12px;
    margin-left: 3px;
    vertical-align: baseline;
}
/* --- Sección Contacto (Formulario y Mapa) --- */
.form-control:focus {
    border-color: var(--azul-principal);
    box-shadow: 0 0 0 0.25rem rgba(0, 52, 138, 0.25);
}
.map-container {
    width: 100%;
    height: 300px;
}

/* --- Estilos Generales y Componentes --- */
.highlight { color: var(--rojo-resaltar); font-weight: 700; font-size: 19px;}
.product-list li { padding: 8px 0; font-size: 1.1rem; }
.product-list i { color: var(--azul-principal); margin-right: 15px; width: 20px; text-align: center; }
.card { border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.card-footer { background-color: var(--blanco); font-weight: 700; border-top: 1px solid #eee; }
.stars { color: var(--rojo-resaltar); }
.contact-info li { display: flex; align-items: flex-start; margin-bottom: 15px; }
.contact-info i { font-size: 1rem; color: var(--azul-principal); margin-right: 15px; margin-top: 5px; width: 25px; }
.contact-info a { color: var(--rojo-resaltar); text-decoration: none; font-weight: 500; }
.social-icons a { display: inline-block; width: 40px; height: 40px; background-color: var(--gris-secundario); color: var(--blanco); border-radius: 50%; text-align: center; line-height: 40px; margin-right: 10px; transition: background-color 0.3s ease; }
.social-icons a:hover { background-color: var(--azul-principal); }
.floating-buttons { position: fixed; bottom: 20px; right: 20px; z-index: 1030; display: flex; flex-direction: column; }
.floating-btn { width: 50px; height: 50px; background-color: var(--azul-principal); color: var(--blanco); border-radius: 50%; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; margin-top: 10px; text-decoration: none; box-shadow: 2px 2px 10px rgba(0,0,0,0.2); transition: background-color 0.3s ease, transform 0.3s ease; }
.floating-btn:hover { transform: scale(1.1); color: var(--blanco); }
.whatsapp-btn { background-color: #25D366; }
.whatsapp-btn:hover { background-color: #128C7E; }

/* --- Media Queries para Responsividad (AJUSTADA) --- */
@media (max-width: 991px) {
    .scroll-section { scroll-margin-top: 70px; }
    .navbar-nav .nav-item:not(:last-child)::after { display: none; }
    #inicio .carousel-caption h1 { font-size: 2.5rem; }
    .carousel-indicators { left: 50%; transform: translateX(-50%); bottom: 10px; justify-content: center; }

    /* --- Ajustes del logo superpuesto para móvil --- */
    .logo-circle {
        top: -25px;
        width: 90px;
        height: 90px;
    }
    .logo-circle img {
        height: 60px;
    }
    .navbar-brand.logo-container {
        padding-left: 50px;
    }
    .navbar-nav {
        margin-left: 0;
        margin-top: 45px;
    }

    /* --- Estilos del logo en móvil al hacer scroll --- */
    .navbar.scrolled .logo-circle {
        top: -10px;
        width: 70px;
        height: 70px;
    }
    .navbar.scrolled .logo-circle img {
        height: 45px;
    }
}

@media (max-width: 768px) {
    .section-title { text-align: center; }
    .section-title::after { left: 50%; transform: translateX(-50%); }
}