/* =====================================================
   กลุ่มงานกองสาธารณสุข อบต.กรงปินัง
   Custom Stylesheet - Government Modern Theme
   ===================================================== */

:root {
    --primary: #2d6a4f;
    --primary-light: #4f8f68;
    --primary-dark: #1d4d38;
    --secondary: #6fa35a;
    --secondary-light: #8bbf74;
    --accent: #d89b2b;
    --accent-light: #e9b949;
    --bg-light: #f3f8f4;
    --bg-white: #ffffff;
    --text-dark: #1d2b22;
    --text-muted: #6f7f74;
    --border-color: #dbe7dd;
    --gradient-primary: linear-gradient(135deg, #2d6a4f 0%, #4f8f68 100%);
    --gradient-hero: linear-gradient(135deg, #1d4d38 0%, #2d6a4f 50%, #5c9b72 100%);
    --gradient-green: linear-gradient(135deg, #5c8f49 0%, #8bbf74 100%);
    --footer-bg: linear-gradient(180deg, #204f3a 0%, #173e2e 100%);
    --topbar-bg: linear-gradient(90deg, #1d4d38 0%, #255a42 100%);
    --album-overlay: rgba(29,77,56,.55);
    --navbar-text: #ffffff;
    --navbar-brand: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

/* ===== Base ===== */
* { box-sizing: border-box; }

body {
    font-family: 'Sarabun', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--bg-light);
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: var(--primary-light);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
}

img { max-width: 100%; height: auto; }

/* ===== Top Bar ===== */
.top-bar {
    background: var(--topbar-bg);
    color: #fff;
    font-size: 0.85rem;
    padding: 8px 0;
}

.top-bar a {
    color: rgba(255,255,255,0.85);
    transition: color 0.3s;
}

.top-bar a:hover {
    color: #fff;
}

/* ===== Main Navbar ===== */
.main-navbar {
    background: var(--gradient-primary);
    padding: 0;
    box-shadow: var(--shadow-md);
    z-index: 1040;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.main-navbar .navbar-brand {
    padding: 12px 0;
}

.brand-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.brand-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--navbar-brand, #fff);
}

.brand-subtitle {
    font-size: 0.8rem;
    color: var(--navbar-brand, rgba(255,255,255,0.8));
    opacity: 0.85;
}

.main-navbar .nav-link {
    color: var(--navbar-text, rgba(255,255,255,0.9)) !important;
    font-weight: 500;
    padding: 18px 16px !important;
    position: relative;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.main-navbar .nav-link:hover,
.main-navbar .nav-link.active {
    color: var(--navbar-text, #fff) !important;
    background: rgba(255,255,255,0.12);
}

.main-navbar .nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 3px;
    background: var(--accent-light);
    border-radius: 3px 3px 0 0;
}

/* Enhanced hover / active styles for clearer, prettier navigation */
.main-navbar .nav-link {
    transition: background .25s, color .2s, transform .12s, box-shadow .25s;
}
.main-navbar .nav-link:hover,
.main-navbar .nav-link:focus {
    background: rgba(255,255,255,0.12);
    color: var(--navbar-text, #fff) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(29,77,56,0.12);
}
.main-navbar .nav-link.active,
.main-navbar .nav-link.active:focus {
    background: linear-gradient(90deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    color: var(--navbar-text, #fff) !important;
    border-radius: 10px;
    padding: 14px 18px !important;
    box-shadow: 0 12px 36px rgba(29,77,56,0.14);
}
.main-navbar .nav-item.dropdown .nav-link.dropdown-toggle::after {
    color: rgba(255,255,255,0.85);
}

/* Dropdown visual polish */
.dropdown-menu {
    border-radius: 10px;
    border: none;
    box-shadow: var(--shadow-lg);
    background: linear-gradient(180deg,#ffffff,#f7fbf7);
    padding: 6px;
}
.dropdown-item {
    color: var(--text-dark);
    transition: background .18s, color .18s, transform .12s;
    border-radius: 6px;
    padding: 8px 14px;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background: linear-gradient(90deg, rgba(45,106,79,0.08), rgba(79,143,104,0.06));
    color: var(--primary-dark);
    transform: translateX(6px);
}
.dropdown-item.active {
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    color: #fff;
}

/* Ensure keyboard focus is visible */
.main-navbar .nav-link:focus,
.dropdown-item:focus {
    outline: 2px solid rgba(79,143,104,0.18);
    outline-offset: 2px;
}

/* ===== Hero Slider ===== */
.hero-slider-section {
    position: relative;
    overflow: hidden;
}

/* Carousel item — DO NOT set display here; Bootstrap uses display:none/block
   to show/hide slides. Setting flex here breaks all slides visible at once. */
.hero-slider-section .carousel-item {
    min-height: 480px;
    height: 68vh;
    max-height: 560px;
    position: relative;
    overflow: hidden;
    background: var(--gradient-hero);
}

/* Only active / transitioning slides need flex for vertical centering */
.hero-slider-section .carousel-item.active,
.hero-slider-section .carousel-item-next,
.hero-slider-section .carousel-item-prev {
    display: flex;
    align-items: center;
}

/* Full image mode: keep entire photo visible (no crop) */
.hero-image-stage {
    position: absolute;
    inset: 0;
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px clamp(12px, 3vw, 40px) 18px;
}
.hero-slide-backdrop {
    position: absolute;
    inset: 30px clamp(24px, 6vw, 120px) 34px;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: blur(10px) saturate(0.92) brightness(0.52);
    transform: scale(1.03);
    opacity: .72;
    border-radius: 18px;
}
.hero-slide-bg {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    max-width: min(100%, 1600px);
    max-height: 100%;
    object-fit: contain;
    object-position: center center;
    filter: drop-shadow(0 10px 22px rgba(0,0,0,.28));
}

/* Dark gradient overlay for photo slides */
.hero-slide-overlay {
    position: absolute;
    inset: 0;
    background: var(--gradient-hero);
    opacity: 0.72;
    z-index: 1;
}
.hero-slide-overlay.has-image {
    background: linear-gradient(135deg, rgba(29,77,56,0.78) 0%, rgba(79,143,104,0.42) 100%);
    opacity: 1;
}

/* Floating decorative shapes (gradient-only slides) */
.hero-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.08;
    pointer-events: none;
    z-index: 1;
}
.hero-shape-1 {
    width: 520px; height: 520px;
    background: #fff;
    top: -100px; right: -80px;
    animation: float 7s ease-in-out infinite;
}
.hero-shape-2 {
    width: 280px; height: 280px;
    background: var(--accent);
    bottom: -60px; left: 8%;
    animation: float 9s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-22px); }
}

/* Slide text content */
.hero-slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 60px;
    padding-bottom: 60px;
}

.hero-slide-inner {
    max-width: 720px;
}

/* badge */
.hero-badge {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 50px;
    padding: 7px 20px;
    color: #fff;
    font-size: 0.88rem;
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

/* titles */
.hero-title {
    font-size: 2.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.6rem;
    text-shadow: 1px 2px 8px rgba(0,0,0,0.35);
    line-height: 1.2;
}
.hero-subtitle {
    font-size: 1.35rem;
    color: rgba(255,255,255,0.9);
    margin-bottom: 1.5rem;
    text-shadow: 0 1px 4px rgba(0,0,0,0.25);
}

/* CTA row */
.hero-cta-row .btn {
    padding: 11px 28px;
    font-weight: 600;
    border-radius: 50px;
    font-size: 0.97rem;
}
.btn-hero-primary {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}
.btn-hero-primary:hover {
    background: var(--accent-light);
    border-color: var(--accent-light);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(245,124,0,0.45);
}
.btn-hero-outline {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.65);
    color: #fff;
}
.btn-hero-outline:hover {
    background: rgba(255,255,255,0.12);
    border-color: #fff;
    color: #fff;
    transform: translateY(-2px);
}

/* Indicators */
.hero-indicators {
    bottom: 80px !important;
    gap: 6px;
}
.hero-indicators [data-bs-target] {
    width: 10px !important;
    height: 10px !important;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.6) !important;
    background: transparent !important;
    opacity: 1 !important;
    transition: all .3s;
}
.hero-indicators .active {
    width: 28px !important;
    border-radius: 5px !important;
    background: var(--accent) !important;
    border-color: var(--accent) !important;
}

/* Prev/Next controls */
.hero-control {
    width: 48px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    height: auto !important;
    bottom: auto !important;
}
.hero-control-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.18);
    border: 2px solid rgba(255,255,255,0.4);
    border-radius: 50%;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    transition: background .25s, transform .25s;
    font-size: 1.3rem;
    color: #fff;
}
.hero-control:hover .hero-control-icon {
    background: var(--accent);
    border-color: var(--accent);
    transform: scale(1.1);
}
.carousel-control-prev.hero-control { left: 18px; }
.carousel-control-next.hero-control { right: 18px; }

/* Slide-in animation */
.carousel-item.active .animate-slide-up { opacity: 1; transform: translateY(0); }
.animate-slide-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .7s ease, transform .7s ease;
}
.delay-1 { transition-delay: .1s; }
.delay-2 { transition-delay: .25s; }
.delay-3 { transition-delay: .4s; }
.delay-4 { transition-delay: .55s; }

/* ── Stats Bar ── */
.hero-stats-bar {
    background: var(--topbar-bg);
    padding: 0;
}
.hero-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    gap: 2px;
    border-right: 1px solid rgba(255,255,255,0.07);
    color: #fff;
    transition: background .25s;
}
.hero-stat-item:last-child { border-right: none; }
.hero-stat-item:hover { background: rgba(255,255,255,0.06); }
.hero-stat-item .stat-ico {
    font-size: 1.4rem;
    color: var(--accent-light, #ffa726);
    margin-bottom: 2px;
}
.hero-stat-item .stat-num {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.1;
}
.hero-stat-item .stat-lbl {
    font-size: .75rem;
    color: rgba(255,255,255,.65);
    text-align: center;
}

.hero-section {
    position: relative;
    background: var(--gradient-hero);
    padding: 80px 0 60px;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="rgba(255,255,255,0.03)" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,208C1248,224,1344,192,1392,176L1440,160L1440,320L0,320Z"></path></svg>') no-repeat bottom;
    background-size: cover;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* ===== Section Styles ===== */
.section {
    padding: 60px 0;
}

.section-light {
    background: var(--bg-light);
}

.section-white {
    background: #fff;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-green);
    border-radius: 4px;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: 10px;
}

/* ===== Quick Access / Service Cards ===== */
.quick-access {
    margin-top: -50px;
    padding-bottom: 30px;
    position: relative;
    z-index: 10;
}

.quick-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 22px 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.4s ease;
    border: none;
    height: 100%;
}

.quick-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.quick-card .icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.4rem;
    transition: all 0.3s ease;
}

.quick-card:hover .icon-wrapper {
    transform: scale(1.1);
}

.icon-blue { background: rgba(45,106,79,0.1); color: var(--primary); }
.icon-green { background: rgba(46,125,50,0.1); color: var(--secondary); }
.icon-orange { background: rgba(245,124,0,0.1); color: var(--accent); }
.icon-purple { background: rgba(123,31,162,0.1); color: #7b1fa2; }
.icon-red { background: rgba(198,40,40,0.1); color: #c62828; }
.icon-teal { background: rgba(0,137,123,0.1); color: #00897b; }

.quick-card h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 6px;
}

.quick-card p {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.4;
}

/* ===== News Cards ===== */
.news-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
}

.news-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.news-card .card-img-wrapper {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--gradient-primary);
}

.news-card .card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-card:hover .card-img-wrapper img {
    transform: scale(1.05);
}

.news-card .card-img-wrapper .card-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: #fff;
    padding: 4px 12px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.news-card .card-img-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.3);
}

