/* Variables de colores según la paleta */
:root {
    --crema-claro: #F8F8F0;
    --negro: #080808;
    --verde-principal: #104028;
    --verde-secundario: #084028;
    --crema-gris: #E8F0E0;
    --gris-claro: #D0D0D0;
    --gris-medio: #D8D8D8;
    --naranja: #F04828;
    --naranja-claro: #F86850;
}

/* Estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--crema-claro);
    color: var(--negro);
    overflow-x: hidden;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 5rem 0;
    scroll-margin-top: 80px;
}

h1, h2, h3 {
    color: var(--verde-principal);
    margin-bottom: 1.5rem;
}

p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--naranja);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background-color: var(--naranja-claro);
    transform: translateY(-3px);
}

/* Pantalla de carga */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--crema-claro);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.logo-container {
    width: 200px;
    height: 200px;
    background-color: var(--verde-principal);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.logo-img {
    max-width: 71%;
    max-height: 80%;
}

.loading-bar {
    width: 200px;
    height: 4px;
    background-color: var(--gris-claro);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    width: 0%;
    background-color: var(--naranja);
    transition: width 0.5s ease;
}

/* Header con video */
header {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    color: white;
    text-align: center;
    overflow: hidden;
    padding-bottom: 100px;
}

.video-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.video-background video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(8, 8, 8, 0.5);
    z-index: 0;
}

.video-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to top,
        rgba(16, 64, 40, 0.95) 0%,
        rgba(16, 64, 40, 0.7) 20%,
        rgba(16, 64, 40, 0.4) 50%,
        rgba(16, 64, 40, 0.1) 80%,
        transparent 100%
    );
    z-index: 1;
}

.header-content {
    z-index: 2;
    max-width: 800px;
    padding: 0 20px;
    position: relative;
    margin-bottom: 50px;
}

.header-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    line-height: 1.2;
}

.header-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.header-content .btn {
    background-color: var(--naranja);
    padding: 15px 40px;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 30px;
}

.header-content .btn:hover {
    background-color: var(--naranja-claro);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(240, 72, 40, 0.3);
}

/* Navegación */
nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.2rem 0;
    background-color: rgba(16, 64, 40, 0.95);
    z-index: 1000;
    transition: all 0.3s ease;
}

nav.scrolled {
    padding: 1rem 0;
    background-color: var(--verde-principal);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo-link:hover {
    transform: scale(1.05);
}

/* LOGO MÁS GRANDE */
.logo-nav-img {
    height: 80px; /* tamaño base */
    transform: scale(1.4);
    transform-origin: left center;
}

nav.scrolled .logo-nav-img {
    height: 70px;
    
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 2rem;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1.1rem;
    padding: 5px 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--naranja);
}

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

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
}

/* Sección de marcas */
.brands-section {
    background-color: var(--crema-gris);
    padding: 3rem 0;
    overflow: hidden;
}

.brands-title {
    text-align: center;
    margin-bottom: 2rem;
}

.brands-container {
    display: flex;
    animation: scrollBrands 30s linear infinite;
}

.brand-item {
    flex: 0 0 auto;
    width: 200px;
    height: 100px;
    margin: 0 20px;
    background-color: white;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.brand-img {
    max-width: 80%;
    max-height: 80%;
    object-fit: contain;
}

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

/* Sección de servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-10px);
}

.service-img {
    height: 200px;
    background-color: var(--gris-claro);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-content {
    padding: 1.5rem;
}

/* Sección de proyectos */
.projects-section {
    background-color: var(--crema-gris);
}

.projects-container {
    position: relative;
}

.projects-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 1rem 0;
    gap: 2rem;
    scrollbar-width: thin;
}

.projects-scroll::-webkit-scrollbar {
    height: 8px;
}

.projects-scroll::-webkit-scrollbar-thumb {
    background-color: var(--verde-principal);
    border-radius: 4px;
}

.project-card {
    flex: 0 0 auto;
    width: 300px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s ease;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-img {
    height: 200px;
    background-color: var(--gris-claro);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.project-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-content {
    padding: 1.5rem;
}

/* Modal de proyecto */
.project-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.project-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background-color: white;
    width: 95%;
    max-width: 1400px;
    max-height: 90vh;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

.modal-header {
    padding: 1.5rem 2rem;
    background-color: var(--verde-principal);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-modal:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--naranja);
}

.modal-gallery {
    display: flex;
    overflow-x: auto;
    padding: 2rem;
    gap: 2rem;
    scroll-behavior: smooth;
    align-items: center;
    flex-grow: 1;
    min-height: 500px;
}

.modal-gallery::-webkit-scrollbar {
    height: 10px;
    background-color: #f5f5f5;
}

.modal-gallery::-webkit-scrollbar-thumb {
    background-color: var(--verde-principal);
    border-radius: 5px;
}

.modal-gallery::-webkit-scrollbar-track {
    background-color: #f5f5f5;
    border-radius: 5px;
}

.gallery-img {
    flex: 0 0 auto;
    width: 600px;
    height: 450px;
    background-color: var(--gris-claro);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.gallery-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    background-color: white;
    padding: 10px;
}

/* Sección Quiénes Somos */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-img {
    height: 400px;
    background-color: var(--gris-claro);
    border-radius: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.about-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mapa */
.map-section {
    padding: 0;
}

.map-container {
    height: 400px;
    background-color: var(--gris-claro);
    position: relative;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 64, 40, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
}

.map-info {
    background-color: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-width: 400px;
    text-align: center;
}

/* Footer */
footer {
    background-color: var(--verde-principal);
    color: white;
    padding: 3rem 0 1.5rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-column h3 {
    color: white;
    margin-bottom: 1.5rem;
}

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

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--gris-claro);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--naranja);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--naranja);
    transform: translateY(-3px);
}

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

/* Botón de WhatsApp */
.whatsapp-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: #25D366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    z-index: 100;
    transition: all 0.3s ease;
    text-decoration: none;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .header-content h1 {
        font-size: 2.5rem;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--verde-principal);
        flex-direction: column;
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        margin: 0;
        text-align: center;
        padding: 1rem 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .about-container {
        grid-template-columns: 1fr;
    }

    .brand-item {
        width: 150px;
        height: 80px;
    }
    
    .logo-nav-img {
        height: 60px;
        max-width: 200px;
    }
    
    nav.scrolled .logo-nav-img {
        height: 50px;
    }
    
    .gallery-img {
        width: 300px;
        height: 250px;
    }
    
    .modal-gallery {
        padding: 1rem;
        gap: 1rem;
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .header-content h1 {
        font-size: 2rem;
    }
    
    header {
        padding-bottom: 80px;
    }
    
    .header-content .btn {
        padding: 12px 30px;
        font-size: 1rem;
    }
    
    .gallery-img {
        width: 280px;
        height: 220px;
    }
    
    .modal-content {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    .logo-nav-img {
        height: 50px;
        max-width: 180px;
    }
    
    nav.scrolled .logo-nav-img {
        height: 45px;
    }
}

@media (min-width: 1200px) {
    .header-content h1 {
        font-size: 4rem;
    }
    
    .header-content p {
        font-size: 1.4rem;
        max-width: 700px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 1024px) {
    .modal-content {
        width: 98%;
        max-height: 85vh;
    }
    
    .gallery-img {
        width: 500px;
        height: 400px;
    }
}