/* ===================================================================== */
/* 1. VARIABEL & PENGATURAN DASAR
/* ===================================================================== */

/* 1. Definisi Variabel Global (Khusus Halaman Ini) */
:root {
    /* Branding */
    --primary-color: #B71C1C; 
    --primary-hover: #991B1B;
    --secondary-color: #FFCDD2;
    --accent-blue: #1e3a8a;
    
    /* Layout */
    --background-color: #F8F9FA;
    --text-color: #212529;
    --text-muted: #6C757D;
    --border-color: #DEE2E6;
    --card-bg: #ffffff;
    --card-shadow: 0 10px 30px rgba(0,0,0,0.08);
    
    /* Font Stack: Mengambil dari Global style.min.css */
    --font-latin: 'Poppins', sans-serif;
    --font-batak: 'Noto Sans Batak', 'Noto Sans', sans-serif;
}

/* Reset Global */
*, *::before, *::after { box-sizing: border-box; }
html, body { scroll-behavior: smooth; margin: 0; padding: 0; }

body {
    font-family: var(--font-latin);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

/* 2. Utility Class Sakti (Terapkan ke HTML mana saja) */
.font-batak { 
    font-family: var(--font-batak); 
    
    /* 1. Mendorong rendering ligatures (Aman & Ringan) */
    font-variant-ligatures: common-ligatures contextual;
    -webkit-font-feature-settings: "liga" on, "clig" on;
    font-feature-settings: "liga" on, "clig" on;
    
    /* 2. Menajamkan font (Tanpa shadow berat) khusus layar HD/Mac/iOS */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    
    /* 3. Kompensasi Ukuran Aksara (Ide Anda: Membesarkan sedikit karena font asli kekecilan) */
    font-size: 1.15em; /* 1.15em lebih aman agar H1 tidak pecah */
    line-height: 1.65; /* Mencegah sandhangan terpotong */
    
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* --- 1. HERO MINI --- */
.hero-mini {
    background: linear-gradient(135deg, hsla(224, 64%, 33%, 1) 0%, hsla(221, 83%, 53%, 1) 50%, hsla(224, 64%, 33%, 1) 100%);
    color: white;
    padding: 4rem 1rem 5rem 1rem; /* Padding lebih lega */
    margin-bottom: -3rem; /* Overlap effect ke card bawah */
    text-align: center;
    position: relative;
    z-index: 1;
}

.hero-mini h1 {
    margin: 0 0 0.8rem 0;
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.5px;
	text-align: center;
	margin: 0 0 1rem 0;
}

.hero-mini p {
    opacity: 0.9;
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.6;
}
/* --- 2. LAYOUT GRID --- */
.content-wrapper { position: relative; z-index: 2; padding-bottom: 4rem; }
.translator-grid {
    display: grid;
    /* Desktop: Kolom Kiri 65%, Kolom Kanan 35% */
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); 
    gap: 30px;
    width: 100%;
    align-items: start; /* Pastikan kolom sejajar di atas */

}

/* --- 3. KOMPONEN KARTU & KONTEN UMUM --- */
.card, 
.translator-card, 
.control-deck, 
.content-hub-card {
    background-color: var(--card-bg);   /* Mengambil dari :root */
    border-radius: 20px;                /* Sudut membulat modern */
    box-shadow: var(--card-shadow);     /* Bayangan halus */
    border: 1px solid #e2e8f0;
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: visible; /* KUNCI UTAMA: Jangan hidden */
    height: auto; /* Biarkan tinggi mengikuti konten */

}

/* Header di dalam kartu */
.card h2 {
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 1.4em;
}

/* Versi kartu lebih tipis untuk bagian 'Tool' */
.card.tool-section {
    box-shadow: none;
    border: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

/* --- 5. TOMBOL-TOMBOL (btn-cohesive) --- */

/* Reset Fieldset Default */
fieldset.control-group {
    border: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.control-label {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e3a8a; /* Biru Tua */
    margin-bottom: 0.8rem;
    display: block;
}

/* Container Tombol */
.radio-pill-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap; /* Agar responsif di HP */
}

/* Sembunyikan Radio Asli */
.radio-pill input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Styling Label sebagai Tombol */
.radio-pill span {
    display: inline-block;
    padding: 8px 16px;
    background-color: #f1f5f9; /* Abu muda */
    border: 1px solid #e2e8f0;
    border-radius: 50px; /* Bentuk Pill */
    font-size: 0.9rem;
    color: #475569;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

/* Efek Hover */
.radio-pill:hover span {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

/* State Checked (Aktif) - Menggunakan Variabel */
.radio-pill input[type="radio"]:checked + span {
    background-color: var(--primary-color); 
    border-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(183, 28, 28, 0.3); /* Angka manual di sini menyesuaikan opacity-nya saja */
}

/* Tambahkan juga ini agar saat diklik (focus) warnanya senada */
.radio-pill input[type="radio"]:focus + span {
    box-shadow: 0 0 0 3px var(--secondary-color);
}

.mt-4 { margin-top: 1.5rem; }

/* ===================================================================== */
/* 2. STRUKTUR UTAMA & LAYOUT HALAMAN
/* ===================================================================== */
/* .container { */
	/* max-width: 1200px; */
	/* margin: 0 auto; */
/* } */


.main-layout-grid {
    /* Dibiarkan kosong untuk mobile-first, diaktifkan di media query desktop */
}

.main-layout-grid > .main-content-column {
    margin-bottom: 20px;
}
	
.main-content-column,
.sidebar-column {
    min-width: 0;
}

.main-content-column > .card:not(:last-child),
.sidebar-column > .card:not(:last-child) {
	margin-bottom: 20px;
}


.footer-references {
    font-size: 0.8em;
    color: #888;
    margin-top: 15px;
}

/* CSS "Anti Gagal" untuk Position Sticky */
/* 1. Paksa semua parent agar overflow-nya visible */
.translator-grid,
.main-column, 
.content-wrapper,
.container {
    overflow: visible !important;
}


.content-group {
    margin-top: 10px;
}

.content-group:first-of-type {
    margin-top: 0;
}

.content-group h3 {
    margin: 0 0 10px 0;
    font-size: 1.4em;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.content-group .group-description {
    margin: 0 0 20px 0;
    color: #495057;
    font-size: 1em;
}	

/* ===================================================================== */
/* 4. NAVIGASI KONTEN (HUB TABS)
/* ===================================================================== */
.content-hub-card {
	padding: 0;
	background-color: #fff;
}

.content-navbar {
    display: flex;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: -webkit-sticky; /* Safari */   
    position: sticky;	
    top: 60px; /* Sesuaikan dengan tinggi Menu Utama Website Anda */
    z-index: 80; /* Pastikan di atas konten lain */
    background: #fff; /* Wajib punya background agar tidak transparan */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); /* Bayangan saat sticky */
    /* Agar bisa di-scroll ke samping di HP */
    overflow-x: auto; 
    /* Agar lebar penuh di dalam card */
    margin-left: -20px; 
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
    border-radius: 8px 8px 0 0; /* Lengkung atas saja */
    white-space: nowrap; 
    /* Hilangkan scrollbar kasar */
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: none; /* Firefox */
}
	
/* Sembunyikan scrollbar di Chrome/Safari */
.content-navbar::-webkit-scrollbar {
    display: none;
}

.navbar-item {
    display: inline-block;
    padding: 15px 20px;
    color: #666;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    cursor: pointer;
    transition: color 0.3s;
    /* Pastikan item tidak mengecil */
    flex-shrink: 0; 
}

/* Hilangkan efek garis bawah saat hover yang lama */
.navbar-item::after {
	display: none;
}

/* Efek hover baru: latar belakang lembut */
.navbar-item:not(.active):hover {
	background-color: #f8f9fa;
	color: var(--text-color);
}

/* Gaya untuk item yang aktif */
.navbar-item.active {
	color: var(--primary-color);
	font-weight: 600; /* KEMBALIKAN: Buat item aktif lebih tebal */
}

/* Indikator aktif yang bergerak (dikelola oleh JavaScript) */
#nav-indicator {
    position: absolute;
    bottom: -1px; /* Posisikan tepat di atas border-bottom navbar */
    height: 2px;
    background-color: var(--primary-color);
    transition: left 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    width: 0;	
}

.hub-content {
	padding: 10px 0px;
}

.hub-section {
	border-top: 1px solid #f0f0f0;
}

.hub-section + .hub-section {
	margin-top: 20px;
	padding-top: 20px;
}

.hub-section:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}

/* ===================================================================== */
/* 5. ALAT TRANSLITERASI (INPUT & OUTPUT)
/* ===================================================================== */
.io-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-top: 15px;
}

textarea {
	font-family: var(--font-latin);
}

/* Baris 248: Update bagian ini */
textarea,
.output-box {
    width: 100%;
    height: 250px;
    padding: 1.2rem;
    border: 1px solid #cbd5e1;
    border-radius: 12px; /* Disamakan dengan Section 4 tadi */
    font-size: 1.1rem;    /* Gunakan rem agar lebih responsif */
    line-height: 1.6;
    background: #fff;
    transition: all 0.2s ease;
    resize: vertical;
}

.output-box {
    background-color: #f8fafc;
    overflow-y: auto;
}

textarea:focus,
.output-box:focus,
textarea:hover,
.output-box:hover {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 4px var(--secondary-color);
}

textarea::placeholder {
	color: #ADB5BD;
	opacity: 1;
	font-size: 15px;
}

.output-box:empty::before {
	content: attr(data-placeholder);
	font-family: var(--font-latin);
	font-size: 14px;
	color: #ADB5BD;
	line-height: 1.6;
	cursor: text;
	pointer-events: none;
	display: inline-block;
}

.output-box .word {
	cursor: pointer;
	position: relative;
	transition: background-color 0.2s ease;
	border-radius: 4px;
	padding: 0 2px;
	margin: 0 -2px;
	font-size: 20px;	
}

.output-box .word:hover {
	background-color: var(--secondary-color);
}

.converter-tip {
    display: block;
    text-align: center;
    margin-top: 10px;
    color: #6C757D;
    font-size: 0.9em;
}

/* ===================================================================== */
/* 6. KONTROL INPUT (ARAH, VARIAN, DLL)
/* ===================================================================== */
.controls {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 10px;
	margin-top: 20px;
}

.direction-control-group {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
}

.radio-group-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	margin-top: 10px;
}

.controls .radio-group-wrapper {
	margin-top: 0;
}

.radio-group-wrapper label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	cursor: pointer;
	font-size: 0.95em;
}

