/* ============================================================
   HOSPITAL WEBSITE — Premium & Professional Design
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Sarabun:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400&family=Noto+Serif+Thai:wght@700;800&display=swap');

/* ---- TOKENS ---- */
:root {
    --navy:        #1a3358;
    --navy-dark:   #0f2040;
    --navy-mid:    #234580;
    --teal:        #2c7873;
    --teal-light:  #3aa89f;
    --gold:        #c09235;
    --gold-pale:   #fdf5e2;
    --white:       #ffffff;
    --off-white:   #f8fafb;
    --gray-50:     #f9fafb;
    --gray-100:    #f3f4f6;
    --gray-200:    #e5e7eb;
    --gray-400:    #9ca3af;
    --gray-500:    #6b7280;
    --gray-700:    #374151;
    --gray-900:    #111827;
    --ease:        cubic-bezier(.4,0,.2,1);
    --radius:      10px;
    --shadow-sm:   0 1px 6px rgba(0,0,0,.07);
    --shadow-md:   0 6px 24px rgba(26,51,88,.1);
    --shadow-lg:   0 16px 48px rgba(26,51,88,.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    color: var(--gray-700);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* ============================================================
   TOP INFO BAR
   ============================================================ */
.header-top {
    background: var(--gray-100) !important;
    border-bottom: 1px solid var(--gray-200) !important;
    padding: 8px 0 !important;
    font-size: 13px;
}

.header-info span {
    color: var(--gray-500);
}

.header-info i {
    color: var(--teal);
    margin-right: 5px;
}

.btn-admin-top {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 20px;
    padding: 4px 14px;
    text-decoration: none;
    transition: all .2s var(--ease);
    background: var(--white);
}

.btn-admin-top:hover {
    background: var(--navy);
    color: #fff;
    border-color: var(--navy);
}

/* ============================================================
   NAVBAR  —  Style like Dr. Karen site
   ============================================================ */
.navbar {
    background: var(--white) !important;
    padding: 0 !important;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: none;
    transition: box-shadow .3s var(--ease);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar.scrolled {
    box-shadow: 0 2px 16px rgba(0,0,0,.09) !important;
}

/* Logo ---- */
.navbar-brand {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 0 !important;
    text-decoration: none;
}

.navbar-brand .brand-logo-icon {
    width: 46px;
    height: 46px;
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(44,120,115,.3);
}

.navbar-brand .brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
    max-width: 260px;
}

.navbar-brand .brand-name {
    font-family: 'Noto Serif Thai', serif;
    font-size: .92rem;
    font-weight: 800;
    color: var(--navy);
    letter-spacing: -.2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.navbar-brand .brand-sub {
    font-size: 11px;
    font-weight: 500;
    color: var(--gray-400);
    letter-spacing: .2px;
    white-space: nowrap;
}

/* Nav Links ---- */
.navbar-nav {
    align-items: center;
    gap: 2px;
}

.nav-link {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: var(--gray-700) !important;
    padding: 20px 13px !important;
    transition: color .2s var(--ease), border-bottom-color .2s var(--ease) !important;
    position: relative;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
}

.nav-link:hover,
.nav-link:focus,
.nav-link:focus-visible {
    color: var(--teal) !important;
    transform: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
    border-bottom: 2px solid var(--teal) !important;
}

.nav-link.active {
    color: var(--teal) !important;
    background: transparent !important;
    border-bottom: 2px solid var(--teal) !important;
}


/* CTA button in navbar */
.btn-nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--teal);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 10px 22px !important;
    font-size: 13.5px !important;
    font-weight: 700 !important;
    text-decoration: none;
    transition: all .25s var(--ease) !important;
    margin-left: 10px;
    white-space: nowrap;
    line-height: 1 !important;
}

.btn-nav-cta:hover {
    background: var(--teal-light) !important;
    color: #fff !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(44,120,115,.35) !important;
}

.btn-nav-cta::after {
    display: none !important;
}

/* Dropdown ---- */
.dropdown-menu {
    border: 1px solid var(--gray-200) !important;
    border-radius: var(--radius) !important;
    box-shadow: 0 8px 32px rgba(0,0,0,.12) !important;
    padding: 8px 0 !important;
    margin-top: 0 !important;
    min-width: 190px;
    background: var(--white);
}

.dropdown-item {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    padding: 9px 20px;
    transition: all .18s var(--ease);
    border-radius: 0;
    border-left: 3px solid transparent;
}

.dropdown-item:hover {
    background: rgba(44,120,115,.06);
    color: var(--teal);
    padding-left: 22px;
    border-left: 3px solid var(--teal);
}

/* Hover dropdown — desktop only */
@media (min-width: 992px) {
    .navbar .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
        animation: dropFadeIn .18s ease forwards;
    }
}
@keyframes dropFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   CAROUSEL / HERO
   ============================================================ */