.news-card .card-body {
    padding: 20px;
}

.news-card .card-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.news-card .card-date i {
    color: var(--accent);
}

.news-card .card-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-text {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card .card-footer {
    background: transparent;
    border-top: 1px solid var(--border-color);
    padding: 12px 20px;
}

.news-card .read-more {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary-light);
}

.news-card .read-more:hover {
    color: var(--primary);
}

/* ===== Featured News ===== */
.featured-news {
    background: #fff;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.featured-news .featured-img {
    height: 350px;
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.featured-news .featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-news .featured-content {
    padding: 30px;
}

/* ===== Service Section ===== */
.service-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    height: 100%;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.service-card .service-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.6rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.service-card h5 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 0;
    line-height: 1.5;
}

/* ===== Knowledge Section ===== */
.knowledge-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    border: 1px solid rgba(0,0,0,0.05);
}

.knowledge-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(5px);
}

.knowledge-card .knowledge-img {
    width: 120px;
    min-height: 120px;
    background: var(--gradient-green);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 2rem;
}

.knowledge-card .knowledge-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.knowledge-card .knowledge-body {
    padding: 15px 20px;
    flex: 1;
}

.knowledge-card .knowledge-body h6 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
    line-height: 1.4;
}

.knowledge-card .knowledge-body p {
    font-size: 0.85rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}

