@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Poppins:wght@400;500;600&display=swap');

/* --- VARIABLES PREMIUM & TEMA INDUSTRIAL --- */
:root {
    --primary: #0066cc;
    --primary-hover: #004bb5;
    --accent-metal: #e2e8f0;
    --whatsapp: #25d366;
    --whatsapp-glow: rgba(37, 211, 102, 0.4);
    --dark-bg: #0b0f19;
    --card-bg: rgba(255, 255, 255, 0.95);
    --shadow-3d: 0 20px 40px rgba(0, 0, 0, 0.25);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #0f172a;
    color: #334155;
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- HEADER TRANSPARENTE CON FILTRO CRISTAL --- */
header {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    font-size: 1.25rem;
    color: #ffffff;
    letter-spacing: -0.5px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: #94a3b8;
    font-weight: 500;
    transition: all 0.3s ease;
}

nav a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #fff;
}

/* --- HERO SECTION: Portada visible, nítida y elegante --- */
.hero {
    position: relative;
    background: 
        radial-gradient(circle at 50% 40%, rgba(11, 15, 25, 0.4) 0%, rgba(11, 15, 25, 0.88) 85%),
        url('img/portada.jpg') center/cover no-repeat;
    color: #ffffff;
    padding: 130px 20px 150px 20px;
    text-align: center;
    overflow: hidden;
}

/* Control del Canvas 3D para despejar y destacar la portada */
#hero-3d-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
    opacity: 0.25;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to top, #0f172a, transparent);
    z-index: 2;
}

.hero-content {
    max-width: 850px;
    margin: 0 auto;
    position: relative;
    z-index: 3;
}

.badge {
    background: rgba(0, 102, 204, 0.4);
    border: 1px solid rgba(56, 189, 248, 0.6);
    color: #38bdf8;
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 25px;
    box-shadow: 0 0 25px rgba(0, 102, 204, 0.4);
    backdrop-filter: blur(8px);
}

.hero h1 {
    font-family: 'Montserrat', sans-serif;
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 25px;
    background: linear-gradient(180deg, #ffffff 0%, #cbd5e1 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.8));
}

.hero p {
    font-size: 1.2rem;
    color: #e2e8f0;
    margin-bottom: 35px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

/* --- BOTONES PREMIUM --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(0, 102, 204, 0.4);
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 102, 204, 0.6);
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25d366 0%, #1da851 100%);
    color: #ffffff;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.5);
}

.btn-cotizar-nav {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #fff !important;
    padding: 10px 22px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.3);
}

.btn-block {
    width: 100%;
    justify-content: center;
}

/* --- CONTENEDORES Y SECCIONES --- */
.container {
    max-width: 1200px;
    margin: 70px auto;
    padding: 0 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 10px;
}

.section-header p {
    color: #94a3b8;
    font-size: 1.1rem;
}

/* --- TARJETAS 3D (SERVICIOS) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 35px 25px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transform-style: preserve-3d;
    position: relative;
    will-change: transform;
}

.card:hover {
    box-shadow: 0 25px 50px rgba(0, 102, 204, 0.25);
}

.icon-wrapper {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 20px;
    transform: translateZ(40px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.15);
}

.card h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f172a;
    transform: translateZ(30px);
}

.card p {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 25px;
    line-height: 1.5;
    transform: translateZ(20px);
}

.card-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transform: translateZ(25px);
    transition: gap 0.2s;
}

.card:hover .card-link {
    gap: 12px;
}

/* --- GALERÍA DE PROYECTOS --- */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
}

.project-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    will-change: transform;
}

.project-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: #1e293b;
}

.project-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-img-wrapper img {
    transform: scale(1.08);
}

.project-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(15, 23, 42, 0.85);
    color: #38bdf8;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(56, 189, 248, 0.3);
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    color: #0f172a;
    margin-bottom: 8px;
}

.project-info p {
    color: #64748b;
    font-size: 0.88rem;
    line-height: 1.4;
}

/* --- SECCIÓN VENTAJAS --- */
.features-section {
    background: #ffffff;
    padding: 80px 0;
    color: #0f172a;
}

.features-section .section-header h2 {
    color: #0f172a;
}

.features-section .section-header p {
    color: #64748b;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.feature-item {
    text-align: center;
    padding: 25px 20px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    cursor: pointer;
    will-change: transform;
}

.feature-item i {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.feature-item h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.feature-item p {
    color: #64748b;
    font-size: 0.9rem;
}

/* --- FORMULARIO Y CONTACTO --- */
.contact-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    overflow: hidden;
}

.contact-info {
    background: linear-gradient(135deg, #0066cc 0%, #004499 100%);
    color: #ffffff;
    padding: 50px 40px;
}

.contact-info h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    margin-bottom: 15px;
}

.contact-info p {
    color: #e2e8f0;
}

.contact-details {
    list-style: none;
    margin-top: 30px;
}

.contact-details li {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.95rem;
}

.quote-form-wrapper {
    padding: 50px 40px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #0f172a;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-family: inherit;
    background: #f8fafc;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #ffffff;
}

/* --- FOOTER Y BOTÓN FLOTANTE --- */
footer {
    background: #070a10;
    color: #64748b;
    padding: 50px 20px;
    text-align: center;
}

footer h3 {
    color: #ffffff;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
}

.floating-whatsapp {
    position: fixed;
    bottom: 25px;
    right: 25px;
    background: var(--whatsapp);
    color: #fff;
    width: 65px;
    height: 65px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    box-shadow: 0 10px 25px var(--whatsapp-glow);
    text-decoration: none;
    z-index: 999;
    animation: pulseRadar 2s infinite;
}

@keyframes pulseRadar {
    0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
    70% { box-shadow: 0 0 0 18px rgba(37, 211, 102, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* --- BANNER DE COOKIES --- */
.cookie-banner {
    position: fixed;
    bottom: 25px;
    left: 25px;
    right: 25px;
    max-width: 480px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    padding: 18px 22px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    z-index: 9999;
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.cookie-banner p {
    margin: 0;
    font-size: 0.85rem;
}

.btn-cookie {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

/* --- MODAL / LIGHTBOX DE IMÁGENES --- */
.modal-gallery {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(7, 10, 16, 0.95);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content-wrapper {
    max-width: 90%;
    max-height: 85vh;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-content-wrapper img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 12px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.8);
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.modal-caption {
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    margin-top: 15px;
    font-size: 1.1rem;
    font-weight: 600;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10001;
}

.modal-close:hover {
    color: var(--primary);
}

.modal-prev, .modal-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-prev:hover, .modal-next:hover {
    background: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.modal-prev { left: 30px; }
.modal-next { right: 30px; }

/* --- RESPONSIVIDAD MÓVIL (CORRECCIÓN DE DISEÑO) --- */
@media (max-width: 768px) {
    /* Ocultar menú de escritorio y mostrar botón hamburguesa */
    .mobile-nav-toggle {
        display: block !important;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(15px);
        padding: 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 20px 30px rgba(0,0,0,0.5);
    }

    /* Clase activa para desplegar menú con JavaScript si se requiere */
    nav ul.active {
        display: flex;
    }

    /* Ajuste del título principal en pantallas pequeñas */
    .hero h1 {
        font-size: 2.1rem;
        line-height: 1.2;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero {
        padding: 90px 15px 100px 15px;
    }

    /* Ajuste de tarjetas y contenedores de contacto */
    .contact-card {
        grid-template-columns: 1fr;
    }

    .contact-info, .quote-form-wrapper {
        padding: 30px 20px;
    }

    .modal-prev { left: 10px; }
    .modal-next { right: 10px; }
}
