:root {
    --primary-color: #2D4C3B;
    /* Deep Forest Green */
    --primary-light: #4A7A5D;
    --secondary-color: #E63946;
    /* Logo Red Accent */
    --secondary-dark: #D62828;
    --text-dark: #2B2B2B;
    --text-light: #F8F9FA;
    --bg-light: #F4F6F4;
    --bg-white: #FFFFFF;
    --transition: all 0.3s ease;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.12);
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    color: var(--text-dark);
}

body {
    background-color: var(--bg-white);
    line-height: 1.6;
}

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

ul {
    list-style: none;
}

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

.section {
    padding: 50px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

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

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

.section-title p {
    color: #666;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.bg-light {
    background-color: var(--bg-light);
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-dark) 100%);
    color: white !important;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(230, 57, 70, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(230, 57, 70, 0.4);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: white !important;
    border: 2px solid white;
    padding: 10px 24px;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-outline:hover {
    background: white;
    color: var(--primary-color) !important;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: transparent;
    z-index: 1000;
    transition: var(--transition);
    padding: 20px 0;
}

.navbar.scrolled {
    padding: 15px 0;
    background: rgba(45, 76, 59, 0.95);
    /* Dark Green */
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 70px;
    transition: var(--transition);
}

.navbar.scrolled .logo img {
    height: 40px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    position: relative;
    transition: color 0.3s ease;
    color: white;
    /* Ensures texts are white on dark/transparent BG */
}

.nav-links li a:not(.btn-primary):hover {
    color: var(--secondary-color);
}

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

.nav-links li a:not(.btn-primary):hover::after {
    width: 100%;
}

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

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: var(--transition);
}

/* Hero Carousel */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
}

.carousel {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-inner {
    width: 100%;
    height: 100%;
    position: relative;
}

.carousel-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-item img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.carousel-item.active {
    opacity: 1;
    z-index: 1;
}

.carousel-item.active .hero-content h1,
.carousel-item.active .hero-content p,
.carousel-item.active .hero-content a {
    animation: fadeInUp 0.8s forwards;
    opacity: 0;
}

.carousel-item .overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.4));
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.5rem;
    margin-bottom: 30px;
    font-weight: 300;
}

.hero-logo {
    max-width: 90%;
    width: 450px;
    margin-bottom: 20px;
    filter: drop-shadow(0px 4px 15px rgba(0, 0, 0, 0.5));
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    backdrop-filter: blur(5px);
}

.carousel-control:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.1);
}

.prev {
    left: 5%;
}

.next {
    right: 5%;
}

/* Animation Utils */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-1 {
    animation-delay: 0.2s !important;
}

.delay-2 {
    animation-delay: 0.4s !important;
}

/* Features */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.feature-card {
    background: var(--bg-white);
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(45, 76, 59, 0.1) 0%, rgba(74, 122, 93, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
    transition: var(--transition);
}

.feature-card:hover .icon-wrapper {
    background: var(--primary-color);
    color: white;
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--text-dark);
}

.feature-card p {
    color: #666;
}

/* Catálogo (Masonry Grid) */
.masonry-grid {
    columns: 4; /* Cambiado de 5 a 4 para mejor visualización */
    column-gap: 20px;
    width: 100%;
}

.masonry-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 15px;
    position: relative;
    border-radius: 10px;
    overflow: visible;
    /* Permitir que el zoom sobresalga */
    break-inside: avoid;
    background: #fff;
    box-shadow: var(--shadow-sm);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.4s ease, z-index 0s;
    z-index: 1;
}

.masonry-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px;
    object-fit: cover;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.masonry-item:hover {
    transform: scale(1.25);
    /* Efecto de crecimiento hacia afuera */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 100;
    /* Superponer sobre los vecinos */
}

.item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 10px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    color: #fff;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    border-radius: 0 0 10px 10px;
}

.masonry-item:hover .item-info {
    opacity: 1;
}

.item-info h3 {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
}

@media (max-width: 1200px) {
    .masonry-grid {
        columns: 3;
    }
}

@media (max-width: 992px) {
    .masonry-grid {
        columns: 2;
    }
}

@media (max-width: 576px) {
    .masonry-grid {
        columns: 3; /* Mantenemos 3 columnas en celular como pidió antes */
        column-gap: 8px;
    }

    .masonry-item:hover {
        transform: scale(1.05);
    }
}

/* Banner de más fotos */
.more-photos-banner {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    padding: 80px 40px;
    text-align: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

.banner-content {
    position: relative;
    z-index: 1;
}

.banner-content h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}


/* Grid Gallery (Instalaciones) */
.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    padding: 0 5%;
}

.grid-img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.grid-img:hover {
    transform: scale(1.03);
    box-shadow: var(--shadow-md);
}

.lightbox-trigger {
    cursor: pointer;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

#lightbox-caption {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    text-align: center;
    color: #ccc;
    padding: 15px 0;
    font-size: 1.2rem;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus {
    color: var(--secondary-color);
    text-decoration: none;
    cursor: pointer;
}

@keyframes zoomIn {
    from {
        transform: scale(0.8)
    }

    to {
        transform: scale(1)
    }
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 1rem;
}

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

.footer-logo {
    max-width: 160px;
    margin-bottom: 20px;
}

.branding p {
    color: #D1D5DB;
    font-size: 0.95rem;
}

.footer-col h3 {
    font-size: 1.3rem;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.links ul li {
    margin-bottom: 15px;
}

.links ul li a {
    color: #D1D5DB;
    transition: var(--transition);
}

.links ul li a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info p {
    margin-bottom: 15px;
    color: #D1D5DB;
}

.contact-info strong {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 5px;
    color: #9CA3AF;
    font-size: 0.9rem;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: var(--transition);
}

.whatsapp-float img {
    width: 35px;
    height: 35px;
    filter: brightness(0) invert(1);
}

.whatsapp-float:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--primary-color);
        /* dark bg for mobile links */
        flex-direction: column;
        padding: 20px 0;
        box-shadow: var(--shadow-md);
    }

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

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

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        margin-bottom: 25px;
    }

    /* Catálogo compacto en celular */
    .masonry-grid {
        columns: 3;
        column-gap: 8px;
    }

    .masonry-item {
        margin-bottom: 8px;
        border-radius: 6px;
        aspect-ratio: 4/5;
        background-color: #eee;
    }

    .masonry-item img {
        border-radius: 6px;
        height: 100%;
        object-fit: cover;
    }

    .item-info {
        padding: 5px;
    }

    .item-info h3 {
        font-size: 0.65rem;
    }

    /* Instalaciones compactas en celular */
    .grid-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
        padding: 0 15px;
    }

    .grid-img {
        aspect-ratio: 1/1;
        height: auto;
        border-radius: 8px;
        object-fit: cover;
    }

    .hero-content p {
        font-size: 1rem;
    }
}