/* public_html/css/style.css - Highly Optimized Responsive & Professional Gaming Blog Design */

/* --- Variabel Warna & Font --- */
:root {
    --bg-dark: #121212; /* Deep black for main background */
    --bg-medium: #1f1f1f; /* Slightly lighter dark for cards/sections */
    --bg-light: #2c2c2c; /* Lighter dark for input fields, accents */
    --text-light: #e0e0e0; /* Off-white for main text */
    --text-muted: #9e9e9e; /* Muted grey for secondary info */

    --accent-primary: #00e6e6; /* Cyan Neon - Main highlight */
    --accent-secondary: #9933ff; /* Purple Neon - Secondary highlight */
    --accent-tertiary: #ff3366; /* Pink/Red Neon - For interactive elements */

    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(0, 230, 230, 0.5);
    --shadow-soft: 0 0.25rem 1rem rgba(0, 0, 0, 0.3); /* Using rem for shadows */
    --shadow-strong: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.6);

    --font-heading: 'Oxanium', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Base font size - will be adjusted for responsiveness */
    font-size: 16px; /* Default base for rem calculations */
}

/* --- Global Reset & Base Styling --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--bg-dark);
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased; /* Better font rendering */
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 80rem; /* 1280px */
    margin: 0 auto;
    padding: 0 1.5rem; /* 24px */
}

a {
    color: var(--accent-primary);
    text-decoration: none;
    transition: color 0.3s ease, opacity 0.3s ease;
}
a:hover {
    color: var(--accent-tertiary);
    opacity: 0.9;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--text-light);
    margin-bottom: 1rem; /* 16px */
    line-height: 1.2;
    letter-spacing: 0.03rem; /* 0.5px */
}
/* Scalable font sizes using clamp() for better responsiveness */
h1 { font-size: clamp(2.5rem, 6vw, 3.5rem); } /* 40px - 56px */
h2 { font-size: clamp(2rem, 5vw, 2.8rem); } /* 32px - 45px */
h3 { font-size: clamp(1.5rem, 4vw, 2.2rem); } /* 24px - 35px */
h4 { font-size: clamp(1.2rem, 3vw, 1.8rem); } /* 19px - 29px */

p {
    margin-bottom: 1.125rem; /* 18px */
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 0.875rem 1.875rem; /* 14px 30px */
    border-radius: 0.5rem; /* 8px */
    font-weight: 700;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    letter-spacing: 0.0625rem; /* 1px */
    font-family: var(--font-heading);
    font-size: 1rem; /* 16px base */
}
.btn-primary {
    background-color: var(--accent-primary);
    color: var(--bg-dark);
    box-shadow: 0 0 0.9375rem rgba(0, 230, 230, 0.4); /* 15px */
}
.btn-primary:hover {
    background-color: var(--accent-tertiary);
    transform: translateY(-0.1875rem); /* 3px */
    box-shadow: 0 0.5rem 1.25rem rgba(255, 51, 102, 0.4); /* 8px 20px */
}

/* --- Header --- */
.main-header {
    background-color: var(--bg-medium);
    padding: 1.25rem 0; /* 20px */
    box-shadow: var(--shadow-strong);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 0.0625rem solid var(--border-subtle);
}
.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}
.main-header .logo h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem); /* 29px - 40px */
    margin: 0;
    color: var(--accent-primary);
    letter-spacing: 0.1875rem; /* 3px */
    text-shadow: 0 0 0.625rem rgba(0, 230, 230, 0.6); /* 10px */
}
.main-header .logo a {
    text-decoration: none;
}

/* Navigasi Utama */
.main-nav {
    display: flex;
    align-items: center;
    flex-grow: 1;
    justify-content: flex-end;
}
.main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0; /* Pastikan padding 0 */
}
.main-nav ul li {
    position: relative;
    margin-left: 2.1875rem; /* 35px */
}
.main-nav ul li a {
    color: var(--text-light);
    font-weight: 700;
    font-size: 1.05rem; /* 16.8px */
    padding: 0.5rem 0; /* 8px */
    display: block;
    position: relative;
    transition: color 0.3s ease;
}
.main-nav ul li a::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.3125rem; /* 5px */
    width: 0;
    height: 0.1875rem; /* 3px */
    background-color: var(--accent-tertiary);
    transition: width 0.3s ease, left 0.3s ease;
    transform: translateX(-50%);
}
.main-nav ul li a:hover::after,
.main-nav ul li a.active::after {
    width: 100%;
    left: 0;
    transform: translateX(0);
}