/* ===== Stats Section ===== */
.stats-section {
    background: var(--gradient-primary);
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 80"><circle cx="40" cy="40" r="1" fill="rgba(255,255,255,0.1)"/></svg>') repeat;
    background-size: 40px 40px;
}

.stat-item {
    text-align: center;
    position: relative;
    z-index: 2;
}

.stat-icon {
    font-size: 2.5rem;
    color: var(--accent-light);
    margin-bottom: 10px;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    line-height: 1;
}

.stat-label {
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
    margin-top: 5px;
}

/* ===== Page Header ===== */
.page-header {
    background: var(--gradient-hero);
    padding: 50px 0 40px;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 60px;
    background: var(--bg-light);
    clip-path: polygon(0 100%, 100% 100%, 100% 0, 0 100%);
}

.page-header h1 {
    font-size: 2rem;
    color: #fff;
    margin-bottom: 10px;
}

.page-header .breadcrumb {
    margin-bottom: 0;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.page-header .breadcrumb-item.active {
    color: var(--accent-light);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/* ===== Content Card ===== */
.content-card {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 30px;
    margin-bottom: 30px;
}

/* ===== Contact Form ===== */
.contact-form .form-control,
.contact-form .form-select {
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
}

.contact-form .form-control:focus,
.contact-form .form-select:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 0.2rem rgba(45,106,79,0.15);
}

.contact-info-card {
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    color: #fff;
    padding: 30px;
    height: 100%;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-info-item .icon-box {
    width: 45px;
    height: 45px;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.contact-info-item h6 {
    font-weight: 600;
    margin-bottom: 3px;
}

.contact-info-item p {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-bottom: 0;
}

/* ===== Sidebar ===== */
.sidebar-widget {
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 25px;
    margin-bottom: 25px;
}

.sidebar-widget h5 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
    position: relative;
}

.sidebar-widget h5::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--accent);
}

