/* Core & Variables */
:root {
    --primary: #f26422;
    /* Energic Orange */
    --primary-hover: #d25015;
    --secondary: #212529;
    /* Dark Gray */
    --bg-color: #121212;
    --surface: #1e1e1e;
    --text: #e0e0e0;
    --text-muted: #a0a0a0;
    --forest: #2b4528;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: #fff;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    background: rgba(18, 18, 18, 0.95);
    backdrop-filter: blur(10px);
    padding: 15px 5%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    letter-spacing: 1px;
}

.brand-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.footer-logo {
    height: 60px;
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: #fff;
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background: var(--primary);
    bottom: -5px;
    left: 0;
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background: var(--primary);
    color: #fff;
    border-radius: 30px;
    font-weight: 600;
    transition: var(--transition);
    border: 1px solid var(--primary);
    cursor: pointer;
}

.btn:hover {
    background: transparent;
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(242, 100, 34, 0.3);
}

.btn-outline {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--bg-color);
    box-shadow: 0 5px 15px rgba(255, 255, 255, 0.2);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    color: #fff;
    cursor: pointer;
    transition: var(--transition);
}

.menu-toggle:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    padding: 0 5%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeUp 1s forwards 0.3s;
}

.hero h1 {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-muted);
    margin-bottom: 30px;
    max-width: 600px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Sections General */
section {
    padding: 100px 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateY(20px);
}

.section-title.visible {
    animation: fadeUp 0.8s forwards;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: #fff;
}

.section-title .accent {
    width: 60px;
    height: 3px;
    background: var(--primary);
    margin: 0 auto;
}

/* Cards (Features/Blog) */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--surface);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    border: 1px solid rgba(255, 255, 255, 0.05);
    opacity: 0;
    transform: translateY(20px);
    display: flex;
    flex-direction: column;
}

.card.visible {
    animation: fadeUp 0.8s forwards;
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    border-color: rgba(242, 100, 34, 0.3);
}

.card-img {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.card-content h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card-content p {
    color: var(--text-muted);
    margin-bottom: 20px;
    flex: 1;
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img {
    width: 100%;
    border-radius: 12px;
    position: relative;
}

.about-img::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--primary);
    border-radius: 12px;
    z-index: -1;
}

.about-img img {
    width: 100%;
    border-radius: 12px;
    display: block;
}

/* Blog Content */
.page-header {
    padding: 150px 5% 80px;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.page-header-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
}

.page-header h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.post-meta {
    color: var(--primary);
    font-weight: 500;
    letter-spacing: 1px;
}

.post-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px 5% 100px;
}

.post-content .figure {
    margin: 40px 0;
    text-align: center;
}

.post-content img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
}

.post-content figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-style: italic;
}

.post-content h2 {
    margin: 40px 0 20px;
    font-size: 2rem;
    scroll-margin-top: 100px;
    /* For TOC anchoring */
}

.post-content h3 {
    margin: 30px 0 15px;
    font-size: 1.5rem;
}

.post-content>p {
    margin-bottom: 20px;
    font-size: 1.15rem;
    color: #ccc;
    line-height: 1.8;
}

.post-content blockquote {
    background: rgba(242, 100, 34, 0.05);
    border-left: 4px solid var(--primary);
    padding: 25px;
    margin: 40px 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    font-size: 1.3rem;
    color: #fff;
    position: relative;
}

.post-content blockquote::before {
    content: '\f10d';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 3rem;
    color: rgba(242, 100, 34, 0.1);
}

.read-also {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
    display: flex;
    align-items: center;
    gap: 15px;
}

.read-also i {
    font-size: 1.5rem;
    color: var(--primary);
}

.read-also a {
    font-size: 1.1rem;
    font-weight: 500;
    color: #fff;
}

.read-also a:hover {
    color: var(--primary);
}

/* TOC (Table of Contents) */
.toc-container {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 40px;
    overflow: hidden;
}

.toc-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.2);
    font-weight: 600;
    font-size: 1.1rem;
}

.toc-header i {
    transition: transform 0.3s ease;
}

.toc-header.open i {
    transform: rotate(180deg);
}

.toc-content {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.toc-content.open {
    padding: 15px 20px 20px;
    max-height: 500px;
    /* Arbitrary large number for slide effect */
}

.toc-content ul {
    list-style-type: none;
}

.toc-content ul li {
    margin-bottom: 10px;
}

.toc-content ul li a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
    display: inline-block;
}

.toc-content ul li a:hover {
    color: var(--primary);
    transform: translateX(5px);
}

/* FAQ */
.faq-section {
    margin: 60px 0;
}

.faq-item {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 15px;
    background: var(--surface);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
    background: rgba(0, 0, 0, 0.1);
}

.faq-question i {
    transition: transform 0.3s ease;
    color: var(--primary);
}