/* Dropdown Menu */
.main-nav .dropdown {
    list-style: none;
    margin: 0;
    padding: 0; /* Ubah padding menjadi 0 di sini, nanti padding untuk li a di bawah */
    position: absolute;
    top: 100%; /* Tepat di bawah parent li */
    left: 0;
    background-color: var(--bg-medium); /* Gunakan variabel warna */
    min-width: 180px;
    box-shadow: var(--shadow-strong); /* Gunakan variabel shadow */
    z-index: 1001; /* Pastikan ini lebih tinggi */
    border-top: 3px solid var(--accent-primary); /* Garis atas accent */
    border-radius: 0 0 0.5rem 0.5rem; /* 8px bawah */

    /* Perbaikan utama: Gunakan opacity dan visibility untuk transisi, dan pointer-events */
    opacity: 0;
    visibility: hidden;
    pointer-events: none; /* Penting: tidak bisa diklik saat tersembunyi */
    transform: translateY(0.625rem); /* Sedikit geser ke bawah saat tersembunyi */
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}

/* Tampilkan dropdown saat LI parent di-hover */
.main-nav ul li:hover > .dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: auto; /* Aktifkan event mouse saat terlihat */
    transform: translateY(0); /* Kembali ke posisi normal */
}

.main-nav .dropdown li {
    margin: 0; /* Hilangkan margin antar item di dropdown */
    border-bottom: 0.0625rem solid var(--border-subtle); /* Gunakan variabel border */
}
.main-nav .dropdown li:last-child {
    border-bottom: none; /* Hilangkan border pada item terakhir */
}
.main-nav .dropdown li a {
    padding: 0.75rem 1.25rem; /* 12px 20px - Padding untuk item dropdown */
    color: var(--text-light);
    font-weight: 400; /* Font lebih tipis untuk dropdown */
    font-size: 0.95rem; /* 15.2px */
    display: block; /* Penting: agar seluruh area link bisa diklik */
    white-space: nowrap; /* Mencegah teks pecah baris */
    transition: background-color 0.3s ease, color 0.3s ease;
    border-bottom: none; /* Hilangkan border bottom dari link utama */
}
.main-nav .dropdown li a::after {
    display: none; /* Hilangkan garis bawah animasi dari link utama */
}
.main-nav .dropdown li a:hover,
.main-nav .dropdown li a:focus {
    background-color: var(--bg-dark); /* Hover background untuk item dropdown */
    color: var(--accent-primary);
}

/* Search Bar */
.search-bar {
    margin-left: 2.5rem; /* 40px */
    display: flex;
    align-items: center;
}
.search-bar form {
    display: flex;
    background-color: var(--bg-light);
    border-radius: 1.5625rem; /* 25px */
    overflow: hidden;
    border: 0.0625rem solid var(--border-subtle);
    box-shadow: inset 0 0.125rem 0.3125rem rgba(0, 0, 0, 0.3); /* 2px 5px */
}
.search-bar input[type="text"] {
    flex-grow: 1;
    border: none;
    padding: 0.625rem 1.25rem; /* 10px 20px */
    background: transparent;
    color: var(--text-light);
    font-size: 0.9rem;
    min-width: 9.375rem; /* 150px */
    outline: none;
}
.search-bar input[type="text"]::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}
.search-bar button {
    background-color: var(--accent-primary);
    border: none;
    padding: 0.625rem 1.125rem; /* 10px 18px */
    cursor: pointer;
    color: var(--bg-dark);
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}
.search-bar button:hover {
    background-color: var(--accent-tertiary);
}

/* Nav Toggle (Mobile - Frontend) */
.nav-toggle {
    display: none; /* Hidden by default on desktop */
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 2rem; /* 32px */
    cursor: pointer;
    margin-left: 1.25rem; /* 20px */
}

