/* Global Styles */
:root {
    --color-primary: #1A3C2F;
    /* Verde Bosque Profundo */
    --color-secondary: #F4F1EA;
    /* Crema Orgánico */
    --color-accent: #C5A059;
    /* Dorado Tenue */
    --color-text: #333333;
    --color-text-light: #666666;
    --color-white: #ffffff;
    --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 40px rgba(0, 0, 0, 0.12);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-secondary);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

h1,
h2,
h3,
.logo {
    font-family: var(--font-heading);
    font-weight: 700;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

/* Navigation */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 2rem;
    transition: var(--transition);
    background: transparent;
}

.sticky-nav.scrolled {
    background: rgba(26, 60, 47, 0.95);
    /* Primary with opacity */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
    backdrop-filter: blur(10px);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    color: var(--color-white);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    color: var(--color-white);
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a:hover {
    color: var(--color-accent);
}

.sticky-nav:not(.scrolled) .nav-links a:hover::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;

}

.btn-nav {
    border: 1px solid var(--color-white);
    padding: 0.5rem 1.5rem;
    border-radius: 50px;
}

.btn-nav:hover {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.mobile-menu-btn {
    display: none;
    color: var(--color-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    height: 100vh;
    width: 100%;
    background-image: url('img/Portal_Del_Ranco/1.webp');
    /* Default hero image */
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

.hero-content {
    position: relative;
    z-index: 10;
    max-width: 800px;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero .highlight {
    color: var(--color-accent);
    display: block;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    font-weight: 300;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-primary);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(197, 160, 89, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.6);
    background: #dcb64b;
}

/* Projects Section */
.projects-section {
    padding: 6rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    margin-bottom: 4rem;
    font-size: 1.1rem;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
}

.project-card {
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-hover);
}

.card-image {
    height: 300px;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.05);
    /* Zoom effect */
}

.badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--color-accent);
    color: var(--color-primary);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    z-index: 5;
}

.card-content {
    padding: 2rem;
}

.card-content h3 {
    font-size: 1.5rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
}

.highlights {
    font-size: 0.95rem;
    color: var(--color-text-light);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.highlights i {
    color: var(--color-accent);
    width: 20px;
}

.pricing {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 10px;
    margin: 1.5rem 0 0.5rem;
    display: flex;
    justify-content: space-between;
}

.price-item {
    display: flex;
    flex-direction: column;
}

.price-item .label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-light);
}

.price-item .amount {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.reservation {
    font-size: 0.85rem;
    color: var(--color-text-light);
    text-align: center;
    margin-bottom: 1.5rem;
}

.card-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 1rem;
}

.btn-outline {
    flex: 1;
    text-align: center;
    padding: 0.8rem;
    border: 1px solid var(--color-primary);
    border-radius: 8px;
    color: var(--color-primary);
    font-size: 0.9rem;
    font-weight: 500;
}

.btn-outline:hover {
    background: var(--color-primary);
    color: var(--color-white);
}

.btn-whatsapp-card {
    display: block;
    width: 100%;
    text-align: center;
    background: #25D366;
    color: white;
    padding: 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 10px;
}

.btn-whatsapp-card:hover {
    background: #128C7E;
}

/* Why Invest Section */
.invest-section {
    background: var(--color-primary);
    color: var(--color-white);
    padding: 6rem 2rem;
}

.invest-section .section-title {
    color: var(--color-white);
    margin-bottom: 4rem;
}

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    max-width: 1200px;
    margin: 0 auto;
}

.benefit-card {
    text-align: center;
    padding: 2rem;
}

.benefit-card i {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: 1.5rem;
}

.benefit-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.benefit-card p {
    color: rgba(255, 255, 255, 0.8);
}

/* Footer */
footer {
    background: #11261f;
    color: var(--color-white);
    padding: 5rem 2rem 1rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 4rem;
    margin-bottom: 3rem;
}

.footer-brand h2 {
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.footer-links ul li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--color-accent);
}

.footer-contact p {
    margin-bottom: 0.8rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.social-icons {
    margin-top: 1.5rem;
    display: flex;
    gap: 1.5rem;
}

.social-icons a {
    font-size: 1.5rem;
}

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Floating Whatsapp */
.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    transition: var(--transition);
}

.floating-whatsapp:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .pricing {
        flex-direction: column;
        gap: 0.5rem;
    }

    .mobile-menu-btn {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        background: var(--color-primary);
        flex-direction: column;
        justify-content: center;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        right: 0;
        display: flex;
    }

    .nav-links li {
        margin: 1.5rem 0;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    /* JS toggles to flex */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Hide scrollbar inside lightbox */
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(5px);
    /* Flexbox Centering */
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    display: block;
    width: auto;
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    margin: 0;
    /* JS flex handles centering */
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    /* Nice shadow for depth */
}

/* Lightbox Content Wrapper needed for protection layer positioning */
.lightbox-content-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Image Protection */
img {
    -webkit-user-drag: none;
    user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    pointer-events: none;
    /* Disables direct interaction with img */
}

.card-image {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

/* Overlay to intercept clicks/context menu on cards */
.card-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

.gallery-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    /* Start centered horizontally */
    background: #27ae60;
    /* Verde brillante que llama la atención */
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    z-index: 15;
    pointer-events: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.card-image:hover .gallery-indicator {
    background: #219150;
    /* Un poco más oscuro al hover */
    transform: translateX(-50%) scale(1.05);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

/* Lightbox Controls */
.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
    z-index: 2001;
}

.close-lightbox:hover,
.close-lightbox:focus {
    color: var(--color-accent);
    text-decoration: none;
    cursor: pointer;
}

.prev,
.next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -50px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    -webkit-user-select: none;
    z-index: 2001;
    background-color: rgba(0, 0, 0, 0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev {
    left: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover,
.next:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* Invisible overlay in lightbox to prevent right click on the image */
.lightbox-protection-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2002;
}

/* Feature Grid Layout */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
    margin-top: 1rem;
    background: #fcfcfc;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.03);
}

.feature-item {
    font-size: 0.9rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.feature-item i {
    color: var(--color-accent);
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.feature-item span {
    line-height: 1.3;
}

@media (min-width: 400px) {
    .features-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* Hero Buttons Container */
.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    justify-content: center;
    margin-top: 2rem;
}

@media (min-width: 768px) {
    .hero-buttons {
        flex-direction: row;
    }
}

/* Secondary Button (Glass Style) */
.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1.1rem;
    display: inline-block;
    border: 1px solid var(--color-white);
    backdrop-filter: blur(5px);
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* Carousel within Card New Styles */
.card-image-container {
    position: relative;
    width: 100%;
    /* Let height be determined by image content */
    overflow: hidden;
    background: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    /* Optional separator */
}

/* Image inside card container */
.card-image-container img {
    width: 100%;
    height: auto;
    /* Maintain aspect ratio */
    display: block;
    /* Remove bottom whitespace */
    cursor: pointer;
    transition: transform 0.5s ease;
}

.card-image-container:hover img {
    transform: scale(1.02);
}

/* Carousel Navigation Buttons */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    cursor: pointer;
    padding: 10px 15px;
    z-index: 21;
    /* Higher than badge/content */
    font-size: 1.2rem;
    border-radius: 5px;
    transition: background 0.3s;
    user-select: none;
}

.carousel-btn:hover {
    background: var(--color-accent);
    color: var(--color-primary);
}

.carousel-btn.prev-btn {
    left: 10px;
}

.carousel-btn.next-btn {
    right: 10px;
}