.pemisah {
	font-family: var(--font-latin);
	color: #6C757D;
	font-weight: 500;
	margin: 0 4px;
}

/* --- Gaya untuk Pil Varian --- */
.variant-pill-container {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}

.variant-pill-container label {
	display: inline-block;
}

.variant-pill-container input[type="radio"] {
	display: none;
}

.variant-pill {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 20px;
	border: 1px solid var(--border-color);
	background-color: #fff;
	color: var(--text-color);
	font-size: 0.9em;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
}

.variant-hint {
	color: #888;
	font-size: 1.1em;
}

.variant-pill-container input[type="radio"]:not(:checked) + .variant-pill:hover {
	background-color: #f8f9fa;
	border-color: #ccc;
}

.variant-pill-container input[type="radio"]:checked + .variant-pill {
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
	font-weight: 600;
}

.variant-pill-container input[type="radio"]:checked + .variant-pill .variant-hint {
	color: rgba(255, 255, 255, 0.7);
}

/* CSS khusus untuk tabel perbandingan varian */
.variant-comparison-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.variant-comparison-table th, .variant-comparison-table td { padding: 12px 15px; text-align: left; border-bottom: 1px solid var(--border-color); }
.variant-comparison-table th { font-weight: 600; font-size: 1.05em; background-color: var(--background-color); }
.variant-comparison-table td { vertical-align: top; }
.variant-comparison-table .font-batak { font-size: 1.5em; color: var(--primary-color); }

/* ===================================================================== */
/* 7. KEYBOARD VIRTUAL
/* ===================================================================== */
.tabs {
	display: flex;
	overflow-x: auto;
	-ms-overflow-style: none;
	scrollbar-width: none;
}

.tabs::-webkit-scrollbar {
	display: none;
}

.tab-button {
	border: none;
	background-color: transparent;
	cursor: pointer;
	padding: 10px 16px;
	border-bottom: 1px solid var(--border-color);
	color: #6C757D;
	font-weight: 500;
	font-size: 0.9em;
	white-space: nowrap;
	transition: color 0.2s ease-in-out;
}

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

.tab-button.active {
	border-bottom: 3px solid var(--primary-color);
	color: var(--primary-color);
	font-weight: 600;
}

.tab-content {
	display: none;
}

.tab-content.active {
	display: block;
	padding-top: 15px;
}

.keyboard-row {
	display: flex;
	justify-content: center;
	gap: 5px;
	margin-bottom: 5px;
	flex-wrap: wrap;
}