/* --- Hero Section --- */
.hero-section {
    background: url('https://ik.imagekit.io/qqmcjedbh/Kudustoto%20Banner/hero-backgroud-kudustoto.png?updatedAt=1752636016264') no-repeat center center/cover;
    height: 43.75rem; /* 700px */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    z-index: 1;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.4), rgba(0,0,0,0.7));
    z-index: -1;
}
.hero-content {
    max-width: 56.25rem; /* 900px */
    padding: 1.875rem; /* 30px */
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 0.625rem; /* 10px */
    border: 0.0625rem solid var(--border-subtle);
    box-shadow: var(--shadow-strong);
    animation: fadeInScale 1s ease-out;
}
.hero-content h2 {
    font-size: clamp(3rem, 7vw, 4.5rem); /* 48px - 72px */
    margin-bottom: 1.5625rem; /* 25px */
    text-shadow: 0 0 1.25rem var(--accent-primary); /* 20px */
    line-height: 1.1;
}
.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.4rem); /* 16px - 22.4px */
    margin-bottom: 2.5rem; /* 40px */
    opacity: 0.9;
    font-weight: 300;
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* --- Latest Articles Grid & Featured Posts Grid --- */
.latest-articles-grid,
.featured-posts-section {
    padding: 5rem 0; /* 80px */
    background-color: var(--bg-dark);
}
.latest-articles-grid h2,
.featured-posts-section h2 {
    text-align: center;
    font-size: clamp(2rem, 5vw, 3.2rem); /* 32px - 51.2px */
    margin-bottom: 3.75rem; /* 60px */
    color: var(--accent-secondary);
    position: relative;
    text-shadow: 0 0 0.9375rem rgba(153, 51, 255, 0.4); /* 15px */
}
.latest-articles-grid h2::after,
.featured-posts-section h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: -0.9375rem; /* 15px */
    transform: translateX(-50%);
    width: 7.5rem; /* 120px */
    height: 0.3125rem; /* 5px */
    background-color: var(--accent-tertiary);
    border-radius: 0.1875rem; /* 3px */
}

/* Specific styling for Featured Section title */
.featured-posts-section h2 {
    color: var(--accent-primary);
    text-shadow: 0 0 0.9375rem rgba(0, 230, 230, 0.4);
}
.featured-posts-section h2::after {
    width: 9.375rem; /* 150px */
    height: 0.375rem; /* 6px */
    background-color: var(--accent-secondary);
}


/* Article Grid Styles */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); /* Min 320px */
    gap: 2.5rem; /* 40px */
}
.article-card {
    background-color: var(--bg-medium);
    border-radius: 0.625rem; /* 10px */
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 0.0625rem solid transparent;
}
.article-card:hover {
    transform: translateY(-0.75rem); /* 12px */
    box-shadow: var(--shadow-strong);
    border-color: var(--accent-primary);
}
.article-card .article-image {
    width: 100%;
    height: 13.75rem; /* 220px */
    overflow: hidden;
    position: relative;
}
.article-card .article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.article-card:hover .article-image img {
    transform: scale(1.1);
}
.article-card .article-info {
    padding: 1.5625rem; /* 25px */
}
.article-card .category-tag {
    display: inline-block;
    background-color: var(--accent-primary);
    color: var(--bg-dark);
    padding: 0.375rem 0.75rem; /* 6px 12px */
    border-radius: 0.3125rem; /* 5px */
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.9375rem; /* 15px */
    letter-spacing: 0.03125rem; /* 0.5px */
}
.article-card h3 {
    font-size: clamp(1.2rem, 3vw, 1.7rem); /* 19.2px - 27.2px */
    margin-bottom: 0.75rem; /* 12px */
}
.article-card h3 a {
    color: var(--text-light);
    transition: color 0.3s ease;
}
.article-card h3 a:hover {
    color: var(--accent-primary);
}
.article-card .excerpt {
    color: var(--text-muted);
    font-size: 0.95rem; /* 15.2px */
    margin-bottom: 1.25rem; /* 20px */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
}
.article-card .article-meta {
    font-size: 0.85rem; /* 13.6px */
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 0.0625rem solid var(--border-subtle);
    padding-top: 0.9375rem; /* 15px */
}
.article-card .article-meta i {
    margin-right: 0.375rem; /* 6px */
    color: var(--accent-tertiary);
}

