/* ==========================================================================
   Kishoreganj University — Classrooms & Laboratories  (/classroom-lab)

   Scoped entirely under .kiu-rooms so nothing leaks into other pages.
   main.css sets `html { font-size: 10px }`, so 1rem = 10px sitewide —
   every size below is declared in explicit px. Do not reintroduce rem here.
   ========================================================================== */

.kiu-rooms {
    /* Palette — mirrors about.css / home.css so the pages read as one site. */

    /* Rhythm */
    --kiu-section-y: 104px;

    /* Top clearance for the fixed navbar + hanging badge logo. */
    --kiu-nav-clear: 190px; /* ~40px under the hanging badge — see components/page-hero.css */

    font-family: var(--rs-ff-body, "Inter", sans-serif);
    color: var(--kiu-body);
    background: var(--kiu-white);
}

.kiu-rooms *,
.kiu-rooms *::before,
.kiu-rooms *::after {
    box-sizing: border-box;
}

/* Headings take their colour from a token, so dark sections flip them to white
   by redefining --kiu-heading rather than fighting this selector's specificity
   from a single-class rule. Same trap main.css sets on the home page. */
.kiu-rooms h1,
.kiu-rooms h2,
.kiu-rooms h3 {
    font-family: var(--rs-ff-body, "Inter", sans-serif);
    color: var(--kiu-heading, var(--kiu-ink));
    margin: 0;
    letter-spacing: -.02em;
}

.kiu-rooms-hero,
.kiu-rooms-facts,
.kiu-rooms-cta {
    --kiu-heading: var(--kiu-white);
}

.kiu-rooms p {
    margin: 0;
}

.kiu-rooms a {
    text-decoration: none;
}

/* Zero-specificity reset for Bootstrap's blue link colour — as a plain
   `.kiu-rooms a` rule it would outrank every single-class button rule and drag
   white button labels back to the grey body colour. */
:where(.kiu-rooms a) {
    color: inherit;
}

.kiu-rooms .kiu-section {
    padding-block: var(--kiu-section-y);
}

/* --------------------------------------------------------------------------
   Shared elements
   -------------------------------------------------------------------------- */

.kiu-rooms .kiu-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--kiu-navy);
}

.kiu-rooms .kiu-eyebrow--accent {
    color: var(--kiu-accent);
}

.kiu-rooms .kiu-section__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    margin-bottom: 48px;
}

.kiu-rooms .kiu-section__title {
    font-size: clamp(30px, 3.4vw, 44px);
    font-weight: 700;
    line-height: 1.15;
}

.kiu-rooms .kiu-section__lead {
    max-width: 46ch;
    font-size: 16px;
    line-height: 1.7;
    color: var(--kiu-body);
}

.kiu-rooms .kiu-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 28px;
    border: 1px solid transparent;
    border-radius: var(--kiu-radius-pill);
    font-size: 14px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    cursor: pointer;
    transition: background var(--kiu-dur) var(--kiu-ease-out), color var(--kiu-dur) var(--kiu-ease-out),
                border-color var(--kiu-dur) var(--kiu-ease-out), transform var(--kiu-dur) var(--kiu-ease-out);
}

.kiu-rooms .kiu-btn--accent {
    background: var(--kiu-accent);
    color: var(--kiu-navy-darker);
}

.kiu-rooms .kiu-btn--accent:hover {
    background: var(--kiu-accent-soft);
    transform: translateY(var(--kiu-lift));
}

/* Scoped, unlike about.css's global rule, so the two pages cannot fight. */
.kiu-rooms .kiu-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, .72);
}

.kiu-rooms .kiu-breadcrumb a:hover {
    color: var(--kiu-accent-soft);
}

.kiu-rooms .kiu-breadcrumb [aria-current="page"] {
    color: var(--kiu-accent);
}

/* --------------------------------------------------------------------------
   Page header
   -------------------------------------------------------------------------- */

/* Clearance for the fixed navbar. The badge logo hangs BELOW the 76px
   mainbar — 100px tall from the top of the bar (92px at =1340px), under a
   34px topbar — so hero content has to start below 134px or it collides with
   the crest. Topbar is hidden below 700px, leaving just the 76px bar. */
.kiu-rooms-hero {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 420px;
    padding-block: var(--kiu-nav-clear) 84px;
    overflow: hidden;
    isolation: isolate;
}

.kiu-rooms-hero__media {
    position: absolute;
    inset: 0;
    z-index: -2;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transform: scale(var(--kiu-scale-hover));
}

.kiu-rooms-hero__scrim {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(
        100deg,
        rgba(13, 31, 60, .93) 0%,
        rgba(18, 41, 77, .84) 48%,
        rgba(27, 58, 107, .62) 100%
    );
}

.kiu-rooms-hero__content {
    max-width: 720px;
}

.kiu-rooms-hero__title {
    font-size: clamp(34px, 4.6vw, 56px);
    font-weight: 700;
    line-height: 1.1;
}

.kiu-rooms-hero__lead {
    max-width: 60ch;
    margin-top: 20px;
    font-size: 17px;
    line-height: 1.75;
    color: rgba(255, 255, 255, .84);
}

/* --------------------------------------------------------------------------
   At-a-glance facts
   -------------------------------------------------------------------------- */

.kiu-rooms-facts {
    padding-block: 64px;
    background: linear-gradient(135deg, var(--kiu-navy-deep) 0%, var(--kiu-navy) 100%);
}

.kiu-rooms-facts__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
}

.kiu-rooms-fact {
    padding-left: 28px;
    border-left: 2px solid rgba(0, 163, 147, .45);
}

.kiu-rooms-fact__value {
    font-size: clamp(32px, 3.6vw, 46px);
    font-weight: 700;
    line-height: 1;
    color: var(--kiu-accent);
}

