/* ==========================================================================
   1. CSS Variables & Theme Configuration
   ========================================================================== */
:root {
    /* Colors - Brand Kit Perintis Berdaya + Modern Vibe */
    --primary-color: #E23838;    /* Vibrant Red/Orange from the new reference */
    --primary-light: #FF5A5A;
    --primary-dark: #7B1414;     /* Deep Maroon from Logo */
    
    --accent-color: #C89B5A;     /* Golden-Beige / Warm Ochre */
    --accent-light: #D0A25F;
    
    /* Modern Colors */
    --text-main: #111111;        /* Very dark gray/black */
    --text-muted: #6B7280;       /* Medium gray */
    --text-light: #9CA3AF;
    --bg-main: #ffffff;          /* Pure white for clean look */
    --bg-alt: #F9FAFB;           /* Very light gray for backgrounds */
    --bg-card: #ffffff;
    --border-color: #E5E7EB;
    --border-dark: #111111;
    
    /* Typography - Clean Modern Sans-Serif */
    --font-heading: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-sans: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-body: 'Plus Jakarta Sans', 'Inter', sans-serif;
    --font-meta: 'Plus Jakarta Sans', 'Inter', sans-serif;
    
    /* Spacing & Layout */
    --container-padding: 2rem;
    --section-padding: 5rem 0;
    --border-radius: 20px;       /* Heavy rounded corners */
    --border-radius-sm: 12px;
    --border-radius-pill: 9999px;
    --transition-speed: 0.3s;
    
    /* Shadows - Soft and Airy */
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.03);
    --shadow-md: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.08);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background-color: var(--bg-main); /* Mengubah background body menjadi putih */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Wrapper opsional untuk membatasi background body */
.site-wrapper {
    max-width: 1440px;
    margin: 0 auto;
    background-color: var(--bg-main);
    min-height: 100vh;
}

img, picture, video, canvas, svg {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--text-main);
    text-decoration: none;
    transition: all var(--transition-speed) ease;
}

a:hover {
    color: var(--primary-color);
}

/* ==========================================================================
   3. Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.1rem; font-weight: 600; }

p {
    margin-bottom: 1.5rem;
    color: var(--text-muted);
}

.text-primary { color: var(--primary-color); }
.text-uppercase { text-transform: uppercase; letter-spacing: 1px; font-size: 0.8rem; font-weight: 700; }
.font-medium { font-weight: 500; }

/* ==========================================================================
   4. Layout & Utilities
   ========================================================================== */
.container {
    width: 100%;
    max-width: 1280px; /* Batasi lebar maksimal agar tidak fullwidth */
    padding-left: var(--container-padding);
    padding-right: var(--container-padding);
    margin-left: auto;
    margin-right: auto;
}

.section {
    padding: var(--section-padding);
}

/* Main Layout Grid (Content + Sidebar) */
.main-layout {
    display: grid;
    gap: 3rem;
}

@media (min-width: 1024px) {
    .main-layout {
        grid-template-columns: 2fr 1fr; /* 2/3 Content, 1/3 Sidebar */
    }
}

/* Buttons - Rounded Pill Style */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.75rem;
    font-family: var(--font-sans);
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: var(--border-radius-pill);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    border: none;
    text-align: center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(226, 56, 56, 0.3);
}

.btn-dark {
    background-color: var(--text-main);
    color: white;
}

.btn-dark:hover {
    background-color: #000;
    color: white;
}
.btn-outline {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.btn-outline:hover {
    background-color: var(--text-main);
    color: white;
}
/* Tags & Chips */
.chip {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 1rem;
    background-color: white;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-main);
    transition: all var(--transition-speed) ease;
    gap: 0.5rem;
}

.chip:hover {
    border-color: var(--text-main);
}