/* Featured Grid Specifics */
.featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem; /* 40px */
}
.featured-main-card {
    background-color: var(--bg-medium);
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: var(--shadow-strong);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 0.0625rem solid var(--border-subtle);
    display: flex;
    flex-direction: column;
}
.featured-main-card:hover {
    transform: translateY(-0.5rem); /* 8px */
    box-shadow: 0 0.9375rem 1.875rem rgba(0, 0, 0, 0.7); /* 15px 30px */
    border-color: var(--accent-primary);
}
.featured-main-card .featured-image {
    width: 100%;
    height: 23.75rem; /* 380px */
    overflow: hidden;
}
.featured-main-card .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.featured-main-card:hover .featured-image img {
    transform: scale(1.05);
}
.featured-main-card .featured-info {
    padding: 1.875rem; /* 30px */
}
.featured-main-card .category-tag {
    background-color: var(--accent-secondary);
    color: var(--bg-dark);
    padding: 0.5rem 0.9375rem; /* 8px 15px */
    border-radius: 0.3125rem;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 0.9375rem;
}
.featured-main-card h3 {
    font-size: clamp(1.5rem, 4vw, 2.2rem);
    margin-bottom: 0.9375rem;
}
.featured-main-card h3 a {
    color: var(--text-light);
}
.featured-main-card h3 a:hover {
    color: var(--accent-primary);
}
.featured-main-card .excerpt {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5625rem; /* 25px */
    line-height: 1.7;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
}
.featured-main-card .featured-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 0.0625rem solid var(--border-subtle);
    padding-top: 0.9375rem;
}
.featured-main-card .featured-meta i {
    margin-right: 0.375rem;
    color: var(--accent-tertiary);
}

