/* ═══════════════════════════════════════════════════════════════
 *  SRI SAKHON HOSPITAL - HOMEPAGE STYLES
 *  Professional Hospital Theme
 * ═══════════════════════════════════════════════════════════════ */

/* ---------------------------------------------------------------
 *  1. DESIGN TOKENS
 * --------------------------------------------------------------- */
:root {
    /* Brand Colors */
    --hosp-navy: #1d3557;
    --hosp-navy-dark: #14253f;
    --hosp-navy-light: #2c4a73;
    --hosp-blue: #2e5d8f;
    --hosp-teal: #16746b;
    --hosp-teal-light: #1ea295;
    --hosp-gold: #b88a3e;
    --hosp-gold-light: #d4a456;
    --hosp-red: #b91c1c;
    --hosp-red-light: #dc2626;

    /* Surfaces */
    --hosp-cream: #f7f3ec;
    --hosp-bg: #eef2f7;
    --hosp-bg-soft: #f8fafc;
    --hosp-white: #ffffff;
    --hosp-border: #e2e8f0;
    --hosp-border-light: #f1f5f9;

    /* Typography */
    --hosp-text: #1a202c;
    --hosp-text-light: #4a5568;
    --hosp-text-muted: #94a3b8;

    /* Elevation */
    --shadow-xs: 0 1px 2px rgba(29, 53, 87, 0.05);
    --shadow-sm: 0 2px 6px rgba(29, 53, 87, 0.07);
    --shadow-md: 0 4px 16px rgba(29, 53, 87, 0.10);
    --shadow-lg: 0 12px 36px rgba(29, 53, 87, 0.16);
    --shadow-gold: 0 4px 14px rgba(184, 138, 62, 0.25);

    /* Geometry */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 18px;

    /* Motion */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------------------------------------------------------------
 *  2. BASE
 * --------------------------------------------------------------- */
* {
    font-family: 'Kanit', 'Sarabun', sans-serif !important;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--hosp-bg);
    background-image:
        radial-gradient(at 0% 0%, rgba(29, 53, 87, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(184, 138, 62, 0.04) 0px, transparent 50%);
    color: var(--hosp-text);
    font-weight: 300;
    line-height: 1.65;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

::-webkit-scrollbar-track {
    background: var(--hosp-bg-soft);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--hosp-navy), var(--hosp-teal));
    border: 2px solid var(--hosp-bg-soft);
    border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--hosp-navy-dark);
}

.main-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 30px 22px 60px;
}

.section-block {
    margin-bottom: 38px;
}

/* ---------------------------------------------------------------
 *  3. SECTION HEADER (reusable)
 * --------------------------------------------------------------- */
.section-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 22px;
    padding: 14px 18px 14px 14px;
    background: var(--hosp-white);
    border-radius: var(--radius-md);
    border-left: 5px solid var(--hosp-gold);
    box-shadow: var(--shadow-xs);
    position: relative;
    overflow: hidden;
}

.section-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(184, 138, 62, 0.04) 0%, transparent 60%);
    pointer-events: none;
}

.section-header-icon {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--hosp-navy), var(--hosp-blue));
    box-shadow: 0 4px 12px rgba(29, 53, 87, 0.3);
    color: white;
    font-size: 19px;
    position: relative;
    z-index: 1;
}

.section-header-text {
    flex: 1;
    position: relative;
    z-index: 1;
}

.section-header h3 {
    margin: 0;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.3;
    letter-spacing: 0.2px;
    color: var(--hosp-navy);
}

.section-header-subtitle {
    margin-top: 3px;
    font-size: 12.5px;
    font-weight: 300;
    color: var(--hosp-text-light);
}

.section-header-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 99px;
    background: rgba(22, 116, 107, 0.08);
    color: var(--hosp-teal);
    font-size: 13px;
    font-weight: 400;
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    z-index: 1;
}

.section-header-link:hover {
    background: var(--hosp-teal);
    color: white;
    gap: 9px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(22, 116, 107, 0.3);
}

/* Icon gradient variants */
.icon-teal-gradient {
    background: linear-gradient(135deg, var(--hosp-teal), var(--hosp-teal-light)) !important;
}