.key {
	background-color: #f8f9fa;
	border: 1px solid #dee2e6;
	border-radius: 8px;
	box-shadow: inset 0 1px 0 #ffffff, 0 1px 2px rgba(0,0,0,0.05);
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	gap: 2px;
	transition: transform 0.1s ease-out, box-shadow 0.1s ease-out, border-color 0.1s ease-out;
	flex: 1 1 0;
	padding: 5px;
	min-width: 28px;
}

.key:hover {
	border-color: #ced4da;
	transform: translateY(1px);
	box-shadow: inset 0 1px 1px rgba(0,0,0,0.1);
}

.key:active {
	transform: scale(0.95);
	box-shadow: inset 0 2px 2px rgba(0,0,0,0.15);
	background-color: var(--secondary-color); /* Efek visual saat tombol keyboard ditekan */	
}

.key .batak {
	font-family: var(--font-batak);
	font-size: 22px;
	line-height: 1;
}

.key .latin {
	font-family: var(--font-latin);
	font-size: 10px;
	color: #6C757D;
	line-height: 1;
}

.key.key-variant-unique {
	border-color: var(--primary-color);
	box-shadow: 0 0 0 2px rgba(183, 28, 28, 0.2);
	position: relative;
	background-color: #FFF8F8;
}

.key.key-variant-unique::after {
	content: '★';
	position: absolute;
	top: 2px;
	right: 4px;
	font-size: 12px;
	color: var(--primary-color);
}

/* ===================================================================== */
/* 8. KOMPONEN TOOLTIP (UMUM & ANALISIS KATA)
/* ===================================================================== */
.custom-tooltip-container {
	position: relative;
}

.custom-tooltip-container label {
	position: relative;
	cursor: pointer;
}

.custom-tooltip {
	position: absolute;
	bottom: 125%;
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	background-color: #fff;
	color: var(--text-color);
	border: 1px solid var(--border-color);
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 0.9em;
	font-weight: 500;
	line-height: 1.5;
	white-space: normal;
	width: max-content;
	max-width: 280px;
	text-align: center;
	z-index: 100;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.custom-tooltip strong {
	color: var(--primary-color); 
	font-weight: 600;
}

.custom-tooltip::after {
	content: '';
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	border-width: 6px;
	border-style: solid;
	border-color: #fff transparent transparent transparent;
}

.custom-tooltip::before {
	content: '';
	position: absolute;
	display: block;
	top: calc(100% + 1px);
	left: 50%;
	transform: translateX(-50%);
	border-width: 7px;
	border-style: solid;
	border-color: var(--border-color) transparent transparent transparent;
	z-index: -1;
}

.custom-tooltip-container label:hover .custom-tooltip {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(0);
}
#word-tooltip {
    position: absolute; /* Wajib absolute agar ikut scroll document */
    z-index: 1000;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 10px;
    font-size: 0.9rem;
    max-width: 250px;
    pointer-events: none; /* Agar tooltip tidak menghalangi mouse */
    opacity: 0;
    transition: opacity 0.2s ease;
}

#word-tooltip.tooltip-visible {
    opacity: 1;
}

.word-tooltip {
	position: absolute;
	background: #FFFFFF;
	color: var(--text-color);
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 14px;
	font-family: var(--font-latin);
	z-index: 1000;
	pointer-events: none;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 10px 30px -5px rgba(0, 0, 0, 0.15);
	max-width: 320px;
	opacity: 0;
	transform: translateY(5px);
	transition: opacity 0.2s ease-out, transform 0.2s ease-out;
}

.word-tooltip.tooltip-visible {
	opacity: 1;
	transform: translateY(0);
}

.tooltip-title {
	font-weight: 500;
	margin-bottom: 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--border-color);
}

