/* -------------------------------------------------------------
 * MODIGIZ Web Guide Book Stylesheet
 * Elegant glassmorphism, responsive design, dark/light theme
 * ------------------------------------------------------------- */

/* Variables and Themes */
:root {
    --font-heading: 'Outfit', 'Plus Jakarta Sans', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;

    /* Transition speeds */
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* Dark Mode Colors (Default) */
.dark-theme {
    --bg-primary: #0a0d1a; /* Custom brand deep navy */
    --bg-secondary: #13172b;
    --bg-glass: rgba(19, 23, 43, 0.7);
    --bg-glass-hover: rgba(32, 38, 67, 0.85);
    
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-active: rgba(11, 190, 187, 0.35); /* Brand teal active border */

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --color-emerald-500: #0bbebb; /* Brand Teal */
    --color-emerald-400: #2aece9; /* Brand Teal Light */
    --color-emerald-600: #099492; /* Brand Teal Dark */
    
    --color-cyan-500: #0061ff; /* Brand Blue */
    --color-cyan-600: #004ecc; /* Brand Blue Dark */
    
    --color-accent-gradient: linear-gradient(135deg, #0bbebb 0%, #0061ff 100%);
    
    --shadow-premium: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(11, 190, 187, 0.2);
    --shadow-glow-cyan: 0 0 30px rgba(0, 97, 255, 0.25);
    
    --card-step-bg: rgba(25, 30, 56, 0.45);
    --card-step-active-bg: rgba(11, 190, 187, 0.07);
}

/* Light Mode Colors */
.light-theme {
    --bg-primary: #f3f7fa; /* Soft brand background tint */
    --bg-secondary: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.8);
    --bg-glass-hover: rgba(234, 242, 248, 0.95);
    
    --border-glass: rgba(0, 97, 255, 0.07);
    --border-glass-active: rgba(11, 190, 187, 0.5);

    --text-primary: #0f1423;
    --text-secondary: #4a5570;
    --text-muted: #8e9bb3;

    --color-emerald-500: #0bbebb;
    --color-emerald-400: #099492;
    --color-emerald-600: #056967;
    
    --color-cyan-500: #0061ff;
    --color-cyan-600: #004ecc;
    
    --color-accent-gradient: linear-gradient(135deg, #0bbebb 0%, #0061ff 100%);
    
    --shadow-premium: 0 20px 40px -15px rgba(10, 13, 26, 0.07);
    --shadow-glow: 0 10px 25px rgba(11, 190, 187, 0.15);
    --shadow-glow-cyan: 0 10px 25px rgba(0, 97, 255, 0.15);
    
    --card-step-bg: rgba(235, 241, 246, 0.7);
    --card-step-active-bg: rgba(11, 190, 187, 0.06);
}

/* Core Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.5s ease, color 0.5s ease;
    padding-top: 4.5rem; /* Offset for fixed header height */
}

/* Background Blobs */
.blob-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.04;
    mix-blend-mode: screen;
    animation: floatBlob 25s infinite alternate ease-in-out;
}

.light-theme .blob {
    mix-blend-mode: multiply;
    opacity: 0.01;
}

.blob-1 {
    top: -10%;
    left: 10%;
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, var(--color-emerald-500) 0%, transparent 70%);
}

.blob-2 {
    bottom: 10%;
    right: 5%;
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, var(--color-cyan-500) 0%, transparent 70%);
    animation-delay: -5s;
}

.blob-3 {
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #8b5cf6 0%, transparent 70%);
    animation-delay: -10s;
}

@keyframes floatBlob {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(60px, 40px) scale(1.1); }
    100% { transform: translate(-40px, -60px) scale(0.9); }
}

/* Header styling */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    transition: var(--transition-smooth);
}

.nav-container {
    max-width: 1440px;
    margin: 0 auto;
    padding: 0.85rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    position: relative;
    height: 40px;
    width: 150px;
}

.logo-img {
    height: 150px;
    width: auto;
    object-fit: contain;
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    filter: drop-shadow(0 2px 10px rgba(11, 190, 187, 0.3));
    transition: transform 0.2s ease;
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.45rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--color-emerald-500);
}

/* Search Bar */
.search-bar-container {
    flex: 0 1 450px;
    position: relative;
    margin: 0 1.5rem;
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-secondary);
    pointer-events: none;
}