.icon-gold-gradient {
    background: linear-gradient(135deg, var(--hosp-gold), var(--hosp-gold-light)) !important;
}

.icon-red-gradient {
    background: linear-gradient(135deg, var(--hosp-red), var(--hosp-red-light)) !important;
}

.icon-navy-gradient {
    background: linear-gradient(135deg, var(--hosp-navy), var(--hosp-blue)) !important;
}

/* ---------------------------------------------------------------
 *  4. HERO SLIDER
 * --------------------------------------------------------------- */
.hero-slider-wrap {
    margin-bottom: 32px;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: linear-gradient(135deg, var(--hosp-navy-dark), var(--hosp-navy));
    border: 1px solid rgba(184, 138, 62, 0.2);
    box-shadow: var(--shadow-lg);
    position: relative;
}

.hero-slider-wrap::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hosp-gold), var(--hosp-gold-light), var(--hosp-gold));
    z-index: 20;
}

#topSlider,
#topSlider .carousel-inner,
#topSlider .carousel-inner .item {
    height: 460px;
}

#topSlider {
    width: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
}

#topSlider .carousel-inner .item {
    background-color: var(--hosp-navy-dark);
    position: relative;
}

.slide-background-blur {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: blur(28px) brightness(0.55);
    transform: scale(1.18);
    z-index: 1;
}

.slide-main-image {
    position: relative;
    z-index: 2;
    height: 460px;
    max-width: 100%;
    margin: 0 auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.4));
}

#topSlider .carousel-control {
    width: 52px;
    height: 52px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    opacity: 0;
    text-shadow: none;
    transition: var(--transition);
    z-index: 10;
}

#topSlider .carousel-control.left,
#topSlider .carousel-control.right {
    background-image: none;
}

#topSlider .carousel-control.left {
    left: 26px;
}

#topSlider .carousel-control.right {
    right: 26px;
}

#topSlider:hover .carousel-control {
    opacity: 1;
}

#topSlider .carousel-control:hover {
    background: var(--hosp-gold);
    border-color: var(--hosp-gold);
}

#topSlider .carousel-control .glyphicon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 18px;
    color: white;
}

#topSlider .carousel-indicators {
    bottom: 20px;
    margin-bottom: 0;
}

#topSlider .carousel-indicators li {
    width: 10px;
    height: 10px;
    margin: 0 4px;
    background: rgba(255, 255, 255, 0.35);
    border: none;
    border-radius: 50%;
    transition: var(--transition);
}

#topSlider .carousel-indicators li.active {
    width: 32px;
    background: var(--hosp-gold);
    border-radius: 5px;
    box-shadow: 0 0 12px rgba(212, 164, 86, 0.6);
}

/* ---------------------------------------------------------------
 *  5. QUICK STATS
 * --------------------------------------------------------------- */
.quick-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 35px;
}

.stat-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: inherit;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--hosp-navy);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--hosp-navy);
    box-shadow: var(--shadow-md);
    color: inherit;
    text-decoration: none;
}

.stat-card:hover::before {
    width: 6px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: white;
    font-size: 22px;
}

.stat-icon.icon-navy {
    background: linear-gradient(135deg, var(--hosp-navy), var(--hosp-blue));
}

.stat-icon.icon-teal {
    background: linear-gradient(135deg, var(--hosp-teal), var(--hosp-teal-light));
}

.stat-icon.icon-gold {
    background: linear-gradient(135deg, var(--hosp-gold), var(--hosp-gold-light));
}

.stat-icon.icon-red {
    background: linear-gradient(135deg, var(--hosp-red), var(--hosp-red-light));
}

.stat-info {
    flex: 1;
    min-width: 0;
}

.stat-label {
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 300;
    color: var(--hosp-text-light);
}

.stat-value {
    font-size: 16px;
    font-weight: 500;
    color: var(--hosp-navy);
    line-height: 1.2;
}

/* ---------------------------------------------------------------
 *  6. CONTENT CARD & NEWS TABS
 * --------------------------------------------------------------- */
