/* --- VARIABLES Y ESTILOS GENERALES --- */
:root {
    --primary-color: #4CAF50; /* Verde principal */
    --secondary-color: #81C784; /* Verde más claro */
    --dark-color: #333;
    --light-color: #f4f4f4;
    --text-color: #555;
    --font-family: 'Arial', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
    padding-bottom: 50px;
    padding-top: 50px;
}
.container2 {
    max-width: 1100px;
    margin: auto;
    overflow: hidden;
    padding: 0 20px;
}
h1 {
    color: var(--light-color);
    margin-bottom: 1rem;
}
h2, h3, h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
}

/* --- BARRA SUPERIOR --- */
.top-bar {
    background: var(--dark-color);
    color: white;
    padding: 0.5rem 0;
}

.top-bar .container2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar .contact-info span {
    margin-right: 1rem;
    font-size: 0.9rem;
}

.top-bar .social-media a {
    color: white;
    margin-left: 1rem;
    transition: color 0.3s ease;
}

.top-bar .social-media a:hover {
    color: var(--secondary-color);
}

/* --- HEADER Y NAVEGACIÓN --- */
header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 20px;
}

.logo img {
    height: 50px;
}

.main-nav ul {
    display: flex;
    list-style: none;
}

.main-nav a {
    color: var(--dark-color);
    padding: 0.5rem 1rem;
    font-weight: bold;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: var(--primary-color);
}

.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* --- SLIDER --- */
.slider {
    position: relative;
    height: 80vh;
    overflow: hidden;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
}

.slide.active {
    opacity: 1;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    text-align: center;
    background: rgba(0, 0, 0, 0.5);
    padding: 2rem;
    border-radius: 10px;
}

/* --- SECCIONES --- */
section {
    padding: 4rem 0;
}

/* About Us */
.about-us {
    display: flex;
    align-items: center;
    gap: 2rem;
}
.about-text { flex: 1; }
.about-image { flex: 1; }
.about-image img { width: 100%; border-radius: 10px; }

/* Separadores */
.cta-separator {
    background: var(--primary-color);
    color: white;
    text-align: center;
}
.cta-separator h3 { color: white; }

.cta-button {
    display: inline-block;
    background: white;
    color: var(--primary-color);
    padding: 0.8rem 2rem;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.cta-button:hover {
    background: var(--light-color);
    transform: translateY(-2px);
}

.image-separator {
    height: 400px;
    background: url('../img/complejo/1.jpg') no-repeat center center/cover;
    background-attachment: fixed; /* Efecto Parallax */
}

/* Galería */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
}
.gallery-grid img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    transition: transform 0.3s ease;
}
.gallery-grid img:hover {
    transform: scale(1.05);
}

/* Servicios */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    text-align: center;
}
.service-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Contacto */
.contact {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}
.contact-form-container, .contact-details {
    flex: 1;
    min-width: 300px;
}
.contact form input, .contact form textarea {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}
.contact .cta-button {
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
}
.contact .cta-button:hover {
    background: var(--secondary-color);
}
.contact-details p {
    margin-bottom: 1rem;
}
.contact-details i {
    margin-right: 0.5rem;
    color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
    background: var(--dark-color);
    color: #ccc;
    padding-top: 3rem;
}
footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    padding-bottom: 3rem;
}
.footer-logo {
    height: 40px;
    margin-bottom: 1rem;
}
footer h4 {
    color: white;
    margin-bottom: 1rem;
}
footer ul {
    list-style: none;
}
footer ul li a {
    color: #ccc;
    margin-bottom: 0.5rem;
    display: inline-block;
}
.footer-social-media a {
    color: #ccc;
    font-size: 1.2rem;
    margin-right: 1rem;
}
.footer-bottom {
    text-align: center;
    padding: 1rem 0;
    border-top: 1px solid #444;
}

/* --- RESPONSIVE (MENÚ HAMBURGUESA) --- */
@media (max-width: 768px) {
    .main-nav {
        display: none;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background: white;
        flex-direction: column;
    }

    .main-nav.active {
        display: flex;
    }

    .main-nav ul {
        flex-direction: column;
        width: 100%;
    }

    .main-nav ul li {
        text-align: center;
        padding: 1rem 0;
        border-top: 1px solid #eee;
    }

    .hamburger-menu {
        display: block;
    }

    .about-us, .contact {
        flex-direction: column;
    }
}

/* --- BOTÓN WHATSAPP FLOTANTE --- */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    animation: bounce 2s infinite;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    color: white;
    font-size: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.whatsapp-float a:hover {
    background: #20b954;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* --- MODAL WHATSAPP --- */
.whatsapp-modal {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 20px;
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
}

.whatsapp-modal.show {
    display: block;
}

.modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 250px;
    position: relative;
}

.modal-content p {
    margin: 0;
    color: var(--dark-color);
    font-weight: 500;
}

