/* =====================================================================
   LAW FIRM CMS - Main Stylesheet
   Palet warna: Olive Green (elegan, profesional, modern)
   ===================================================================== */

:root {
    --olive-950: #1c2214;
    --olive-900: #2f371f;
    --olive-800: #3f4a2a;
    --olive-700: #556238;
    --olive-600: #6b7a45;
    --olive-500: #808f56;
    --olive-400: #a3af7b;
    --olive-300: #c3cba3;
    --olive-100: #eef0e4;
    --olive-50:  #f7f8f2;
    --gold: #b08d57;
    --ink: #23281c;
    --muted: #6b7264;
    --white: #ffffff;
    --radius: 10px;
    --shadow-sm: 0 1px 3px rgba(28,34,20,0.08);
    --shadow-md: 0 8px 24px rgba(28,34,20,0.10);
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--ink);
    background: var(--olive-50);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--olive-700); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold); }
h1,h2,h3,h4 { font-family: var(--font-serif); color: var(--olive-950); margin: 0 0 .5em; line-height: 1.25; }
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: 2.1rem; }
.section-head p { color: var(--muted); font-size: 1.02rem; }
.btn {
    display: inline-block; padding: 12px 28px; border-radius: 999px;
    font-weight: 600; font-size: .92rem; letter-spacing: .2px; cursor: pointer;
    border: 1.5px solid transparent; transition: all .25s ease;
}
.btn-primary { background: var(--olive-700); color: var(--white); }
.btn-primary:hover { background: var(--olive-800); color: var(--white); }
.btn-outline { border-color: var(--olive-400); color: var(--olive-800); background: transparent; }
.btn-outline:hover { background: var(--olive-700); color: var(--white); border-color: var(--olive-700); }
.btn-gold { background: var(--gold); color: var(--white); }

/* ---------- Top bar ---------- */
.topbar {
    background: var(--olive-950); color: var(--olive-200, #dfe4d0);
    font-size: .82rem; padding: 7px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; }
.topbar a { color: var(--olive-300); }
.lang-switch a { margin-left: 10px; padding: 2px 8px; border-radius: 4px; }
.lang-switch a.active { background: var(--olive-700); color: #fff; }

/* ---------- Header / Nav ---------- */
.site-header {
    background: rgba(255,255,255,.97); position: sticky; top: 0; z-index: 100;
    box-shadow: var(--shadow-sm); backdrop-filter: blur(6px);
}
.navbar { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    width: 44px; height: 44px; border-radius: 50%; background: var(--olive-700);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-family: var(--font-serif); font-weight: 700; font-size: 1.2rem;
}
.brand-text .site-name { font-family: var(--font-serif); font-size: 1.25rem; font-weight: 700; color: var(--olive-950); }
.brand-text .site-tagline { font-size: .74rem; color: var(--muted); letter-spacing: .5px; text-transform: uppercase; }
.nav-menu { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav-menu a { font-weight: 600; font-size: .93rem; color: var(--olive-900); }
.nav-menu a.active, .nav-menu a:hover { color: var(--gold); }
.nav-actions { display: flex; align-items: center; gap: 14px; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--olive-800); font-size: 1.15rem; }
.burger { display: none; }

/* ---------- Search overlay ---------- */
.search-box { position: relative; }
#globalSearchInput {
    padding: 10px 40px 10px 16px; border-radius: 999px; border: 1.5px solid var(--olive-300);
    width: 230px; font-size: .9rem; outline: none; transition: width .25s ease, border-color .2s;
}
#globalSearchInput:focus { width: 300px; border-color: var(--olive-600); }
.search-btn { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--olive-600); cursor: pointer; }
#searchResultsDropdown {
    position: absolute; top: 110%; right: 0; width: 380px; max-height: 420px; overflow-y: auto;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-md); display: none; z-index: 200;
}
#searchResultsDropdown .result-item { padding: 12px 16px; border-bottom: 1px solid var(--olive-100); display: flex; gap: 10px; }
#searchResultsDropdown .result-item:hover { background: var(--olive-50); }
#searchResultsDropdown img { width: 44px; height: 58px; object-fit: cover; border-radius: 4px; }
#searchResultsDropdown .r-title { font-weight: 600; font-size: .88rem; color: var(--olive-950); }
#searchResultsDropdown .r-type { font-size: .72rem; color: var(--gold); text-transform: uppercase; }