#mainSlider { position: relative; }

.carousel-item {
    position: relative;
    background: var(--navy, #0a1630);
}

.carousel-item img {
    height: auto;
    max-height: 440px;
    object-fit: contain;
    display: block;
    width: 100%;
    margin: 0 auto;
}

.carousel-caption {
    position: absolute !important;
    top: auto !important;
    bottom: 24px !important;
    transform: none !important;
    left: 5% !important;
    right: 5% !important;
    text-align: left !important;
    background: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    padding: 0 !important;
    z-index: 20;
    border-radius: 0 !important;
    box-shadow: none !important;
    border: none !important;
    display: flex !important;
    align-items: center !important;
    gap: 28px !important;
}

.caption-eyebrow {
    display: none;
}

.carousel-caption h2 {
    font-family: 'Noto Serif Thai', serif !important;
    font-size: 1.5rem !important;
    font-weight: 800 !important;
    color: #fff !important;
    text-shadow: 0 2px 10px rgba(0,0,0,.55) !important;
    line-height: 1.3 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    flex-shrink: 0;
}

.carousel-caption p {
    font-size: .88rem;
    color: rgba(255,255,255,.85);
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
    line-height: 1.55;
    margin-bottom: 0;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--teal);
    color: #fff;
    border-radius: 50px;
    padding: 9px 22px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 4px 16px rgba(44,120,115,.4);
    transition: all .3s var(--ease);
}

.btn-hero:hover {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 12px 36px rgba(0,0,0,.2);
}

/* Controls */
.carousel-control-prev,
.carousel-control-next {
    width: 46px; height: 46px;
    top: 50%; bottom: auto;
    transform: translateY(-50%);
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.35);
    backdrop-filter: blur(6px);
    opacity: 1;
    transition: all .25s var(--ease);
}
.carousel-control-prev { left: 20px; }
.carousel-control-next { right: 20px; }
.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: var(--teal);
    border-color: var(--teal);
}
.carousel-control-prev-icon,
.carousel-control-next-icon { width: 16px; height: 16px; }

/* Indicators */
.carousel-indicators { bottom: 20px; gap: 5px; }
.carousel-indicators [data-bs-target] {
    width: 24px !important; height: 3px !important;
    border-radius: 3px !important;
    background: rgba(255,255,255,.35) !important;
    border: none !important; opacity: 1 !important;
    transition: all .3s var(--ease);
}
.carousel-indicators .active {
    width: 42px !important;
    background: var(--teal-light) !important;
}

/* ============================================================
   QUICK LINKS
   ============================================================ */