#guideSearch {
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.65rem;
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid var(--border-glass);
    border-radius: 50px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.light-theme #guideSearch {
    background: rgba(255, 255, 255, 0.7);
}

#guideSearch:focus {
    outline: none;
    border-color: var(--color-emerald-500);
    box-shadow: var(--shadow-glow);
    background: var(--bg-secondary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.65rem 1.25rem;
    border-radius: 12px;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--color-accent-gradient);
    color: #ffffff;
    box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(11, 190, 187, 0.35);
}

.btn-secondary {
    background: var(--bg-glass);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: var(--bg-glass-hover);
    border-color: var(--text-muted);
}

/* Custom Richly-Colored Hero Buttons */
.btn-hero-start {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%); /* Premium Royal Blue */
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(2, 132, 199, 0.4);
}

.btn-hero-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(2, 132, 199, 0.55);
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.btn-hero-pdf {
    background: linear-gradient(135deg, #e11d48 0%, #be123c 100%); /* Acrobat Ruby Red */
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(225, 29, 72, 0.4);
}

.btn-hero-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(225, 29, 72, 0.55);
    background: linear-gradient(135deg, #f43f5e 0%, #e11d48 100%);
}

.btn-hero-apk {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%); /* Android Emerald Green */
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-hero-apk:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.55);
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.theme-toggle:hover {
    background: var(--bg-glass-hover);
    transform: scale(1.05);
}

.sun-icon {
    display: none;
}

.moon-icon {
    display: block;
    width: 20px;
    height: 20px;
}

.light-theme .sun-icon {
    display: block;
    width: 20px;
    height: 20px;
}

.light-theme .moon-icon {
    display: none;
}

/* Hero Section */
.hero-section {
    max-width: 1440px;
    margin: 0 auto;
    padding: 3rem 2rem;
    position: relative;
    min-height: calc(100vh - 4.5rem); /* Fill full viewport below the fixed header */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 4rem;
    align-items: center;
    width: 100%;
    max-width: 1200px;
}

.hero-content {
    text-align: left;
    width: 100%;
}