.featured-side-cards {
    display: flex;
    flex-direction: column;
    gap: 1.875rem; /* 30px */
}
.featured-small-card {
    background-color: var(--bg-medium);
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 0.0625rem solid var(--border-subtle);
    display: flex;
    padding: 0.9375rem; /* 15px */
}
.featured-small-card:hover {
    transform: translateY(-0.3125rem); /* 5px */
    box-shadow: var(--shadow-strong);
    border-color: var(--accent-tertiary);
}
.featured-small-card .small-image {
    width: 7.5rem; /* 120px */
    height: 5.625rem; /* 90px */
    flex-shrink: 0;
    margin-right: 0.9375rem; /* 15px */
    border-radius: 0.3125rem;
    overflow: hidden;
}
.featured-small-card .small-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.featured-small-card .small-info h4 {
    font-size: 1.15rem; /* 18.4px */
    margin-bottom: 0.5rem; /* 8px */
    line-height: 1.3;
}
.featured-small-card .small-info h4 a {
    color: var(--text-light);
}
.featured-small-card .small-info h4 a:hover {
    color: var(--accent-primary);
}
.featured-small-card .small-info span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Sidebar (More Integrated Look) --- */
.sidebar {
    background-color: var(--bg-medium);
    padding: 1.875rem; /* 30px */
    border-radius: 0.625rem;
    box-shadow: var(--shadow-soft);
}
.sidebar h3 {
    font-size: clamp(1.5rem, 3.5vw, 2rem); /* 24px - 32px */
    color: var(--accent-secondary);
    margin-bottom: 1.5625rem; /* 25px */
    border-bottom: 0.125rem solid var(--border-strong); /* 2px */
    padding-bottom: 0.625rem; /* 10px */
    text-shadow: 0 0 0.5rem rgba(153, 51, 255, 0.3); /* 8px */
}
.sidebar ul {
    list-style: none;
    margin-bottom: 1.875rem; /* 30px */
}
.sidebar ul li {
    margin-bottom: 0.75rem; /* 12px */
}
.sidebar ul li a {
    color: var(--text-light);
    display: flex;
    align-items: center;
    padding: 0.625rem 0; /* 10px */
    transition: color 0.3s ease, transform 0.2s ease;
}
.sidebar ul li a::before {
    content: "\f054"; /* FontAwesome caret right icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    margin-right: 0.625rem; /* 10px */
    color: var(--accent-primary);
    font-size: 0.8rem;
    transition: transform 0.2s ease;
}
.sidebar ul li a:hover {
    color: var(--accent-primary);
    transform: translateX(0.3125rem); /* 5px */
}
.sidebar ul li a:hover::before {
    transform: translateX(0.3125rem);
}
.popular-post-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5625rem; /* 25px */
    background-color: var(--bg-dark);
    padding: 0.625rem; /* 10px */
    border-radius: 0.5rem; /* 8px */
    border: 0.0625rem solid var(--border-subtle);
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.popular-post-item:hover {
    background-color: var(--bg-light);
    transform: translateY(-0.1875rem); /* 3px */
}
.popular-post-item img {
    width: 5.625rem; /* 90px */
    height: 4.375rem; /* 70px */
    object-fit: cover;
    border-radius: 0.3125rem;
    margin-right: 0.9375rem; /* 15px */
    border: 0.0625rem solid var(--border-strong);
    box-shadow: 0 0.125rem 0.5rem rgba(0,0,0,0.4); /* 2px 8px */
}
.popular-post-item h4 {
    font-size: 1.15rem; /* 18.4px */
    margin: 0 0 0.3125rem 0; /* 5px */
    line-height: 1.3;
}
.popular-post-item h4 a {
    color: var(--text-light);
}
.popular-post-item span {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* --- Footer --- */
.main-footer {
    background-color: var(--bg-medium);
    color: var(--text-muted);
    text-align: center;
    padding: 2.5rem 0; /* 40px */
    margin-top: 5rem; /* 80px */
    box-shadow: 0 -0.5rem 1.25rem rgba(0, 0, 0, 0.4); /* 8px 20px */
    border-top: 0.0625rem solid var(--border-subtle);
}
.main-footer p {
    margin: 0;
    font-size: 0.9rem; /* 14.4px */
}

/* --- Styling untuk Halaman Detail Artikel --- */
.article-page {
    display: grid;
    grid-template-columns: 2.5fr 1fr;
    gap: 2.5rem; /* 40px */
    padding: 3.75rem 0; /* 60px */
}
.post-content {
    background-color: var(--bg-medium);
    padding: 2.5rem; /* 40px */
    border-radius: 0.625rem;
    box-shadow: var(--shadow-strong);
}
.post-featured-image {
    margin-bottom: 2.5rem; /* 40px */
    border-radius: 0.625rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 0.0625rem solid var(--border-subtle);
}
.post-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}
.post-header {
    margin-bottom: 2.5rem; /* 40px */
}
.post-title {
    font-size: clamp(2.5rem, 6vw, 4rem); /* 40px - 64px */
    color: var(--accent-primary);
    text-shadow: 0 0 1.25rem rgba(0, 230, 230, 0.6); /* 20px */
    margin-bottom: 1.25rem; /* 20px */
    line-height: 1.1;
}
.post-meta {
    font-size: 1rem; /* 16px */
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.9375rem 1.875rem; /* 15px 30px */
    border-bottom: 0.0625rem solid var(--border-subtle);
    padding-bottom: 1.25rem; /* 20px */
    margin-bottom: 1.875rem; /* 30px */
}
.post-meta .meta-item i {
    margin-right: 0.5rem; /* 8px */
    color: var(--accent-tertiary);
}
.post-meta .meta-item a {
    color: var(--text-light);
    transition: color 0.3s ease;
}
.post-meta .meta-item a:hover {
    color: var(--accent-primary);
}
.post-body {
    font-size: clamp(1rem, 2vw, 1.15rem); /* 16px - 18.4px */
    line-height: 1.8;
    color: var(--text-light);
}
.post-body h1, .post-body h2, .post-body h3, .post-body h4 {
    color: var(--accent-secondary);
    margin-top: 2.1875rem; /* 35px */
    margin-bottom: 1.25rem; /* 20px */
    text-shadow: 0 0 0.5rem rgba(153, 51, 255, 0.2); /* 8px */
}
.post-body p {
    margin-bottom: 1.375rem; /* 22px */
}
.post-body img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1.875rem auto; /* 30px */
    border-radius: 0.625rem;
    box-shadow: var(--shadow-soft);
    border: 0.0625rem solid var(--border-subtle);
}

