/* ========================================
   WANGCHAO HOSPITAL - MODERN MEDICAL THEME
   ======================================== */

:root {
    /* Medical Color Palette */
    --primary-blue: #0066CC;
    --primary-blue-dark: #004C99;
    --primary-blue-light: #3385D6;
    --accent-teal: #00A896;
    --accent-green: #05C46B;
    --soft-blue: #E8F4F8;
    --soft-green: #E8F8F5;

    /* Neutral Colors */
    --white: #FFFFFF;
    --gray-50: #F8F9FA;
    --gray-100: #F1F3F5;
    --gray-200: #E9ECEF;
    --gray-300: #DEE2E6;
    --gray-400: #CED4DA;
    --gray-500: #ADB5BD;
    --gray-600: #6C757D;
    --gray-700: #495057;
    --gray-800: #343A40;
    --gray-900: #212529;

    /* Semantic Colors */
    --success: #05C46B;
    --info: #0ABDE3;
    --warning: #FFC312;
    --danger: #EE5A6F;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    overflow-x: hidden;
}

a {
    transition: var(--transition-base);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--white);
}

.topbar {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-dark) 100%);
    font-size: 0.875rem;
}

.top-link:hover {
    opacity: 0.8;
}

.navbar {
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.logo-circle {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-size: 1.1rem;
    color: var(--gray-900) !important;
    font-weight: 600;
}

.nav-link {
    color: var(--gray-700) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-blue) !important;
    background-color: var(--soft-blue);
}

/* ========================================
   HERO SECTION
   ======================================== */

.hero-section {
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    z-index: 1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 4rem 0;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.6;
    opacity: 0.95;
}

.btn-hero-primary {
    background: var(--white);
    color: var(--primary-blue);
    border: none;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
}

.btn-hero-primary:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-outline-light {
    border: 2px solid var(--white);
    color: var(--white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    transition: var(--transition-base);
}

.btn-outline-light:hover {
    background: var(--white);
    color: var(--primary-blue);
    transform: translateY(-2px);
}

.glass-card {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: var(--shadow-lg);
}

.hero-stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.hero-stat-label {
    font-size: 0.875rem;
    opacity: 0.9;
}

/* ========================================
   SECTIONS
   ======================================== */

.section-light {
    background-color: var(--gray-100);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
    position: relative;
    padding-bottom: 0.5rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    border-radius: 2px;
}

/* ========================================
   CARDS
   ======================================== */

.card-soft {
    border: none;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
    background: var(--white);
}

.card-soft:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* ========================================
   NEWS CARDS
   ======================================== */

.news-card {
    border: none;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-base);
}

.news-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.news-thumb {
    position: relative;
    overflow: hidden;
    height: 200px;
    background: var(--gray-200);
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.news-card:hover .news-thumb img {
    transform: scale(1.05);
}

.news-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.news-card .card-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gray-900);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.news-card .stretched-link::after {
    z-index: 1;
}

/* ========================================
   POSTER BOX
   ======================================== */

.poster-box {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    background: var(--gray-200);
    aspect-ratio: 16/9;
}

.poster-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.poster-box:hover img {
    transform: scale(1.03);
}

/* ========================================
   TABLE
   ======================================== */

.table {
    font-size: 0.9375rem;
}

.table thead th {
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-weight: 600;
    border-bottom: 2px solid var(--gray-300);
    padding: 1rem;
}

.table tbody tr {
    transition: var(--transition-fast);
}

.table tbody tr:hover {
    background-color: var(--soft-blue);
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
}

/* ========================================
   PILL BOX
   ======================================== */

.pill-box {
    background: var(--soft-blue);
    color: var(--primary-blue);
    padding: 0.625rem 1rem;
    border-radius: var(--radius-xl);
    text-align: center;
    font-weight: 500;
    transition: var(--transition-base);
    cursor: pointer;
}

.pill-box:hover {
    background: var(--primary-blue);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ========================================
   GALLERY
   ======================================== */

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    aspect-ratio: 4/3;
    background: var(--gray-200);
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-base);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 100%);
    color: var(--white);
    padding: 1rem;
    transform: translateY(100%);
    transition: var(--transition-base);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

/* ========================================
   ICON LINK CARDS (BANNERS)
   ======================================== */

.icon-link-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 1rem;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--gray-700);
    font-weight: 500;
    transition: var(--transition-base);
    min-width: 140px;
}

.icon-link-card:hover {
    color: var(--primary-blue);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.icon-circle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--accent-teal) 100%);
    border-radius: 50%;
    box-shadow: var(--shadow-md);
    transition: var(--transition-base);
    overflow: hidden;
}

/* Zoom animation for banners */
.icon-link-card:hover .icon-circle {
    transform: scale(1.1);
}

.icon-circle img {
    transition: var(--transition-base);
}

.icon-link-card:hover .icon-circle img {
    transform: scale(1.05);
}

/* ========================================
   FOOTER
   ======================================== */

.site-footer {
    background: var(--gray-900);
    color: var(--gray-300);
}

.site-footer h5 {
    color: var(--white);
    font-weight: 600;
}

.site-footer a {
    color: var(--gray-400);
    transition: var(--transition-base);
}

.site-footer a:hover {
    color: var(--primary-blue-light);
}

.map-box {
    background: var(--gray-800);
    border-radius: var(--radius-md);
    overflow: hidden;
    height: 200px;
}

.map-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 2rem;
    text-align: center;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-content {
        padding: 3rem 0;
    }

    .news-thumb {
        height: 180px;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.text-primary {
    color: var(--primary-blue) !important;
}

.bg-primary {
    background-color: var(--primary-blue) !important;
}

.btn-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-primary:hover {
    background-color: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
}

.btn-outline-primary {
    color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.btn-outline-primary:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    color: var(--white);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}