
/* =========================================
   1. Reset & Base Styles
   ========================================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    /* Color Palette */
    --primary-color: #0d1b2a;
    --secondary-color: #1b263b;
    --accent-blue: #428cdc;
    --accent-blue-dark: #1183d3;
    --accent-orange: #fb4d00;
    --accent-orange-hover: #e04500;
    
    --text-main: #333333;
    --text-light: #777777;
    --text-white: #ffffff;
    
    --bg-body: #f4f6f9;
    --bg-card: #ffffff;
    
    /* Semantic Status Colors */
    --color-info: #e3f2fd;
    --color-info-text: #0d47a1;
    --color-success: #e8f5e9;
    --color-success-text: #1b5e20;
    --color-warning: #fff3e0;
    --color-warning-text: #e65100;
    --color-danger: #ffebee;
    --color-danger-text: #b71c1c;

    /* Dimensions & Spacing */
    --container-width: 1200px;
    --header-height: auto;
    --border-radius-sm: 0.5rem;
    --border-radius-md: 1rem;
    --border-radius-lg: 1.25rem; /* 20px approx */
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --shadow-orange: 0 4px 15px rgba(251, 77, 0, 0.3);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* =========================================
   2. Layout & Utilities (Based on HTML classes)
   ========================================= */
.wrap {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Utility Flex classes mapping */
.flx { display: flex; }
.jcsb { justify-content: space-between; }
.jcc { justify-content: center; }
.aic { align-items: center; }
.fxg { flex-grow: 1; }

/* Spacing utilities */
.b10 { margin-bottom: 0.625rem; }
.b20 { margin-bottom: 1.25rem; }
.b30 { margin-bottom: 1.875rem; }
.b40 { margin-bottom: 2.5rem; }
.r10 { margin-right: 0.625rem; }
.r20 { margin-right: 1.25rem; }

/* Dimensions utilities */
.w500 { font-weight: 500; }
.f12 { font-size: 0.75rem; }
.h30 { height: 1.875rem; display: inline-flex; align-items: center; }
.h60 { height: 3.75rem; display: inline-flex; align-items: center; justify-content: center; }
.radius16 { border-radius: 1rem; }
.radius20 { border-radius: 1.25rem; }

/* Grid Layout for Main Content */
.content-row {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 1.5rem;
    margin-top: 1.5rem;
    padding-bottom: 2rem;
}

/* =========================================
   3. Header Styling
   ========================================= */
header {
    background-color: var(--primary-color);
    color: var(--text-white);
    padding: 0.75rem 0;
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 100;
}

.head-top {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.head-bottom {
    padding-top: 0.75rem;
    gap: 1.5rem;
    align-items: center;
}

/* Download Section */
.download {
    background: rgba(255, 255, 255, 0.05);
    padding: 0 1rem;
    color: var(--text-light);
    font-size: 0.75rem;
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 0.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition-fast);
}

.btn-icon:hover {
    background: var(--accent-blue);
    transform: translateY(-2px);
}

.btn-icon svg path {
    fill: #ffffff !important; /* Force white icon on dark header */
    transition: fill var(--transition-fast);
}

/* Logo */
.logo svg {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
    transition: transform var(--transition-fast);
}

.logo:hover svg {
    transform: scale(1.05);
}

/* Main Menu */
.main-menu ul {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.main-menu a {
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    position: relative;
    padding: 0.25rem 0;
}

.main-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-orange);
    transition: width var(--transition-fast);
}

.main-menu a:hover {
    color: var(--text-white);
}

.main-menu a:hover::after {
    width: 100%;
}

/* Dropdown & Utility Links in Header */
.drop {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-white);
    font-size: 0.8rem;
    padding: 0 0.5rem;
    cursor: pointer;
}

.drop svg path {
    transition: fill var(--transition-fast);
}

.drop:hover {
    color: var(--accent-blue);
}

.drop:hover svg path {
    fill: var(--accent-blue);
}

