/* =========================================================================
   Dormitories � hero, options, amenities, rules
   ========================================================================= */

.dorm-hero {
    position: relative;
    overflow: hidden;
    min-height: clamp(420px, 58vh, 600px);
    padding-top: calc(var(--header-h) + 56px);
    padding-bottom: clamp(40px, 6vw, 72px);
    color: #fff;
    border-bottom: 0;
    background: #121722;
}

.dorm-hero__media {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.dorm-hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
}

.dorm-hero__scrim {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(105deg, rgba(12, 18, 28, 0.82) 0%, rgba(12, 18, 28, 0.5) 48%, rgba(12, 18, 28, 0.22) 100%),
        linear-gradient(0deg, rgba(12, 18, 28, 0.4), transparent 50%);
}

.dorm-hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(240px, 0.8fr);
    gap: clamp(22px, 4vw, 48px);
    align-items: end;
}

.dorm-hero__content { max-width: 620px; }

.dorm-hero .eyebrow--on-dark { color: rgba(255, 255, 255, 0.82); }
.dorm-hero .eyebrow--on-dark::before { background: #fff; }

.dorm-hero__title {
    color: #fff;
    margin: 12px 0 16px;
}

.dorm-hero__lead {
    color: rgba(255, 255, 255, 0.84);
    max-width: 52ch;
}

.dorm-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 26px;
}

.dorm-hero__ghost {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.08);
}

.dorm-hero__ghost:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}

.dorm-hero__stats {
    display: grid;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius-lg);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.dorm-stat {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.dorm-stat:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.dorm-stat__num {
    font-family: var(--font-head);
    font-size: clamp(1.4rem, 2.4vw, 1.9rem);
    font-weight: 800;
    min-width: 72px;
}

.dorm-stat__label {
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.94rem;
}

.dorm-overview__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

.dorm-overview__facts {
    display: grid;
    gap: 14px;
    margin: 0;
}

.dorm-overview__facts li {
    display: flex;
    gap: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.dorm-overview__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 12px;
    background: rgba(227, 6, 19, 0.09);
    color: var(--accent);
}

.dorm-overview__icon svg {
    width: 20px;
    height: 20px;
}

.dorm-overview__facts strong {
    display: block;
    margin-bottom: 4px;
}

.dorm-overview__facts span {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dorm-options {
    background: var(--bg-2);
}

.dorm-options__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px;
}

.dorm-card {
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.dorm-card__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--surface-2);
}

.dorm-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dorm-card__badge {
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(10, 14, 22, 0.72);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.dorm-card__body {
    padding: clamp(18px, 2.4vw, 26px);
}

.dorm-card__meta {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.dorm-card__title {
    font-size: 1.35rem;
}

.dorm-card__capacity {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent);
}

.dorm-card__text {
    color: var(--text-muted);
    margin-bottom: 16px;
}

.dorm-card--renovation .dorm-card__media img {
    filter: grayscale(0.35) brightness(0.92);
}

.dorm-card__badge--renovation {
    background: #b45309;
}

.dorm-card__notice {
    margin: 0 0 4px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(180, 83, 9, 0.1);
    border: 1px solid rgba(180, 83, 9, 0.28);
    color: #7c2d12;
    font-size: 0.9rem;
    line-height: 1.5;
    font-weight: 600;
}

.dorm-card__features {
    display: grid;
    gap: 8px;
    margin: 0;
}

.dorm-card__features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.95rem;
}

.dorm-card__features svg {
    flex: none;
    width: 16px;
    height: 16px;
    margin-top: 3px;
    color: var(--accent);
}

.dorm-amenities__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.dorm-amenity {
    padding: 22px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.dorm-amenity__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    margin-bottom: 14px;
    border-radius: 12px;
    background: rgba(227, 6, 19, 0.09);
    color: var(--accent);
}

.dorm-amenity__icon svg {
    width: 20px;
    height: 20px;
}

.dorm-amenity__title {
    font-size: 1.05rem;
    margin-bottom: 6px;
}

.dorm-amenity__text {
    color: var(--text-muted);
    font-size: 0.95rem;
}

.dorm-rules {
    background: var(--bg-2);
}

.dorm-rules__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
    gap: clamp(24px, 4vw, 48px);
    align-items: start;
}

.dorm-rules__list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.dorm-rules__list li {
    position: relative;
    padding: 14px 16px 14px 42px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
}

.dorm-rules__list li::before {
    content: '';
    position: absolute;
    left: 16px;
    top: 50%;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--red);
    transform: translateY(-50%);
}

.dorm-cta__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

html[dir="rtl"] .dorm-card__badge {
    left: auto;
    right: 14px;
}

html[dir="rtl"] .dorm-rules__list li {
    padding: 14px 42px 14px 16px;
}

html[dir="rtl"] .dorm-rules__list li::before {
    left: auto;
    right: 16px;
}

html[dir="rtl"] .dorm-hero__scrim {
    background:
        linear-gradient(255deg, rgba(12, 18, 28, 0.82) 0%, rgba(12, 18, 28, 0.5) 48%, rgba(12, 18, 28, 0.22) 100%),
        linear-gradient(0deg, rgba(12, 18, 28, 0.4), transparent 50%);
}

@media (max-width: 980px) {
    .dorm-hero__inner,
    .dorm-overview__grid,
    .dorm-options__grid,
    .dorm-rules__grid {
        grid-template-columns: 1fr;
    }

    .dorm-hero__stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 14px;
    }

    .dorm-stat {
        flex-direction: column;
        gap: 4px;
        padding-bottom: 0;
        border-bottom: 0;
    }

    .dorm-stat__num { min-width: 0; }
}

@media (max-width: 640px) {
    .dorm-hero__stats {
        grid-template-columns: 1fr;
    }

    .dorm-stat {
        flex-direction: row;
        align-items: baseline;
        gap: 12px;
    }

    .dorm-hero__actions .btn,
    .dorm-cta__actions .btn {
        width: 100%;
        justify-content: center;
    }
}