.close-modal {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: var(--dark-color);
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- BOTÓN VOLVER ARRIBA --- */
.back-to-top {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 999;
    display: none;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.back-to-top.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background: var(--secondary-color);
    transform: translateX(-50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    color: white;
    font-size: 20px;
}

/* --- RESPONSIVE PARA BOTONES FLOTANTES --- */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-float a {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .whatsapp-modal {
        bottom: 80px;
        right: 15px;
    }
    
    .modal-content {
        min-width: 200px;
        padding: 15px;
    }
    
    .back-to-top {
        bottom: 15px;
        width: 45px;
        height: 45px;
    }
    
    .back-to-top i {
        font-size: 18px;
    }
}

/* --- ESTILOS PARA PÁGINAS INDIVIDUALES --- */

/* Hero de páginas internas */
.page-hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../img/complejo/1.jpg') no-repeat center center/cover;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
}

.hero-content h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Navegación activa */
.nav-links a.active {
    color: var(--primary-color);
    background: rgba(76, 175, 80, 0.1);
    border-radius: 5px;
}

/* Sección principal de apartamentos */
.apartments-main, .facilities-main {
    padding: 4rem 0;
}

.apartments-intro, .facilities-intro {
    text-align: center;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.apartments-intro h2, .facilities-intro h2 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-color);
}

.apartments-intro p, .facilities-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1rem;
}

/* Galería de apartamentos e instalaciones */
.apartments-gallery, .facilities-gallery {
    margin: 4rem 0;
}

.apartments-gallery h3, .facilities-gallery h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-color);
}

/* Grid de comodidades/amenities */
.amenities-section, .facilities-features {
    margin: 4rem 0;
}

.amenities-section h3, .facilities-features h3 {
    text-align: center;
    margin-bottom: 3rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.amenities-grid, .facilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.amenity-item, .facility-item {
    text-align: center;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.amenity-item:hover, .facility-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.amenity-item i, .facility-item i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.amenity-item h4, .facility-item h4 {
    margin-bottom: 1rem;
    color: var(--dark-color);
    font-size: 1.2rem;
}

.amenity-item p, .facility-item p {
    color: var(--text-color);
    line-height: 1.6;
}

/* Sección de introducción con texto */
.section-intro {
    text-align: center;
    margin: 3rem 0;
    padding: 2rem;
    background: rgba(76, 175, 80, 0.05);
    border-radius: 10px;
}

.section-intro p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
}

/* Imagen especial para instalaciones */
.special-feature {
    text-align: center;
    margin: 3rem 0;
}

.feature-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Destacado de instalaciones */
.facilities-highlight {
    background: var(--primary-color);
    color: white;
    padding: 3rem 2rem;
    border-radius: 15px;
    text-align: center;
    margin: 3rem 0;
}

.highlight-content h3 {
    color: white;
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.highlight-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.95;
}

/* Enlaces de navegación entre páginas */
.navigation-links {
    background: var(--light-color);
    padding: 3rem 0;
}

.nav-link-item {
    text-align: center;
}

.nav-link-item a {
    display: inline-block;
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    color: var(--dark-color);
    max-width: 400px;
}

.nav-link-item a:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    color: var(--primary-color);
}

.nav-link-item i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.nav-link-item h4 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.nav-link-item p {
    line-height: 1.6;
    color: var(--text-color);
}

/* Galería de servicios */
.services-gallery {
    margin: 3rem 0;
}

.services-gallery h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--dark-color);
}

/* Responsive para páginas internas */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .apartments-intro h2, .facilities-intro h2 {
        font-size: 2rem;
    }
    
    .amenities-grid, .facilities-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .amenity-item, .facility-item {
        padding: 1.5rem;
    }
    
    .page-hero {
        height: 40vh;
    }
    
    .navigation-links {
        padding: 2rem 0;
    }
    
    .nav-link-item a {
        padding: 1.5rem;
        margin: 0 1rem;
    }
}

/* --- LIGHTBOX PARA GALERÍAS --- */
.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.lightbox.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: white;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    z-index: 2001;
    transition: color 0.3s ease;
}

.lightbox-close:hover {
    color: #ccc;
}

#lightbox-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
}

.lightbox-prev,
.lightbox-next {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 5px;
    transition: all 0.3s ease;
    pointer-events: all;
    backdrop-filter: blur(10px);
}

.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.lightbox-prev {
    margin-left: -60px;
}

.lightbox-next {
    margin-right: -60px;
}

.lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 16px;
    background: rgba(0, 0, 0, 0.5);
    padding: 8px 16px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

/* Cursor pointer para imágenes de galería */
.gallery-image {
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-image:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive para lightbox */
@media (max-width: 768px) {
    .lightbox-close {
        font-size: 28px;
        top: -35px;
    }
    
    .lightbox-prev,
    .lightbox-next {
        font-size: 20px;
        padding: 12px 15px;
    }
    
    .lightbox-prev {
        margin-left: -50px;
    }
    
    .lightbox-next {
        margin-right: -50px;
    }
    
    .lightbox-counter {
        font-size: 14px;
        padding: 6px 12px;
        bottom: -35px;
    }
    
    .lightbox-content {
        max-width: 95%;
        max-height: 85%;
    }
}