.quick-links { padding: 0; }
.quick-link-box {
    padding: 28px 22px !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    border-right: 1px solid rgba(255,255,255,.1);
    transition: filter .25s var(--ease) !important;
    cursor: pointer;
    text-align: center;
}
.quick-link-box:hover { filter: brightness(1.1); }
.quick-link-box i { font-size: 2.2rem !important; margin-bottom: 10px !important; display: block; }
.quick-link-box h5 { font-size: .95rem; font-weight: 700; margin-bottom: 12px; }
.ql-blue   { background: linear-gradient(135deg, #1147b0, #1a5dd4); }
.ql-green  { background: linear-gradient(135deg, #047857, #059669); }
.ql-teal   { background: linear-gradient(135deg, var(--teal), var(--teal-light)); }
.ql-amber  { background: linear-gradient(135deg, #92400e, #b45309); }
.btn-ql {
    display: inline-block;
    background: rgba(255,255,255,.18);
    border: 1.5px solid rgba(255,255,255,.35);
    color: #fff;
    font-size: 12px; font-weight: 700;
    padding: 6px 18px;
    border-radius: 30px;
    text-decoration: none;
    transition: background .2s;
}
.btn-ql:hover { background: rgba(255,255,255,.32); }

/* ============================================================
   STATS
   ============================================================ */
.stats-strip {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%);
    padding: 54px 0;
    position: relative;
    overflow: hidden;
}
.stats-strip::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 320px; height: 320px;
    border-radius: 50%;
    background: rgba(255,255,255,.03);
}
.stat-item { text-align: center; }
.stat-icon { font-size: 1.5rem; color: rgba(255,255,255,.2); margin-bottom: 10px; display: block; }
.stat-number {
    font-family: 'Noto Serif Thai', serif;
    font-size: 2.8rem; font-weight: 800;
    color: var(--teal-light); line-height: 1; display: block; margin-bottom: 6px;
}
.stat-label { font-size: 13px; color: rgba(255,255,255,.6); font-weight: 500; }

/* ============================================================
   SECTION COMMON
   ============================================================ */
.section-label {
    display: inline-block;
    font-size: 11px; font-weight: 700;
    letter-spacing: 2.5px; text-transform: uppercase;
    color: var(--teal);
    background: rgba(44,120,115,.08);
    padding: 5px 14px;
    border-radius: 20px;
    margin-bottom: 12px;
}
.section-title {
    font-family: 'Noto Serif Thai', serif;
    font-size: 2rem; font-weight: 800;
    color: var(--navy); line-height: 1.3;
}
.section-subtitle {
    color: var(--gray-500); font-size: 15px;
    line-height: 1.75; max-width: 520px; margin: 10px auto 28px;
}

/* ============================================================
   DEPARTMENT CARDS
   ============================================================ */
.departments { background: var(--off-white) !important; padding: 56px 0 !important; }

.dept-card {
    background: var(--white);
    border: 1px solid var(--gray-200) !important;
    border-radius: 14px !important;
    overflow: hidden;
    transition: all .35s var(--ease) !important;
    box-shadow: var(--shadow-sm) !important;
    height: 100%;
}
.dept-card:hover {
    transform: translateY(-7px) !important;
    box-shadow: var(--shadow-lg) !important;
    border-color: transparent !important;
}
.dept-card-img-wrap { overflow: hidden; height: 200px; }
.dept-card-img-wrap img {
    width: 100%; height: 200px;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.dept-card:hover .dept-card-img-wrap img { transform: scale(1.06); }
.dept-card-top-bar { height: 4px; background: linear-gradient(90deg, var(--teal), var(--teal-light)); }
.dept-card-body { padding: 22px 24px; }
.dept-card-title { font-weight: 700; font-size: 1.05rem; color: var(--navy); margin-bottom: 10px; }
.dept-card-text { color: var(--gray-500); font-size: 13.5px; line-height: 1.7; margin-bottom: 18px; }
.btn-dept {
    display: inline-flex; align-items: center; gap: 7px;
    background: transparent;
    border: 1.5px solid var(--teal);
    color: var(--teal);
    border-radius: 30px;
    padding: 7px 18px;
    font-size: 13px; font-weight: 700;
    text-decoration: none;
    transition: all .22s var(--ease);
}
.btn-dept:hover { background: var(--teal); color: #fff; }

/* ============================================================
   NEWS CARDS
   ============================================================ */
.news-section { background: var(--white); padding: 56px 0; }
.procurement-section { background: var(--off-white); }
.home-section + .home-section { padding-top: 0; }
.news-card {
    background: var(--white);
    border: 1px solid var(--gray-200) !important;
    border-radius: 14px !important;
    overflow: hidden;
    transition: all .35s var(--ease) !important;
    box-shadow: var(--shadow-sm) !important;
    height: 100%;
}
.news-card:hover {
    transform: translateY(-7px) !important;
    box-shadow: var(--shadow-lg) !important;
    border-color: transparent !important;
}
.news-card-img-wrap {
    overflow: hidden; height: 210px;
    display: flex; align-items: center; justify-content: center;
    background: #f4f5f7;
}
.news-card-img-wrap img {
    width: 100%; height: 100%;
    object-fit: contain; transition: transform .5s var(--ease);
}
.news-card:hover .news-card-img-wrap img { transform: scale(1.06); }
.news-card-top { height: 4px; background: linear-gradient(90deg, var(--gold), #e0b04a); }
.news-card-body { padding: 22px 24px; }
.news-card-meta {
    display: flex; align-items: center; gap: 14px;
    font-size: 12px; color: var(--gray-400); margin-bottom: 12px;
}
.news-card-meta i { color: var(--teal); margin-right: 4px; }
.news-badge {
    background: rgba(192,146,53,.12); color: var(--gold);
    font-size: 10px; font-weight: 700;
    letter-spacing: 1px; text-transform: uppercase;
    padding: 3px 10px; border-radius: 20px;
}
.news-card-title { font-weight: 700; font-size: 1rem; color: var(--gray-900); line-height: 1.5; margin-bottom: 10px; }
.news-card-text { color: var(--gray-500); font-size: 13.5px; line-height: 1.7; margin-bottom: 18px; }
.btn-news {
    display: inline-flex; align-items: center; gap: 6px;
    color: var(--navy); font-size: 13px; font-weight: 700;
    text-decoration: none;
    transition: all .2s var(--ease);
}
.btn-news:hover { color: var(--teal); gap: 10px; }
.btn-view-all {
    display: inline-flex; align-items: center; gap: 10px;
    background: transparent;
    border: 2px solid var(--navy); color: var(--navy);
    border-radius: 50px; padding: 12px 36px;
    font-size: 14px; font-weight: 700;
    text-decoration: none;
    transition: all .3s var(--ease);
}
.btn-view-all:hover {
    background: var(--navy); color: #fff;
    transform: translateY(-2px); box-shadow: var(--shadow-md);
}

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--navy) !important; padding-top: 64px; padding-bottom: 0; }
.footer-logo {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 16px;
}
.footer-logo .f-icon {
    width: 44px; height: 44px;
    background: linear-gradient(135deg, var(--teal), var(--teal-light));
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 20px; flex-shrink: 0;
}
.footer-logo .f-name {
    font-family: 'Noto Serif Thai', serif;
    font-size: 1rem; font-weight: 800; color: #fff; line-height: 1.25;
}
.footer-logo .f-sub { font-size: 12px; color: rgba(255,255,255,.45); }
.footer h6 {
    font-size: 11.5px; font-weight: 700;
    letter-spacing: 2px; text-transform: uppercase;
    color: rgba(255,255,255,.4);
    margin-bottom: 18px; padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.footer p { font-size: 14px; color: rgba(255,255,255,.5); line-height: 1.85; }
.footer-link {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: rgba(255,255,255,.5);
    text-decoration: none; padding: 3px 0;
    transition: all .2s var(--ease);
}
.footer-link::before { content: '›'; color: var(--teal-light); font-size: 15px; font-weight: 700; }
.footer-link:hover { color: rgba(255,255,255,.9); padding-left: 5px; }
.footer-contact-item {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 14px; color: rgba(255,255,255,.5); margin-bottom: 12px;
}
.footer-contact-item .f-ic {
    width: 32px; height: 32px;
    background: rgba(255,255,255,.07); border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: var(--teal-light); font-size: 13px; flex-shrink: 0;
}
.social-links { display: flex; gap: 10px; margin-bottom: 24px; }
.social-btn {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.1);
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,.65); font-size: 15px;
    text-decoration: none; transition: all .25s var(--ease);
}
.social-btn:hover {
    background: var(--teal); border-color: var(--teal);
    color: #fff; transform: translateY(-3px);
}
.footer-bottom {
    margin-top: 48px; padding: 16px 0;
    border-top: 1px solid rgba(255,255,255,.07);
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; color: rgba(255,255,255,.3);
}
.footer-bottom a { color: rgba(255,255,255,.3); text-decoration: none; }
.footer-bottom a:hover { color: var(--teal-light); }

.btn-admin-footer {
    font-size: 12px;
    font-weight: 600;
    color: rgba(255,255,255,.55) !important;
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 20px;
    padding: 4px 14px;
    transition: all .2s var(--ease);
}
.btn-admin-footer:hover {
    background: var(--teal);
    color: #fff !important;
    border-color: var(--teal);
}

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 100%) !important;
    padding: 60px 0 !important;
}
.page-header h1 {
    font-family: 'Noto Serif Thai', serif;
    color: #fff; font-weight: 800;
}
.page-header .breadcrumb-item a { color: rgba(255,255,255,.6); text-decoration: none; }
.page-header .breadcrumb-item.active { color: var(--teal-light); }
.page-header .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.35); }

/* ============================================================
   GENERIC BUTTONS
   ============================================================ */
.btn { border-radius: var(--radius); padding: 9px 22px; font-weight: 600; font-size: 14px; transition: all .25s var(--ease); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md) !important; }
.btn-primary {
    background: linear-gradient(135deg, var(--teal-light), var(--teal)) !important;
    border-color: var(--teal) !important;
}
.btn-primary:hover { background: linear-gradient(135deg, var(--teal), #1f5752) !important; }

/* ============================================================
   CARD OVERRIDE
   ============================================================ */
.card { border-radius: 14px !important; border: 1px solid var(--gray-200) !important; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal:nth-child(2) { transition-delay: .1s; }
.reveal:nth-child(3) { transition-delay: .2s; }
.reveal:nth-child(4) { transition-delay: .3s; }
.reveal:nth-child(5) { transition-delay: .4s; }
.reveal:nth-child(6) { transition-delay: .5s; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 992px) {
    .nav-link { padding: 12px 10px !important; }
    .btn-nav-cta { margin-left: 0; margin-top: 8px; }
    .carousel-caption { gap: 16px !important; bottom: 24px !important; }
    .carousel-caption h2 { font-size: 1.15rem !important; }
}
@media (max-width: 768px) {
    .carousel-item img { max-height: 260px; }
    .carousel-caption { flex-direction: column !important; align-items: flex-start !important; gap: 4px !important; bottom: 16px !important; left: 4% !important; right: 4% !important; }
    .carousel-caption h2 { font-size: 1rem !important; white-space: normal !important; }
    .section-title { font-size: 1.65rem; }
    .stat-number { font-size: 2.2rem; }
    .footer-bottom { flex-direction: column; gap: 6px; text-align: center; }
    .quick-link-box { border-right: none; border-bottom: 1px solid rgba(255,255,255,.1); }
}
