* {
    box-sizing: border-box;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

:root {
    --bg: #f7f3ef;
    --surface: #ffffff;
    --surface-soft: #fff7ed;
    --text: #1f2933;
    --muted: #687282;
    --brand: #16213e;
    --brand-2: #0f766e;
    --accent: #f97316;
    --accent-2: #ec4899;
    --line: #eadfd4;
    --shadow: 0 18px 45px rgba(52, 36, 28, 0.13);
}

body {
    margin: 0;
    background:
        radial-gradient(circle at 12% -8%, rgba(249, 115, 22, 0.16), transparent 28%),
        radial-gradient(circle at 86% 4%, rgba(20, 184, 166, 0.14), transparent 30%),
        var(--bg);
    color: var(--text);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    line-height: 1.65;
}

a {
    color: inherit;
    text-decoration: none;
}

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

.site-header {
    position: relative;
    z-index: 1000;
    background: linear-gradient(135deg, #111827 0%, #16213e 46%, #0f766e 130%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(14px);
}

.site-header__inner {
    max-width: 1180px;
    margin: 0 auto;
    min-height: 74px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand img {
    height: 42px;
    width: auto;
    max-width: 240px;
    object-fit: contain;
}

.social-nav,
.site-footer nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.social-nav a,
.site-footer nav a {
    color: #e5e7eb;
    min-width: 40px;
    min-height: 40px;
    padding: 9px 12px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.social-nav a:hover,
.site-footer nav a:hover {
    background: rgba(249, 115, 22, 0.18);
    border-color: rgba(249, 115, 22, 0.36);
    color: #fff;
}

.category-nav {
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(234, 223, 212, 0.95);
    box-shadow: 0 10px 28px rgba(31, 41, 51, 0.08);
    backdrop-filter: blur(16px);
    display: flex;
    gap: 8px;
    justify-content: center;
    overflow-x: auto;
    padding: 12px 16px;
    scrollbar-width: none;
}

.category-nav::-webkit-scrollbar {
    display: none;
}

.category-nav a {
    flex: 0 0 auto;
    color: #263342;
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    border: 1px solid #eadfd4;
    border-radius: 14px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 8px 20px rgba(52, 36, 28, 0.08);
    transition: transform .18s ease, box-shadow .18s ease, color .18s ease, border-color .18s ease;
}

.category-nav a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(249, 115, 22, 0.22);
}

.category-nav i {
    color: var(--accent);
}

.category-nav a:hover i {
    color: #fff;
}

.carousel {
    max-width: 1180px;
    height: 320px;
    margin: 24px auto 0;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    background: var(--brand);
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.carousel img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
    transition: opacity .8s ease;
}

.carousel img.hidden {
    opacity: 0;
}

.carousel img.visible {
    opacity: 1;
}

.container,
.isi-container {
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 20px;
}

.category-page {
    max-width: 1180px;
    margin: 28px auto;
    padding: 0 20px;
}

.category-hero {
    background:
        linear-gradient(135deg, rgba(22, 33, 62, 0.96) 0%, rgba(15, 118, 110, 0.9) 105%),
        linear-gradient(45deg, rgba(249, 115, 22, 0.85), rgba(236, 72, 153, 0.4));
    color: #fff;
    padding: 28px;
    margin-bottom: 24px;
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.category-hero span {
    color: #fbbf24;
    font-weight: 900;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: .08em;
}

.category-hero h1 {
    margin: 8px 0;
    font-size: 38px;
    line-height: 1.15;
}

.category-hero p {
    max-width: 720px;
    margin: 0;
    color: #dbeafe;
}

.category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.empty-state {
    background: #fff;
    border: 1px solid var(--line);
    padding: 24px;
}

.main-content,
.isi-container {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 28px;
    align-items: start;
}

.left-column,
.right-column,
.card,
.card-header,
.card-header a,
.card h3,
.card-title {
    min-width: 0;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.card,
.card-item,
.isi-article-container,
.isi-sidebar {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 10px 28px rgba(52, 36, 28, 0.08);
}

.card {
    overflow: hidden;
    border-radius: 18px;
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card:hover {
    transform: translateY(-3px);
    border-color: rgba(249, 115, 22, 0.38);
    box-shadow: 0 18px 38px rgba(52, 36, 28, 0.16);
}

.card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.card-content {
    padding: 16px;
}

.card-header {
    display: block;
    max-width: 100%;
}

.card h3,
.card-title {
    margin: 0;
    color: var(--text);
    font-size: 18px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    overflow: visible;
    word-break: normal;
}

.card-header a {
    display: block;
    max-width: 100%;
}

.card a:hover h3,
.card-item a:hover .card-title {
    color: var(--accent);
}

.right-column,
.isi-sidebar {
    position: sticky;
    top: 78px;
    align-self: start;
}

.card-section-title {
    margin: 0 0 16px;
    color: var(--brand);
    font-size: 20px;
    line-height: 1.3;
    position: relative;
    padding-left: 14px;
}

.card-section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 5px;
    height: 24px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--accent), var(--accent-2));
}

.card-item {
    display: grid;
    grid-template-columns: 96px 1fr;
    gap: 12px;
    padding: 10px;
    margin-bottom: 12px;
    border-radius: 16px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.card-item:hover {
    transform: translateX(-2px);
    border-color: rgba(15, 118, 110, 0.35);
    box-shadow: 0 14px 28px rgba(15, 118, 110, 0.12);
}

.card-image {
    width: 96px;
    height: 72px;
    object-fit: cover;
    border-radius: 12px;
}

.card-item .card-content {
    padding: 0;
}

.card-title {
    font-size: 14px;
}

.isi-article-container,
.isi-sidebar {
    padding: 22px;
    border-radius: 14px;
}

.isi-article-container h2 {
    margin: 0 0 18px;
    font-size: 34px;
    line-height: 1.2;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.isi-article-content img {
    width: 100%;
    max-height: 460px;
    object-fit: cover;
    margin-bottom: 20px;
}

.isi-article-content p,
.isi-article-content li {
    color: #374151;
    font-size: 17px;
    overflow-wrap: anywhere;
}

.isi-article-content p {
    margin: 0 0 18px;
}

.isi-article-content h2,
.isi-article-content h3 {
    color: var(--brand);
    line-height: 1.25;
    margin: 28px 0 12px;
}

.site-footer {
    margin-top: 44px;
    background:
        radial-gradient(circle at 14% 0%, rgba(236, 72, 153, 0.36), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(249, 115, 22, 0.4), transparent 30%),
        linear-gradient(135deg, #101827 0%, #16213e 46%, #0f766e 118%);
    color: #e5e7eb;
    border-top: 4px solid #fb923c;
    position: relative;
    overflow: hidden;
}

.site-footer__inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 42px 20px 28px;
    display: grid;
    grid-template-columns: minmax(280px, 1.1fr) minmax(320px, .9fr);
    gap: 34px;
    align-items: start;
}

.site-footer strong {
    display: block;
    color: #fff;
    font-size: 30px;
    line-height: 1.1;
    margin-bottom: 8px;
}

.site-footer p {
    max-width: 620px;
    margin: 0 0 18px;
    color: #dbeafe;
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.footer-links a,
.footer-social a {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 14px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 800;
    transition: transform .18s ease, background .18s ease, border-color .18s ease;
}

.footer-links a:hover,
.footer-social a:hover {
    background: linear-gradient(135deg, #f97316, #ec4899);
    border-color: transparent;
    transform: translateY(-1px);
}

.footer-social {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.footer-social a {
    width: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
}

.site-footer small {
    grid-column: 1 / -1;
    display: block;
    padding-top: 22px;
    border-top: 1px solid rgba(255, 255, 255, 0.11);
    color: #cbd5e1;
}

.sidebar-panel {
    background: linear-gradient(180deg, #ffffff 0%, #fff7ed 100%);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 18px;
    margin-top: 18px;
    box-shadow: 0 10px 28px rgba(52, 36, 28, 0.08);
}

.sidebar-panel h3 {
    margin: 0 0 12px;
    color: var(--brand);
    font-size: 18px;
    line-height: 1.25;
}

.topic-cloud {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.topic-cloud a {
    color: #334155;
    background: #fff;
    border: 1px solid #eadfd4;
    border-radius: 999px;
    padding: 7px 11px;
    font-size: 13px;
    font-weight: 800;
}

.topic-cloud a:hover {
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    border-color: transparent;
}

.accent-panel {
    color: #fff;
    background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
    border: 0;
}

.accent-panel h3,
.accent-panel p {
    color: #fff;
}

.accent-panel p {
    margin: 0 0 14px;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #fff;
    color: var(--brand);
    font-weight: 900;
}

.scroll-to-top {
    display: none;
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
}

@media (max-width: 900px) {
    .social-nav {
        gap: 6px;
    }

    .social-nav a {
        min-width: 36px;
        min-height: 36px;
        padding: 8px;
    }

    .category-nav {
        justify-content: flex-start;
        padding: 10px 14px;
    }

    .category-nav a {
        font-size: 13px;
        padding: 8px 12px;
        border-radius: 13px;
    }

    .carousel {
        height: 210px;
        margin-top: 16px;
        border-radius: 0;
    }

    .main-content,
    .isi-container {
        grid-template-columns: 1fr;
    }

    .container,
    .isi-container {
        width: 100%;
        max-width: 100vw;
        overflow: hidden;
    }

    .card-grid {
        width: 100%;
        max-width: calc(100vw - 40px);
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .card {
        width: 100%;
        max-width: calc(100vw - 40px);
    }

    .card h3 {
        width: 100%;
        max-width: clamp(230px, 58vw, 520px);
        white-space: normal;
    }

    .right-column,
    .isi-sidebar {
        position: static;
    }

    .site-footer__inner {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .site-header__inner {
        min-height: 70px;
        padding: 10px 14px;
    }

    .brand img {
        height: 36px;
        max-width: 190px;
    }

    .container,
    .isi-container {
        padding: 0 14px;
        margin: 18px auto;
        width: auto;
        max-width: 100%;
        overflow: visible;
    }

    .isi-container {
        display: block;
    }

    .card-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        width: 100%;
        max-width: calc(100vw - 28px);
    }

    .card {
        width: 100%;
        max-width: calc(100vw - 28px);
    }

    .card img {
        width: 100%;
        max-width: 100%;
        height: 190px;
    }

    .card-content {
        padding: 14px 16px 16px;
    }

    .card h3 {
        font-size: 18px;
        width: 100%;
        max-width: 280px;
        white-space: normal;
    }

    .card-item {
        grid-template-columns: 88px 1fr;
        gap: 10px;
    }

    .card-image {
        width: 88px;
        height: 68px;
    }

    .isi-article-container,
    .isi-sidebar {
        padding: 16px;
        width: calc(100vw - 32px);
        max-width: calc(100vw - 32px);
        overflow: hidden;
    }

    .isi-article-content,
    .isi-article-content * {
        max-width: 100%;
    }

    .isi-article-container h2 {
        font-size: 26px;
        line-height: 1.22;
        max-width: 100%;
    }

    .isi-article-content img {
        max-height: 320px;
    }

    .isi-article-content p,
    .isi-article-content li {
        font-size: 16px;
        line-height: 1.75;
    }

    .site-footer__inner {
        text-align: center;
        padding: 36px 16px 28px;
        gap: 22px;
    }

    .site-footer strong {
        font-size: 32px;
        background: linear-gradient(90deg, #ffffff, #fed7aa 55%, #fbcfe8);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

    .site-footer p {
        margin: 0 auto 18px;
        max-width: 330px;
        font-size: 14px;
        line-height: 1.55;
    }

    .footer-links {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
        width: 100%;
    }

    .footer-links a {
        min-height: 44px;
        padding: 9px 8px;
        border-radius: 13px;
        background: rgba(255, 255, 255, 0.12);
        font-size: 13px;
    }

    .footer-social {
        justify-content: center;
        gap: 12px;
    }

    .footer-social a {
        width: 46px;
        min-height: 46px;
        font-size: 16px;
        background: linear-gradient(135deg, rgba(249, 115, 22, 0.95), rgba(236, 72, 153, 0.88));
        border-color: rgba(255, 255, 255, 0.2);
    }

    .site-footer small {
        padding-top: 18px;
        font-size: 12px;
    }

    .category-page {
        padding: 0 14px;
        margin: 18px auto;
    }

    .category-hero {
        padding: 22px;
    }

    .category-hero h1 {
        font-size: 30px;
    }
}
