/* =========================================================================
   RESIDENCES SECTION HEADER
   ========================================================================= */
.residences-header {
    margin-bottom: 3.5rem;
    text-align: left;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    max-width: 28rem;
}

.residences-kicker {
    display: block;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.residences-title {
    font-family: var(--font-serif);
    font-size: clamp(2.4rem, 5vw, 3.8rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--text-color);
    text-transform: none;
}

.residences-title em {
    font-style: italic;
    font-weight: 400;
    color: var(--brand-brown);
}

/* =========================================================================
   HORIZONTAL ACCORDION GALLERY
   ========================================================================= */
.accordion-gallery {
    display: flex;
    width: 100%;
    height: 70vh;
    min-height: 500px;
    gap: 0;
    overflow: hidden;
}

.accordion-item {
    position: relative;
    flex: 1;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transition: flex 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    cursor: pointer;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
}

.accordion-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%);
    transition: background 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-item:hover .accordion-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.2) 60%);
}

.accordion-item:hover {
    flex: 5;
}

.accordion-item--plan {
    background-color: #f5f3f0;
    background-size: contain;
    background-position: center center;
}

.accordion-item--plan .accordion-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0) 45%);
}

.accordion-item--plan:hover .accordion-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.15) 55%);
}

.accordion-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    width: 100%;
    color: #fff;
}

.accordion-title {
    font-family: var(--font-display);
    font-size: clamp(1.4rem, 2vw, 1.85rem);
    font-weight: 400;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0;
    white-space: nowrap;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.accordion-hidden {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.6s cubic-bezier(0.25, 1, 0.5, 1);
    transform: translateY(20px);
}

.accordion-item:hover .accordion-hidden {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
    transform: translateY(0);
}

.accordion-hidden p {
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-weight: 400;
    opacity: 0.92;
    white-space: normal;
    letter-spacing: 0.02em;
}

.accordion-link {
    display: inline-block;
    color: #fff;
    font-family: var(--font-sans);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.3rem;
    transition: border-color 0.3s ease;
}

.accordion-link:hover {
    border-color: #fff;
}

@media (max-width: 900px) {
    .accordion-gallery {
        flex-direction: column;
        height: auto;
    }
    
    .accordion-item {
        height: 15vh;
        min-height: 100px;
    }
    
    .accordion-item:hover {
        flex: auto;
        height: 40vh;
    }
    
    .accordion-title {
        white-space: normal;
        font-size: 1.1rem;
    }
}