.kiu-rooms-fact__label {
    margin-top: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
}

/* --------------------------------------------------------------------------
   Room cards
   -------------------------------------------------------------------------- */

.kiu-rooms-list__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 32px;
}

.kiu-room {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--kiu-border);
    border-radius: var(--kiu-radius-lg);
    background: var(--kiu-white);
    box-shadow: var(--kiu-shadow);
    /* Anchor links from elsewhere land below the sticky navbar, not under it. */
    scroll-margin-top: 120px;
    transition: transform var(--kiu-dur) var(--kiu-ease-out), box-shadow var(--kiu-dur) var(--kiu-ease-out);
}

.kiu-room:hover {
    transform: translateY(var(--kiu-lift-lg));
    box-shadow: var(--kiu-shadow-hover);
}

.kiu-room__media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--kiu-surface-alt);
}

.kiu-room__media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--kiu-ease-out);
}

.kiu-room:hover .kiu-room__media img {
    transform: scale(var(--kiu-scale-hover));
}

.kiu-room__body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px 28px 32px;
}

.kiu-room__title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.kiu-room__text {
    font-size: 15px;
    line-height: 1.75;
    color: var(--kiu-body);
}

.kiu-rooms-list__empty {
    padding: 40px;
    border: 1px dashed var(--kiu-border);
    border-radius: var(--kiu-radius);
    background: var(--kiu-surface);
    font-size: 15px;
    line-height: 1.7;
    color: var(--kiu-muted);
    text-align: center;
}

/* --------------------------------------------------------------------------
   Standards
   -------------------------------------------------------------------------- */

.kiu-rooms-standards {
    background: var(--kiu-surface);
}

.kiu-rooms-standards__head {
    max-width: 640px;
    margin-bottom: 48px;
}

.kiu-rooms-standards__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
}

.kiu-rooms-standard {
    padding: 32px 28px;
    border: 1px solid var(--kiu-border);
    border-radius: var(--kiu-radius);
    background: var(--kiu-white);
    transition: transform var(--kiu-dur) var(--kiu-ease-out), box-shadow var(--kiu-dur) var(--kiu-ease-out);
}

.kiu-rooms-standard:hover {
    transform: translateY(var(--kiu-lift-lg));
    box-shadow: var(--kiu-shadow);
}

.kiu-rooms-standard__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    margin-bottom: 20px;
    border-radius: var(--kiu-radius);
    background: rgba(27, 58, 107, .08);
    font-size: 24px;
    color: var(--kiu-navy);
}

.kiu-rooms-standard__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
}

.kiu-rooms-standard__body {
    margin-top: 10px;
    font-size: 14.5px;
    line-height: 1.7;
    color: var(--kiu-body);
}

/* --------------------------------------------------------------------------
   Closing call to action
   -------------------------------------------------------------------------- */

.kiu-rooms-cta {
    padding-block: 72px;
    background: linear-gradient(120deg, var(--kiu-navy-darker) 0%, var(--kiu-navy) 100%);
}

.kiu-rooms-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.kiu-rooms-cta__title {
    font-size: clamp(24px, 2.6vw, 32px);
    font-weight: 700;
    line-height: 1.25;
}

.kiu-rooms-cta__lead {
    max-width: 52ch;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.7;
    color: rgba(255, 255, 255, .78);
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 1340px) {
    .kiu-rooms {
        --kiu-nav-clear: 178px;
    }
}

@media (max-width: 700px) {
    .kiu-rooms {
        --kiu-nav-clear: 108px;
    }
}

@media (max-width: 1199px) {
    .kiu-rooms {
        --kiu-section-y: 84px;
    }

    .kiu-rooms-list__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .kiu-rooms-standards__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .kiu-rooms {
        --kiu-section-y: 72px;
    }

    .kiu-rooms-hero {
        min-height: 340px;
        padding-block: var(--kiu-nav-clear) 60px;
    }

    .kiu-rooms .kiu-section__head {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
        margin-bottom: 36px;
    }

    .kiu-rooms-cta__inner {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 767px) {
    .kiu-rooms {
        --kiu-section-y: 60px;
    }

    /* The four figures stay on one line at every width — stacked, this band
       filled most of a phone screen. Everything below just buys the room for
       that: the band, the gaps and the type all shrink together. */
    .kiu-rooms-facts {
        padding-block: 34px;
    }

    .kiu-rooms-facts__grid {
        gap: 10px;
    }

    .kiu-rooms-fact {
        padding-left: 10px;
        border-left-width: 2px;
    }

    /* The clamp() floor of 32px is a desktop figure; four of those plus gaps
       overflow a 360px viewport. */
    .kiu-rooms-fact__value {
        font-size: 23px;
    }

    .kiu-rooms-fact__label {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.35;
    }

    .kiu-rooms-list__grid,
    .kiu-rooms-standards__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 24px;
    }

    .kiu-room__body {
        padding: 24px 22px 28px;
    }
}

@media (max-width: 479px) {
    .kiu-rooms-facts__grid {
        gap: 7px;
    }

    .kiu-rooms-fact {
        padding-left: 8px;
    }

    .kiu-rooms-fact__value {
        font-size: 19px;
    }

    .kiu-rooms-fact__label {
        font-size: 10px;
        /* "Lab workstations" is the longest label and must be allowed to
           break rather than widen its column. */
        word-break: break-word;
    }

    .kiu-rooms .kiu-btn {
        width: 100%;
        justify-content: center;
    }
}

/* --------------------------------------------------------------------------
   Motion preferences
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .kiu-rooms *,
    .kiu-rooms *::before,
    .kiu-rooms *::after {
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
    }
}
