/* ===================================
   Variables CSS
   =================================== */
:root {
    --primary: #2D3748;
    --secondary: #E53E3E;
    --accent: #F6AD55;
    --bg: #F7FAFC;
    --text: #1A202C;
    --light: #FFFFFF;
    --gray: #718096;
}

/* ===================================
   Reset y Base
   =================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text);
    background: var(--bg);
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Poppins', sans-serif;
}

/* ===================================
   Header
   =================================== */
header {
    background: var(--primary);
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

header.scrolled {
    padding: 0.5rem 2rem;
    background: rgba(45, 55, 72, 0.95);
    backdrop-filter: blur(4px);
}

nav {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--light);
    font-size: 1.4rem;
    font-weight: 700;
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2.5rem;
}

nav a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--secondary);
    transition: width 0.3s;
}

nav a:hover::after {
    width: 100%;
}

nav a:hover {
    color: var(--accent);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background: white;
    transition: 0.3s;
}

/* ===================================
   Hero Section
   =================================== */
.hero {
    margin-top: 80px;
    height: 90vh;
    background: linear-gradient(135deg, var(--primary) 0%, #1A202C 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--light);
    position: relative;
    overflow: hidden;
}

/* Video de fondo */
.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 0;
    display: block; /* Video por defecto */
}

.hero-gif {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    z-index: 0;
    display: none; /* GIF oculto por defecto */
}

/* Overlay oscuro sobre el video */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

/* Patrón animado (opcional, se puede quitar si el video es suficiente) */
.hero::before {
    content: '';
    position: absolute;
    width: 150%;
    height: 150%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 50px,
        rgba(229, 62, 62, 0.03) 50px,
        rgba(229, 62, 62, 0.03) 100px
    );
    animation: slide 20s linear infinite;
    z-index: 1;
    pointer-events: none;
}

@keyframes slide {
    0% { transform: translate(0, 0); }
    100% { transform: translate(50px, 50px); }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    padding: 0 2rem;
    animation: fadeInUp 1s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 2.5rem;
    color: var(--accent);
}

.cta-btn {
    display: inline-block;
    background: var(--secondary);
    color: white;
    padding: 1rem 3rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.cta-btn:hover {
    background: #c53030;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.4);
}

/* ===================================
   Sections
   =================================== */
section {
    padding: 5rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title h2 {
    font-size: 2.8rem;
    color: var(--primary);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 400px;
    height: 4px;
    background: var(--secondary);
    border-radius: 50px;
}

/* ===================================
   Servicios
   =================================== */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(229, 62, 62, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    /*background: linear-gradient(135deg, var(--secondary), var(--accent));
    border-radius: 50%;*/
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--gray);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary);
}

.service-card p {
    color: var(--gray);
    line-height: 1.6;
}

/* ===================================
   Galería
   =================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.gallery-item-1 {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #e0e7ff 0%, #fef3c7 100%);
    /* Cuando agregues imágenes reales, usa: */
    background-image: url('../assets/images/image1.png');
    background-size: cover;
    background-position: center;
    
}

.gallery-item-2 {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #e0e7ff 0%, #fef3c7 100%);
    background-image: url('../assets/images/image2.png');
    background-size: cover;
    background-position: center;
    
}

.gallery-item-3 {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #e0e7ff 0%, #fef3c7 100%);
    background-image: url('../assets/images/image3.png');
    background-size: cover;
    background-position: center;
    
}

.gallery-item-4 {
    position: relative;
    height: 300px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, #e0e7ff 0%, #fef3c7 100%);
    background-image: url('../assets/images/image4.png');
    background-size: cover;
    background-position: center;
    
}

.gallery-item-1::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.gallery-item-1:hover::before {
    opacity: 1;
}

.gallery-item-1:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.gallery-item-2:hover::before {
    opacity: 1;
}

.gallery-item-2:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item-3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.gallery-item-3:hover::before {
    opacity: 1;
}

.gallery-item-3:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item-4::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 1;
}

.gallery-item-4:hover::before {
    opacity: 1;
}