.sidebar-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-list li {
    border-bottom: 1px solid var(--bg-light);
}

.sidebar-list li:last-child {
    border-bottom: none;
}

.sidebar-list li a {
    display: flex;
    align-items: center;
    padding: 10px 0;
    color: var(--text-dark);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.sidebar-list li a:hover {
    color: var(--primary-light);
    padding-left: 5px;
}

.sidebar-list li a i {
    margin-right: 8px;
    color: var(--text-muted);
}

/* ===== About Section ===== */
.about-card {
    background: #fff;
    border-radius: var(--radius-md);
    padding: 30px;
    box-shadow: var(--shadow-sm);
    height: 100%;
    border-left: 4px solid var(--primary);
}

.about-card .about-icon {
    width: 60px;
    height: 60px;
    background: var(--bg-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

/* ===== Personnel ===== */
.personnel-card {
    background: #fff;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: all 0.3s ease;
}

.personnel-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.personnel-card .personnel-img {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 25px auto 15px;
    overflow: hidden;
    border: 4px solid var(--bg-light);
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.5);
    font-size: 3rem;
}

.personnel-card .personnel-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.personnel-card .card-body {
    padding: 0 20px 20px;
}

.personnel-card h6 {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 5px;
}

.personnel-card .position {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* ===== Buttons ===== */
.btn-primary {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-success {
    background: var(--secondary);
    border-color: var(--secondary);
}

.btn-success:hover {
    background: var(--secondary-light);
    border-color: var(--secondary-light);
}

.btn-outline-primary {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    border-color: var(--primary);
}

.btn-rounded {
    border-radius: 50px;
    padding: 10px 25px;
}

/* ===== Footer ===== */
.site-footer {
    background: var(--footer-bg);
    color: #fff;
}

.footer-top {
    padding: 60px 0 40px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent);
    border-radius: 3px;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links li a {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.footer-links li a:hover {
    color: #fff;
    padding-left: 5px;
}

.footer-links li a::before {
    content: '\f285';
    font-family: 'bootstrap-icons';
    margin-right: 8px;
    font-size: 0.7rem;
}

.footer-contact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 12px;
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
}

.footer-contact li i {
    margin-right: 10px;
    margin-top: 4px;
    color: var(--accent-light);
    flex-shrink: 0;
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    color: #fff;
    margin-right: 8px;
    transition: all 0.3s;
    font-size: 1rem;
}

.social-link:hover {
    background: var(--accent);
    color: #fff;
    transform: translateY(-3px);
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
}

/* ===== Back to Top ===== */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    box-shadow: var(--shadow-md);
    font-size: 1.2rem;
    padding: 0;
}

.btn-back-to-top.show {
    display: flex;
}

/* ===== Detail Page ===== */
.article-content {
    font-size: 1rem;
    line-height: 1.9;
}

.article-content img {
    border-radius: var(--radius-sm);
    margin: 15px 0;
}

.article-content h3, .article-content h4 {
    color: var(--primary);
    margin-top: 25px;
    margin-bottom: 12px;
}

.article-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.article-meta span i {
    color: var(--accent);
    margin-right: 5px;
}

/* ===== Alert ===== */
.alert-flash {
    border-radius: var(--radius-sm);
    border: none;
}

/* ===== Responsive ===== */
@media (max-width: 991.98px) {
    /* Hero carousel responsive */
    .hero-slider-section .carousel-item {
        min-height: 360px;
        height: 56vh;
        max-height: 460px;
    }
    .hero-image-stage {
        padding: 10px 12px 14px;
    }
    .hero-slide-backdrop {
        inset: 22px 18px 24px;
    }
    .hero-title {
        font-size: 2rem;
    }
    .hero-subtitle {
        font-size: 1.15rem;
    }
    .hero-indicators { bottom: 55px !important; }
    .hero-stat-item { padding: 14px 8px; }

    .hero-section {
        padding: 50px 0 40px;
        min-height: auto;
    }
    .hero-stats {
        margin-top: 1.5rem;
        gap: 1.5rem;
    }
    .hero-image-wrapper {
        margin-top: 2rem;
    }
    .quick-access {
        margin-top: 0;
    }
    .section {
        padding: 50px 0;
    }
    .knowledge-card {
        flex-direction: column;
    }
    .knowledge-card .knowledge-img {
        width: 100%;
        min-height: 150px;
    }
}

@media (max-width: 767.98px) {
    .hero-slider-section .carousel-item {
        min-height: 290px;
        height: 43vh;
        max-height: 360px;
    }
    .hero-image-stage {
        padding: 8px 8px 10px;
    }
    .hero-slide-backdrop {
        inset: 16px 10px 16px;
        border-radius: 12px;
    }
    .hero-title {
        font-size: 1.55rem;
    }
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1rem;
    }
    .hero-cta-row .btn { padding: 9px 18px; font-size: .88rem; }
    .hero-control-icon { width: 38px; height: 38px; font-size: 1rem; }
    .hero-indicators { bottom: 42px !important; }
    .hero-badge { font-size: .78rem; padding: 5px 14px; }
    .hero-stat-item .stat-num { font-size: 1.2rem; }
    .hero-stat-item .stat-ico { font-size: 1.1rem; }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1rem;
    }
    .hero-stat {
        flex: 0 0 calc(50% - 0.5rem);
    }
    .stat-number {
        font-size: 1.8rem;
    }
    .section-title h2 {
        font-size: 1.5rem;
    }
    .page-header h1 {
        font-size: 1.5rem;
    }
}

/* ===== Loading Animation ===== */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== Custom Scrollbar ===== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: var(--primary-light); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* Minimal overlay for image slides — only a thin gradient at bottom for indicator dots */
.hero-slide-overlay-minimal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 72px;
    background: linear-gradient(to top, rgba(0,0,0,.28) 0%, transparent 100%);
    z-index: 1;
    pointer-events: none;
}

