/* Content list & detail — light, readable layout */

.content-directory {
    --cd-green: #00a855;
    --cd-gold: #9a7209;
    --cd-ink: #0f172a;
    --cd-muted: #64748b;
    --cd-line: rgba(0, 0, 0, 0.08);
    --cd-surface: #ffffff;
    padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(3.5rem, 6vw, 5rem);
    background: linear-gradient(180deg, #f8faf9 0%, #fff 100%);
}

.content-directory .container {
    max-width: 1320px;
}

.content-directory__head {
    max-width: 720px;
    margin: 0 0 2.25rem;
}

.content-directory__head span {
    display: inline-block;
    color: var(--cd-gold);
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid rgba(255, 170, 0, 0.25);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.content-directory__head h2 {
    margin: 0;
    color: var(--cd-ink) !important;
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    font-weight: 900;
    line-height: 1.15;
}

.content-subhead {
    color: var(--cd-ink) !important;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 2.5rem 0 1.25rem;
    padding-top: 0.5rem;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.content-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--cd-surface);
    border: 1px solid var(--cd-line);
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.content-card:hover {
    color: inherit;
    transform: translateY(-6px);
    border-color: rgba(0, 168, 85, 0.35);
    box-shadow: 0 14px 32px rgba(0, 168, 85, 0.12);
}

.content-card__image {
    flex: 0 0 auto;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.content-card__badge {
    position: absolute;
    left: 14px;
    top: 14px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--cd-gold);
    border: 1px solid rgba(255, 170, 0, 0.35);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    z-index: 2;
}

.content-card__body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 1.25rem 1.35rem 1.35rem;
    background: var(--cd-surface);
}

.content-card__body h3 {
    margin: 0 0 8px;
    color: var(--cd-ink) !important;
    font-size: 1.15rem;
    line-height: 1.3;
    font-weight: 800;
}

.content-card__body p {
    margin: 0;
    flex: 1 1 auto;
    color: var(--cd-muted) !important;
    font-size: 14px;
    line-height: 1.65;
}

.content-card__meta {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--cd-line);
    color: var(--cd-green) !important;
    font-weight: 700;
    font-size: 13px;
}

.content-directory--gallery .content-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.content-directory--gallery .content-card__image {
    height: 260px;
}

.content-directory--gallery .content-card__body {
    padding: 1rem 1.15rem 1.15rem;
}

.content-directory--gallery .content-card__body h3 {
    margin-bottom: 0;
    font-size: 1rem;
}

/* —— Detail page —— */

.content-hero {
    min-height: 380px;
    display: flex;
    align-items: flex-end;
    position: relative;
    background-size: cover;
    background-position: center;
    color: #fff;
}

.content-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.88) 100%);
    z-index: 0;
}

.content-hero .container {
    position: relative;
    z-index: 1;
}

.content-hero__body {
    max-width: 820px;
    padding: clamp(2rem, 5vw, 3.5rem) 0;
}

.content-hero__badge {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.35);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    margin-bottom: 14px;
    color: #fcd34d !important;
}

.content-hero h1 {
    color: #fff !important;
    font-size: clamp(1.85rem, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 12px;
}

.content-hero p {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 17px;
    line-height: 1.7;
    margin: 0;
}

.content-detail {
    padding: clamp(2.5rem, 5vw, 4rem) 0;
    background: #f8faf9;
}

.content-detail__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.75rem;
    align-items: start;
}

.content-panel {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.75rem 1.85rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
}

.content-panel + .content-panel {
    margin-top: 1.25rem;
}

.content-panel h2,
.content-panel h3 {
    color: #0f172a !important;
    font-weight: 800;
    margin-bottom: 12px;
}

.content-panel p,
.content-panel li {
    color: #475569 !important;
    line-height: 1.75;
}

.content-highlights {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.content-highlight {
    background: #f0fdf4;
    border: 1px solid rgba(0, 168, 85, 0.2);
    border-radius: 12px;
    padding: 14px 16px;
    color: #146f38 !important;
    font-weight: 700;
    font-size: 14px;
}

.content-side {
    position: sticky;
    top: calc(var(--site-header-height, 80px) + 16px);
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem 1.65rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.content-side h3 {
    color: #0f172a !important;
    font-weight: 800;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.content-side-row {
    padding: 14px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.content-side-row:last-child {
    border-bottom: 0;
}

.content-side-row span {
    display: block;
    color: #64748b !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.content-side-row strong,
.content-side-row a {
    color: #0f172a !important;
    font-weight: 700;
    text-decoration: none;
}

.content-side-row a:hover {
    color: #00a855 !important;
}

.content-related {
    padding: clamp(2.5rem, 5vw, 3.5rem) 0;
    background: #fff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.content-related h2 {
    color: #0f172a !important;
    font-weight: 900;
    margin-bottom: 1.25rem;
}

.content-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.25rem;
}

.content-related-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.content-related-card:hover {
    color: inherit;
    transform: translateY(-4px);
    border-color: rgba(0, 168, 85, 0.35);
}

.content-related-card__image {
    height: 140px;
    background-size: cover;
    background-position: center;
}

.content-related-card__body {
    padding: 1rem 1.1rem 1.15rem;
}

.content-related-card h4 {
    margin: 0;
    color: #0f172a !important;
    font-size: 1rem;
    font-weight: 800;
}

.type-facts {
    margin-top: -2.5rem;
    position: relative;
    z-index: 2;
    padding-bottom: 0.5rem;
}

.type-facts__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.type-fact {
    padding: 1.25rem 1.35rem;
    border-right: 1px solid rgba(0, 0, 0, 0.08);
}

.type-fact:last-child {
    border-right: 0;
}

.type-fact span {
    display: block;
    color: #64748b !important;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.type-fact strong {
    color: #146f38 !important;
    font-size: 1rem;
    font-weight: 800;
}

.course-register {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    padding: 1.5rem 1.65rem;
    position: sticky;
    top: calc(var(--site-header-height, 80px) + 16px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.course-register h3 {
    color: #0f172a !important;
    font-weight: 800;
    margin-bottom: 8px;
}

.course-register p,
.course-register .form-label {
    color: #64748b !important;
}

.course-register .form-control {
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #f8faf9;
    color: #0f172a !important;
    border-radius: 10px;
}

.course-register .form-control:focus {
    border-color: #00a855;
    box-shadow: 0 0 0 3px rgba(0, 168, 85, 0.15);
}

.course-register .btn {
    width: 100%;
    border-radius: 999px;
    background: #00a855;
    border-color: #00a855;
    color: #fff !important;
    font-weight: 700;
    padding: 12px 20px;
}

.course-register .btn:hover {
    background: #087a42;
    border-color: #087a42;
    color: #fff !important;
}

.institution-programs,
.institution-facilities {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.institution-program,
.institution-facility {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    padding: 16px;
    background: #f8faf9;
    color: #0f172a !important;
}

.gallery-detail-image {
    display: block;
    overflow: hidden;
    border-radius: 16px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background: #fff;
}

.gallery-detail-image img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .content-detail__layout {
        grid-template-columns: 1fr;
    }

    .content-side,
    .course-register {
        position: static;
    }

    .type-facts__grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 575px) {
    .content-highlights {
        grid-template-columns: 1fr;
    }

    .type-facts__grid {
        grid-template-columns: 1fr;
    }

    .type-fact {
        border-right: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }
}
