:root {
    --primary-color: #2c5282; /* Deep Navy */
    --secondary-color: #4a69bd; /* Lighter Navy */
    --accent-color: #fca311; /* Industrial Gold/Yellow */
    --text-light: #e0e1dd;
    --text-dark: #14213d;
    --bg-light: #ffffff;
    --bg-gray: #f4f4f4;
    --transition: all 0.3s ease-in-out;
    --font-main: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-light);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
}

a {
    text-decoration: none;
    color: inherit;
}

/* Preloader Futurista */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.loader-logo {
    width: 350px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

.loader-bar-container {
    width: 300px;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    border-radius: 2px;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-color);
    position: absolute;
    left: 0;
    top: 0;
    transition: width 0.1s linear;
}

.loader-text {
    margin-top: 15px;
    font-size: 14px;
    letter-spacing: 2px;
    color: var(--accent-color);
    text-transform: uppercase;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

/* Navbar Premium */
header.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
}

header.navbar.scrolled {
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 50px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.1);
}

.nav-logo img {
    height: 130px; /* Agrandado a petición del usuario para mejor visibilidad */
    cursor: pointer;
    transition: var(--transition);
}

header.navbar.scrolled .nav-logo img {
    height: 90px; /* Se encoge un poco al hacer scroll para no ocupar tanto espacio */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 45px; /* Aumentado de 30px a 45px para que no se vean amontonadas */
}

.nav-links a {
    color: var(--text-light);
    font-weight: 500;
    font-size: 16px;
    position: relative;
    padding-bottom: 5px;
    white-space: nowrap; /* Evita que el texto del menú se rompa en varias líneas */
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0%;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
}

/* Hero Section "Lienzo" */
.hero {
    min-height: 100vh;
    height: auto;
    display: flex;
    align-items: center;
    padding: 180px 10% 80px 10%; /* Espacio superior suficiente (180px) para despejar el logo y el menú fijo */
    position: relative;
    overflow: hidden;
    background-color: var(--primary-color);
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

/* Capa Oscura (overlay) Estática */
.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 27, 42, 0.65);
    z-index: 1;
}

/* Degradado Animado Sofisticado */
.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #0d1b2a, #1b263b, #fca311, #0d1b2a);
    background-size: 400% 400%;
    z-index: 2;
    animation: gradientShift 2s ease infinite, fadeOutOverlay 1s ease 2s forwards;
    pointer-events: none;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes fadeOutOverlay {
    0% { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

.hero-content {
    max-width: 800px;
    z-index: 3;
    position: relative;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: #fff;
}

.hero-content h1 span {
    color: var(--accent-color);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    color: #cbd5e1;
    line-height: 1.6;
}

.btn-primary {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--primary-color);
    padding: 15px 35px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    border: 2px solid var(--accent-color);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--accent-color);
}

/* Floating AI Buttons */
.floating-container {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-end;
}

.ai-btn {
    background: var(--primary-color);
    color: var(--text-light);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid rgba(255,255,255,0.1);
}

.ai-btn:hover {
    transform: translateY(-5px) scale(1.05);
    background: var(--accent-color);
    color: var(--primary-color);
}

.ai-btn.estimator {
    width: auto;
    border-radius: 30px;
    padding: 0 20px;
    font-size: 16px;
    font-weight: 600;
}

.ai-btn.estimator i {
    margin-right: 10px;
    font-size: 20px;
}

/* Secret Admin Modal (Hidden by default) */
#admin-pin-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(15px);
    z-index: 10000;
    display: none;
    justify-content: center;
    align-items: center;
}

.pin-pad {
    background: var(--primary-color);
    padding: 40px;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.1);
    text-align: center;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

.pin-display {
    width: 100%;
    margin-bottom: 20px;
    font-size: 30px;
    letter-spacing: 15px;
    text-align: center;
    background: #000;
    color: var(--accent-color);
    border: none;
    padding: 15px;
    border-radius: 5px;
    outline: none;
}

.pin-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.pin-btn {
    background: var(--secondary-color);
    color: white;
    border: none;
    font-size: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.pin-btn:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

/* Gallery Grid System */
.gallery-section {
    padding: 80px 20px;
    background: var(--bg-light);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    height: 250px;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(13, 27, 42, 0) 0%, rgba(13, 27, 42, 0.8) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: var(--transition);
}

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

.gallery-overlay span {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Lightbox Premium */
#lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(13, 27, 42, 0.95);
    backdrop-filter: blur(15px);
    z-index: 10001;
    display: none;
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
}

#lightbox img {
    max-width: 90%;
    max-height: 85vh;
    border-radius: 10px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

#lightbox.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    transition: var(--transition);
}

.lightbox-close:hover {
    color: var(--accent-color);
}