/* Gallery homepage section background */
.gallery-home-section {
    background: var(--gray-50, #f8f9fa);
    padding: 70px 0;
}

/* ===== Album Grid (Homepage Gallery) ===== */
.album-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.album-card {
    display: block;
    text-decoration: none;
    color: inherit;
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,.08);
    transition: transform .3s ease, box-shadow .3s ease;
    cursor: pointer;
}
.album-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,.15);
    color: inherit;
    text-decoration: none;
}
.album-cover-wrap {
    position: relative;
    aspect-ratio: 4/3;
    overflow: hidden;
    background: #e9ecef;
}
.album-cover-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .45s ease;
}
.album-card:hover .album-cover-wrap img {
    transform: scale(1.08);
}
.album-no-cover {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-primary);
    color: rgba(255,255,255,.4);
    font-size: 2.5rem;
}
.album-hover-overlay {
    position: absolute;
    inset: 0;
    background: var(--album-overlay);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #fff;
    opacity: 0;
    transition: opacity .3s ease;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: .02em;
}
.album-hover-overlay i {
    font-size: 2rem;
}
.album-card:hover .album-hover-overlay {
    opacity: 1;
}
.album-count-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: .72rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    line-height: 1.4;
    z-index: 2;
}
.album-footer {
    padding: 12px 14px 13px;
    display: flex;
    align-items: center;
    gap: 4px;
    border-top: 1px solid rgba(0,0,0,.06);
}
.album-name {
    font-size: .88rem;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}