.tooltip-analysis {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tooltip-item {
	display: inline-flex;
	flex-direction: column;
	padding: 4px 8px;
	border-radius: 6px;
	background: var(--background-color);
	text-align: center;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.tooltip-item .batak {
	font-size: 1.2em;
	font-family: var(--font-batak);
	color: var(--text-color);
}

.tooltip-item .latin {
	font-size: 0.75em;
	color: #6C757D;
}

.tooltip-item .type {
    font-size: 0.7em;
    color: var(--primary-color);
    margin-top: 2px;
    font-style: italic;
}

/* ===================================================================== */
/* 9. KOMPONEN NOTIFIKASI (NO-SCRIPT, DYNAMIC NOTE, TOAST)
/* ===================================================================== */
.noscript-warning {
    background-color: #ffc107;
    color: #333;
    text-align: center;
    padding: 15px;
    border-bottom: 2px solid #e0a800;
    position: sticky;
    top: 0;
    z-index: 9999;
}

.dynamic-note {
	display: none;
	background-color: #e7f5ff;
	border-left: 4px solid #90cfff;
	border-top: 1px solid #d0eaff;
	border-right: 1px solid #d0eaff;
	border-bottom: 1px solid #d0eaff;
	border-radius: 8px;
	padding: 12px 16px;
	margin-top: 15px;
	font-size: 0.9em;
	color: #0a589e;
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: all 0.4s ease-in-out;
}

.dynamic-note.visible {
	opacity: 1;
	max-height: 100px;
	padding-top: 12px;
	padding-bottom: 12px;
}

.dynamic-note p {
	margin: 0;
	padding: 0;
	line-height: 1.6;
}

.dynamic-note p strong {
	color: #063e72;
}

.smart-toast {
    position: fixed;
    z-index: 9999;
    bottom: 10px;
    left: 10px;
    right: 10px;
    width: auto;
    max-width: none;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--border-color);
    display: flex;
    gap: 15px;
    padding: 15px;
    opacity: 0;
    transform: translateY(calc(100% + 20px));
    transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

.smart-toast.visible {
    opacity: 1;
    transform: translateX(0);
}

.toast-icon-container {
    flex-shrink: 0;
}

.toast-icon-container .icon {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-body h4 {
    margin: 0 0 5px 0;
    font-size: 1.05em;
    font-weight: 600;
}

.toast-body p {
    margin: 0 0 15px 0;
    font-size: 0.9em;
    color: #6C757D;
    line-height: 1.5;
}

.toast-changes {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.toast-change-item {
    background-color: var(--background-color);
    border-radius: 8px;
    padding: 5px 10px;
    text-align: center;
}

.toast-change-item .aksara {
    font-family: var(--font-batak);
    font-size: 1.8em;
    color: var(--primary-color);
}

.toast-actions {
    display: flex;
    gap: 10px;
}

.toast-button {
    flex-grow: 1;
    padding: 8px 12px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: transparent;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s ease;
}

.toast-button.primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.toast-button:hover {
    opacity: 0.8;
}

.toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    width: 100%;
    background-color: var(--primary-color);
    animation: shrink 8s linear forwards;
}

@keyframes shrink {
    from { width: 100%; }
    to { width: 0%; }
}

/* =========================================
   SLIDER CONTOH TULISAN (ANIMASI & UX)
========================================= */
.example-content-wrapper {
    position: relative;
    min-height: 180px; /* Sesuaikan agar tinggi kotak tidak lompat-lompat */
    overflow: hidden;
}

.example-slide {
    display: none;
    cursor: pointer;
    animation: fadeInSlide 0.3s ease-in-out;
}

.example-slide.active {
    display: block;
}

.example-detail-card {
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid var(--border-color);
    transition: all 0.2s ease;
    border: 1px solid #e9ecef;
    border-left-width: 4px;
}

.example-slide:hover .example-detail-card {
    background-color: #fff;
    border-left-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.08);
}

.ex-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #e9ecef;
    gap: 10px;
}

.ex-row:last-of-type {
    border-bottom: none; margin-bottom: 0; padding-bottom: 0;
}

.ex-label {
    width: 85px;
    flex-shrink: 0;
    font-size: 0.85em;
    font-weight: 600;
    color: var(--text-color);
    margin-top: 4px;
}

.ex-content {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
    text-align: left;
}

.ex-batak-text {
    font-size: 1.5em; /* Ukuran pas untuk aksara Batak */
    color: var(--primary-color);
    line-height: 1.2;
    display: block;
}

.ex-latin-text {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.ex-arti-text {
    font-size: 0.9em;
    color: #6C757D;
    font-style: italic;
}

.ex-cta-text {
    margin-top: 15px;
    text-align: center;
    font-size: 0.85em;
    color: #ffffff;
    background-color: var(--primary-color);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 500;
    display: block;
}

.pulse-animation {
    animation: pulseBtn 2s infinite;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateX(10px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulseBtn {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(183, 28, 28, 0.4); } /* Merah Batak */
    50% { transform: scale(1.02); box-shadow: 0 0 0 6px rgba(183, 28, 28, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(183, 28, 28, 0); }
}

/* ===================================================================== */
/* 10. KONTEN EDUKASI & INFORMASI
/* ===================================================================== */

/* --- Fitur Keunggulan --- */
.features-grid-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	gap: 30px;
	margin-top: 30px;
}

.feature-item {
	display: flex;
	align-items: flex-start;
	gap: 15px;
}

.feature-icon {
	flex-shrink: 0;
	color: var(--primary-color);
	margin-top: -2px;
	opacity: 0.8;
}

.feature-item h4 {
	margin: 0 0 8px 0;
	font-weight: 500;
	font-size: 1.1em;
	color: var(--text-color);
}

.feature-item p {
	margin: 0;
	font-size: 0.95em;
	color: #495057;
	line-height: 1.6;
}

/* --- Aksara Hari Ini --- */
#aksara-hari-ini {
    text-align: center;
}

#aksara-hari-ini .aksara {
	font-family: var(--font-batak);
	font-size: clamp(3.5em, 12vw, 5em);
	text-align: center;
	color: var(--primary-color);
	
	/* 1. Perkecil kotak teksnya */
	line-height: 0.8; 
	display: block;
	
	/* 2. KUNCI PERBAIKAN: Geser elemen secara visual ke atas */
	/* Anda bisa menyesuaikan nilai -15px ini jika perlu (misal: -12px atau -18px) */
	transform: translateY(-15px); 
	
	/* 3. Atur ulang margin untuk mengkompensasi pergeseran */
	margin-top: 10px;
	margin-bottom: 0; 
}
#aksara-hari-ini h3 {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 1.5em;
	color: var(--primary-color);
}

#aksara-hari-ini .fungsi-aksara {
    margin-bottom: 0;
}

#coba-aksara-hari-ini {
    width: 100%;
}

.contoh-fokus {
	background-color: #F8F9FA;
	border: 1px solid var(--border-color);
	border-radius: 8px;
	padding: 12px;
}

/* --- Analisis & Kaidah --- */
.analysis-container {
	margin-top: 0;
	padding: 15px;
	background-color: #F8F9FA;
	border-radius: 8px;
	min-height: 50px;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}

.analysis-container p {
    color: #6C757D;
    text-align: center;
    width: 100%;
}

.analysis-item {
	display: inline-flex;
	flex-direction: column;
	padding: 5px 10px;
	border: 1px solid #ccc;
	border-radius: 5px;
	background: white;
	text-align: center;
}

.analysis-item .batak {
	font-size: 1.2em;
}

.analysis-item .latin {
	font-size: 0.8em;
	color: #555;
}

.analysis-item .type {
	font-size: 0.7em;
	color: var(--primary-color);
	font-style: italic;
}

/* --- FAQ (Tanya Jawab) --- */
.faq-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faq-item {
	background-color: #fff;
    border: 1px solid transparent;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.faq-item .faq-question.active {
    color: var(--primary-color);
}

.faq-question {
	padding: 0;
	font-weight: 600;
	cursor: pointer;
	position: relative;
	transition: color 0.2s ease;
}

.faq-question:hover {
	color: var(--primary-color);
}

.faq-question::after {
	content: '+';
	position: absolute;
	right: 5px;
	font-size: 1.4em;
	font-weight: 300;
	transition: transform 0.3s ease;
}

.faq-question.active::after {
	transform: rotate(45deg);
}

.faq-answer {
	max-height: 0;
	overflow: hidden;
	transition: max-height 0.4s ease-in-out;
}

.faq-answer p,
.faq-answer ul {
	padding: 15px 0 0 0;
	margin: 0;
	font-size: 0.95em;
	color: #495057;
}

.faq-answer ul {
    padding-left: 20px;
}

/* --- Contoh Ungkapan --- */
.example-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.example-item {
	background-color: transparent; 
	border: 1px solid #e9ecef;           
	border-left: 4px solid #e9ecef;       
	padding: 10px 12px;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.25s ease-out;
}

.example-item:hover {
	border-left: 4px solid var(--primary-color); 
	box-shadow: 0 4px 15px rgba(0,0,0,0.07);
	transform: translateY(-2px);
}

.ex-row {
	display: flex;
	align-items: center;
	gap: 8px;
    margin-bottom: 4px;
}

.ex-label {
	flex-shrink: 0;
	width: 105px;
	position: relative;
	font-weight: 500;
	font-size: 0.9em;
	color: #6C757D;
}

.ex-label::after {
	content: ":";
	position: absolute;
	top: 0;
	right: 0;
}

.ex-content {
    min-width: 0; 
    line-height: 1.5;
}

.ex-row:not(:has(.ex-batak)) .ex-label,
.ex-row:not(:has(.ex-batak)) .ex-label::after {
    transform: translateY(2px); 
}

.ex-content.ex-latin,
.ex-content.ex-arti {
    font-size: 0.95em;
    font-weight: 500;
}

.ex-content.ex-batak {
	font-size: 1.4em;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* ===================================================================== */
/* 11. KOMPONEN PANDUAN, TIPS & VISUALISASI
/* ===================================================================== */

/* --- Carousel Tips --- */
.tip-carousel-header {
	text-align: center;
	border-bottom: 1px solid var(--border-color);
}

.tip-carousel-header h2 {
	border-bottom: none;
	padding-bottom: 0;
}

#tip-content-wrapper {
	min-height: 250px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	transition: opacity 0.2s ease-in-out;
}

.tip-content-fade-out {
	opacity: 0;
}

.tip-comparison {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
}

.tip-comparison.single-column-layout {
    grid-template-columns: 1fr;
}

.tip-example {
	background-color: var(--background-color);
	border: none;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.04);
	padding: 15px;
	border-radius: 8px;
	text-align: center;
	border-left: 4px solid;
}