/* Responsiveness adjustments */
@media (max-width: 768px) {
    header.navbar { padding: 15px 20px; }
    .nav-logo, .hamburger { position: relative; z-index: 1001; }
    
    /* Ocultar logo inicialmente en móviles para no tapar el texto */
    .nav-logo {
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
    }

    header.navbar.scrolled .nav-logo {
        opacity: 1;
        visibility: visible;
    }

    .nav-logo img { height: 80px; }
    .hamburger { display: block; }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(44, 82, 130, 0.98);
        backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        padding: 20px;
        text-align: center;
        z-index: 1000;
        display: flex; /* Siempre flex para permitir transiciones */
        opacity: 0;
        visibility: hidden;
        transform: translateY(-20px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    .nav-links li {
        margin: 15px 0;
        opacity: 0;
        transform: translateY(20px);
        transition: all 0.4s ease forwards;
    }

    .nav-links.active li {
        opacity: 1;
        transform: translateY(0);
    }

    /* Animación en cascada elegante */
    .nav-links.active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.active li:nth-child(2) { transition-delay: 0.2s; }
    .nav-links.active li:nth-child(3) { transition-delay: 0.3s; }
    .nav-links.active li:nth-child(4) { transition-delay: 0.4s; }
    .nav-links.active li:nth-child(5) { transition-delay: 0.5s; }
    .nav-links.active li:nth-child(6) { transition-delay: 0.6s; }
    .nav-links.active li:nth-child(7) { transition-delay: 0.7s; }

    .nav-links a {
        font-family: var(--font-heading);
        font-size: 2.0rem; /* Tipografía grande y moderna */
        font-weight: 600;
        color: var(--text-light);
        display: block;
        padding: 10px;
    }

    .nav-links a::after {
        display: none; /* Quitamos la línea inferior en móviles */
    }
    
    .hero-content h1 { font-size: 2.5rem; }
    .floating-container {
        bottom: 20px;
        right: 20px;
    }
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

/* Prevenir zoom automático en iOS al enfocar inputs */
input, textarea, select {
    font-size: 16px !important;
}

/* --- New Homepage Sections --- */

.section-padding { padding: 100px 10%; }
.text-center { text-align: center; }

/* Stats Counter Section */
.stats-section {
    background: var(--primary-color);
    color: white;
    padding: 60px 10%;
    display: flex;
    justify-content: space-around;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.stat-card {
    text-align: center;
    min-width: 200px;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    display: block;
    margin-bottom: 5px;
    font-family: var(--font-heading);
}

.stat-label {
    font-size: 0.9rem;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Process / Workflow Section */
.process-section {
    background: #f8fafc;
    color: var(--text-dark);
}

.process-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-top: 50px;
    position: relative;
}

.step-card {
    background: white;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    text-align: center;
    position: relative;
    transition: var(--transition);
    border: 1px solid rgba(0,0,0,0.05);
}

.step-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
}

.step-number {
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 800;
    margin: 0 auto 20px;
}

.step-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
}

.step-card p {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
}

/* Call to Action Banner */
.cta-banner {
    background: linear-gradient(135deg, #0d1b2a 0%, #1b263b 100%);
    color: white;
    padding: 80px 10%;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-banner h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.cta-banner p {
    font-size: 1.2rem;
    color: #cbd5e1;
    max-width: 700px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 2;
}

.cta-banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(252, 163, 17, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

/* Responsive fixes for new sections */
@media (max-width: 768px) {
    .section-padding { padding: 60px 20px; }
    .stat-number { font-size: 2.5rem; }
    .cta-banner h2 { font-size: 1.8rem; }
}

/* --- Footer Premium --- */
.site-footer {
    background: #0d1b2a;
    padding: 60px 10% 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-light);
    font-family: var(--font-main);
    margin-top: 50px;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 30px;
    height: 2px;
    background: var(--accent-color);
}

.footer-logo img {
    height: 50px; /* Logo discreto a petición del usuario */
    margin-bottom: 20px;
}

.footer-desc {
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 0.95rem;
}

.footer-contact-info {
    list-style: none;
}

.footer-contact-info li {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    color: #cbd5e1;
    font-size: 0.95rem;
}

.footer-contact-info i {
    color: var(--accent-color);
    font-size: 1.1rem;
    width: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #94a3b8;
    transition: var(--transition);
    display: inline-block;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
    transform: translateX(5px);
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 45px;
    height: 45px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background: var(--accent-color);
    color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(252, 163, 17, 0.2);
}

.footer-bottom {
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: #64748b;
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* Responsiveness adjustments for footer */
@media (max-width: 992px) {
    .footer-container {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .site-footer {
        padding: 60px 20px 30px;
    }
    .footer-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .footer-col {
        text-align: center;
    }
    .footer-col h4::after {
        left: 50%;
        transform: translateX(-50%);
    }
    .footer-contact-info li {
        justify-content: center;
    }
    .footer-social {
        justify-content: center;
    }
    .footer-links a:hover {
        transform: none; /* Mejor no desplazar en móviles */
    }
}