/* Placeholder card (no real image) */
.album-card-placeholder { cursor: default; pointer-events: none; }
.album-card-placeholder:hover { transform: none; box-shadow: 0 2px 12px rgba(0,0,0,.08); }
.album-placeholder-icon {
    font-size: 2.8rem;
    color: rgba(255,255,255,.6);
}

@media (max-width: 1199px) {
    .album-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
}
@media (max-width: 991px) {
    .album-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (max-width: 575px) {
    .album-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .album-footer { padding: 10px 12px; }
    .album-name { font-size: .82rem; }
}

/* ===== Gallery Page Header ===== */
.gallery-page-header {
    position: relative;
    overflow: hidden;
}
.gallery-header-bg {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="30" cy="30" r="2" fill="rgba(255,255,255,.08)"/><circle cx="100" cy="80" r="3" fill="rgba(255,255,255,.05)"/><circle cx="170" cy="40" r="1.5" fill="rgba(255,255,255,.07)"/><circle cx="60" cy="140" r="2.5" fill="rgba(255,255,255,.06)"/><circle cx="150" cy="160" r="2" fill="rgba(255,255,255,.08)"/></svg>') repeat;
    background-size: 200px 200px;
    animation: galHeaderFloat 20s linear infinite;
}
@keyframes galHeaderFloat {
    0% { background-position: 0 0; }
    100% { background-position: 200px 200px; }
}
.gallery-header-content {
    display: flex;
    align-items: center;
    gap: 18px;
}
.gallery-header-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: #fff;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,.2);
}
.gallery-header-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 2px;
    line-height: 1.3;
}
.gallery-header-desc {
    font-size: .95rem;
    color: rgba(255,255,255,.8);
}