.tip-label {
	font-weight: 600;
	font-size: 0.8em;
	display: block;
	margin-bottom: 10px;
}

.tip-benar { border-left-color: #28a745; }
.tip-benar .tip-label { color: #28a745; }
.tip-salah { border-left-color: #dc3545; }
.tip-salah .tip-label { color: #dc3545; }
.tip-info { border-left-color: #0d6efd; }
.tip-info .tip-label { color: #0d6efd; }

.tip-text-container {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5px;
	min-height: 60px;
}

.tip-batak-text,
.tip-latin-text {
	margin: 0;
}

.tip-batak-text {
	font-size: 1.6em;
	overflow-wrap: break-word;
	word-break: break-all;
}

.tip-latin-text {
	font-size: 0.85em;
	color: #6C757D;
	font-style: italic;
}

.tip-info-text {
    font-size: 0.9em;
    color: #0a589e;
    text-align: left;
    line-height: 1.6;
    padding: 0 5px;
}

.tip-carousel-footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 15px;
	border-top: 1px solid var(--border-color);
	padding-top: 15px;
	margin-top: 20px;
}

.tip-nav-btn-new {
	background-color: transparent;
	border: 1px solid var(--border-color);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	transition: all 0.2s ease;
}

.tip-nav-btn-new:hover {
	background-color: var(--secondary-color);
	border-color: var(--primary-color);
}

.tip-nav-btn-new svg {
	width: 24px;
	height: 24px;
	fill: var(--primary-color);
}

#tip-counter {
	font-size: 0.9em;
	font-weight: 500;
	color: #6C757D;
	flex-shrink: 0;
}

.tip-progress-container {
	flex-grow: 1;
	width: 100%;
	height: 6px;
	background-color: #e9ecef;
	border-radius: 3px;
	overflow: hidden;
}

#tip-progress-bar {
	width: 0%;
	height: 100%;
	background-color: var(--primary-color);
	border-radius: 3px;
	transition: width 0.3s ease;
}

/* ========================================= */
/* CSS BARU UNTUK PANDUAN 2 KOLOM DESKTOP
/* --- Panduan Penulisan & Alur Adaptasi --- */
/* ========================================= */
.guide-intro {
    text-align: center;
}

/* Container Utama (Lurus ke bawah) */
.guide-steps-container { 
    display: flex; flex-direction: column; gap: 30px; 
    max-width: 800px; margin: 0 auto; 
}
/* Pembungkus Grid Baru (Untuk Kasus 1, 2, 4, 5) */
.guide-steps-grid {
    display: grid;
    /* Secara default (Desktop), bagi menjadi 2 kolom dengan jarak 25px */
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}
/* Modifikasi .guide-step agar pas di dalam Grid */
.guide-steps-grid .guide-step {
    padding-top: 0; /* Hapus padding atas karena sudah ada 'gap' dari Grid */
    border-top: none; /* Hapus garis pembatas jika bentuknya Grid */
    display: flex; 
    flex-direction: column;
}
/* Memastikan kotak contoh (example-box) mengisi sisa ruang bawah 
   agar kartu di kiri dan kanan tingginya bisa sejajar rapi */
.guide-steps-grid .example-box {
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
}
.guide-steps-grid .content-block:last-child {
    flex-grow: 1; /* Rentangkan blok terakhir agar sejajar */
}
/* Mengatur ukuran huruf sedikit lebih padat agar rapi di kolom sempit */
.guide-steps-grid .guide-result {
    font-size: 1.5em; 
}
.guide-steps-grid .result-group span {
    font-size: 1.5em;
}

.guide-step {
	padding-top: 20px;
	border-top: 1px solid #f0f0f0;
}

.guide-step:first-child {
	padding-top: 0;
	border-top: none;
}

.guide-step .content-block > p {
    margin-top: 15px;
}

.guide-title {
	margin: 0 0 8px 0;
	font-weight: 500;
	font-size: 1.2em;
}

.guide-description {
	margin: 0 0 12px 0;
	color: #495057;
	line-height: 1.7;
}

.guide-result {
	font-size: 1.8em;
	margin-top: 8px;
	text-align: center;
}

.guide-result.result-small {
	font-size: 1.6em;
}

.result-group {
	font-size: 1.8em;
	display: flex;
	justify-content: center;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 5px;
}

.adapt-flow-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.adapt-card {
	background-color: #FFFFFF;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 15px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.06);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.adapt-step {
	width: 100%;
	background-color: var(--background-color);
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 10px 12px;
	text-align: center;
}

.adapt-step.final-step {
	background-color: #FFF8F8;
	border-color: var(--secondary-color);
}

.adapt-arrow {
	font-size: 1.8em;
	color: #adb5bd;
	font-weight: 500;
	flex-shrink: 0;
}

.adapt-arrow.horizontal { display: none; }
.adapt-arrow.vertical { display: block; }

.flow-label {
	display: block;
	font-size: 0.85em;
	font-weight: 500;
	color: #6c757d;
	margin-bottom: 5px;
}

.flow-content {
	font-size: 1.4em;
	font-weight: 500;
	color: var(--text-color);
}

.flow-content.font-batak {
	font-size: 2em;
	color: var(--primary-color);
	line-height: 1.5;
}

/* --- Visualisasi Kaidah Dasar --- */
.visualization-intro {
	text-align: center;
	margin-top: 50px;
	border-top: 1px solid #f0f0f0;
	padding-top: 30px;
}

.visualization-intro h2 {
	font-weight: 600;
	margin-bottom: 5px;
}

.visualization-intro p {
	color: #495057;
	font-size: 1.05em;
	margin-top: 5px;
}

.visualization-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 25px;
	margin-top: 20px;
}

.visualization-process {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 15px;
	font-size: 2.2em;
	margin: 25px 0;
}

.viz-operator {
	font-size: 0.8em;
	color: #adb5bd;
}

.viz-diacritic {
	color: var(--primary-color);
}

.viz-example {
	background-color: #f8f9fa;
	border-radius: 6px;
	padding: 10px 15px;
	margin-top: 20px;
	border: 1px solid #e9ecef;
}

.viz-example p {
	margin: 0 !important;
	font-size: 0.95em !important;
}

.viz-example .font-batak {
	font-size: 1.2em;
	vertical-align: middle;
}

/* ===================================================================== */
/* 12. SISTEM KARTU KONTEN UNIVERSAL & PANDUAN
/* ===================================================================== */
.content-block {
    background-color: #fff;
    border: 1px solid var(--border-color);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.content-block h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--text-color);
    padding-bottom: 0;
    border-bottom: none;
}

.content-block .viz-display {
	font-size: 2em;
	font-weight: 500;
}

.content-block .viz-label {
	margin-top: 8px;
	font-size: 0.95em;
	color: #495057;
}

.content-block .viz-label p {
	font-size: 0.85em;
	color: #6C757D;
	margin-top: 8px;
	margin-bottom: 0;
}

.content-block p {
    margin: 0 0 15px 0;
}

.content-block p:last-child {
    margin-bottom: 0;
}

.content-block.text-center {
    text-align: center;
}

.example-box {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.example-box .content-block p {
    margin-top: 15px;
}

.example-box .content-block p:first-child {
    margin-top: 0;
}

.example-comparison {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 15px;
}

.example-comparison.two-column > div {
	flex-basis: 100%;
	text-align: center;
}

.example-correct {
	font-size: 1em;
}

.example-correct .font-batak {
	font-size: 1.4em;
	vertical-align: middle;
}

.example-incorrect {
	font-size: 1em;
	color: #dc3545;
}

.example-incorrect .font-batak {
	font-size: 1.4em;
	vertical-align: middle;
}

/* ===================================================================== */
/* 13. FITUR & KONTROL TAMBAHAN (DECK, TOMBOL, MODAL, KUIS)
/* ===================================================================== */

/* --- Control Deck & Tombol Fitur --- */
.control-deck {
	background-color: #FFFFFF;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 20px;
	margin-top: 25px;
	box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.control-deck .deck-title {
	margin: 0 0 15px 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--border-color);
	font-size: 1.2em;
	font-weight: 500;
	color: var(--text-color);
	text-align: left;
}

.deck-description {
    text-align: left;
    margin-top: -15px;
    margin-bottom: 20px;
    color: #6C757D;
    font-size: 0.9em;
}

.features-cohesive {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	align-items: stretch;
}

.btn-cohesive {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	background-color: #f8f9fa;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	padding: 10px 16px;
	cursor: pointer;
	gap: 10px;
	color: #495057;
	font-size: 14px;
	font-family: var(--font-latin);
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: all 0.2s ease-in-out;
}

.btn-cohesive:hover {
	border-color: #ced4da;
	background-color: #e9ecef;
	color: #212529;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.btn-cohesive svg {
	width: 18px;
	height: 18px;
	color: #6c757d;
	transition: color 0.2s ease-in-out;
	flex-shrink: 0;
}

.btn-cohesive:hover svg {
	color: #212529;
}

/* ===================================================================== */
/* [STYLE BARU] Tombol Khusus untuk Trakteer
/* ===================================================================== */
.btn-trakteer {
    /* --- Gaya Utama: Solid dan Berkontras Tinggi --- */
    background-color: #F42C4F; /* Warna merah resmi Trakteer */
    border-color: #F42C4F;
    color: #fff; /* Teks putih untuk kontras maksimal */
}

/* --- Ikon juga berwarna putih --- */
.btn-trakteer svg {
    color: #fff;
}

/* --- Efek Hover: Sedikit lebih gelap untuk umpan balik --- */
.btn-trakteer:hover {
    background-color: #d62040; /* Warna merah yang sedikit lebih gelap */
    border-color: #d62040;
    color: #fff;
    /* Efek transform & shadow diwarisi dari .btn-cohesive:hover */
}

/* Pastikan ikon tetap putih saat di-hover */
.btn-trakteer:hover svg {
    color: #fff;
}

/* ===================================================================== */
/* [STYLE BARU] CTA Dukungan di Footer
/* ===================================================================== */
.support-cta h3 {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--primary-color);
    margin: 0 0 15px 0;
}

.trakteer-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #F42C4F;
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 10px;
    transition: all 0.2s ease-out;
}

