.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.7s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.scroll-smooth {
    scroll-behavior: smooth;
}

/* Galería: imágenes cuadradas */
.gallery-img {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    width: 100% !important;;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-img:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    padding: 1rem;
    transition: background 0.3s ease;
}

.lightbox img {
    max-width: 95%;
    max-height: 95vh;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    opacity: 0;
    transition: transform 0.4s ease, opacity 0.4s ease;
}

.lightbox.flex img {
    transform: scale(1);
    opacity: 1;
}

/* Flechas blancas */
.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: translateY(-50%) scale(1.15);
    border-color: white;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 25px;
    color: white;
    font-size: 2.8rem;
    font-weight: 300;
    cursor: pointer;
    transition: 0.3s;
}

.lightbox-close:hover {
    color: #C9A96E;
    transform: scale(1.1);
}

/* Mapa */
.map-container {
    height: 400px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}
/* Animación del menú móvil */
#mobile-menu {
    opacity: 0;
    pointer-events: none;
    transform: scale(1.05);
    transition: all 0.3s ease;
}

#mobile-menu.flex {
    opacity: 1;
    pointer-events: auto;
    transform: scale(1);
}
#main-nav.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 0.75rem 1.25rem;
    transform: translateY(0);
}

#main-nav.scrolled h1 {
    font-size: 1.5rem; /* Reduce un poco el logo al hacer scroll */
}

@media (min-width: 768px) {
    #main-nav.scrolled .md\\:text-3xl {
        font-size: 1.75rem;
    }
}

/* Efectos de aparición desde los lados */
.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.7s ease-out;
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.7s ease-out;
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ELIMINAR SCROLL HORIZONTAL EN MÓVILES */
html, body {
    overflow-x: hidden !important;
    width: 100% !important; /* <-- evita el bug del 100vw */
    margin: 0 !important;
    padding: 0 !important;
}

* {
    box-sizing: border-box;
}


.container, .max-w-6xl, section, header, nav, div, img, p, h1, h2, h3, ul, li {
    max-width: 100% !important;
    overflow-x: hidden !important;
}


img {
    max-width: 100% !important;
    width: auto !important;
    height: auto !important;
}


.px-6, .px-4, .p-5, .p-8 {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
}

@media (max-width: 768px) {
    .px-6, .px-4, .p-5 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    body {
        padding: 0 !important;
        margin: 0 !important;
    }
}

h1, h2, h3, h4, h5, h6,
.fade-in, .max-w-6xl, .container, section, header, div, p {
    overflow: visible !important;
    overflow-y: visible !important;
    overflow-x: visible !important;
}

h2, h3 {
    line-height: 1.2 !important;
    padding-bottom: 0 !important;
    margin-bottom: 3rem !important; /* igual que mb-12 */
}

.fade-in, .max-w-6xl, .px-6, .py-20 {
    contain: none !important;
    overflow: visible !important;
}

#alquiler, #comodidades, #departamentos, #galeria, #ubicacion, #contacto {
    overflow: visible !important;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn {
  animation: fadeIn 0.3s ease-out;
}

