/* ==========================================================================
   GLOBAL VARIABLES & BASE STYLES
   Project: RSU Universitas Tadulako (RS UNTAD)
   File: Base / Global Stylesheet
   Developer: TIM IT UPA TIK Untad (Divisi Website & Desain)
   ========================================================================== */

/* 1. CSS Variables & Theme Color Palette */
:root {
    --rs-navy: #093c71;
    --rs-navy-dark: #052649;
    --rs-teal: #00a896;
    --rs-teal-hover: #028090;
    --rs-teal-light: #e6f7f5;
    --rs-red: #e63946;
    --rs-red-light: #fdeaea;
    --rs-bg-light: #f8fafc;
    --rs-text-dark: #1e293b;
    --rs-text-muted: #64748b;
    --rs-border: #e2e8f0;
    --rs-radius: 16px;
    --rs-shadow: 0 10px 30px rgba(9, 60, 113, 0.08);
    --rs-shadow-hover: 0 15px 35px rgba(0, 168, 150, 0.15);
}

/* 2. Core Base Reset & Smooth Scroll */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--rs-text-dark);
    background-color: var(--rs-bg-light);
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* 3. Global Container Layout */
.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   4. LAYOUT FIX: GAP RESET (HEADER TO HERO)
   ========================================================================== */

header,
.site-header,
.main-header,
#masthead {
    margin-bottom: 0 !important;
}

main,
.site-main,
#primary,
.hero-section,
.hero {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.hero-section > *:first-child,
.hero > *:first-child,
.hero-section p:first-child {
    margin-top: 0;
}

/* ==========================================================================
   5. HEADER BRANDING & EQUAL LOGOS (PEMOLESAN LOGO SAMAKAN BESAR)
   ========================================================================== */

/* Kelas Utama Penyelaras Tinggi Logo */
.equal-brand-logo {
    height: clamp(52px, 4.2vw, 72px) !important;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.25s ease;
}

.equal-brand-logo:hover {
    transform: scale(1.04);
}

/* Garis Pemisah (Divider) Antar Logo */
.logo-divider {
    width: 2px;
    height: clamp(38px, 3.2vw, 52px);
    background: linear-gradient(180deg, rgba(9, 60, 113, 0.1) 0%, rgba(9, 60, 113, 0.3) 50%, rgba(9, 60, 113, 0.1) 100%);
    border-radius: 2px;
}

/* Penyesuaian Teks Branding */
.brand-institution {
    font-size: clamp(0.68rem, 0.85vw, 0.82rem);
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.brand-title {
    font-size: clamp(1.05rem, 1.55vw, 1.6rem);
    line-height: 1.15;
    color: var(--rs-navy);
}

.brand-tagline {
    font-size: clamp(0.7rem, 0.8vw, 0.8rem);
}

/* ==========================================================================
   6. PEMOLESAN VISUAL SEKSI KESEHATAN (HUMANIS & MODERN)
   ========================================================================== */

/* Card Section Berkelir Modern & Responsif */
.card, 
.cpt-card,
.medical-card {
    background-color: #ffffff;
    border: 1px solid var(--rs-border) !important;
    border-radius: var(--rs-radius) !important;
    box-shadow: var(--rs-shadow);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover, 
.cpt-card:hover,
.medical-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--rs-shadow-hover);
    border-color: rgba(0, 168, 150, 0.3) !important;
}

/* Akses Gambar & Placeholder Medis agar tidak pecah */
.card-img-top,
.cpt-card img {
    object-fit: cover;
    width: 100%;
    height: 200px;
    transition: transform 0.5s ease;
}

.card:hover .card-img-top,
.cpt-card:hover img {
    transform: scale(1.03);
}

/* ==========================================================================
   7. GLOSSY & GLASSMORPHISM FOOTER COMPONENT
   ========================================================================== */

.glossy-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.02) 100%);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--rs-radius);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    transition: all 0.3s ease-in-out;
}

.glossy-card:hover {
    border-color: rgba(0, 168, 150, 0.4);
    box-shadow: 0 10px 40px 0 rgba(0, 168, 150, 0.18);
    transform: translateY(-3px);
}

.glossy-title {
    font-weight: 700;
    font-size: 1rem;
    border-bottom: 2px solid rgba(0, 168, 150, 0.5);
    padding-bottom: 8px;
    display: inline-block;
}

/* Warna Aksen Medis Glossy */
.text-teal { color: var(--rs-teal) !important; }
.text-teal-light { color: #80dfd5 !important; }
.bg-teal { background-color: var(--rs-teal) !important; color: #ffffff !important; }
.bg-blue { background-color: #0d6efd !important; color: #ffffff !important; }

.border-top-teal { border-top: 3px solid var(--rs-teal) !important; }
.border-top-danger { border-top: 3px solid var(--rs-red) !important; }
.border-top-warning { border-top: 3px solid #ffc107 !important; }
.border-top-info { border-top: 3px solid #0dcaf0 !important; }

/* Box IP Status Pengunjung */
.glossy-ip-box {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.glossy-badge, 
.glossy-stat {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.4), 0 2px 5px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Link Hover Animation */
.glossy-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s ease;
}

.glossy-links a:hover {
    color: var(--rs-teal) !important;
    padding-left: 5px;
}

/* Perbaikan Map Container Footer (Mengisi Area Kosong) */
.map-container {
    position: relative;
    width: 100%;
}

.map-container iframe {
    border-radius: 8px;
    filter: grayscale(15%) contrast(105%);
    transition: filter 0.3s ease;
}

.map-container:hover iframe {
    filter: grayscale(0%);
}

/* Floating Emergency Action (HP/Mobile) */
.rs-floating-emergency {
    position: fixed;
    bottom: 15px;
    left: 15px;
    right: 15px;
    z-index: 9999;
    display: flex;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.rs-floating-emergency a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    text-decoration: none;
    color: #ffffff;
}

.btn-emergency-float { background: var(--rs-red); }
.btn-wa-float { background: #198754; }

/* Jarak Jeda Antara Header Menu dan Area Utama */
.main-content-padding {
    padding-top: 2.5rem !important;
}

/* Kustomisasi Breadcrumb */
.rs-breadcrumbs-wrapper {
    margin-bottom: 1.5rem;
    color: #64748b;
}

.rs-breadcrumbs-wrapper a {
    color: #00a896;
    text-decoration: none;
    font-weight: 500;
}

.rs-breadcrumbs-wrapper a:hover {
    text-decoration: underline;
}