/* =========================================
   A. Variables de Diseño (NGM SEALS)
========================================== */
:root {
    --bg-main: #F8F9FA; 
    --yellow-pale: #FFFDF3; 
    --yellow-btn: #FFD54F; 
    --primary-color: #1a3c5e; 
    --accent-color: #00a8cc;  
    --bs-warning: var(--yellow-btn);   
    --bs-primary: var(--primary-color); 
    --text-dark: #212529;
    --text-muted: #6c757d;
    --border-color: rgba(0,0,0,0.08); 
    --navbar-height: 80px; 
}

/* Modificador global para scroll suave */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
    background-color: var(--bg-main); 
    -webkit-font-smoothing: antialiased;
}

/* Compensar altura del nav sticky para el scroll */
.scroll-section {
    scroll-margin-top: var(--navbar-height); 
}

/* Títulos de Sección Estilizados (NGM Style) */
.section-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    position: relative;
    display: block;
    padding-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary-color);
}

.section-title::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 4px;
    background-color: var(--yellow-btn); 
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 0;
}

.text-start.section-title::after {
    left: 0;
    transform: translateX(0);
}

.section-title.text-white::after {
    background-color: var(--yellow-btn);
}

/* =========================================
   B. Navegación Custom (NGM SEALS)
========================================== */
.container-nav-custom {
    max-width: 1400px;
}

.logo-img {
    height: 55px;
    width: auto;
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.02);
}

.nav-link-custom {
    font-weight: 700;
    color: var(--primary-color) !important;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    padding: 10px 15px !important;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
}

.nav-link-custom:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--yellow-btn) !important; 
    border-bottom: 3px solid var(--yellow-btn) !important;
}

/* =========================================
   C. Sección Hero
========================================== */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
    position: relative;
}

.hero-section .border.rounded-4 {
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-section .border.rounded-4:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0,0,0,0.175) !important;
}

.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: clamp(2.5rem, 5vw, 4rem); 
    text-shadow: 0 4px 8px rgba(0,0,0,0.5); 
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .hero-section {
        height: auto; 
        padding: 80px 0; 
    }
    .hero-section .row {
        margin-top: 40px;
    }
}

.hero-overlay {
    background: linear-gradient(
        rgba(26, 60, 94, 0.6),
        rgba(0, 0, 0, 0.9)
    );
}

.hero-section .row {
    margin-top: 80px;
}

/* =========================================
   D. Tarjetas de Productos y Formularios
========================================== */
.card, .form-control {
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    color: var(--primary-color) !important;
}

.bg-yellow-pale {
    background-color: var(--yellow-pale) !important;
    border-color: #f1e0b0 !important; 
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.img-product {
    height: 220px;
    object-fit: cover;
    filter: brightness(0.95);
    transition: all 0.5s ease;
}

.card:hover .img-product {
    filter: brightness(1);
    transform: scale(1.08);
}

/* =========================================
   E. Animaciones de Entrada (Mejoradas)
========================================== */
.card-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform, opacity;
    color: var(--primary-color) !important;
}

/* Animaciones desde los bordes absolutos */
.slide-left { 
    transform: translateX(-100vw); 
    transition-duration: 1.2s; 
}
.slide-up { 
    transform: translateY(100vw); 
    transition-duration: 1.2s; 
}
.slide-right { 
    transform: translateX(100vw); 
    transition-duration: 1.2s; 
}

.card-animate.visible {
    opacity: 1;
    transform: translate(0, 0) !important;
}

/* =========================================
   F. Footer e Historia (Optimizado)
========================================== */
footer {
    background-color: #121212; 
    border-top: 4px solid var(--yellow-btn); 
}

footer h6 {
    color: var(--primary-color) !important;
    text-transform: uppercase;
    letter-spacing: 1px;
}

#historia {
    position: relative;
    /* Ajuste para evitar bugs visuales en móviles */
    background: url('images/backgroundHistory.png');
    background-size: cover;
    background-position: center;
    background-attachment: scroll; 
    padding: 100px 0;
    color: var(--primary-color) !important;
}

/* Solo se aplica fondo fijo (parallax) en pantallas de escritorio */
@media (min-width: 992px) {
    #historia {
        background-attachment: fixed;
    }
}

/* =========================================
   G. Ajuste de Navegación Sticky
========================================== */
#main-nav {
    padding: 15px 0;
    transition: all 0.3s ease;
}

.navbar.sticky-top {
    backdrop-filter: blur(10px);
    background-color: rgba(248, 249, 250, 0.95) !important; 
}

.navbar-scrolled {
    padding: 5px 0 !important;
    border-bottom: 2px solid var(--yellow-btn); 
}

/* =========================================
   H. Botones Custom
========================================== */
.btn-primary {
    background-color: var(--yellow-btn);
    color: var(--primary-color); 
    border: none;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #e6c047; 
    color: var(--primary-color);
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* =========================================
   J. Sección de Video Showcase
========================================== */
.video-loop-section {
    line-height: 0; 
}

.video-wrapper video {
    max-height: 100vh; 
    object-fit: cover; 
    filter: brightness(0.9); 
    transition: filter 0.5s ease;
}

.video-wrapper video:hover {
    filter: brightness(1); 
}

@media (max-width: 768px) {
    .video-loop-section {
        height: 50vh; /* better mobile fit */
    }
}

/* =========================================
   K. Botón Flotante de WhatsApp
========================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px; /* Separación del borde inferior */
    right: 30px;  /* Separación del borde derecho */
    background-color: #25d366;
    color: #FFF !important;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    z-index: 1000; /* Asegura que esté por encima de todo */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.whatsapp-float:hover {
    background-color: #128c7e;
    transform: scale(1.1); /* Efecto de crecimiento al pasar el mouse */
    color: #FFF !important;
}

/* Ajuste para dispositivos móviles (un poco más pequeño) */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 28px;
    }
}

.hero-video-wrapper {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 🔥 CRITICAL */
}

/* Overlay hero */
.hero-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 10;
    left: 0;
    background: linear-gradient(
        rgba(26, 60, 94, 0.8),
        rgba(0, 0, 0, 0.7)
    );
    z-index: 1;
}

/* Ajuste de botones con video de fondo */
.hero-section .container {
    position: relative;
    z-index: 2;
}


.text-white,
.text-muted,
.text-warning,
.text-primary {
    color: #1a3c5e !important;
}

#historia .fade-in-soft {
    opacity: 0;
    transform: translateY(30px);
    transition: all 2s ease;
}

#historia .fade-in-soft.visible {
    opacity: 1;
    transform: translateY(10px);
}

#historia .card-animate {
    opacity: 0;
    transform: translateY(100px);
    transition: all 2s ease;
}

#historia .card-animate.visible {
    opacity: 1;
    transform: translateY(0);
}