/* Specific Chip Colors based on category */
.chip-creative { color: #8B5CF6; background: #F5F3FF; border-color: #F5F3FF; }
.chip-design { color: #EC4899; background: #FDF2F8; border-color: #FDF2F8; }
.chip-tech { color: #3B82F6; background: #EFF6FF; border-color: #EFF6FF; }
.chip-business { color: #10B981; background: #ECFDF5; border-color: #ECFDF5; }
.chip-crypto { color: #F59E0B; background: #FFFBEB; border-color: #FFFBEB; }

/* ==========================================================================
   5. Header & Navigation (Modern Style)
   ========================================================================== */
.site-header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    position: sticky;
    top: 1rem;
    z-index: 100;
    width: calc(100% - 2rem);
    max-width: 1200px;
    margin: 1rem auto;
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 70px;
    padding: 0 1rem;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 35px;
    width: auto;
}

/* Center Navigation */
.nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: white;
    padding: 2rem;
    box-shadow: var(--shadow-md);
    z-index: 1000;
}

.nav-menu.active {
    display: flex;
}

.nav-menu a {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.5rem 0;
    display: block;
}

/* Header Actions (Search, Profile, Cart) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color var(--transition-speed) ease;
}

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

/* Mobile Menu Toggle */
.menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 101;
}

.menu-toggle span {
    width: 100%;
    height: 2px;
    background: var(--text-main);
    transition: all 0.3s linear;
}

/* Desktop Nav */
@media (min-width: 1024px) {
    .menu-toggle { display: none; }
    
    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        padding: 0;
        box-shadow: none;
        width: auto;
        gap: 2.5rem;
        align-items: center;
    }
    
    .nav-menu a {
        font-family: var(--font-sans);
        font-weight: 500;
        font-size: 0.95rem;
        color: var(--text-muted);
        transition: color 0.3s;
        padding: 0;
        display: inline;
    }
    
    .nav-menu a:hover, .nav-menu a.active {
        color: var(--text-main);
    }
}

/* ==========================================================================
   6. Hero Section (Carousel)
   ========================================================================== */
.modern-hero {
    padding: 6rem 0 2rem;
    overflow: hidden;
}

.hero-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    color: var(--text-main);
}

.hero-title span {
    color: var(--primary-color);
}

.hero-desc {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.7;
}

.hero-carousel-wrapper {
    position: relative;
    width: 100%;
    padding: 2rem 0 0;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-carousel {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: relative;
    min-height: 700px;
    max-width: 100%;
    overflow: hidden; /* Prevent slide animation overflow */
}

.hero-slide {
    position: absolute;
    width: 900px;
    max-width: 90vw;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0;
    z-index: 0;
    pointer-events: none;
    top: 0;
    transform: translateX(50px); /* Initial position for slide in */
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
    pointer-events: auto;
    position: relative;
    transform: translateX(0); /* Slide into place */
}

.hero-slide.prev {
    transform: translateX(-50px); /* Slide out direction */
}

.slide-inner {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 3rem;
    padding-bottom: 2rem;
    position: relative;
    z-index: 10;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.control-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    flex: 1;
    transition: all 0.3s ease;
}

.control-wrapper.prev-wrapper {
    justify-content: flex-end;
}

.control-wrapper.next-wrapper {
    justify-content: flex-start;
}

.control-title-container {
    height: auto; /* Disesuaikan untuk menampung label */
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 250px;
    gap: 0.25rem;
}

.control-wrapper.prev-wrapper .control-title-container {
    align-items: flex-end;
    text-align: right;
}

.control-wrapper.next-wrapper .control-title-container {
    align-items: flex-start;
    text-align: left;
}

.control-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--primary-color);
    text-transform: uppercase;
}

.control-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.control-wrapper:hover .control-title {
    color: var(--primary-color);
}

.carousel-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: white;
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.control-wrapper:hover .carousel-btn {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(226, 56, 56, 0.3);
}

@media (max-width: 1024px) {
    .hero-carousel {
        min-height: 550px;
    }
}