.trakteer-link:hover {
    background-color: #d62040;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(244, 44, 79, 0.3);
}

.trakteer-link svg {
    margin-bottom: 2px;
}


.trakteer-inline-link {
    color: #B91D3B; /* Warna merah Trakteer */
    font-weight: 600;
    text-decoration: none;
    border-bottom: 2px solid rgba(185, 29, 59, 0.2);
    transition: all 0.2s ease-out;
}

.trakteer-inline-link:hover {
    background-color: rgba(185, 29, 59, 0.1);
    border-bottom-color: #B91D3B;
}
/* ===================================================================== */
/* [STYLE BARU] Kontainer untuk Ekspor Gambar yang Informatif
/* ===================================================================== */
.image-export-container {
    position: absolute;
    left: -9999px; /* Sembunyikan di luar layar */
    top: auto;
    width: 700px; /* Lebar gambar yang dihasilkan */
    background-color: #FFFFFF;
    border: 1px solid var(--border-color);
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    gap: 20px; /* Jarak antar elemen */
}

.image-export-container .export-title {
    font-family: var(--font-latin);
    font-size: 1.5em;
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    margin: 0;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.image-export-container .export-batak {
    font-family: var(--font-batak);
    font-size: 3.5em; /* Ukuran aksara yang besar dan jelas */
    line-height: 1.6;
    text-align: center;
    color: var(--text-color);
    min-height: 100px;
}

.image-export-container .export-latin-section {
    font-family: var(--font-latin);
    text-align: center;
    font-size: 1.1em;
    color: #6C757D;
}

.image-export-container .export-footer {
    font-family: var(--font-latin);
    text-align: center;
    font-size: 0.8em;
    color: #888;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

/* --- Sistem Modal --- */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 15px;
}

.modal-content {
	background-color: white;
	padding: 25px;
	border-radius: 12px;
	max-width: 800px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	position: relative;
}

.modal-close-btn {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	font-size: 2em;
	cursor: pointer;
	color: #888;
}

.modal-description {
    margin-top: -10px;
    color: #6C757D;
    font-size: 0.9em;
}

.modal-subheading {
    text-align: center;
    margin-top: -10px;
    color: #6C757D;
    font-size: 0.9em;
}

/* --- Modal Berbagi --- */
#share-modal .modal-content {
    max-width: 400px;
}