.content-card {
    margin-bottom: 25px;
    overflow: hidden;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-top: 3px solid var(--hosp-navy);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.content-card:hover {
    box-shadow: var(--shadow-md);
}

.equal-height {
    display: flex;
    flex-direction: column;
}

.news-tabs-wrap {
    padding: 0 8px;
    background: linear-gradient(180deg, var(--hosp-bg-soft), white);
    border-bottom: 2px solid var(--hosp-border);
    overflow-x: auto;
    scrollbar-width: none;
}

.news-tabs-wrap::-webkit-scrollbar {
    display: none;
}

.news-tabs-wrap .nav-tabs {
    display: inline-flex;
    border: none;
    white-space: nowrap;
}

.news-tabs-wrap .nav-tabs>li {
    float: none;
    display: inline-block;
    margin: 0;
}

.news-tabs-wrap .nav-tabs>li>a {
    margin: 0;
    padding: 16px 22px;
    border: none !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--hosp-text-light) !important;
    font-size: 13.5px;
    font-weight: 400;
    position: relative;
    transition: var(--transition);
}

.news-tabs-wrap .nav-tabs>li>a:hover {
    background: rgba(29, 53, 87, 0.03) !important;
    color: var(--hosp-navy) !important;
}

.news-tabs-wrap .nav-tabs>li>a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hosp-navy), var(--hosp-gold));
    border-radius: 3px 3px 0 0;
    transform: translateX(-50%);
    transition: var(--transition);
}

.news-tabs-wrap .nav-tabs>li.active>a {
    color: var(--hosp-navy) !important;
    font-weight: 500;
}

.news-tabs-wrap .nav-tabs>li.active>a::after {
    width: 75%;
}

.news-content {
    flex: 1;
    padding: 0;
    max-height: 465px;
    overflow-y: auto;
}

.news-row {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    border-bottom: 1px solid var(--hosp-border-light);
    position: relative;
    transition: var(--transition);
}

.news-row:last-child {
    border-bottom: none;
}

.news-row::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 0;
    background: var(--hosp-gold);
    transition: var(--transition);
}

.news-row:hover {
    background: linear-gradient(90deg, rgba(29, 53, 87, 0.04), transparent);
    padding-left: 24px;
}

.news-row:hover::before {
    width: 3px;
}

.news-bullet {
    width: 8px;
    height: 8px;
    flex-shrink: 0;
    margin-right: 14px;
    background: var(--hosp-teal);
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(22, 116, 107, 0.12);
    transition: var(--transition);
}

.news-row:hover .news-bullet {
    background: var(--hosp-gold);
    box-shadow: 0 0 0 5px rgba(184, 138, 62, 0.18);
    transform: scale(1.3);
}

.news-text {
    flex: 1;
    font-size: 14px;
    font-weight: 400;
    color: var(--hosp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-pdf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin-left: 10px;
    background: rgba(185, 28, 28, 0.08);
    color: var(--hosp-red);
    border-radius: var(--radius-sm);
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
}

.news-pdf-btn:hover {
    background: var(--hosp-red);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(185, 28, 28, 0.3);
    text-decoration: none;
}

.news-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 12px;
}

.label-new {
    padding: 3px 9px;
    background: linear-gradient(135deg, var(--hosp-red-light), #ef4444);
    border-radius: 99px;
    color: white;
    font-size: 9.5px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 2px 6px rgba(220, 38, 38, 0.3);
}

.news-date {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
    min-width: 95px;
    color: var(--hosp-text-muted);
    font-size: 12px;
    font-weight: 300;
}

/* ---------------------------------------------------------------
 *  7. FEATURED CARD (Director)
 * --------------------------------------------------------------- */
.featured-card {
    position: relative;
    min-height: 530px;
    overflow: hidden;
    background: linear-gradient(160deg, var(--hosp-navy-dark) 0%, var(--hosp-navy) 100%);
    border: 1px solid rgba(184, 138, 62, 0.25);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.featured-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--hosp-gold), var(--hosp-gold-light));
    z-index: 5;
}

.featured-img-wrap {
    position: absolute;
    inset: 0;
}