@media (max-width: 768px) {
    .header-actions .btn-dark {
        display: none;
    }
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-carousel {
        min-height: auto;
        padding-bottom: 2rem;
    }
    .hero-slide {
        position: relative; /* Stacks naturally in mobile */
        display: none;
    }
    .hero-slide.active {
        display: block;
    }
    .hero-slide .card-title {
        font-size: 1.5rem !important;
    }
    
    /* Mobile Controls (Inline per design) */
    .carousel-controls {
        flex-direction: row;
        gap: 0.5rem;
        margin-top: 1rem;
        padding: 0 1.5rem; /* Tambahkan padding kiri dan kanan agar tidak mepet */
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
    .control-wrapper {
        width: 50%;
        flex: 1;
        min-width: 0;
        padding: 0;
    }
    .control-wrapper.prev-wrapper {
        flex-direction: row; /* Icon on left, text on right */
        align-items: center;
        text-align: left;
        gap: 0.5rem;
    }
    .control-wrapper.next-wrapper {
        flex-direction: row; /* Text on left, icon on right */
        align-items: center;
        text-align: right;
        gap: 0.5rem;
    }
    .control-title-container {
        height: auto;
        min-height: auto;
        flex: 1;
        width: auto;
    }
    .control-wrapper.prev-wrapper .control-title-container {
        align-items: flex-start;
        text-align: left;
    }
    .control-wrapper.next-wrapper .control-title-container {
        align-items: flex-end;
        text-align: right;
    }
    .control-label {
        font-size: 0.55rem;
        letter-spacing: 1px;
    }
    .control-title {
        font-size: 0.75rem; /* Smaller to fit inline */
        font-weight: 500;
        -webkit-line-clamp: 1; /* Diubah ke 1 baris agar tidak memakan tinggi */
        line-height: 1.2;
    }
    .carousel-btn {
        width: 44px;
        height: 44px;
        flex-shrink: 0;
    }
}

/* ==========================================================================
   7. Main Content & Cards
   ========================================================================== */
/* Main Grid for Articles */
.content-grid {
    display: grid;
    gap: 2rem;
}

@media (min-width: 768px) {
    .content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Article Card */
.article-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.card-img-wrapper {
    position: relative;
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    margin-bottom: 1.5rem;
    aspect-ratio: 16/10;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .card-img {
    transform: scale(1.05);
}

/* Floating Chips inside Image */
.card-chips-floating {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    z-index: 2;
}

.card-chips-floating .chip {
    padding: 0.2rem 0.8rem;
    font-size: 0.65rem;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(4px);
    border: none;
}

/* Card Content */
.card-title {
    font-size: 1.35rem;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.card-meta {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

/* Bookmark icon */
.bookmark-btn {
    color: var(--text-light);
    background: transparent;
    border: none;
    cursor: pointer;
}
.bookmark-btn:hover { color: var(--primary-color); }

/* ==========================================================================
   7. Widgets & Sidebar
   ========================================================================== */
.widget {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    color: var(--text-main);
    font-weight: 700;
}

/* Author Widget */
.author-widget {
    text-align: center;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 1rem;
    object-fit: cover;
}

.author-name {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.author-role {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.author-social {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.author-social a {
    color: var(--text-main);
}
.author-social a:hover { color: var(--primary-color); }

/* Categories Widget */
.category-list {
    list-style: none;
    padding: 0;
}

.category-list li {
    margin-bottom: 0.75rem;
}

.category-list a {
    display: block;
    color: var(--text-muted);
    font-weight: 500;
    transition: all 0.2s ease;
}

.category-list a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

/* Related Small List Widget */
.small-post-list {
    list-style: none;
    padding: 0;
}

.small-post-list li {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.small-post-img {
    width: 60px;
    height: 60px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    flex-shrink: 0;
}

.small-post-title {
    font-size: 0.95rem;
    line-height: 1.3;
    margin: 0;
}

/* Tags Widget */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   8. Newsletter & Footer
   ========================================================================== */
.newsletter-section {
    background: var(--bg-alt); /* Memberi sedikit perbedaan warna pada newsletter section */
    padding: 5rem 0;
    border-top: 1px solid var(--border-color);
}

.newsletter-card {
    background: var(--bg-main);
    border-radius: var(--border-radius);
    padding: 3rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm); /* Menambah shadow pada newsletter card agar lebih menonjol */
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    margin: 2rem auto 0;
}

@media (min-width: 768px) {
    .newsletter-form {
        flex-direction: row;
        background: white;
        padding: 0.5rem;
        border-radius: var(--border-radius-pill);
        box-shadow: var(--shadow-sm);
    }
}

.newsletter-input {
    flex-grow: 1;
    padding: 1rem 1.5rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-pill);
    background: white;
    font-family: var(--font-sans);
}

@media (min-width: 768px) {
    .newsletter-input {
        border: none;
        box-shadow: none;
    }
    .newsletter-input:focus { outline: none; }
}

/* Footer Modern */
.site-footer {
    background-color: var(--bg-main);
    padding: 5rem 0 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-grid {
    display: grid;
    gap: 3rem;
}

@media (min-width: 768px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1.5fr;
    }
}

.footer-widget h3 {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
    font-size: 0.85rem;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding-top: 2rem;
    margin-top: 4rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-light);
    font-size: 0.8rem;
}

@media (min-width: 768px) {
    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}