.share-options {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-top: 20px;
}

.share-option-btn {
	display: block;
	padding: 12px 15px;
	border-radius: 8px;
	text-align: center;
	font-weight: 500;
	text-decoration: none;
	color: #fff;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.share-option-btn:hover {
	transform: scale(1.03);
	opacity: 0.9;
}

.share-option-btn.whatsapp { background-color: #25D366; }
.share-option-btn.telegram { background-color: #0088cc; }
.share-option-btn.twitter { background-color: #1DA1F2; }
.share-option-btn.facebook { background-color: #1877F2; }
.share-option-btn.copy-link {
	background-color: #6c757d;
	border: none;
	width: 100%;
	font-family: var(--font-latin);
	font-size: 14px;
	cursor: pointer;
}

/* --- Modal Koleksi --- */
.collection-list {
	margin-top: 20px;
	display: grid;
	grid-template-columns: 1fr;
	gap: 15px;
}

.collection-item {
	border: 1px solid var(--border-color);
	border-radius: 8px;
	position: relative;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #f0f0f0;	
}

.collection-item:hover {
	background-color: #F8F9FA;
	transform: translateY(-2px);
}

.collection-item .c-batak {
	font-size: 1.5em;
	font-family: var(--font-batak);
	margin-bottom: 8px;
	display: block;
	color: var(--primary-color);
}

.collection-item .c-latin {
	font-size: 0.9em;
	font-weight: 500;
	color: var(--text-color);
}

.collection-item-delete {
	position: absolute;
	top: 8px;
	right: 8px;
	background: #F8D7DA;
	color: #721C24;
	border: none;
	border-radius: 50%;
	width: 28px;
	height: 28px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.2em;
	opacity: 0;
	transition: opacity 0.2s ease;
}

.collection-item:hover .collection-item-delete {
	opacity: 1;
}

#collection-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 10px;
    margin-bottom: 15px;
}

#collection-empty-state {
    display: none;
    text-align: center;
    padding: 40px 20px;
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    margin-top: 20px;
}

#collection-empty-state p {
    margin: 0;
    font-weight: 500;
}

#clear-collection-btn {
    display: none;
    background-color: #F8D7DA;
    color: #721C24;
    margin-top: 20px;
}

#clear-collection-btn:hover {
    background-color: #f5c6cb;
    color: #721C24;
}

/* --- Kuis --- */
#quiz-section {
	padding: 20px;
}

#quiz-main {
    display: none;
}

#quiz-next-btn {
    display: none;
}

.quiz-intro-header {
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 10px;
	margin-bottom: 15px;
	text-align: center;
}

.quiz-intro-header h3 {
	margin: 0;
	color: var(--primary-color);
	font-size: 1.4em;
	text-align: center;
}

.quiz-intro-body {
	padding: 0;
	text-align: center;
}

.quiz-intro-body p {
	margin: 0 0 20px 0;
	color: #495057;
	font-size: 0.95em;
}

.quiz-start-button {
	width: 100%;
	background-color: var(--primary-color);
	color: #fff;
	border-color: var(--primary-color);
	font-size: 1em;
	padding: 12px;
}

.quiz-start-button:hover {
	background-color: #a71e1e;
	color: #fff;
	border-color: #a71e1e;
}

.quiz-start-button svg {
	color: #fff;
}

.quiz-container {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

#quiz-main h2 {
	color: var(--primary-color);
	font-size: 1.4em;
	text-align: center;
	border-bottom: 1px solid var(--border-color);
	padding-bottom: 10px;
	margin-top: 0;
}

#quiz-question-text {
	font-size: 1.2em;
}

#quiz-input {
	flex-grow: 1;
	font-size: 1.2em;
	padding: 8px;
	border: 1px solid var(--border-color);
	border-radius: 6px;
}

#quiz-input::placeholder { font-size: 15px; opacity: 1; color: #ADB5BD; }
#quiz-input:-ms-input-placeholder { font-size: 15px; color: #ADB5BD; }
#quiz-input::-ms-input-placeholder { font-size: 15px; color: #ADB5BD; }

.quiz-feedback {
	padding: 10px;
	border-radius: 6px;
	display: none;
}

