@import url('variables.css');

/* Desplazamiento suave nativo */
html {
    scroll-behavior: smooth;
}

/* Evita que el navbar fijo tape los títulos de las secciones */
section {
    scroll-margin-top: 80px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    text-transform: uppercase;
    letter-spacing: 2px; /* Esto le da ese toque "espaciado" premium del logo */
    font-weight: 700;
}

/* Para los párrafos y textos generales */
body, p, .text-muted, .form-control {
    font-family: var(--font-body);
    font-weight: 400;
}

/* Un pequeño ajuste para los botones para que se vean más refinados */
.btn-custom, .nav-link, .filter-btn {
    font-family: var(--font-headings);
    font-weight: 600;
}

/* =========================================
   ANIMACIONES AL SCROLL (SCROLL REVEAL)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   NAVBAR
   ========================================= */
.navbar {
    transition: var(--transition);
    padding: 1.5rem 0;
}
.navbar.scrolled {
    background: rgba(10, 10, 10, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 0rem 0;
    border-bottom: 1px solid rgba(203, 162, 88, 0.2); /* Borde dorado sutil */
}
.navbar-brand img { max-height: 70px; transition: var(--transition); }
.navbar.scrolled .navbar-brand img { max-height: 80px; }
.nav-link {
    color: var(--text-primary) !important;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 600;
    position: relative;
    transition: var(--transition);
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition);
    transform: translateX(-50%);
}
.nav-link:hover::after, .nav-link.active::after { width: 80%; }
.nav-link:hover, .nav-link.active { color: var(--accent-color) !important; }

/* =========================================
   HERO SECTION
   ========================================= */
/* =========================================
   HERO SECTION (NUEVO Y DINÁMICO)
   ========================================= */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background-color: #000; /* Fondo de seguridad */
}

/* Video de fondo con zoom lento */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: 0;
    animation: slowZoom 20s linear infinite alternate;
}

@keyframes slowZoom {
    0% { transform: translate(-50%, -50%) scale(1); }
    100% { transform: translate(-50%, -50%) scale(1.1); }
}

/* Capa oscura sobre el video */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.85));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Animaciones de entrada para el texto */
.hero-subtitle {
    animation: slideUpFade 1s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}
/* =========================================
   LOGO EN EL HERO
   ========================================= */
.hero-logo {
    max-width: 500px; 
    width: 100%;      
    height: auto;     
    
    /* AQUÍ ESTÁ LA MAGIA */
    display: block;   /* Fuerza a que ocupe toda la línea y empuje el botón hacia abajo */
    margin: 0 auto 1.5rem auto; /* Centrado horizontalmente y con un margen inferior de 1.5rem */
    
    /* Animación */
    animation: slideUpFade 1s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

/* Ajuste para celulares */
@media (max-width: 768px) {
    .hero-logo {
        max-width: 280px; 
        margin-bottom: 1rem; /* Un poco menos de margen en móvil */
    }
}
.hero-btn {
    animation: slideUpFade 1s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

@keyframes slideUpFade {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* Indicador de Scroll (Ratón animado) */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    opacity: 0;
    animation: fadeIn 1s ease forwards;
    animation-delay: 1.5s;
}
.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--text-muted);
    border-radius: 20px;
    display: block;
    position: relative;
    transition: var(--transition);
}
.mouse:hover { border-color: var(--accent-color); }
.wheel {
    width: 4px;
    height: 8px;
    background: var(--accent-color);
    border-radius: 2px;
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}
@keyframes scrollWheel {
    0% { top: 8px; opacity: 1; }
    100% { top: 25px; opacity: 0; }
}
@keyframes fadeIn { to { opacity: 1; } }
.hero h1 { 
    font-size: clamp(2.5rem, 5vw, 5rem); 
    font-weight: 800; 
    text-shadow: 0 10px 30px rgba(0,0,0,0.5);
}
.hero p { font-size: 1.2rem; color: var(--text-muted); letter-spacing: 4px; font-weight: 300; }

/* =========================================
   BOTONES
   ========================================= */
.btn-custom {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--accent-color);
    padding: 12px 35px;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 2px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-custom::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 0; height: 100%;
    background-color: var(--accent-color);
    transition: var(--transition);
    z-index: -1;
}
.btn-custom:hover::before { width: 100%; }
.btn-custom:hover {
    color: var(--bg-dark);
    box-shadow: 0 5px 20px rgba(203, 162, 88, 0.4);
}

/* =========================================
   FILTROS PORTAFOLIO
   ========================================= */
.filter-btn {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    padding: 8px 25px;
    margin: 5px;
    border-radius: 50px;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
}
.filter-btn:hover, .filter-btn.active {
    background: var(--accent-color);
    color: var(--bg-dark);
    border-color: var(--accent-color);
    box-shadow: 0 0 15px rgba(203, 162, 88, 0.3);
    transform: translateY(-2px);
}

/* =========================================
   TARJETAS DE PORTAFOLIO (GALERÍA)
   ========================================= */