.gallery-item-4:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0;
    z-index: 2;
    transition: opacity 0.3s;
}



/* ===================================
   Proceso
   =================================== */
.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 80px;
    height: 80px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.3);
}

.step h3 {
    font-size: 1.3rem;
    margin-bottom: 0.8rem;
    color: var(--primary);
}

.step p {
    color: var(--gray);
}

/* ===================================
   Contacto
   =================================== */
.contact-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.contact-info {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-icon {
    width: 50px;
    height: 50px;
    /*background: var(--secondary);*/
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

/* ===================================
   Footer
   =================================== */
footer {
    background: var(--primary);
    color: white;
    padding: 2rem;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
}

.footer-email {
    color: var(--accent);
    text-decoration: none;
}
/*
.footer-email:hover {
    text-decoration: underline;
}
*/
/* ===================================
   Botón Flotante de WhatsApp
   =================================== */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25D366;
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 9999;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    background-color: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 35px;
    height: 35px;
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.7);
    }
    100% {
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    }
}

/* ===================================
   Modal/Lightbox Galería
   =================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.modal-content {
    background: var(--primary);
    padding: 2rem;
    border-radius: 15px;
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    width: 90%;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    transition: transform 0.3s;
    z-index: 10001;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8);  /* ← Sombra para que se vea mejor */
}

.modal-close:hover {
    transform: rotate(90deg);
    color: var(--secondary);
}

.modal-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 3px solid var(--secondary);
    padding-bottom: 1rem;
}

.modal-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.modal-gallery-item {
    position: relative;
    height: 250px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    transition: transform 0.3s;
}

.modal-gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(229, 62, 62, 0.4);
}

/* Botones de descarga en modal */
.modal-gallery-item-with-buttons {
    position: relative;
}

.download-buttons {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
    z-index: 10;
}

.modal-gallery-item:hover .download-buttons {
    opacity: 1;
}

.btn-download {
    background: var(--secondary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    border: none; /* Añadido para buttons */
    cursor: pointer; /* Añadido para buttons */
    font-family: 'Inter', sans-serif; /* Añadido para buttons */
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Botón de descarga completa (RAR) */
.btn-download-complete {
    background: linear-gradient(135deg, var(--secondary), var(--accent));
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 15px rgba(229, 62, 62, 0.3);
}

.btn-download-complete:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(229, 62, 62, 0.5);
}

.btn-download:hover {
    background: #c53030;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(229, 62, 62, 0.4);
}

.btn-download-dxf {
    background: #10B981;
}

.btn-download-dxf:hover {
    background: #059669;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* Scrollbar personalizado para el modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===================================
   Responsive - Mobile
   =================================== */
@media (max-width: 768px) {
    .menu-toggle {
        display: flex;
    }

    nav ul {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--primary);
        flex-direction: column;
        padding: 2rem;
        transition: left 0.3s;
        gap: 1.5rem;
    }

    nav ul.active {
        left: 0;
    }

    .hero {
        height: 70vh;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    section {
        padding: 3rem 1.5rem;
    }

    .services-grid,
    .gallery-grid,
    .process-steps {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-content {
        padding: 2rem 1.5rem;
    }

    .contact-info {
        flex-direction: column;
        align-items: center;
    }

    /* Mostrar GIF en móviles en lugar de video */
    .hero-video {
        display: none !important;
    }

    .hero-gif {
        display: block !important;
    }

    /* Ajustar botón de WhatsApp en móvil */
    .whatsapp-float {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .whatsapp-float svg {
        width: 30px;
        height: 30px;
    }

    /* Modal responsive */
    .modal-content {
        width: 95%;
        padding: 1.5rem;
        max-height: 85vh;
    }

    .modal-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .modal-close {
        font-size: 2.5rem;
        top: 0.5rem;
        right: 1rem;
    }

    .modal-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 1rem;
    }

    .modal-gallery-item {
        height: 180px;
    }

   

    .btn-download-complete {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero h1 {
        font-size: 2.8rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}