/* --- CSS Reset & Variables --- */
:root {
    --brand-red: #D92E34;
    --brand-yellow: #F7C02B;
    --dark-text: #1a1a1a;
    --body-text: #4c4c4c;
    --bg-cream: #FFFBF2;
    --bg-mint: #E6F4F1;
    --bg-peach: #FFEAE3;
    --bg-yellow-light: #FFF8E1;
    --stroke-color: #E6E6E6;

    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Figtree', sans-serif;
    --transition-smooth: 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--body-text);
    background-color: var(--bg-cream);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* --- General Components --- */
.section-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: clamp(2.25rem, 5vw, 3rem);
    color: var(--dark-text);
    line-height: 1.2;
    margin-bottom: 1rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-family: var(--font-heading);
    font-weight: 600;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 50px;
    border: 2px solid transparent;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.cta-button.primary {
    background-color: var(--brand-red);
    color: white;
}
.cta-button.primary:hover {
    background-color: #b82227;
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(217, 46, 52, 0.2);
}
.cta-button.primary.large {
    padding: 1.25rem 3rem;
    font-size: 1.125rem;
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--dark-text);
    border-color: var(--stroke-color);
}
.cta-button.secondary:hover {
    border-color: var(--dark-text);
    color: var(--dark-text);
    transform: translateY(-3px);
}

.cta-button.full-width {
    width: 100%;
    max-width: 300px;
}

.icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-mint);
    color: var(--brand-red);
    margin-bottom: 1rem;
}
.icon-wrapper svg {
    width: 28px;
    height: 28px;
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 1rem 0;
    transition: all 0.3s ease-out;
}
.main-header.scrolled-alt, .main-header.scrolled {
    background-color: rgba(255, 251, 242, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo img {
    height: 45px;
}
.main-nav {
    display: flex;
    gap: 2.5rem;
}
.main-nav a {
    text-decoration: none;
    font-weight: 600;
    color: white; /* Default untuk hero gelap */
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    position: relative;
    transition: color 0.3s ease;
}
.main-header.scrolled-alt .main-nav a,
.main-header.scrolled .main-nav a {
    color: var(--dark-text);
    text-shadow: none;
}
.main-nav a.active {
    color: var(--brand-yellow);
}
.main-header.scrolled .main-nav a.active,
.main-header.scrolled-alt .main-nav a.active {
    color: var(--brand-red);
}
.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--brand-yellow);
    transition: width 0.3s ease;
}
.main-header.scrolled .main-nav a::after,
.main-header.scrolled-alt .main-nav a::after {
    background-color: var(--brand-red);
}
.main-nav a:hover::after, .main-nav a.active::after {
    width: 100%;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.cart-button {
    position: relative;
    background: none;
    border: none;
    cursor: pointer;
    color: white; /* Default untuk hero gelap */
    transition: color 0.3s ease;
}
.main-header.scrolled .cart-button,
.main-header.scrolled-alt .cart-button {
    color: var(--dark-text);
}
.cart-badge {
    position: absolute;
    top: -5px;
    right: -10px;
    background-color: var(--brand-red);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.75rem;
    font-weight: 600;
}
.mobile-nav-toggle { display: none; }
.header-cta {
    display: inline-flex;
}

/* --- Page Hero Section --- */
.page-hero-section {
    background: radial-gradient(circle, #e74b51 0%, #a52327 100%);
    padding: 10rem 0 6rem 0;
    color: white;
    text-align: center;
}
.page-hero-title {
    font-family: var(--font-heading);
    font-size: clamp(3rem, 6vw, 4rem);
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}
.page-hero-subtitle {
    font-size: 1.125rem;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Article List Section --- */
.article-list-section {
    padding: 6rem 0;
}
.featured-article-card {
    margin-bottom: 4rem;
    background-color: white;
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: var(--transition-smooth);
}
.featured-article-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}
.featured-article-link {
    display: grid;
    grid-template-columns: 1fr 1fr;
    text-decoration: none;
    color: inherit;
}
.featured-article-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.featured-article-content {
    padding: 3rem;
}
.featured-article-content h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    color: var(--dark-text);
    margin: 1rem 0;
}
.featured-article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}


.blog-card {
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: var(--transition-smooth);
}
.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}
.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}
.blog-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px 16px 0 0;
}
.blog-card-content {
    padding: 1.5rem;
}
.blog-card-category {
    display: inline-block;
    background-color: var(--bg-peach);
    color: var(--brand-red);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.blog-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--dark-text);
    line-height: 1.4;
    margin-bottom: 1rem;
}
.read-more {
    font-weight: 600;
    color: var(--brand-red);
}

