/* URBAN — Residents listing */

.urban-residents-page {
    --urban-accent: #ef4536;
    --urban-accent-dark: #88000c;
}

/* Hero — override fixed .well-7 height on mobile */
.urban-residents-hero {
    position: relative;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.urban-residents-hero.well-7 {
    height: auto !important;
    min-height: 0;
}

.urban-residents-hero__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.55);
}

.urban-residents-hero .container {
    position: relative;
    z-index: 1;
    padding-bottom: 0 !important;
}

.urban-residents-hero__subtitle {
    margin: 0.75rem auto 0;
    max-width: 36rem;
    color: rgba(255, 255, 255, 0.82);
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 400;
}

.urban-residents {
    padding: 2.5rem 0 4rem;
}

.urban-residents__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
}

.urban-resident-card {
    opacity: 0;
    animation: urbanResidentFadeIn 0.55s ease forwards;
}

.urban-resident-card:nth-child(1) { animation-delay: 0.05s; }
.urban-resident-card:nth-child(2) { animation-delay: 0.1s; }
.urban-resident-card:nth-child(3) { animation-delay: 0.15s; }
.urban-resident-card:nth-child(4) { animation-delay: 0.2s; }
.urban-resident-card:nth-child(5) { animation-delay: 0.25s; }
.urban-resident-card:nth-child(6) { animation-delay: 0.3s; }

@keyframes urbanResidentFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.urban-resident-card__link {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(36, 37, 38, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: border-color 0.25s ease;
}

.urban-resident-card__link:hover,
.urban-resident-card__link:focus-visible {
    border-color: rgba(239, 69, 54, 0.5);
    outline: none;
}

.urban-resident-card__media {
    position: relative;
    aspect-ratio: 3 / 4;
    overflow: hidden;
    background: #1a1a1a;
}

.urban-resident-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.urban-resident-card__link:hover .urban-resident-card__media img,
.urban-resident-card__link:focus-visible .urban-resident-card__media img {
    transform: scale(1.03);
}

.urban-resident-card__shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0) 40%,
        rgba(0, 0, 0, 0.5) 75%,
        rgba(0, 0, 0, 0.85) 100%
    );
    pointer-events: none;
}

.urban-resident-card__body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2;
    padding: 1.25rem 1.25rem 1.35rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
}

.urban-resident-card__name {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
}

.urban-resident-card__realname {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    text-transform: none;
    color: rgba(255, 255, 255, 0.72);
}

.urban-resident-card__cta {
    flex-shrink: 0;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: background 0.25s ease;
}

.urban-resident-card__link:hover .urban-resident-card__cta,
.urban-resident-card__link:focus-visible .urban-resident-card__cta {
    background: var(--urban-accent);
}

.urban-residents__empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 1.5rem;
    color: #999;
}

.urban-residents__empty i {
    display: block;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #555;
}

.urban-residents__actions {
    text-align: center;
    margin-top: 2.5rem;
}

.urban-residents__load-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 200px;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #fff;
    background: var(--urban-accent);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.urban-residents__load-btn[hidden] {
    display: none !important;
}

.urban-residents__load-btn:hover:not(:disabled) {
    background: var(--urban-accent-dark);
}

.urban-residents__load-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

body:not(.dark) .urban-resident-card__link {
    background: rgba(255, 255, 255, 0.96);
    border-color: rgba(0, 0, 0, 0.08);
}

@media (max-width: 992px) {
    .urban-residents__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
    }
}

@media (max-width: 768px) {
    .urban-residents-hero.well-7 {
        padding-top: 1.75rem !important;
        padding-bottom: 1.75rem !important;
    }

    .urban-residents-hero .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .urban-residents-hero__subtitle {
        font-size: 0.92rem;
        line-height: 1.5;
        padding: 0;
    }
}

@media (max-width: 576px) {
    .urban-residents {
        padding: 1.5rem 0 3rem;
    }

    .urban-residents__grid {
        grid-template-columns: 1fr;
        max-width: 420px;
        margin: 0 auto;
    }

    .urban-resident-card__name {
        font-size: 1.15rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .urban-resident-card {
        animation: none;
        opacity: 1;
    }

    .urban-resident-card__link,
    .urban-resident-card__media img,
    .urban-resident-card__cta,
    .urban-residents__load-btn {
        transition: none;
    }
}