/* =========================================
   4. Buttons & Interactive Elements
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    text-align: center;
    transition: all var(--transition-fast);
    border: none;
    outline: none;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

/* Blue Button */
.fon-blu, .fon-blu2 {
    background: linear-gradient(135deg, var(--accent-blue) 0%, var(--accent-blue-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(66, 140, 220, 0.3);
}

.fon-blu:hover, .fon-blu2:hover {
    background: linear-gradient(135deg, var(--accent-blue-dark) 0%, var(--accent-blue) 100%);
    box-shadow: 0 6px 12px rgba(66, 140, 220, 0.4);
    transform: translateY(-1px);
}

/* Orange Button */
.fon-orang {
    background: linear-gradient(135deg, #ff6b2b 0%, var(--accent-orange) 100%);
    color: white;
    box-shadow: var(--shadow-orange);
}

.fon-orang:hover {
    background: linear-gradient(135deg, var(--accent-orange) 0%, #ff6b2b 100%);
    box-shadow: 0 6px 20px rgba(251, 77, 0, 0.4);
    transform: translateY(-2px);
}

/* Button active state (click) */
.btn:active {
    transform: translateY(1px);
    box-shadow: none;
}

.shadow-white {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* =========================================
   5. Sidebar Navigation
   ========================================= */
.col-left {
    background: var(--bg-card);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    align-self: start;
    position: sticky;
    top: 1rem;
    overflow-y: auto;
    max-height: calc(100vh - 2rem);
}

.col-left::-webkit-scrollbar {
    width: 4px;
}
.col-left::-webkit-scrollbar-thumb {
    background-color: #ddd;
    border-radius: 4px;
}

.menu-category ul li {
    position: relative;
}

.menu-category ul li a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-main);
    border-left: 3px solid transparent;
    transition: all var(--transition-fast);
}

.menu-category ul li a:hover {
    background-color: rgba(66, 140, 220, 0.05);
    color: var(--accent-blue-dark);
    border-left-color: var(--accent-blue);
    padding-left: 1.5rem; /* Micro animation slide */
}

.menu-category ul li a svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.menu-category ul li a:hover svg {
    transform: scale(1.1) rotate(5deg);
}

/* Nested lists in sidebar */
.menu-category ul ul {
    background-color: #fafafa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.menu-category ul ul li a {
    padding-left: 2.5rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* =========================================
   6. Main Content Area
   ========================================= */
.content {
    min-width: 0; /* Prevents flex/grid overflow */
}

.box.text {
    background: var(--bg-card);
    padding: 2.5rem;
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--text-main);
}

/* Article Typography */
.box.text h1, 
.box.text h2, 
.box.text h3 {
    color: var(--primary-color);
    line-height: 1.3;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.box.text h1 {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
}

.box.text h2 {
    font-size: clamp(1.25rem, 3vw, 1.8rem);
    margin-top: 2.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

.box.text h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-orange);
    border-radius: 2px;
}

.box.text p {
    margin-bottom: 1.25rem;
    font-size: 1rem;
    color: #4a4a4a;
}

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

/* Lists in content */
.box.text ul, 
.box.text ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.box.text ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.box.text ul li::before {
    content: '•';
    color: var(--accent-blue);
    font-weight: bold;
    position: absolute;
    left: -1rem;
    font-size: 1.2rem;
    line-height: 1.4;
}

/* Todo list specific styling from HTML */
.todo-list {
    list-style: none;
    padding: 0;
}
.todo-list__label {
    font-weight: 500;
    display: block;
    margin-bottom: 0.5rem;
}

/* Blockquotes */
blockquote {
    padding: 1.5rem;
    border-radius: var(--border-radius-sm);
    margin: 2rem 0;
    font-size: 0.95rem;
    border-left: 4px solid #ccc;
}

blockquote.danger {
    background-color: var(--color-danger);
    color: var(--color-danger-text);
    border-left-color: #d32f2f;
}

blockquote.info {
    background-color: var(--color-info);
    color: var(--color-info-text);
    border-left-color: var(--accent-blue);
}

blockquote.success {
    background-color: var(--color-success);
    color: var(--color-success-text);
    border-left-color: #2e7d32;
}

blockquote.warning {
    background-color: var(--color-warning);
    color: var(--color-warning-text);
    border-left-color: var(--accent-orange);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    box-shadow: 0 0 0 1px #e0e0e0;
}

table td, table th {
    padding: 1rem;
    border: 1px solid #eee;
    vertical-align: middle;
}

table tr:nth-child(even) {
    background-color: #f9f9f9;
}

table tr:hover {
    background-color: #f0f4f8;
}

table strong {
    color: var(--accent-blue-dark);
}

/* Figures & Images */
figure {
    margin: 2rem 0;
}

.image a {
    display: block;
    border-radius: var(--border-radius-md);
    overflow: hidden;
}

.image img {
    transition: transform var(--transition-smooth);
}

.image a:hover img {
    transform: scale(1.02);
}

/* =========================================
   7. Form Elements (if present or dynamic)
   ========================================= */
input, select, textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: var(--border-radius-sm);
    font-size: 1rem;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(66, 140, 220, 0.2);
}

/* =========================================
   8. Responsive Design
   ========================================= */

/* Tablet & Mobile (Max 992px) */
@media (max-width: 992px) {
    .hide_992 {
        display: none !important;
    }
    
    .content-row {
        grid-template-columns: 1fr;
    }
    
    .col-left {
        display: none; /* Often hide sidebar or move to drawer on tablet */
    }
    
    .head-top {
        justify-content: center;
    }
    
    .head-bottom {
        justify-content: space-between;
    }
}

/* Mobile (Max 768px) */
@media (max-width: 768px) {
    .wrap {
        padding: 0 0.75rem;
    }
    
    .box.text {
        padding: 1.5rem 1rem;
    }
    
    .head-bottom .flx {
        flex-direction: column;
        width: 100%;
    }
    
    .logo {
        margin-bottom: 0.5rem;
    }
    
    .head-top.flx {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    /* Buttons full width on mobile */
    .head-top .flx > div {
        width: 100%;
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
    
    .flx .reg, .flx .enter {
        width: auto;
        flex-grow: 1;
    }
    
    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    
    .h60 {
        height: 3rem;
        font-size: 0.9rem;
    }
}