.featured-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.92;
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 28px 22px;
    background: linear-gradient(0deg,
            rgba(20, 37, 63, 0.98) 0%,
            rgba(20, 37, 63, 0.65) 60%,
            transparent 100%);
    text-align: center;
    z-index: 2;
}

.featured-badge {
    display: inline-block;
    padding: 6px 18px;
    background: linear-gradient(135deg, var(--hosp-gold), var(--hosp-gold-light));
    border: none;
    border-radius: 99px;
    color: white;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    box-shadow: var(--shadow-gold);
}

/* ---------------------------------------------------------------
 *  8. POSTER GRID
 * --------------------------------------------------------------- */
.poster-section {
    margin-bottom: 32px;
    padding: 26px;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-top: 3px solid var(--hosp-gold);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.poster-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
    max-height: 500px;
    padding: 4px;
    overflow-y: auto;
}

.modern-poster {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    overflow: hidden;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: var(--transition);
}

.modern-poster:hover {
    transform: translateY(-8px);
    border-color: var(--hosp-gold);
    box-shadow: var(--shadow-lg);
    text-decoration: none;
}

.modern-poster-img {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.modern-poster-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.modern-poster:hover .modern-poster-img img {
    transform: scale(1.1);
}

.modern-poster-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 18px 16px;
    background: linear-gradient(to top,
            rgba(20, 37, 63, 0.98) 0%,
            rgba(20, 37, 63, 0.55) 65%,
            transparent 100%);
    color: white;
    pointer-events: none;
}

.modern-poster .title {
    margin-bottom: 6px;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.modern-poster .date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--hosp-gold-light);
    font-size: 11px;
    font-weight: 300;
}

/* ---------------------------------------------------------------
 *  9. GALLERY GRID
 * --------------------------------------------------------------- */
.gal-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gal-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    text-decoration: none !important;
    transition: var(--transition);
}

.gal-card:hover {
    transform: translateY(-6px);
    border-color: var(--hosp-navy);
    box-shadow: var(--shadow-lg);
}

.gal-img-wrapper {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--hosp-bg);
}

.gal-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gal-card:hover .gal-img-wrapper img {
    transform: scale(1.1);
}

.gal-img-wrapper::after {
    content: '\f03e';
    position: absolute;
    top: 12px;
    right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: var(--hosp-gold);
    border-radius: 50%;
    box-shadow: var(--shadow-gold);
    color: white;
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 13px;
    opacity: 0;
    transition: var(--transition);
}

.gal-card:hover .gal-img-wrapper::after {
    opacity: 1;
}

.gal-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 14px 16px;
    background: white;
}

.gal-name {
    margin-bottom: 8px;
    font-size: 13.5px;
    font-weight: 400;
    line-height: 1.4;
    color: var(--hosp-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gal-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--hosp-text-muted);
    font-size: 11.5px;
    font-weight: 300;
}

/* ---------------------------------------------------------------
 *  10. VIDEO GRID
 * --------------------------------------------------------------- */
.video-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.video-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.video-card:hover {
    transform: translateY(-4px);
    border-color: var(--hosp-navy);
    box-shadow: var(--shadow-md);
}

.embed-wrap {
    position: relative;
    padding-top: 56.25%;
    background: #000;
}

.embed-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-title {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 14px 16px;
    border-top: 1px solid var(--hosp-border-light);
    color: var(--hosp-text);
    font-size: 13.5px;
    font-weight: 400;
}

.video-title i {
    color: var(--hosp-red);
    font-size: 16px;
}

/* ---------------------------------------------------------------
 *  11. WEBBOARD
 * --------------------------------------------------------------- */
.board-card {
    overflow: hidden;
    background: white;
    border: 1px solid var(--hosp-border-light);
    border-top: 3px solid var(--hosp-teal);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

.board-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
}

.board-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 17px 20px;
    border-bottom: 1px solid var(--hosp-border-light);
    color: inherit;
    text-decoration: none;
    transition: var(--transition);
}

.board-item:nth-child(odd) {
    border-right: 1px solid var(--hosp-border-light);
}

