/* ================================================================
 * ================================================================
 *   ESTILOS PRINCIPALES - HERRERÍA EL RUSO
 *   FECHA: 2026
 * ================================================================
 * ================================================================ */

/* ================================================================
 * 1. RESET Y BASE
 * ================================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    background-color: #121212;
}


/* ================================================================
 * 2. FONDOS CON TEXTURA DE METAL
 * ================================================================ */

/* ---- 2.1 Fondo oscuro (metal) ---- */
.metal-bg {
    position: relative;
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 50%, #1a1a1a 100%);
    overflow: hidden;
}

/* ---- 2.2 Fondo claro (metal claro) ---- */
.metal-bg-light {
    position: relative;
    background: linear-gradient(135deg, #e8e4df 0%, #d6d2cc 100%);
    overflow: hidden;
}

/* ---- 2.3 Textura de grano de metal - fondo oscuro ---- */
.metal-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 40%, rgba(184, 92, 26, 0.06) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(184, 92, 26, 0.04) 1px, transparent 1px),
        repeating-linear-gradient(45deg, rgba(184, 92, 26, 0.02) 0px, rgba(184, 92, 26, 0.02) 2px, transparent 2px, transparent 10px);
    background-size: 40px 40px, 30px 30px, 16px 16px;
    pointer-events: none;
    z-index: 0;
}

/* ---- 2.4 Textura de grano de metal - fondo claro ---- */
.metal-bg-light::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 40%, rgba(184, 92, 26, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 80% 70%, rgba(184, 92, 26, 0.03) 1px, transparent 1px);
    background-size: 40px 40px, 30px 30px;
    pointer-events: none;
    z-index: 0;
}


/* ================================================================
 * 3. DESTELLOS Y CHISPAS
 * ================================================================ */

/* ---- 3.1 Destellos grandes flotantes ---- */
.glow-spark {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(184, 92, 26, 0.12) 0%, rgba(184, 92, 26, 0) 70%);
    pointer-events: none;
    z-index: 0;
    animation: floatGlow 8s ease-in-out infinite;
}

.glow-spark:nth-child(1) {
    top: 10%;
    left: -5%;
    animation-delay: 0s;
    width: 400px;
    height: 400px;
}
.glow-spark:nth-child(2) {
    bottom: 5%;
    right: -10%;
    animation-delay: 3s;
    width: 500px;
    height: 500px;
}
.glow-spark:nth-child(3) {
    top: 40%;
    right: 20%;
    animation-delay: 6s;
    width: 250px;
    height: 250px;
}
.glow-spark:nth-child(4) {
    bottom: 30%;
    left: 15%;
    animation-delay: 2s;
    width: 200px;
    height: 200px;
}

@keyframes floatGlow {
    0%, 100% {
        transform: translate(0, 0) scale(1);
        opacity: 0.4;
    }
    50% {
        transform: translate(30px, -20px) scale(1.2);
        opacity: 0.7;
    }
}

/* ---- 3.2 Partículas de chispa pequeñas ---- */
.spark-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: #b85c1a;
    border-radius: 50%;
    opacity: 0;
    animation: sparkle 4s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0;
        transform: scale(0.5);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.2);
    }
}


/* ================================================================
 * 4. TARJETAS MVV (Misión, Visión, Valores)
 * ================================================================ */
.card-mvv {
    transition: all 0.4s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    border-bottom: 2px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
    background: rgba(30, 30, 30, 0.9);
    backdrop-filter: blur(4px);
}

.card-mvv::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(184, 92, 26, 0.2), transparent);
    transition: left 0.6s ease;
    z-index: -1;
}

.card-mvv:hover::before {
    left: 100%;
}

.card-mvv:hover {
    transform: translateY(-8px);
    border-bottom-color: #b85c1a;
    box-shadow: 0 20px 30px -15px rgba(184, 92, 26, 0.3);
}


/* ================================================================
 * 5. ICONOS DE SERVICIOS
 * ================================================================ */
.service-icon {
    transition: all 0.3s ease;
    display: inline-block;
}

.service-icon:hover {
    transform: scale(1.1);
    text-shadow: 0 0 15px rgba(184, 92, 26, 0.6);
    color: #b85c1a !important;
}