.quiz-feedback.correct { background-color: #d4edda; color: #155724; }
.quiz-feedback.incorrect { background-color: #f8d7da; color: #721c24; }

/* ===================================================================== */
/* 14. GLOSARIUM
/* ===================================================================== */
.glossary-group {
	margin-top: 25px;
	padding-top: 25px;
	border-top: 1px solid #f0f0f0;
}

.glossary-group:first-of-type {
	margin-top: 10px;
	padding-top: 0;
	border-top: none;
}

.glossary-group h3 {
	margin: 0 0 8px 0;
	font-weight: 600;
}

.glossary-group h4 {
	font-weight: 500;
	font-size: 1.1em;
	margin-top: 30px;
	margin-bottom: 5px;
}

.glossary-description {
	margin: 0 0 15px 0;
	color: #495057;
}

.glossary-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
	gap: 8px;
}

.glossary-grid-large {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.glossary-item {
	background-color: #ffffff;
	border: 1px solid var(--border-color);
	border-radius: 10px;
	padding: 12px 8px;
	text-align: center;
	box-shadow: 0 2px 8px rgba(0,0,0,0.05);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glossary-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.glossary-item .g-batak {
	font-family: var(--font-batak);
	font-size: 2.4em;
	display: block;
	color: var(--primary-color);
	line-height: 1.2;
}

.glossary-item .g-latin {
	font-size: 0.85em;
	color: #495057;
	font-weight: 500;
	display: block;
	margin-top: 4px;
}

.glossary-group .sub-group {
	margin-top: 20px;
}

.glossary-group .sub-group + .sub-group {
	margin-top: 25px;
}

.glossary-group .sub-group h4 {
	font-weight: 500;
	font-size: 1.1em;
	margin-bottom: 8px;
	margin-top: 0;
}
   
/* ===================================================================== */
/* 15. RESPONSIVE SYSTEM (Lengkap & Detail)
/* ===================================================================== */
/* --- 1. Desktop & Tablet Besar (Layar > 1024px) --- */
@media (min-width: 1024px) {
    .main-layout-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 30px; align-items: start;}
    .translator-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 30px; }
    .io-container { grid-template-columns: 1fr 1fr; }
    .card { padding: 25px 30px; }
    header h1 { font-size: 2.5em; }
    .main-layout-grid > .main-content-column { margin-bottom: 0; }
}

/* --- 2. Mode Tablet & Mobile (Layar < 1024px) --- */
@media (max-width: 1023px) {
    /* Paksa semua layout grid kembali menjadi tumpukan satu kolom (Block) */
    .main-layout-grid, .translator-grid, .io-container { display: block; }
    .sidebar-column {margin-top: 20px; /* Beri jarak saat sidebar turun ke bawah content */}    
    .main-content-column {margin-bottom: 20px;}
    .main-column, .sidebar-column {
        width: 100%; /* Pastikan keduanya selebar layar */
    }    
}

@media (max-width: 991px) {
    /* Matikan grid di layar lebih kecil dari 992px, ubah jadi 1 kolom (tumpuk) */
    .guide-steps-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Kembalikan garis pembatas dan padding atas untuk mode tumpuk */
    .guide-steps-grid .guide-step {
        padding-top: 20px;
        border-top: 1px solid #f0f0f0;
    }
    /* Hapus garis untuk kasus pertama */
    .guide-steps-grid .guide-step:first-child {
        padding-top: 0;
        border-top: none;
    }
}


/* --- 2. Tablet Mode (Layar 768px - 1023px) --- */
/* Mengembalikan logika baris untuk kontrol dan alur adaptasi */
@media (min-width: 768px) {	
    header h1 { font-size: 2.2em; }
    .collection-list { grid-template-columns: 1fr 1fr; }
    .features-cohesive { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
    .btn-cohesive { white-space: nowrap; }
    .key { flex-basis: 40px; min-width: 28px; }    
    .controls { flex-direction: row; align-items: center; }
    .adapt-card { flex-direction: row; align-items: stretch; gap: 10px; }
    .adapt-step { flex: 1; display: flex; flex-direction: column; justify-content: center; }
    .adapt-arrow.horizontal { display: block; align-self: center; }
    .adapt-arrow.vertical { display: none; }
    .smart-toast {bottom: 20px; right: 20px; left: auto; width: 100%; max-width: 380px; padding: 20px; transform: translateX(calc(100% + 20px));}
    .smart-toast.visible { transform: translateX(0); }
   .content-navbar {
        top: 0; /* Tempel langsung di atas layar HP */
        margin-left: -15px; /* Kompensasi padding container mobile */
        margin-right: -15px;
        padding-left: 15px;
        border-radius: 0; /* Kotak penuh di mobile */
    }	
	.card, .translator-card {
	padding: 1.25rem;
	margin-bottom: 20px;
	border-radius: 12px;
	}
}

/* --- 3. Mobile Dasar (Layar < 768px) --- */
@media (max-width: 767px) {
    body { font-size: 15px; }
    header { padding-top: 15px; }
    header h1 { font-size: 1.7em; }	
    .container { padding: 0 10px; }
    .card h2 { font-size: 1.3em; }
    .card, .control-deck { padding: 10px; }
    .control-deck { margin-top: 20px; }

    /* Layout menjadi 1 kolom */
    .main-layout-grid, .io-container, .tip-comparison, .collection-list,
    /* .features-grid-container, .visualization-container, .glossary-grid.custom-grid {grid-template-columns: 1fr;} */
    .key { min-width: 0; flex: 1 1 25px; padding: 8px 4px; min-height: 54px; }
    .keyboard-row { gap: 3px; }
    .hub-content { padding: 10px 0; }
    .example-comparison { flex-direction: column; align-items: stretch; gap: 10px; }    
    /* Tombol Radio 2 Kolom di HP */
    .radio-group-wrapper { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
    .btn-cohesive { white-space: normal; }    
    p, li, code { overflow-wrap: break-word; word-break: break-word; }
    /* Tabel Responsif */
    .variant-comparison-table thead { display: none; }
    .variant-comparison-table, .variant-comparison-table tbody, 
    .variant-comparison-table tr, .variant-comparison-table td { display: block; width: 100%; }
    .variant-comparison-table tr { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px solid var(--border-color); }
    .variant-comparison-table td { padding: 2px 0; border: none; }
    .variant-comparison-table td:first-child { font-weight: 600; font-size: 1.05em; color: var(--text-color); }
}

/* --- 5. Layar Kecil & Tooltip Cerdas (< 480px) --- */
@media (max-width: 480px) {
    header h1 {font-size: 1.5rem; line-height: 1.3;}
	.hero-mini h1 {font-size: 1.75rem; }	
	.card, .translator-card, .control-deck, .content-hub-card {padding: 1rem;}	
    .io-container {
        grid-template-columns: 1fr; /* Input dan Output jadi tumpuk atas-bawah */
        gap: 15px;    }
    .key {min-height: 55px; /* Tombol keyboard lebih besar agar mudah ditekan jari */
        font-size: 0.85rem;    }    
    /* Kembalikan Logika Tooltip agar tidak keluar layar */
    .custom-tooltip-container label .custom-tooltip { max-width: 250px; text-align: left; transform: translateY(10px); }
    .custom-tooltip-container label:nth-child(odd) .custom-tooltip { left: 0; }
    .custom-tooltip-container label:nth-child(odd) .custom-tooltip::after,
    .custom-tooltip-container label:nth-child(odd) .custom-tooltip::before { left: 30px; transform: none; }
    .custom-tooltip-container label:nth-child(even) .custom-tooltip { left: auto; right: 0; }
    .custom-tooltip-container label:nth-child(even) .custom-tooltip::after,
    .custom-tooltip-container label:nth-child(even) .custom-tooltip::before { left: auto; right: 30px; transform: none; }    
    .smart-toast { left: 10px; right: 10px; width: auto; }
}

/* --- 6. Layar Sangat Sempit (< 420px) --- */
@media (max-width: 420px) {
    .content-navbar { gap: 2px; }
    .navbar-item { font-size: 0.85em; padding-left: 4px; padding-right: 4px; white-space: normal; line-height: 1.3; }
}

/* --- 4. Ponsel Modern (360px - 767px) --- */
/* Pengecualian agar tetap 2 kolom di layar yang agak lebar */
@media (min-width: 360px) and (max-width: 767px) {
    .features-cohesive { grid-template-columns: 1fr 1fr; }
    .glossary-grid { grid-template-columns: repeat(4, 1fr); }
}

/* --- 7. Minimalist Screen (< 360px) --- */
@media (max-width: 359px) {
    .features-cohesive { grid-template-columns: 1fr; }
}