/* --- Share Buttons --- */
.post-actions {
    margin-top: 3.125rem; /* 50px */
    padding-top: 1.875rem; /* 30px */
    border-top: 0.0625rem solid var(--border-subtle);
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem; /* 20px */
    justify-content: center;
}
.share-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.5625rem; /* 12px 25px */
    border-radius: 0.5rem;
    font-weight: 700;
    color: white;
    transition: transform 0.2s ease, opacity 0.3s ease, box-shadow 0.3s ease;
    text-shadow: 0 0 0.3125rem rgba(0,0,0,0.5); /* 5px */
    border: 0.0625rem solid transparent;
    font-size: 0.9rem; /* 14.4px */
}
.share-btn i {
    margin-right: 0.75rem; /* 12px */
    font-size: 1.2rem;
}
.share-btn.facebook { background-color: #3b5998; border-color: #3b5998; }
.share-btn.twitter { background-color: #00acee; border-color: #00acee; }
.share-btn:hover {
    transform: translateY(-0.3125rem); /* 5px */
    opacity: 1;
    box-shadow: 0 0.5rem 1.25rem rgba(0,0,0,0.3); /* 8px 20px */
}
.share-btn.facebook:hover { background-color: #4c6fab; box-shadow: 0 0.5rem 1.25rem rgba(59, 89, 152, 0.4); }
.share-btn.twitter:hover { background-color: #1da1f2; box-shadow: 0 0.5rem 1.25rem rgba(0, 172, 238, 0.4); }

/* --- Comments Section --- */
.comments-section {
    background-color: var(--bg-medium);
    padding: 2.5rem; /* 40px */
    border-radius: 0.625rem;
    box-shadow: var(--shadow-soft);
    margin-top: 2.5rem; /* 40px */
}
.comments-section h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem); /* 29px - 40px */
    color: var(--accent-primary);
    margin-bottom: 1.875rem; /* 30px */
    border-bottom: 0.125rem solid var(--border-strong);
    padding-bottom: 0.625rem; /* 10px */
    text-shadow: 0 0 0.625rem rgba(0, 230, 230, 0.3);
}
.comment-list {
    margin-bottom: 2.5rem; /* 40px */
}
.comment-item {
    background-color: var(--bg-dark);
    padding: 1.5625rem; /* 25px */
    border-radius: 0.5rem;
    margin-bottom: 1.5625rem; /* 25px */
    border: 0.0625rem solid var(--border-subtle);
    box-shadow: inset 0 0.125rem 0.3125rem rgba(0,0,0,0.2);
}
.comment-item:last-child {
    margin-bottom: 0;
}
.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.9375rem; /* 15px */
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-bottom: 0.625rem;
    border-bottom: 0.0625rem dashed var(--border-subtle);
}
.comment-header .comment-author {
    font-weight: bold;
    color: var(--text-light);
    font-size: 1.1rem;
}
.comment-header .comment-author i {
    margin-right: 0.5rem;
    color: var(--accent-tertiary);
}
.comment-header .comment-date i {
    margin-right: 0.5rem;
    color: var(--accent-tertiary);
}
.comment-item .comment-content p {
    margin: 0;
    color: var(--text-light);
    line-height: 1.7;
}
.comment-message {
    background-color: var(--accent-primary);
    color: var(--bg-dark);
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5625rem;
    font-weight: bold;
    text-align: center;
    box-shadow: var(--shadow-soft);
}
.comment-message.error {
    background-color: #e74c3c;
    color: white;
}

/* --- Comment Form --- */
.comment-form-container {
    padding-top: 2.5rem; /* 40px */
    border-top: 0.125rem solid var(--border-strong);
    margin-top: 1.875rem; /* 30px */
}
.comment-form-container h3 {
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    color: var(--accent-secondary);
    margin-bottom: 1.5625rem;
    text-shadow: 0 0 0.5rem rgba(153, 51, 255, 0.3);
}
.comment-form .form-group {
    margin-bottom: 1.5625rem;
}
.comment-form label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: bold;
    color: var(--text-light);
    font-size: 1.05rem;
}
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form textarea {
    width: 100%;
    padding: 0.9375rem; /* 15px */
    border: 0.0625rem solid var(--border-subtle);
    border-radius: 0.5rem;
    background-color: var(--bg-light);
    color: var(--text-light);
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
    box-shadow: inset 0 0.125rem 0.3125rem rgba(0,0,0,0.2);
}
.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 0.25rem rgba(0, 230, 230, 0.3); /* 4px */
}
.comment-form textarea {
    resize: vertical;
    min-height: 7.5rem; /* 120px */
}
.comment-form .btn-primary {
    width: auto;
    padding: 0.9375rem 2.1875rem; /* 15px 35px */
    font-size: 1.1rem;
}