/* ================================================================
 * 6. NAVBAR
 * ================================================================ */

/* ---- 6.1 Barra de navegación ---- */
.navbar {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    background: rgba(20, 20, 20, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ---- 6.2 Enlaces de navegación ---- */
.nav-link {
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #b85c1a;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}
.nav-link:hover {
    color: #b85c1a;
}


/* ================================================================
 * 7. HERO - VIDEO DE FONDO
 * ================================================================ */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 1;
}


/* ================================================================
 * 8. ANIMACIONES DE TEXTO
 * ================================================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-title {
    animation: fadeInUp 1s ease forwards;
}
.animate-subtitle {
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}
.animate-button {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}


/* ================================================================
 * 9. CARRUSEL
 * ================================================================ */

/* ---- 9.1 Contenedor ---- */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    flex: 0 0 100%;
    padding: 0 10px;
}

/* ---- 9.2 Responsive: 3 items en tablet/desktop ---- */
@media (min-width: 768px) {
    .carousel-slide {
        flex: 0 0 33.333%;
    }
}

/* ---- 9.3 Botones de navegación ---- */
.carousel-button {
    background: rgba(0, 0, 0, 0.7);
    border: none;
    color: white;
    cursor: pointer;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    transition: all 0.3s;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.carousel-button:hover {
    background: #b85c1a;
    color: black;
}

/* ---- 9.4 Puntos indicadores ---- */
.carousel-dot {
    transition: all 0.3s ease;
    cursor: pointer;
}

.carousel-dot.active {
    background-color: #b85c1a !important;
    width: 24px !important;
}

/* ---- 9.5 Items del carrusel ---- */
.carousel-item {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-item:hover {
    transform: translateY(-5px);
}

.project-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-image:hover {
    transform: scale(1.02);
}


/* ================================================================
 * 10. BOTÓN WHATSAPP FLOTANTE
 * ================================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 100;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background-color: #128C7E;
}


/* ================================================================
 * 11. FLECHA VOLVER ARRIBA
 * ================================================================ */
.scroll-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: #b85c1a;
    color: white;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 100;
}

.scroll-top.show {
    opacity: 1;
    visibility: visible;
}


/* ================================================================
 * 12. ANIMACIONES FADE-UP (Scroll)
 * ================================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ================================================================
 * 13. EFECTOS DE BRILLO Y TEXTO
 * ================================================================ */
.glow-text {
    text-shadow: 0 0 20px rgba(184, 92, 26, 0.4);
}


/* ================================================================
 * 14. INPUTS Y FORMULARIOS
 * ================================================================ */
input,
textarea {
    background-color: #2a2a2a !important;
    color: #e0e0e0 !important;
    border-color: #4a4a4a !important;
}

input:focus,
textarea:focus {
    border-color: #b85c1a !important;
}

input::placeholder,
textarea::placeholder {
    color: #888 !important;
}


/* ================================================================
 * 15. MODAL DE IMÁGENES
 * ================================================================ */
.image-modal {
    transition: all 0.3s ease;
}

/* ================================================================
 * ESTILOS PARA CONTACTO MITAD Y MITAD
 * ================================================================ */

/* Animación flotante para la imagen principal */
.contact-image-main {
    animation: floatContact 6s ease-in-out infinite;
}

@keyframes floatContact {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-12px);
    }
}

/* Animación para los badges */
.animate-bounce-slow {
    animation: bounceSlow 3s ease-in-out infinite;
}

@keyframes bounceSlow {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-6px);
    }
}

/* Responsive: en móvil la imagen desaparece y el formulario ocupa todo */
@media (max-width: 768px) {
    .grid.md\:grid-cols-2 {
        grid-template-columns: 1fr;
    }
    
    .contact-image-main {
        max-width: 70%;
        margin: 0 auto;
    }
}
/* ================================================================
 * BANNER ANIMADO (MARQUEE)
 * ================================================================ */

@keyframes marquee {
    0% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-50%);
    }
}

.animate-marquee {
    display: inline-block;
    animation: marquee 15s linear infinite;
    white-space: nowrap;
}

/* Pausa la animación al hacer hover (opcional) */
.animate-marquee:hover {
    animation-play-state: paused;
}