.faq-question.active i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.faq-answer.open {
    padding: 20px;
    max-height: 500px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Author Profile */
.author-profile {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    margin: 50px 0;
}

.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-info h4 {
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.author-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 0 !important;
}

/* Social Share */
.social-share {
    margin: 40px 0;
    text-align: center;
}

.social-share span {
    display: block;
    font-weight: 600;
    margin-bottom: 15px;
    color: #fff;
}

.share-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.share-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.2rem;
    transition: var(--transition);
}

.share-btn.wa {
    background: #25D366;
}

.share-btn.fb {
    background: #1877F2;
}

.share-btn.tw {
    background: #1DA1F2;
}

.share-btn.tg {
    background: #0088cc;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    color: #fff;
}

/* Related Articles Container */
.related-articles {
    background: var(--surface);
    padding: 60px 5%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.related-articles .section-title {
    margin-bottom: 40px;
}


/* Back to Top */
#backToTop {
    position: fixed;
    bottom: 90px;
    /* Moved up to make room for WA button */
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

#backToTop.show {
    opacity: 1;
    visibility: visible;
}

#backToTop:hover {
    background: var(--primary-hover);
    transform: translateY(-5px);
}

/* Floating WhatsApp Button */
.floating-wa {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.8rem;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    z-index: 998;
    transition: var(--transition);
}

.floating-wa:hover {
    background-color: #128C7E;
    transform: translateY(-5px);
    color: white;
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.4);
}


/* Footer */
footer {
    background: #0a0a0a;
    padding: 80px 5% 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h3 {
    color: #fff;
    margin-bottom: 25px;
    font-size: 1.5rem;
}

.footer-col p {
    color: var(--text-muted);
    margin-bottom: 15px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 15px;
}

.footer-col ul li a {
    color: var(--text-muted);
    transition: var(--transition);
}

.footer-col ul li a:hover {
    color: var(--primary);
    padding-left: 8px;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
}

/* Responsive Settings & Mobile Optimization */
@media (max-width: 991px) {
    .hero h1 {
        font-size: 3rem;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-img {
        margin-bottom: 30px;
    }

    .author-profile {
        padding: 20px;
    }
}

@media (max-width: 768px) {

    /* Navbar Adjustment */
    .navbar {
        padding: 10px 5%;
        background: rgba(18, 18, 18, 0.95);
        /* Ensure always visible background on mobile */
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .navbar.scrolled {
        padding: 10px 5%;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.4s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
        border-left: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        font-size: 1.3rem;
        width: 100%;
        text-align: center;
        padding: 10px 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        z-index: 1001;
    }

    .nav-actions .btn {
        display: none;
        /* Hide 'Pesan Sekarang' on mobile header to save space */
    }

    .btn {
        padding: 12px 20px;
        font-size: 0.95rem;
    }

    /* Global padding reduction */
    section {
        padding: 50px 5%;
    }

    /* Hero Section */
    .hero h1 {
        font-size: 2.2rem;
    }

    .hero p {
        font-size: 1.05rem;
        margin-bottom: 25px;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
        font-size: 1.05rem;
    }

    /* Headers */
    .section-title h2 {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 110px 5% 50px;
    }

    .page-header h1 {
        font-size: 2rem;
        margin-bottom: 10px;
    }

    /* Post Content */
    .post-content {
        padding: 30px 5% 50px;
    }

    .post-content h2 {
        font-size: 1.5rem;
    }

    .post-content h3 {
        font-size: 1.2rem;
        color: var(--primary);
    }

    .post-content>p {
        font-size: 1.05rem;
    }

    .post-content blockquote {
        font-size: 1.1rem;
        padding: 20px 15px;
        margin: 30px 0;
        border-radius: 0 12px 12px 0;
    }

    .post-content blockquote::before {
        font-size: 2rem;
        top: 10px;
        right: 15px;
    }

    /* TOC & Read Also */
    .read-also {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 15px;
    }

    .toc-header {
        font-size: 1rem;
    }

    /* Author Profile */
    .author-profile {
        flex-direction: column;
        text-align: center;
        padding: 24px 15px;
    }

    .author-img {
        width: 90px;
        height: 90px;
        margin: 0 auto;
    }

    /* FAQ */
    .faq-question {
        font-size: 1rem;
        padding: 15px;
    }

    /* Cards */
    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card-img {
        height: 220px;
    }

    .card-content {
        padding: 20px;
    }

    /* Footer */
    footer {
        padding: 50px 5% 30px;
    }

    .footer-grid {
        gap: 30px;
    }
}

@media (max-width: 480px) {

    /* Extra small devices fixes to avoid horizontal scroll */
    html,
    body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .logo {
        font-size: 1.3rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .page-header {
        padding: 100px 5% 40px;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .section-title h2 {
        font-size: 1.7rem;
    }

    .about-img::before {
        display: none;
        /* Prevent border outline from causing overflow */
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .post-content blockquote {
        padding: 15px;
        margin: 20px 0;
        font-size: 1.05rem;
    }

    /* Force images to respect container bounds exactly */
    img {
        max-width: 100%;
        height: auto;
    }

    .grid {
        gap: 15px;
    }
}