/* Gallery Album Pill Filter */
.gallery-album-bar {
    background: #fff;
    border-radius: 14px;
    padding: 14px 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    overflow-x: auto;
}
.gallery-filter-label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: .9rem;
    white-space: nowrap;
}
.gallery-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: .85rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    text-decoration: none;
    white-space: nowrap;
    transition: all .2s ease;
}
.gallery-pill:hover {
    color: var(--primary);
    border-color: var(--primary);
    background: #fff;
}
.gallery-pill.active {
    color: #fff;
    background: var(--primary);
    border-color: var(--primary);
}
.gallery-pill-count {
    font-size: .75rem;
    background: rgba(0,0,0,.08);
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.4;
}
.gallery-pill.active .gallery-pill-count {
    background: rgba(255,255,255,.25);
}

/* ===== Gallery Grid ===== */
.gallery-grid {
    columns: 4;
    column-gap: 12px;
}
.gallery-grid-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
}
.gallery-grid-item a.gallery-link {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}
.gallery-grid-item img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease;
    border-radius: 10px;
    object-fit: cover;
}
.gallery-grid-item:hover img {
    transform: scale(1.06);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.72) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding: 16px 12px 14px;
    color: #fff;
    font-size: .85rem;
    text-align: center;
    border-radius: 10px;
}
.gallery-overlay i {
    font-size: 1.8rem;
    margin-bottom: 6px;
}
.gallery-grid-item:hover .gallery-overlay {
    opacity: 1;
}

/* Lightbox */
.gal-lb-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.92);
    z-index: 2000;
    display: flex !important;
    align-items: center;
    justify-content: center;
}
.gal-lb-backdrop.d-none {
    display: none !important;
}
.gal-lb-inner {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gal-lb-img {
    max-width: 90vw;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0,0,0,.6);
    display: block;
}
.gal-lb-caption {
    color: #eee;
    margin-top: 10px;
    font-size: .95rem;
    text-align: center;
}
.gal-lb-counter {
    color: rgba(255,255,255,.5);
    font-size: .8rem;
    margin-top: 4px;
}
.gal-lb-close {
    position: fixed;
    top: 16px;
    right: 16px;
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.gal-lb-close:hover { background: rgba(255,255,255,.3); }
.gal-lb-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,.15);
    border: none;
    color: #fff;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 2001;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .2s;
}
.gal-lb-nav:hover { background: rgba(255,255,255,.3); }
.gal-lb-prev { left: 16px; }
.gal-lb-next { right: 16px; }

/* Gallery homepage preview strip */
.gallery-preview-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.gallery-preview-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    position: relative;
    cursor: pointer;
}
.gallery-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s ease;
}
.gallery-preview-item:hover img {
    transform: scale(1.08);
}
.gallery-preview-item .gallery-overlay {
    border-radius: 10px;
}
.gallery-preview-item:hover .gallery-overlay {
    opacity: 1;
}

@media (max-width: 1199px) {
    .gallery-grid { columns: 3; }
}
@media (max-width: 768px) {
    .gallery-grid { columns: 2; }
    .gallery-header-icon { width: 48px; height: 48px; font-size: 1.3rem; border-radius: 12px; }
    .gallery-header-title { font-size: 1.3rem; }
}
@media (max-width: 480px) {
    .gallery-grid { columns: 1; }
    .gallery-header-content { gap: 12px; }
    .gallery-album-bar { padding: 10px 14px; }
    .gallery-pill { padding: 5px 10px; font-size: .8rem; }
}

/* ===== No Image Placeholder ===== */
.no-image {
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.3);
    font-size: 3rem;
}