.board-item:hover {
    background: linear-gradient(90deg, rgba(29, 53, 87, 0.04), transparent);
    padding-left: 24px;
    color: inherit;
    text-decoration: none;
}

.board-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--hosp-navy), var(--hosp-teal));
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: white;
    transition: var(--transition);
}

.board-item:hover .board-icon {
    transform: rotate(-8deg) scale(1.05);
    box-shadow: var(--shadow-md);
}

.board-text {
    flex: 1;
    min-width: 0;
}

.board-head {
    margin-bottom: 4px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--hosp-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.board-date {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--hosp-text-muted);
    font-size: 11.5px;
    font-weight: 300;
}

/* ---------------------------------------------------------------
 *  12. UTILITIES (Modal, Scroll-Top, Empty State)
 * --------------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(20, 37, 63, 0.88);
    backdrop-filter: blur(8px);
}

.modal-box {
    position: relative;
    width: 100%;
    max-width: 680px;
    overflow: hidden;
    background: white;
    border: 2px solid rgba(184, 138, 62, 0.3);
    border-radius: var(--radius-xl);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(20, 37, 63, 0.85);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    color: white;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--hosp-gold);
    transform: rotate(90deg);
}

.modal-box img {
    width: 100%;
    display: block;
}

.scroll-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: linear-gradient(135deg, var(--hosp-navy), var(--hosp-blue));
    border: 2px solid var(--hosp-gold);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    color: white;
    font-size: 16px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    cursor: pointer;
}

.scroll-top-btn:hover {
    background: linear-gradient(135deg, var(--hosp-gold), var(--hosp-gold-light));
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.empty-state {
    grid-column: 1 / -1;
    padding: 55px 20px;
    background: white;
    border: 1px dashed var(--hosp-border);
    border-radius: var(--radius-md);
    color: var(--hosp-text-muted);
    text-align: center;
}

.empty-state i {
    display: block;
    margin-bottom: 14px;
    color: var(--hosp-navy);
    font-size: 52px;
    opacity: 0.35;
}

.empty-state-text {
    font-size: 14px;
    font-weight: 300;
}

/* ---------------------------------------------------------------
 *  13. THIRD-PARTY OVERRIDES (Fancybox, Bootstrap Dropdown)
 * --------------------------------------------------------------- */
.fancybox-slide--image .fancybox-content {
    width: 85vw !important;
    height: 85vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    background: transparent !important;
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
}

.fancybox-image {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain;
}

.navbar-hospital .dropdown-menu {
    display: none !important;
}

.navbar-hospital .dropdown.open>.dropdown-menu,
.navbar-hospital .dropdown:hover>.dropdown-menu {
    display: block !important;
}

/* ---------------------------------------------------------------
 *  14. RESPONSIVE
 * --------------------------------------------------------------- */
@media (min-width: 992px) {
    .equal-height {
        height: 530px;
    }

    .row-equal {
        display: flex;
        flex-wrap: wrap;
    }

    .row-equal>[class*='col-'] {
        display: flex;
        flex-direction: column;
    }
}

@media (max-width: 991px) {

    #topSlider,
    #topSlider .carousel-inner,
    #topSlider .carousel-inner .item {
        height: 280px;
    }

    .slide-main-image {
        height: 280px;
    }

    .featured-card {
        min-height: 400px;
        margin-top: 20px;
    }

    .main-container {
        padding: 20px 14px 50px;
    }

    .section-header {
        padding: 12px 14px 12px 12px;
    }

    .section-header h3 {
        font-size: 17px;
    }

    .quick-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .gal-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .navbar-hospital .dropdown:hover>.dropdown-menu {
        display: none !important;
    }

    .navbar-hospital .dropdown.open>.dropdown-menu {
        display: block !important;
    }
}

@media (max-width: 768px) {
    .board-list {
        grid-template-columns: 1fr;
    }

    .board-item:nth-child(odd) {
        border-right: none;
    }
}

@media (max-width: 576px) {
    .video-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quick-stats-row {
        grid-template-columns: 1fr;
    }

    .gal-grid {
        grid-template-columns: 1fr;
    }
}