.badge-accent {
    display: inline-block;
    padding: 0.35rem 1rem;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--color-emerald-400);
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.hero-content h1 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.hero-content h1 span {
    background: var(--color-accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 0 2.25rem 0;
}

.hero-actions {
    display: flex;
    justify-content: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Video Mockup Area */
.hero-video-area {
    width: 100%;
}

.video-mockup {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px rgba(11, 190, 187, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.video-mockup:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 40px rgba(11, 190, 187, 0.25);
}

.mockup-header {
    background: rgba(15, 23, 42, 0.6);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    border-bottom: 1px solid var(--border-glass);
}

.light-theme .mockup-header {
    background: rgba(255, 255, 255, 0.8);
}

.mockup-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.mockup-dot.red { background: #ff5f56; }
.mockup-dot.yellow { background: #ffbd2e; }
.mockup-dot.green { background: #27c93f; }

.mockup-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-left: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-video {
    width: 100%;
    display: block;
    border-radius: 0 0 16px 16px;
    background: #000;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

/* Pemilih Tab Panduan */
.guide-tab-wrapper {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
}

.guide-tabs {
    display: flex;
    position: relative;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    padding: 0.35rem;
    border-radius: 50px;
    box-shadow: var(--shadow-premium), 0 4px 15px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.tab-btn {
    background: transparent;
    border: none;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.2s ease, background 0.3s ease;
    z-index: 2;
    position: relative;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: #ffffff !important;
    background: var(--color-accent-gradient);
    box-shadow: 0 4px 12px rgba(11, 190, 187, 0.3);
}

.light-theme .tab-btn.active {
    color: #ffffff !important;
}

/* Tampilan Elemen Berdasarkan Tab Aktif */
body.active-tab-pasien .active-tab-pasien-only {
    display: inline-block !important;
}
body.active-tab-pasien p.active-tab-pasien-only,
body.active-tab-pasien div.active-tab-pasien-only {
    display: block !important;
}
body.active-tab-pasien .active-tab-ahligizi-only {
    display: none !important;
}

body.active-tab-ahligizi .active-tab-ahligizi-only {
    display: inline-block !important;
}
body.active-tab-ahligizi p.active-tab-ahligizi-only,
body.active-tab-ahligizi div.active-tab-ahligizi-only {
    display: block !important;
}
body.active-tab-ahligizi .active-tab-pasien-only {
    display: none !important;
}

/* Main Grid Layout */
.main-layout {
    max-width: 1440px;
    margin: 0 auto;
    padding: 2rem 2rem 5rem 2rem;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2.5rem;
    align-items: start;
}

/* Ensure guide sections have enough scroll-margin so header doesn't cover them */
.guide-section {
    scroll-margin-top: 4.75rem; /* Match body padding-top = fixed header height */
}

/* Sidebar Styling */
.sidebar {
    position: sticky;
    top: 5.2rem; /* Raised to match right sidebar alignment */
    height: calc(100vh - 6.5rem); /* Expanded vertical scroll space */
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}

.sidebar-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    letter-spacing: -0.2px;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin-bottom: 0.45rem;
}

.nav-group-title {
    font-family: var(--font-heading);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin: 1.25rem 0 0.5rem 0.75rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition-fast);
    border: 1px solid transparent;
}

.nav-item:hover {
    background: var(--bg-glass-hover);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--bg-glass);
    color: var(--color-emerald-400);
    border-color: var(--border-glass-active);
    font-weight: 600;
    box-shadow: var(--shadow-glow);
}

.light-theme .nav-item.active {
    color: var(--color-emerald-600);
}

.nav-num, .nav-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.nav-item.active .nav-num {
    background: var(--color-emerald-500);
    color: #ffffff;
}

.nav-item.active .nav-icon {
    background: rgba(16, 185, 129, 0.15);
}

/* Right Content & Live Phone Showcase Grid */
.content-showcase-container {
    display: grid;
    grid-template-columns: 1.25fr 1fr; /* 55% to 45% balanced layout */
    gap: 3rem;
    align-items: start;
}

/* Guide Content Area */
.guide-content-area {
    min-width: 0; /* Prevents flex items from overflowing */
}

.guide-section {
    display: none;
    animation: fadeInSection 0.4s ease;
}

.guide-section.active-section {
    display: block;
}

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

/* Header Card for each section */
.section-header-card {
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-premium);
}

.section-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--color-cyan-500);
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.85rem;
    text-transform: uppercase;
}

.section-header-card h2 {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.section-intro {
    font-size: 1.05rem;
    color: var(--text-secondary);
}

/* Subsections & Step Cards */
.subsection {
    margin-bottom: 2.25rem;
}

.subsection h3 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.5rem;
}

/* Info Alerts */
.info-alert {
    display: flex;
    gap: 1rem;
    padding: 1.15rem;
    border-radius: 14px;
    background: rgba(30, 41, 59, 0.4);
    border-left: 4px solid var(--color-cyan-500);
    margin-bottom: 1.25rem;
}

.light-theme .info-alert {
    background: #f1f5f9;
}

.error-alert {
    border-left-color: #ef4444;
    background: rgba(239, 68, 68, 0.05);
}

.success-alert {
    border-left-color: var(--color-emerald-500);
    background: rgba(16, 185, 129, 0.05);
}

.alert-icon {
    font-size: 1.25rem;
    line-height: 1;
}

.alert-content {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.alert-content strong {
    color: var(--text-primary);
}

/* Step cards */
.step-card {
    background: var(--card-step-bg);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 1.15rem;
    margin-bottom: 0.9rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.step-card:hover {
    border-color: var(--text-muted);
    background: var(--bg-glass-hover);
    transform: translateX(4px);
}

.step-card.active-step {
    background: var(--card-step-active-bg);
    border-color: var(--color-emerald-500);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.step-badge {
    flex-shrink: 0;
    padding: 0.25rem 0.65rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-emerald-500);
    text-transform: uppercase;
}

.step-card.active-step .step-badge {
    background: var(--color-emerald-500);
    color: #ffffff;
    border-color: var(--color-emerald-500);
}

.step-card p {
    font-size: 0.94rem;
    color: var(--text-secondary);
}

.step-card.active-step p {
    color: var(--text-primary);
}

.step-card p strong {
    color: var(--text-primary);
}

.step-print-img {
    display: none;
}

/* Footer signoff */
.content-footer {
    border-top: 1px solid var(--border-glass);
    padding-top: 2rem;
    margin-top: 4rem;
    text-align: center;
}

.content-footer h4 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.content-footer p {
    font-size: 0.94rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.footer-copyright {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Sticky Device Showcase Area */
.showcase-device-area {
    position: sticky;
    top: 5.2rem; /* Raised from 6.5rem to pull the title and controls higher */
}

.sticky-device-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.device-frame-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-secondary);
    margin-bottom: 0.85rem;
    align-self: center;
}

/* Simulated Smartphone Wrapper - Optimized for Mockup Assets & Screen Fit */
.phone-simulator {
    position: relative;
    width: min(480px, 100%, calc((100vh - 7.5rem) * 0.58)); /* Massive scale-to-fit dimensions */
    height: auto;
    max-height: calc(100vh - 7.5rem);
    overflow: visible; /* Prevents clipping the top/bottom bezel of the phone */
    pointer-events: none; /* Allows click events to pass through to buttons underneath */
    margin-top: 0.15rem; /* Extremely small clean gap as requested, just so it's there */
    transition: var(--transition-smooth);
}

/* Glass Reflection Overlay on Screen - Disabled */
.phone-simulator::after {
    display: none;
}

/* Speaker Notch - Disabled */
.phone-speaker {
    display: none;
}

/* Camera Punch Hole - Disabled */
.phone-camera {
    display: none;
}

/* Phone Screen Area */
.phone-screen {
    position: relative;
    width: 100%;
    height: auto;
    background: transparent;
    overflow: visible;
    display: flex;
    flex-direction: column;
}

/* Status Bar - Disabled */
.phone-status-bar {
    display: none;
}

.status-icons {
    display: none;
}

/* Screen Image Frame Wrapper */
.screen-content-wrapper {
    position: relative;
    width: 100%;
    height: auto;
    background: transparent;
    overflow: visible;
}

.screen-content-wrapper img {
    width: 128%; /* Increased scaling to maximize visible screen size */
    max-width: 128%;
    margin-left: -14%;
    margin-right: -14%;
    margin-top: -12.5%; /* Aggressively crops top transparent margin to pull the phone bezel up */
    margin-bottom: -12.5%;
    max-height: calc(100vh - 7.5rem);
    height: auto;
    display: block;
    object-fit: contain;
    transition: opacity 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94), transform 0.4s ease;
    filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.45));
}

.light-theme .screen-content-wrapper img {
    filter: drop-shadow(0 15px 35px rgba(10, 13, 26, 0.18));
}

/* Hover Zoom feature on Screenshot */
.phone-simulator:hover .screen-content-wrapper img {
    transform: scale(1.03);
}

.screen-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent; /* Changed to transparent to prevent large black boxes during preloading */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 6;
    border-radius: 20px;
}