/* --- Footer --- */
.main-footer {
    padding: 6rem 0 2rem 0;
    background-color: var(--dark-text);
    color: rgba(255,255,255,0.7);
}
.footer-main {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 4rem;
    margin-bottom: 4rem;
}
.footer-logo {
    height: 50px;
    margin-bottom: 1rem;

}
.footer-links h4, .footer-contact h4 {
    font-family: var(--font-heading);
    color: white;
    margin-bottom: 1.5rem;
}
.footer-links a, .footer-contact a {
    display: block;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    margin-bottom: 1rem;
    transition: color 0.3s ease;
}
.footer-links a:hover, .footer-contact a:hover {
    color: white;
}
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
}
.footer-social {
    display: flex;
    gap: 1rem;
}
.footer-social a {
    color: rgba(255,255,255,0.7);
    transition: color 0.3s ease;
}
.footer-social a:hover {
    color: white;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .main-nav, .header-cta { display: none; }
    .mobile-nav-toggle { display: flex; flex-direction: column; gap: 6px; background: none; border: none; width: 24px; cursor: pointer; }
    .mobile-nav-toggle span { display: block; height: 2px; background-color: var(--dark-text); width: 100%; transition: all 0.3s ease; }
    .main-header.scrolled .mobile-nav-toggle span,
    .main-header.scrolled-alt .mobile-nav-toggle span {
        background-color: var(--dark-text);
    }
    .footer-main { grid-template-columns: 1fr; }
    .featured-article-link {
        grid-template-columns: 1fr;
    }
    .featured-article-image {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .footer-bottom {
        flex-direction: column;
        gap: 1.5rem;
    }
}


/* --- STYLING PAGINASI BARU & DIPERBAIKI --- */
.pagination-wrapper {
    margin-top: 4rem;
}
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
}
.page-item .page-link,
.page-item span.page-link { /* Menargetkan link dan span di dalam .page-item */
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: var(--dark-text);
    background-color: white;
    border: 1px solid var(--stroke-color);
    font-weight: 600;
    font-size: 1rem;
    transition: var(--transition-smooth);
    line-height: 1; /* Memastikan ikon vertikal di tengah */
}
.page-item .page-link:hover {
    background-color: var(--brand-red);
    color: white;
    border-color: var(--brand-red);
}
.page-item.active span.page-link { /* Target span untuk halaman aktif */
    background-color: var(--brand-red);
    color: white;
    border-color: var(--brand-red);
    cursor: default;
}
.page-item.disabled span.page-link { /* Target span untuk tombol disabled */
    background-color: #f8f9fa;
    color: #adb5bd;
    cursor: not-allowed;
    border-color: var(--stroke-color);
}

/* --- PERBAIKAN UNTUK UKURAN IKON SVG --- */
.page-item .page-link svg,
.page-item span.page-link svg {
    width: 1rem;
    height: 1rem;
}

/* --- Pagination Styling (Final & Clean) --- */
.pagination-wrapper {
    margin-top: 3rem;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    list-style: none;
    padding: 0;
    gap: 0.5rem;
}

.page-item .page-link,
.page-item span.page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--dark-text);
    background-color: white;
    border: 1px solid var(--stroke-color);
    transition: var(--transition-smooth);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.page-item .page-link:hover {
    background-color: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    box-shadow: 0 4px 10px rgba(217,46,52,0.2);
}

.page-item.active span.page-link {
    background-color: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    cursor: default;
}

.page-item.disabled span.page-link {
    background-color: #f8f9fa;
    color: #adb5bd;
    border-color: var(--stroke-color);
    cursor: not-allowed;
}

/* --- SVG Icons Fix --- */
.page-item .page-link svg,
.page-item span.page-link svg {
    width: 0.9rem;
    height: 0.9rem;
}

/* --- Pagination Styling (Bootstrap Version) --- */
.pagination-wrapper {
    margin-top: 3rem;
}

.pagination {
    justify-content: center;
    gap: 0.5rem;
}

.page-item .page-link {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
    background-color: white;
    border: 1px solid var(--stroke-color);
    transition: var(--transition-smooth);
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.page-item .page-link:hover {
    background-color: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    box-shadow: 0 4px 10px rgba(217,46,52,0.2);
}

.page-item.active .page-link {
    background-color: var(--brand-red);
    color: #fff;
    border-color: var(--brand-red);
    cursor: default;
}

.page-item.disabled .page-link {
    background-color: #f8f9fa;
    color: #adb5bd;
    border-color: var(--stroke-color);
    cursor: not-allowed;
}
