html {
    scroll-behavior: smooth;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #f8f9fa;
    color: #222;
}

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

.header {
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 20px 0;
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 150px;
    width: auto;
    object-fit: contain;
}

.header nav {
    display: flex;
    align-items: center;
}

.header nav a {
    margin-left: 30px;
    text-decoration: none;
    color: #333;
    font-weight: 600;
    font-size: 1.25rem;
    padding: 10px 24px;
    border-radius: 30px;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.header nav a:hover {
    background: linear-gradient(135deg, #0077ff, #00bfff);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 119, 255, 0.35);
    transform: translateY(-3px);
}

.hero {
    height: 80vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    background: #000; /* Fondo negro para cubrir espacios si las imágenes no llenan */
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: translateX(100%);
    opacity: 0;
    transition: transform 1.5s ease, opacity 1.5s ease;
}

.hero-bg.active {
    transform: translateX(0);
    opacity: 1;
}

.hero::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.btn {
    padding: 12px 30px;
    border: none;
    background: #0077ff;
    color: white;
    border-radius: 30px;
    cursor: pointer;
    transition: 0.3s;
}

.btn:hover {
    background: #005fcc;
}

.properties {
    padding: 80px 0;
    text-align: center;
}

.section-title {
    margin-bottom: 50px;
    font-size: 2rem;
}

.slider {
    position: relative;
    max-width: 900px;
    margin: auto;
    overflow: hidden;
    padding: 0 60px;
}

.slides {
    position: relative;
    height: 550px;
}

/* SIN transition aqui para que no choque con las animaciones */
.card {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 550px;
    opacity: 0;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 15px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.card.active {
    opacity: 1;
    pointer-events: auto;
}

.card img {
    width: 100%;
    height: 450px;
    object-fit: contain;
    background: #fff;
}

.card-content {
    padding: 20px;
}

.card.active {
    display: flex;
}

.arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    border: none;
    font-size: 25px;
    padding: 10px 15px;
    cursor: pointer;
    border-radius: 50%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    z-index: 10;
}

.arrow.left {
    left: 0;
}

.arrow.right {
    right: 0;
}

.footer {
    background: #111;
    color: white;
    padding: 30px 0;
    text-align: center;
}

/* ===================================================
   SCROLL REVEAL — elementos aparecen al hacer scroll
   =================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   SLIDE ANIMATIONS — animacion al cambiar de imagen
   =================================================== */
@keyframes slideInFromRight {
    0% {
        opacity: 0;
        transform: translateX(80px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-80px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(-80px);
    }
}

@keyframes slideOutToRight {
    0% {
        opacity: 1;
        transform: translateX(0);
    }

    100% {
        opacity: 0;
        transform: translateX(80px);
    }
}

.card.slide-in-right {
    animation: slideInFromRight 0.4s ease forwards;
}

.card.slide-in-left {
    animation: slideInFromLeft 0.4s ease forwards;
}
.card.slide-out-left {
    animation: slideOutToLeft 0.35s ease forwards;
}

.card.slide-out-right {
    animation: slideOutToRight 0.35s ease forwards;
}

/* ===================================================
   IMAGE MODAL (LIGHTBOX)
   =================================================== */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1000; 
    padding-top: 60px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.9); 
    backdrop-filter: blur(5px);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    object-fit: contain;
    animation: zoomIn 0.3s ease;
    border-radius: 10px;
}

@keyframes zoomIn {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 30px;
    right: 40px;
    color: white;
    background-color: #ff3333;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 35px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: 0.3s;
    line-height: 0.8;
    box-shadow: 0 4px 10px rgba(255, 51, 51, 0.4);
}

.close-modal:hover,
.close-modal:focus {
    background-color: #ff0000;
    transform: scale(1.1);
}

.card img {
    cursor: pointer;
    transition: 0.3s;
}

.card img:hover {
    opacity: 0.8;
}

/* ===================================================
   RESPONSIVE DESIGN — para móviles y tablets
   =================================================== */
@media (max-width: 768px) {
    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .logo-img {
        height: 100px;
    }

    .header nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .header nav a {
        margin-left: 0;
        font-size: 14px;
    }

    .hero {
        height: 60vh;
        padding: 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }

    .properties {
        padding: 40px 0;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 30px;
    }

    .slider {
        padding: 0 20px;
        max-width: 100%;
    }

    .card img {
        height: 300px;
    }

    .card-content {
        padding: 15px;
    }

    .card-content h3 {
        font-size: 1.2rem;
    }

    .card-content p {
        font-size: 14px;
    }

    .arrow {
        font-size: 20px;
        padding: 8px 12px;
    }

    .footer {
        padding: 20px 0;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .hero h2 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.3rem;
    }

    .card img {
        height: 250px;
    }

    .arrow {
        font-size: 18px;
        padding: 6px 10px;
    }
}