.screen-loader::after {
    content: '';
    width: 25px;
    height: 25px;
    border: 3px solid rgba(16, 185, 129, 0.2);
    border-top-color: var(--color-emerald-500);
    border-radius: 50%;
    animation: spinLoader 0.7s infinite linear;
}

@keyframes spinLoader {
    to { transform: rotate(360deg); }
}

/* Indicators and Dots Inside Phone screen */
.screen-indicator-dots {
    position: relative;
    margin-top: 1rem;
    width: 100%;
    display: flex;
    justify-content: center;
    gap: 6px;
    z-index: 8;
    pointer-events: none;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transition: var(--transition-fast);
}

.light-theme .dot {
    background: rgba(10, 13, 26, 0.2);
}

.dot.active {
    width: 16px;
    border-radius: 10px;
    background: var(--color-emerald-500);
}

.phone-home-bar {
    display: none;
}

/* Physical Buttons Deco - Disabled */
.phone-btn {
    display: none;
}

.phone-btn-vol-up { top: 90px; left: -14px; height: 40px; }
.phone-btn-vol-down { top: 140px; left: -14px; height: 40px; }
.phone-btn-power { top: 110px; right: -14px; height: 55px; }

/* Simulator Controls Panel */
.simulator-controls {
    margin-top: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 0.5rem;
}

.control-btn {
    padding: 0.55rem 0.85rem;
    border-radius: 8px;
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: var(--transition-fast);
}

.control-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--text-secondary);
}

.control-btn svg {
    width: 12px;
    height: 12px;
}

.control-indicator {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
}