/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, var(--olive-900) 0%, var(--olive-700) 100%);
    color: #fff; padding: 100px 0 90px; text-align: center; position: relative; overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0; opacity: .06;
    background-image: radial-gradient(circle, #fff 1px, transparent 1px);
    background-size: 22px 22px;
}
.hero-content { position: relative; max-width: 720px; margin: 0 auto; }
.hero h1 { color: #fff; font-size: 2.7rem; margin-bottom: 18px; }
.hero p { font-size: 1.1rem; color: var(--olive-100); margin-bottom: 30px; }
.hero-search { max-width: 560px; margin: 0 auto; display: flex; background: #fff; border-radius: 999px; padding: 6px; box-shadow: var(--shadow-md); }
.hero-search input { flex: 1; border: none; outline: none; padding: 12px 18px; border-radius: 999px; font-size: .95rem; }
.hero-search button { border: none; background: var(--gold); color: #fff; padding: 0 26px; border-radius: 999px; font-weight: 600; cursor: pointer; }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 28px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.card {
    background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-sm);
    transition: transform .25s ease, box-shadow .25s ease; display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-thumb { position: relative; aspect-ratio: 3/4; background: var(--olive-100); overflow: hidden; }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.card-badge { position: absolute; top: 10px; left: 10px; background: var(--olive-800); color: #fff; font-size: .68rem; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; letter-spacing: .4px; }
.card-badge.subscriber { background: var(--gold); }
.card-body { padding: 18px 18px 20px; display: flex; flex-direction: column; flex: 1; }
.card-body h3 { font-size: 1.02rem; margin-bottom: 8px; }
.card-body p { color: var(--muted); font-size: .87rem; flex: 1; }
.card-meta { font-size: .76rem; color: var(--olive-600); margin-top: 10px; display: flex; justify-content: space-between; }

.article-card { display: flex; gap: 18px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.article-card img { width: 220px; object-fit: cover; }
.article-card .card-body { padding: 20px; }

/* ---------- Section variants ---------- */
.section-alt { background: var(--olive-100); }

/* ---------- Footer ---------- */
.site-footer { background: var(--olive-950); color: var(--olive-300); padding-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.3fr; gap: 40px; padding-bottom: 40px; }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 18px; font-family: var(--font-sans); }
.site-footer a { color: var(--olive-300); font-size: .88rem; }
.site-footer a:hover { color: var(--gold); }
.footer-links li { margin-bottom: 10px; list-style: none; }
.footer-links { padding: 0; margin: 0; }
.contact-item { display: flex; gap: 10px; margin-bottom: 14px; font-size: .87rem; }
.contact-item i { color: var(--gold); margin-top: 3px; }
.social-links { display: flex; gap: 12px; }
.social-links a { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--olive-700); display: flex; align-items: center; justify-content: center; }
.social-links a:hover { background: var(--gold); border-color: var(--gold); color: #fff; }
.footer-bottom { border-top: 1px solid var(--olive-800); padding: 20px 0; text-align: center; font-size: .8rem; }

/* ---------- Viewer ---------- */
.viewer-wrap { background: var(--olive-950); min-height: 100vh; }
.viewer-header { background: var(--olive-900); color: #fff; padding: 14px 24px; display: flex; justify-content: space-between; align-items: center; }
.viewer-frame-wrap { width: 100%; height: calc(100vh - 60px); position: relative; }
.viewer-frame-wrap iframe, .viewer-frame-wrap video { width: 100%; height: 100%; border: none; }
.protected-notice { background: #fff3cd; color: #7a5c00; padding: 8px 16px; font-size: .82rem; text-align: center; }

/* ---------- Breadcrumb / detail page ---------- */
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: 20px; }
.detail-hero { display: grid; grid-template-columns: 320px 1fr; gap: 40px; align-items: start; }
.detail-hero img { border-radius: var(--radius); box-shadow: var(--shadow-md); }
.tag { display: inline-block; background: var(--olive-100); color: var(--olive-800); font-size: .75rem; padding: 4px 12px; border-radius: 999px; margin-right: 8px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .detail-hero { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .nav-menu { position: fixed; top: 0; right: -100%; height: 100vh; width: 78%; background: #fff; flex-direction: column; padding: 90px 30px; transition: right .3s ease; box-shadow: -4px 0 20px rgba(0,0,0,.1); }
    .nav-menu.open { right: 0; }
    .burger { display: block; background: none; border: none; font-size: 1.4rem; cursor: pointer; }
    .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .footer-grid { grid-template-columns: 1fr; }
    .article-card { flex-direction: column; }
    .article-card img { width: 100%; height: 180px; }
    #globalSearchInput { width: 160px; }
}
