/* Estilos específicos para index.html - Mobile First */

header {
    padding: 48px var(--spacing-md) !important;
}

section {
    padding: var(--spacing-lg) var(--spacing-md) !important;
}

.apartamentos-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    margin: 24px 0;
}

/* Card Style adapted from reference's cabin-card */
.apartamento-card {
    background: linear-gradient(135deg, rgba(15, 60, 95, 0.05) 0%, rgba(31, 111, 165, 0.05) 100%);
    border-radius: 12px;
    padding: var(--spacing-lg);
    border-left: 4px solid var(--color-primary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, border-left-color 0.3s ease;
    box-shadow: 0 2px 8px rgba(15, 60, 95, 0.08);
    display: flex;
    flex-direction: column;
}

.apartamento-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(15, 60, 95, 0.2);
    background: linear-gradient(135deg, rgba(15, 60, 95, 0.1) 0%, rgba(31, 111, 165, 0.08) 100%);
    border-left-color: var(--color-secondary);
}

.apartamento-card h3 {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--color-primary);
}

.apartamento-card p {
    font-size: 14px;
    margin-bottom: 8px;
}

.apartamento-card a {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary) 0%, #0a2940 100%);
    color: white;
    padding: 12px 24px;
    text-decoration: none;
    border-radius: 6px;
    margin-top: 16px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 2px solid var(--color-primary);
    cursor: pointer;
    text-align: center;
    align-self: flex-start;
}

.apartamento-card a:hover {
    background: linear-gradient(135deg, var(--color-dark) 0%, #051825 100%);
    border-color: var(--color-secondary);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(15, 60, 95, 0.4);
    color: white;
}

.apartamento-card a:active {
    transform: translateY(0);
}

/* Carrusel */
.carousel-container {
    position: relative;
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    border-radius: 12px;
    background: #000;
    margin: 24px 0;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    display: none;
    width: 100%;
    height: 100%;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide.active {
    display: flex;
    /* Changed from block to flex to center if needed, or simply block */
    align-items: center;
    justify-content: center;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Botones del carrusel */
.carousel-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 24px;
    cursor: pointer;
    border-radius: 4px;
    transition: background 0.3s ease;
    z-index: 10;
}

.carousel-button:hover {
    background: rgba(0, 0, 0, 0.8);
}

.carousel-button.prev {
    left: 12px;
}

.carousel-button.next {
    right: 12px;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    flex-wrap: wrap;
    /* allow wrapping if many indicators */
    justify-content: center;
    width: 90%;
}

.indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background 0.3s ease;
}

.indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Galería de fotos (if used) */
.galeria {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
}

.galeria img {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

.galeria img:hover {
    transform: scale(1.02);
}

/* Tablet */
@media (min-width: 768px) {
    header {
        padding: 60px 32px !important;
    }

    section {
        max-width: 1100px !important;
        padding: 48px 32px !important;
        border-radius: 8px;
    }

    .apartamentos-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* If we have many apartments, maybe 3 columns on large screens? */

    .carousel-container {
        max-height: 600px;
    }

    .galeria {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .galeria {
        grid-template-columns: repeat(3, 1fr);
    }

    .apartamentos-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}