/* Tip card under simulator */
.contextual-tip-card {
    display: none; /* Hide to prevent layout overflow in sticky sidebar */
    width: 100%;
    margin-top: 1.25rem;
    background: rgba(6, 182, 212, 0.05);
    border: 1px dashed rgba(6, 182, 212, 0.3);
    border-radius: 12px;
    padding: 1rem;
    transition: var(--transition-smooth);
}

.contextual-tip-card h4 {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-cyan-500);
    margin-bottom: 0.35rem;
}

.contextual-tip-card p {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Floating Mascot Widget */
.mascot-widget-wrapper {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 1rem;
    z-index: 200;
}

.mascot-trigger {
    width: 54px;
    height: 54px;
    border-radius: 50%;
    border: 1px solid var(--border-glass-active);
    background: var(--bg-glass);
    backdrop-filter: blur(12px);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
}

.mascot-trigger:hover {
    transform: translateY(-2px);
    background: var(--bg-glass-hover);
    border-color: var(--color-cyan-500);
}

.mascot-glow {
    display: none;
}

.help-icon {
    width: 22px;
    height: 22px;
    stroke: var(--color-emerald-500);
    transition: var(--transition-fast);
}

.mascot-trigger:hover .help-icon {
    stroke: var(--color-cyan-500);
}

.mascot-badge-alert {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

/* Mascot Chat Bubble Panel */
.mascot-chat-bubble {
    width: 320px;
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass-active);
    border-radius: 20px;
    padding: 1.25rem;
    box-shadow: var(--shadow-premium);
    display: none;
    flex-direction: column;
    gap: 0.85rem;
    animation: popupBubble 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom right;
}

.mascot-chat-bubble.open {
    display: flex;
}

@keyframes popupBubble {
    from { opacity: 0; transform: scale(0.8) translate(10px, 10px); }
    to { opacity: 1; transform: scale(1) translate(0, 0); }
}

.mascot-bubble-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 0.45rem;
}

.mascot-bubble-header strong {
    font-family: var(--font-heading);
    font-size: 0.9rem;
    color: var(--color-emerald-400);
}

.mascot-bubble-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.25rem;
    cursor: pointer;
    line-height: 1;
}