/* --- Author Box (for post_detail.php) --- */
.author-box {
    background-color: var(--bg-medium);
    padding: 1.875rem; /* 30px */
    border-radius: 0.625rem;
    box-shadow: var(--shadow-soft);
    margin-top: 3.125rem; /* 50px */
    display: flex;
    align-items: center;
    border: 0.0625rem solid var(--border-subtle);
}
.author-box .author-avatar {
    width: 7.5rem; /* 120px */
    height: 7.5rem;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 1.875rem; /* 30px */
    border: 0.1875rem solid var(--accent-primary); /* 3px */
    box-shadow: 0 0 0.9375rem rgba(0, 230, 230, 0.4);
    transition: transform 0.3s ease;
}
.author-box:hover .author-avatar {
    transform: scale(1.05);
}
.author-box .author-info {
    flex-grow: 1;
}
.author-box .author-info h4 {
    font-size: clamp(1.4rem, 3vw, 1.8rem); /* 22.4px - 28.8px */
    color: var(--accent-secondary);
    margin-bottom: 0.625rem; /* 10px */
    text-shadow: 0 0 0.5rem rgba(153, 51, 255, 0.3);
}
.author-box .author-info p {
    color: var(--text-light);
    font-size: 1rem;
    margin-bottom: 0.9375rem;
    line-height: 1.6;
}
.author-box .author-social a {
    color: var(--text-light);
    font-size: 1.5rem;
    margin-right: 0.9375rem;
    transition: color 0.3s ease, transform 0.2s ease;
}
.author-box .author-social a:hover {
    color: var(--accent-primary);
    transform: translateY(-0.1875rem);
}


/* --- Responsive Adjustments (Mobile-First Philosophy) --- */