.portfolio-item {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    display: block;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    /* Animación de entrada para cuando se filtran */
    animation: popIn 0.5s cubic-bezier(0.5, 0, 0, 1) forwards;
}
@keyframes popIn {
    0% { opacity: 0; transform: scale(0.95) translateY(10px); }
    100% { opacity: 1; transform: scale(1) translateY(0); }
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.25, 0.8, 0.25, 1), filter 0.5s ease;
    filter: brightness(0.9);
}
.portfolio-item:hover img { 
    transform: scale(1.1); 
    filter: brightness(1.1);
}
.portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.95) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 25px;
    opacity: 0;
    transition: var(--transition);
    border: 2px solid transparent;
    border-radius: 12px;
}
.portfolio-item:hover .portfolio-overlay { 
    opacity: 1; 
    border-color: rgba(203, 162, 88, 0.5); /* Borde dorado interior */
}
.portfolio-overlay h4 { 
    margin: 0; 
    font-size: 1.3rem; 
    color: #fff; 
    transform: translateY(15px);
    transition: var(--transition);
}
.portfolio-item:hover .portfolio-overlay h4 { transform: translateY(0); }
.portfolio-overlay span { 
    color: var(--accent-color); 
    font-size: 0.75rem; 
    text-transform: uppercase; 
    letter-spacing: 2px;
    transform: translateY(15px);
    transition: var(--transition) 0.1s;
}
.portfolio-item:hover .portfolio-overlay span { transform: translateY(0); }

/* =========================================
   SERVICIOS
   ========================================= */
.service-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, #101010 100%);
    border: 1px solid rgba(255,255,255,0.03);
    border-radius: 12px;
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 3px;
    background: var(--accent-color);
    transform: scaleX(0);
    transition: var(--transition);
    transform-origin: left;
}
.service-card:hover {
    transform: translateY(-10px);
    border-color: rgba(203, 162, 88, 0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.service-card:hover::before { transform: scaleX(1); }

.service-card i {
    transition: all 0.5s ease;
    display: inline-block;
}
.service-card:hover i {
    transform: scale(1.2) translateY(-5px);
    text-shadow: 0 10px 20px rgba(203, 162, 88, 0.4);
}

/* =========================================
   FORMULARIO
   ========================================= */
.form-control {
    background-color: var(--bg-darker);
    border: 1px solid rgba(255,255,255,0.08);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 8px;
    transition: var(--transition);
}
/* ARREGLO DEL PLACEHOLDER: Hacerlo visible */
.form-control::placeholder {
    color: rgba(255, 255, 255, 0.4); 
    font-weight: 300;
}
.form-control:focus {
    background-color: var(--bg-darker);
    color: var(--text-primary);
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(203, 162, 88, 0.1);
}
.form-control:focus::placeholder { color: transparent; }

/* Text-muted corregido para fondos oscuros */
.text-muted { color: #b0b0b0 !important; }

/* Evita el parpadeo de Vue */
[v-cloak] { display: none; }

/* GLightbox z-index */
.glightbox-container { z-index: 9999 !important; }

/* =========================================
   BOTÓN FLOTANTE DE WHATSAPP
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 10000; /* Por encima de todo, incluso el navbar */
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    animation: whatsapp-pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E; /* Verde más oscuro al pasar el mouse */
    color: #FFF;
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
    animation: none; /* Detiene la animación al hacer hover */
}

/* Animación de pulso para llamar la atención */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

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

/* =========================================
   ESTILOS DE LA SECCIÓN CONTACTO
   ========================================= */
.contact-item {
    transition: var(--transition);
}
.contact-item:hover {
    transform: translateX(5px);
}

.hover-gold {
    transition: var(--transition);
}
.hover-gold:hover {
    color: var(--accent-color) !important;
}

/* Redes Sociales */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border-radius: 50%;
    text-decoration: none;
    transition: var(--transition);
    font-size: 1.1rem;
}
.social-icon:hover {
    background-color: var(--accent-color);
    color: var(--bg-dark);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(203, 162, 88, 0.3);
}


/* =========================================
   MENÚ MÓVIL FULL-SCREEN (ESTILO PREMIUM)
   ========================================= */
@media (max-width: 991.98px) {
    /* Fondo inmersivo */
    .navbar-collapse {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        display: flex !important; 
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 1040;
        
        /* Animación */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    /* Vue agrega esta clase cuando isMenuOpen es true */
    .navbar-collapse.show {
        opacity: 1;
        visibility: visible;
    }

    .navbar-brand, .navbar-toggler {
        position: relative;
        z-index: 1050; 
    }

    .navbar-nav {
        text-align: center;
        width: 100%;
    }

    .nav-item {
        margin: 10px 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease;
    }

    .navbar-collapse.show .nav-item {
        opacity: 1;
        transform: translateY(0);
    }

    /* Cascada */
    .navbar-collapse.show .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .navbar-collapse.show .nav-item:nth-child(2) { transition-delay: 0.15s; }
    .navbar-collapse.show .nav-item:nth-child(3) { transition-delay: 0.2s; }
    .navbar-collapse.show .nav-item:nth-child(4) { transition-delay: 0.25s; }
    .navbar-collapse.show .nav-item:nth-child(5) { transition-delay: 0.3s; }

    .nav-link {
        font-size: 1.15rem;
        letter-spacing: 2px;
        display: inline-block;
        padding: 8px 20px !important;
    }

    .nav-link::after { bottom: 2px; }
    .nav-link:hover::after, .nav-link.active::after { width: 100%; }
}

/* Evita el scroll de fondo */
body.menu-open {
    overflow: hidden !important;
}