/* ==========================================================================
   DAFTAR ISI:
   1. Import Fonts & Reset
   2. Komponen Header & Navigasi (Mobile & Desktop)
   3. Komponen Footer
   4. Layout Utama (Container, Page Title)
   5. Blog Archive & Widget (Grid, Card, Pagination)
   6. Single Post (Artikel & Sidebar)
   ========================================================================== */

/* ==========================================================================
   1. IMPORT FONTS & RESET
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600;700;800&family=Poppins:wght@400;500;600&display=swap');

:root {
    --primary: #600000;
    --accent: #c89e3c;
    --text-main: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg-soft: #ffffff;
    --radius-lg: 32px;
    --radius-md: 16px;
    --transition: all 0.3s ease;
    --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 16px 40px rgba(96, 0, 0, 0.1);
    --shadow-lg: 0 25px 50px rgba(0, 0, 0, 0.12);
    --border: #f3f4f6;
}

* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-main);
    background: var(--bg-soft);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
}

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

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

ul {
    list-style: none;
}

/* ==========================================================================
   2. KOMPONEN HEADER & NAVIGASI
   ========================================================================== */
ul.main-menu,
ul.submenu {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.main-header {
    background: #ffffff;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-bottom: 4px solid var(--primary);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

.main-menu {
    display: flex;
    gap: 30px;
}

.main-menu li {
    position: relative;
}

.main-menu > li > a {
    text-decoration: none;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    padding: 15px 0;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    transition: 0.3s;
}

.main-menu li a:hover {
    color: var(--accent);
}

.dropdown-icon {
    width: 10px;
    fill: currentColor;
    transition: transform 0.3s;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    min-width: 260px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--accent);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.main-menu li:hover > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li a {
    display: block;
    padding: 12px 20px;
    font-size: 12px;
    color: #333;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: 600;
    transition: 0.2s;
}

.submenu li a:hover {
    background-color: #fcfaf5;
    color: var(--accent);
    padding-left: 25px;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 1024px) {
    .menu-toggle { display: block; }

    .nav-wrapper {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #ffffff;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out;
        border-top: 1px solid #eee;
    }

    .nav-wrapper.is-active {
        max-height: 100vh;
        overflow-y: auto;
    }

    .main-menu {
        flex-direction: column;
        gap: 0;
    }

    .main-menu > li {
        border-bottom: 1px solid #f2f2f2;
    }

    .main-menu > li > a {
        padding: 18px 20px;
        font-size: 14px;
        justify-content: space-between;
    }

    .submenu {
        position: static;
        display: none;
        opacity: 1;
        visibility: visible;
        box-shadow: none;
        border: none;
        background: #f9f9f9;
        padding: 0;
        transform: none;
        width: 100%;
    }

    .submenu li a {
        padding: 15px 20px 15px 30px;
        font-size: 13px;
        color: var(--primary);
        border-bottom: 1px solid #fff;
    }

    .has-submenu.open > .submenu {
        display: block;
    }

    .has-submenu.open > a {
        background-color: #fcfaf5;
        color: var(--accent);
    }

    .has-submenu.open > a .dropdown-icon {
        transform: rotate(180deg);
    }
}

/* ==========================================================================
   3. KOMPONEN FOOTER
   ========================================================================== */
.main-footer {
    background-color: var(--primary);
    color: #ffffff;
    padding: 70px 0 0 0;
    border-top: 5px solid var(--accent);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 25px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
}

.footer-about img {
    max-height: 80px;
    width: auto;
    margin-bottom: 25px;
    display: block;
}

.footer-about p {
    font-size: 14px;
    line-height: 1.8;
    color: #eeeeee;
    margin: 0;
    text-align: justify;
}

.footer-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 30px;
    padding-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 35px;
    height: 2px;
    background-color: #ffffff;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-contact {
    font-size: 14px;
}

.contact-item {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-label {
    color: var(--accent);
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 1px;
}

.contact-text {
    color: #ffffff;
    line-height: 1.5;
}

.footer-bottom {
    background-color: #4a0000;
    padding: 25px 0;
    margin-top: 60px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-bottom p {
    font-size: 12px;
    margin: 0;
    color: rgba(255, 255, 255, 0.6);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-about img {
        margin: 0 auto 25px;
    }

    .footer-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .footer-links a:hover {
        transform: none;
        color: var(--accent);
    }
}

/* ==========================================================================
   4. LAYOUT UTAMA (CONTAINER & TITLES)
   ========================================================================== */
.site-main,
.archive,
.blog,
.home,
.page-content,
.elementor,
.elementor-section,
.elementor-container {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
}

.container {
    max-width: 1200px;
    margin: auto;
    padding: 100px 0;
}

.page-title {
    text-align: center;
    margin-bottom: 60px;
}

.page-title h1 {
    font-size: 48px;
    font-weight: 800;
    color: var(--primary);
}

.title-divider {
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 16px auto 0;
    border-radius: 2px;
}

/* ==========================================================================
   5. BLOG ARCHIVE & WIDGET
   ========================================================================== */
.page-header {
    background: var(--primary) !important;
    color: var(--white) !important;
    text-align: center !important;
    border-radius: 0 0 32px 32px !important;
    width: 100% !important;
    padding-top: 100px !important;
    padding-bottom: 100px !important;
    margin-bottom: 0 !important;
}

.page-header .page-header-content {
    width: 100%;
}

.page-header h1 {
    font-size: 48px !important;
    font-weight: 800 !important;
    letter-spacing: -1px !important;
    line-height: 1.1 !important;
    margin-bottom: 15px !important;
    color: #ffffff !important;
}

.page-header p {
    font-size: 18px !important;
    color: rgba(255, 255, 255, 0.8) !important;
    max-width: 700px;
    margin: 0 auto !important;
    line-height: 1.7 !important;
}

.blog-section {
    padding-top: 100px !important;
    padding-bottom: 100px !important;
}

/* anti pink, tetap gaya bawaan */
.blog-section a,
.page-header a,
.news-card a,
.post-card a {
    color: var(--primary) !important;
}

.blog-section a:hover,
.page-header a:hover,
.news-card a:hover,
.post-card a:hover {
    color: var(--accent) !important;
}

/* Flex-center logic: grup di tengah, orphan tetap kiri */
.post-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    align-content: flex-start !important;
    gap: 30px !important;
    width: 100% !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.news-card,
.post-card {
    box-sizing: border-box !important;
    background: #ffffff !important;
    border-radius: 32px !important;
    overflow: hidden !important;
    transition: var(--transition) !important;
    box-shadow: var(--shadow-sm) !important;
    display: flex !important;
    flex-direction: column !important;
    flex-shrink: 0 !important;
    height: 100% !important;
    border: 1px solid #f3f4f6;
}

.news-card:hover,
.post-card:hover {
    transform: translateY(-8px) !important;
    box-shadow: var(--shadow-md) !important;
    border-color: var(--accent);
}

/* Desktop 3 kolom */
@media (min-width: 1025px) {
    .news-card,
    .post-card {
        flex: 0 0 calc((100% - 60px) / 3) !important;
        max-width: calc((100% - 60px) / 3) !important;
        min-width: calc((100% - 60px) / 3) !important;
    }

    .page-header h1,
    .page-title h1 {
        font-size: 48px !important;
    }

    .page-header,
    .blog-section,
    .container {
        padding-top: 100px !important;
        padding-bottom: 100px !important;
    }

    .container {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

/* Tablet 2 kolom */
@media (min-width: 768px) and (max-width: 1024px) {
    .news-card,
    .post-card {
        flex: 0 0 calc((100% - 30px) / 2) !important;
        max-width: calc((100% - 30px) / 2) !important;
        min-width: calc((100% - 30px) / 2) !important;
    }

    .page-header h1,
    .page-title h1 {
        font-size: 36px !important;
    }

    .page-header,
    .blog-section,
    .container {
        padding-top: 60px !important;
        padding-bottom: 60px !important;
    }

    .container {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

/* Mobile 1 kolom */
@media (max-width: 767px) {
    .news-card,
    .post-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        min-width: 100% !important;
    }

    .page-header h1,
    .page-title h1 {
        font-size: 32px !important;
    }

    .page-header,
    .blog-section,
    .container {
        padding-top: 40px !important;
        padding-bottom: 40px !important;
    }

    .container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .post-grid {
        justify-content: center !important;
    }
}

/* Thumbnail / image */
.news-img,
.post-thumbnail {
    height: 240px;
    overflow: hidden;
    position: relative;
    background: #e2e8f0;
}

.news-img a,
.post-thumbnail a {
    display: block;
    width: 100%;
    height: 100%;
}

.news-img img,
.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.news-card:hover .news-img img,
.post-card:hover .post-thumbnail img {
    transform: scale(1.05);
}

.category-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: #ffffff;
    color: var(--primary) !important;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 2;
    box-shadow: var(--shadow-sm);
}

.news-content,
.post-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date,
.post-meta {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 16px;
    font-family: 'Poppins', sans-serif;
}

.news-date {
    font-size: 13px;
    font-weight: 800;
    color: var(--accent) !important;
    display: block;
    margin-bottom: 10px;
    letter-spacing: 0.2px;
}

/* Title clamp 2 baris */
.news-card h4,
.news-card .post-title,
.news-card h4 a,
.news-card .post-title a,
.post-card .post-title,
.post-card .post-title a {
    font-size: 20px !important;
    color: var(--primary) !important;
    line-height: 1.4 !important;
    font-weight: 800 !important;
    text-decoration: none !important;
    margin-bottom: 12px !important;
    word-break: break-word !important;
}

.news-card h4 a,
.news-card .post-title a,
.post-card .post-title a {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: calc(1.4em * 2) !important;
}

/* Excerpt clamp 3 baris */
.post-excerpt,
.post-excerpt p,
.news-card p {
    font-size: 15px !important;
    color: var(--text-light) !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
}

.post-excerpt {
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: calc(1.6em * 3) !important;
}

.post-excerpt p {
    margin: 0 !important;
}

/* Read more */
.btn-read-more,
.read-more {
    font-weight: 800 !important;
    font-size: 14px !important;
    color: var(--primary) !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    margin-top: auto !important;
    padding-top: 0 !important;
    border-top: none !important;
    transition: var(--transition) !important;
}

.btn-read-more:hover,
.read-more:hover {
    color: var(--accent) !important;
}

.btn-read-more svg,
.btn-read-more i,
.read-more svg,
.read-more i {
    display: inline-block !important;
    transition: transform 0.3s ease !important;
}

.btn-read-more:hover svg,
.btn-read-more:hover i,
.read-more:hover svg,
.read-more:hover i {
    transform: translateX(5px) !important;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 70px;
}

.pagination .nav-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    background: #f3f4f6;
    color: #374151;
    transition: all .2s ease;
}

.pagination a.page-numbers:hover {
    background: var(--accent);
    color: #ffffff;
}

.pagination .page-numbers.current {
    background: var(--primary);
    color: #ffffff;
}

.pagination .page-numbers.prev,
.pagination .page-numbers.next {
    padding: 0 18px;
}

/* ==========================================================================
   6. SINGLE POST & SIDEBAR
   ========================================================================== */
.post-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    align-items: start;
}

.post-layout article {
    max-width: 720px;
}

.article-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    color: var(--primary);
    margin-bottom: 16px;
}

.article-meta {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 30px;
}

.featured-image {
    margin-bottom: 40px;
    border-bottom: 4px solid var(--accent);
    border-radius: 10px 10px 0 0;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    display: block;
}

.article-content {
    font-size: 17px;
    line-height: 1.8;
    color: #374151;
    text-align: justify;
}

.article-content p {
    margin-bottom: 24px;
}

.article-content h2 {
    font-size: 28px;
    margin-top: 40px;
    margin-bottom: 14px;
    color: var(--primary);
}

.article-content h3 {
    font-size: 22px;
    margin-top: 30px;
    margin-bottom: 10px;
    color: #1f2937;
}

.article-content ul {
    margin: 20px 0 20px 20px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    border-left: 4px solid var(--accent);
    background: #fcfaf5;
    padding: 18px 20px;
    margin: 30px 0;
    font-style: italic;
    color: var(--primary);
    font-weight: 500;
}

.sidebar {
    max-width: 340px;
    padding-left: 35px;
    border-left: 1px solid #e5e7eb;
}

.sidebar-widget {
    background: #fcfaf5;
    border: 1px solid #f0e6d2;
    border-radius: 10px;
    padding: 26px;
    margin-bottom: 32px;
}

.sidebar-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 20px;
    position: relative;
    padding-left: 16px;
}

.sidebar-title:before {
    content: "";
    position: absolute;
    left: 0;
    top: 7px;
    width: 4px;
    height: 22px;
    background: var(--accent);
    border-radius: 2px;
}

.sidebar-list {
    list-style: none;
}

.sidebar-list li {
    padding: 12px 0;
    border-bottom: 1px solid #e5e7eb;
}

.sidebar-list li:last-child {
    border: none;
}

.sidebar-list a {
    text-decoration: none;
    color: #374151;
    font-size: 16px;
    line-height: 1.5;
    font-weight: 500;
    transition: .2s;
}

.sidebar-list a:hover {
    color: var(--accent);
    padding-left: 4px;
}

.sidebar-cta {
    background: var(--primary);
    color: white;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    border-bottom: 4px solid var(--accent);
}

.sidebar-cta h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: white;
}

.sidebar-cta p {
    font-size: 15px;
    margin-bottom: 18px;
    opacity: .9;
}

.sidebar-button {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    transition: .2s;
}

.sidebar-button:hover {
    background: #b0882e;
}

/* Responsive single post */
@media (max-width: 1024px) {
    .post-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border: none;
        padding-left: 0;
        max-width: 100%;
    }

    .article-title {
        font-size: 36px;
    }

    .article-content h2 {
        font-size: 26px;
    }
}

@media (max-width: 640px) {
    .page-title h1 {
        font-size: 32px;
    }

    .article-title {
        font-size: 32px;
    }

    .article-content {
        font-size: 16px;
    }

    .post-grid {
        justify-content: center !important;
    }
}