/* Base font size adjustment for smaller screens */
@media (max-width: 768px) {
    :root {
        font-size: 15px; /* Slightly smaller base font size for tablets/larger phones */
    }
    .container {
        padding: 0 1rem; /* 16px */
    }

    /* Header adjustments */
    .main-header .container {
        flex-direction: column;
        align-items: flex-start;
    }
    .main-header .logo {
        width: 100%;
        text-align: center;
        margin-bottom: 1rem; /* Add margin below logo */
    }
    .nav-toggle {
        display: block; /* Show toggle on mobile/tablet */
        position: absolute;
        right: 1rem; /* 16px */
        top: 1.25rem; /* 20px */
    }
    .main-nav {
        width: 100%;
        order: 3; /* Push nav to the bottom in flex order */
        margin-top: 1.25rem; /* 20px */
        position: relative;
        justify-content: center;
    }
    .main-nav ul {
        flex-direction: column;
        width: 100%;
        background-color: var(--bg-dark);
        position: absolute;
        top: 100%;
        left: 0;
        display: none; /* Hidden by default for mobile */
        box-shadow: var(--shadow-strong);
        border-top: 0.1875rem solid var(--accent-primary);
        padding: 0.625rem 0;
        border-radius: 0.3125rem;
        z-index: 999; /* Ensure it's above other content */
    }
    .main-nav ul.active {
        display: flex; /* Show when active */
    }
    .main-nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 0.0625rem solid var(--border-subtle);
    }
    .main-nav ul li:last-child {
        border-bottom: none;
    }
    .main-nav ul li a {
        padding: 0.9375rem 1.25rem; /* 15px 20px */
        font-size: 1.2rem;
        text-align: center;
    }
    /* Dropdown di mode mobile */
    .main-nav .dropdown {
        position: static; /* Hilangkan posisi absolut agar mengalir di mobile nav */
        display: block; /* Selalu tampilkan jika parent .main-nav ul.active */
        width: 100%;
        box-shadow: none;
        border-top: none;
        padding: 0;
        border-radius: 0;
        opacity: 1; /* Selalu opacity 1 di mobile */
        visibility: visible; /* Selalu visible di mobile */
        pointer-events: auto; /* Selalu aktif di mobile */
        transform: translateY(0); /* Hilangkan transform */
        background-color: var(--bg-dark); /* Pastikan background untuk nested dropdown */
    }
    .main-nav .dropdown li a {
        padding-left: 2.5rem; /* Indent dropdown items */
        background-color: rgba(0, 0, 0, 0.2);
    }
    .search-bar {
        order: 2; /* Position search bar after logo on mobile */
        margin: 0.9375rem auto 0; /* 15px auto 0 */
        width: 90%;
        max-width: 21.875rem; /* 350px */
    }
    .search-bar form {
        width: 100%;
    }
    .search-bar input[type="text"] {
        min-width: unset; /* Remove min-width for full flexibility */
        width: 100%;
    }

    /* Hero section adjustments */
    .hero-section {
        height: 31.25rem; /* 500px */
    }
    .hero-content {
        padding: 1.5rem; /* 24px */
    }
    .hero-content h2 {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }
    .hero-content p {
        font-size: 1rem;
    }

    /* Grid layout changes */
    .articles-grid,
    .featured-grid,
    .article-page {
        grid-template-columns: 1fr; /* Single column layout for most grids */
        gap: 1.875rem; /* 30px */
    }

    /* Sidebar positioning on mobile */
    .sidebar {
        margin-top: 2.5rem; /* 40px */
    }

    /* Post detail page adjustments */
    .post-content,
    .comments-section,
    .sidebar {
        padding: 1.5625rem; /* 25px */
    }
    .post-title {
        font-size: clamp(2rem, 5vw, 2.8rem);
    }
    .post-meta {
        flex-direction: column;
        gap: 0.625rem; /* 10px */
    }
    .comments-section h2, .comment-form-container h3 {
        font-size: clamp(1.5rem, 4vw, 2rem);
    }

    /* Author box adjustments */
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .author-box .author-avatar {
        margin-right: 0;
        margin-bottom: 1.25rem; /* 20px */
    }
    .author-box .author-info h4 {
        font-size: 1.5rem;
    }

    /* Featured section mobile specifics */
    .featured-main-card .featured-image {
        height: 15.625rem; /* 250px */
    }
    .featured-main-card h3 {
        font-size: 1.8rem;
    }
    .featured-side-cards {
        gap: 1.25rem; /* 20px */
    }
    .featured-small-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.25rem; /* 20px */
    }
    .featured-small-card .small-image {
        width: 100%;
        height: 9.375rem; /* 150px */
        margin-right: 0;
        margin-bottom: 0.9375rem;
    }
}

/* Further Mobile Optimization (for smaller phones) */
@media (max-width: 480px) {
    :root {
        font-size: 14px; /* Even smaller base font size */
    }
    .container {
        padding: 0 0.75rem; /* 12px */
    }
    .main-header .logo h1 {
        font-size: clamp(1.5rem, 5vw, 2rem);
    }
    .nav-toggle {
        font-size: 1.8rem; /* Smaller icon */
    }
    .hero-section {
        height: 25rem; /* 400px */
    }
    .hero-content {
        padding: 1rem; /* 16px */
    }
    .latest-articles-grid h2,
    .featured-posts-section h2 {
        font-size: clamp(1.8rem, 5vw, 2.2rem);
        margin-bottom: 2.5rem; /* 40px */
    }
    .article-card .article-info {
        padding: 1.25rem; /* 20px */
    }
    .featured-main-card .featured-image {
        height: 12.5rem; /* 200px */
    }
    .author-box .author-avatar {
        width: 6.25rem; /* 100px */
        height: 6.25rem;
    }
    .author-box .author-info h4 {
        font-size: 1.3rem;
    }
    .comments-section h2, .comment-form-container h3 {
        font-size: 1.8rem;
    }
}

/* Optional: Landscape mode for smaller tablets */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        height: 25rem; /* Adjust height for landscape view */
    }
}