.mascot-bubble-body p {
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.mascot-bubble-actions {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.mascot-action-btn {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 8px;
    background: var(--bg-glass-hover);
    border: 1px solid var(--border-glass);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.78rem;
    text-align: left;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mascot-action-btn:hover {
    border-color: var(--color-emerald-500);
    background: var(--card-step-active-bg);
    color: var(--color-emerald-400);
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .main-layout {
        grid-template-columns: 240px 1fr;
        gap: 1.5rem;
    }
    
    .content-showcase-container {
        grid-template-columns: 1fr 310px;
        gap: 1.5rem;
    }
    
    .phone-simulator {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 5rem 1.5rem 3rem 1.5rem;
    }
    
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        text-align: center;
    }
    
    .hero-content {
        text-align: center;
    }
    
    .hero-content p {
        margin: 0 auto 2rem auto;
    }
    
    .hero-actions {
        justify-content: center;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        position: static;
        height: auto;
        margin-bottom: 1.5rem;
    }
    
    .sidebar-sticky {
        background: var(--bg-glass);
        padding: 1.25rem;
        border-radius: 16px;
        border: 1px solid var(--border-glass);
    }
    
    .sidebar-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .nav-group-title {
        display: none;
    }
    
    .nav-item {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .content-showcase-container {
        grid-template-columns: 1fr;
    }
    
    .showcase-device-area {
        display: none !important; /* Hide interactive phone simulator sidebar on tablet/mobile */
    }
    
    /* Raise floating mascot help button so it doesn't overlap the mobile bottom control capsule */
    .mascot-widget-wrapper {
        bottom: 6.5rem !important;
        right: 1.5rem !important;
    }
    
    /* Make step-print-img visible as inline screenshot card on mobile/tablet viewports */
    .step-print-img {
        display: block !important;
        width: 140px !important;
        height: auto !important;
        flex-shrink: 0 !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        border: 1px solid var(--border-glass) !important;
        background: var(--bg-card) !important;
        box-shadow: var(--shadow-sm) !important;
        margin-left: 1.5rem !important;
    }
    
    .step-card {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1.5rem !important;
    }
}

@media (max-width: 768px) {
    .search-bar-container {
        display: none; /* Hide search bar in header on tiny screens */
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 0.95rem;
    }
    
    .mascot-chat-bubble {
        width: calc(100vw - 3rem);
        right: 1.5rem;
    }
    
    /* Center text inside cards and arrange screenshot stack vertically on tiny screens */
    .step-card {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    
    .step-print-img {
        width: 100% !important;
        max-width: 220px !important;
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
        align-self: center !important;
    }
}

@media (max-width: 576px) {
    /* Hide button text to fit nicely on very small mobile headers */
    .header-actions .btn-text {
        display: none !important;
    }
    
    .header-actions .btn {
        padding: 0.55rem 0.7rem !important;
    }
    
    .header-actions svg {
        margin-right: 0 !important;
    }
    
    /* Place hero actions side-by-side on mobile viewports */
    .hero-actions {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100% !important;
        gap: 0.5rem !important;
    }
    
    .hero-actions .btn {
        flex: 1 1 0px !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        padding: 0.6rem 0.35rem !important;
        font-size: 0.78rem !important;
        white-space: nowrap !important;
        text-overflow: ellipsis !important;
        overflow: hidden !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .hero-actions .btn svg {
        margin-right: 4px !important;
        flex-shrink: 0 !important;
    }
}

/* Mobile Sticky Navigation Bar Controls */
.mobile-controls-bar {
    display: none;
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    width: min(450px, calc(100% - 2rem));
    height: 62px;
    background: var(--bg-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-glass);
    border-radius: 31px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    z-index: 1000;
    align-items: center;
    justify-content: space-between;
    padding: 0 0.75rem;
    transition: var(--transition-smooth);
}

.mobile-control-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border-glass);
    background: var(--bg-glass);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
}

.mobile-control-btn:hover {
    background: var(--bg-glass-hover);
    border-color: var(--text-muted);
}

.mobile-control-btn:active {
    transform: scale(0.92);
    background: var(--color-teal);
    color: #ffffff;
}

.mobile-control-btn svg {
    width: 20px;
    height: 20px;
}

.mobile-control-status {
    text-align: center;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#mobileSectionTitle {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--color-teal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 190px;
    margin: 0 auto;
}

#mobileStepCounter {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    margin-top: 2px;
}

/* Show only on screens <= 992px */
@media (max-width: 992px) {
    .mobile-controls-bar {
        display: flex;
    }
    
    /* Add extra padding to the body footer so it doesn't get overlapped by the floating controls */
    .content-footer {
        padding-bottom: 5.5rem !important;
    }
}

/* Print Styles for PDF Export */
@media print {
    /* Hide inactive tab sections when printing */
    body.active-tab-pasien [id^="ag-section"] {
        display: none !important;
    }
    body.active-tab-ahligizi .guide-section:not([id^="ag-section"]) {
        display: none !important;
    }

    /* Set page margins for A4 Portrait */
    @page {
        size: A4 portrait;
        margin: 1.2cm 1.5cm;
    }
    
    /* Reset background colors for high contrast printing */
    body {
        background: #ffffff !important;
        color: #0d1326 !important;
        font-size: 10pt !important;
    }
    
    /* Show cover page */
    .hero-section {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        min-height: 20cm !important; /* Safely fits within A4 page height */
        max-height: 24cm !important;
        height: 100vh !important;
        page-break-after: always !important;
        page-break-inside: avoid !important;
        background: linear-gradient(135deg, #0bbebb 0%, #0061ff 100%) !important;
        color: #ffffff !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        padding: 2.5rem !important;
        text-align: center !important;
        margin: 0 !important;
        border-radius: 12px !important;
    }
    
    .hero-section h1 {
        color: #ffffff !important;
        font-size: 28pt !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-section h1 span {
        color: #ffffff !important;
        -webkit-text-fill-color: #ffffff !important;
    }
    
    .hero-section p {
        color: rgba(255, 255, 255, 0.95) !important;
        font-size: 12pt !important;
        max-width: 650px !important;
        line-height: 1.6 !important;
    }
    
    .badge-accent {
        background: rgba(255, 255, 255, 0.25) !important;
        color: #ffffff !important;
        border: 1px solid rgba(255, 255, 255, 0.4) !important;
        font-size: 11pt !important;
        padding: 0.6rem 1.5rem !important;
        margin-bottom: 2rem !important;
        border-radius: 50px !important;
        display: inline-block !important;
        text-transform: uppercase !important;
        letter-spacing: 1px !important;
    }
    
    .hero-actions {
        display: none !important; /* Hide action buttons on PDF cover */
    }
    
    /* Hide layout elements not needed for print */
    .header,
    .sidebar,
    .showcase-device-area,
    .mascot-widget-wrapper,
    .simulator-controls,
    .contextual-tip-card,
    .theme-toggle,
    .nav-pdf-btn,
    .hero-video-area, /* Hide video mockup area on print cover */
    .content-footer {
        display: none !important;
    }
    
    /* Explicitly override active-tab classes to avoid specificity issues under print mode */
    body.active-tab-pasien .active-tab-ahligizi-only {
        display: none !important;
    }
    body.active-tab-pasien .active-tab-pasien-only {
        display: block !important;
    }
    body.active-tab-pasien .badge-accent.active-tab-pasien-only {
        display: inline-block !important;
    }

    body.active-tab-ahligizi .active-tab-pasien-only {
        display: none !important;
    }
    body.active-tab-ahligizi .active-tab-ahligizi-only {
        display: block !important;
    }
    body.active-tab-ahligizi .badge-accent.active-tab-ahligizi-only {
        display: inline-block !important;
    }
    
    /* Remove column layouts */
    .main-layout {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    .guide-content-area {
        width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Show all sections simultaneously for printing */
    .guide-section {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        page-break-after: always;
        border: none !important;
        background: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin-bottom: 3rem !important;
    }
    
    /* Styled Section Header Card */
    .section-header-card {
        background: #f1f5f9 !important; /* Soft Slate gray background */
        border-left: 6px solid #0bbebb !important; /* Brand Teal side accent bar */
        border-radius: 10px !important;
        padding: 1.5rem !important;
        margin-bottom: 2rem !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        page-break-inside: avoid !important;
        page-break-after: avoid !important; /* Prevent header card from being orphaned on a page */
    }
    
    .section-header-card h2 {
        border-bottom: none !important;
        margin-top: 0 !important;
        color: #0f172a !important;
        font-size: 18pt !important;
    }
    
    .section-tag {
        background: #0bbebb !important;
        color: #ffffff !important;
        padding: 0.25rem 0.75rem !important;
        border-radius: 4px !important;
        font-size: 9pt !important;
        font-weight: bold !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        display: inline-block !important;
        margin-bottom: 0.5rem !important;
    }
    
    .subsection {
        page-break-inside: auto !important; /* Allow step cards to fill the A4 page naturally */
        margin-bottom: 1.5rem;
    }
    
    .subsection h3 {
        font-size: 13pt !important;
        color: #0f172a !important;
        border-bottom: 1px solid #e2e8f0 !important;
        padding-bottom: 4px !important;
        margin-bottom: 1rem !important;
        page-break-after: avoid !important; /* Prevent subsection heading from being orphaned */
    }
    
    /* Step Cards formatted side-by-side (Description & Screen mockup) */
    .step-card {
        page-break-inside: avoid;
        background: #fafafc !important;
        border: 1px solid #e8e8f0 !important;
        color: #0d1326 !important;
        box-shadow: none !important;
        margin-bottom: 1rem !important;
        padding: 1.25rem !important;
        border-radius: 12px !important;
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 1.5rem !important;
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
    
    .step-card-text {
        flex: 1 !important;
    }
    
    /* Show Screenshot inside step cards for print only */
    .step-print-img {
        display: block !important;
        width: 140px !important;
        height: auto !important;
        flex-shrink: 0 !important;
        object-fit: contain !important;
        border-radius: 8px !important;
        border: 1px solid #e2e8f0 !important;
        background: #ffffff !important;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05) !important;
    }
    
    .step-badge {
        background: #e2e8f0 !important;
        color: #0f172a !important;
        border: 1px solid #cbd5e1 !important;
        font-size: 8pt !important;
        margin-bottom: 0.5rem !important;
        display: inline-block !important;
    }
    
    /* Format text styles for print */
    h1, h2, h3, h4 {
        color: #0f172a !important;
        page-break-after: avoid;
    }
}
