@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=Merriweather:ital,wght@0,400;0,700;1,400&display=swap');

:root {
    --primary: #0d3e3e;
    --primary-light: #155d5d;
    --accent: #14b8a6;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --text-main: #0f172a;
    --text-body: #334155;
    --text-muted: #64748b;
    --border: #e2e8f0;
    --radius-lg: 16px;
    --radius-md: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
}

* { box-sizing: border-box; }

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-body);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; transition: all 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }

/* ─── Header ─── */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}
.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.main-nav { display: flex; gap: 32px; }
.main-nav a { font-size: 15px; font-weight: 600; color: var(--text-muted); }
.main-nav a:hover, .main-nav a.active { color: var(--primary); }
.main-nav a.active { border-bottom: 2px solid var(--accent); padding-bottom: 4px; }

/* ─── Global Layout ─── */
.container { max-width: 1400px; margin: 40px auto; padding: 0 24px; }

/* ─── Home : Hero Banner ─── */
.hero-banner {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 480px;
    margin-bottom: 60px;
    box-shadow: var(--shadow-md);
    display: block;
}
.hero-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
    background: #cbd5e1;
    transition: transform 0.6s ease;
}
.hero-banner:hover img { transform: scale(1.03); }
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,62,62,0.95) 0%, rgba(13,62,62,0.2) 60%, transparent 100%);
}
.hero-content {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px;
    color: white;
}
.cat-badge {
    background: var(--accent);
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
    margin-bottom: 20px;
}
.hero-content h1 {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.1;
    margin: 0 0 15px 0;
    max-width: 800px;
}

/* ─── Cards Base ─── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    margin-bottom: 30px;
}
.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
    border-color: var(--primary-light);
}
.card-img { width: 100%; background: #e2e8f0; position: relative; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { font-size: 20px; font-weight: 700; line-height: 1.3; margin: 0 0 12px 0; }
.card-title a:hover { color: var(--primary-light); }
.card-excerpt { color: var(--text-muted); font-size: 15px; line-height: 1.6; margin: 0 0 20px 0; flex-grow: 1; }
.card-meta {
    font-size: 13px; color: var(--text-muted); font-weight: 500; display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding-top: 15px;
}
.card-horizontal { flex-direction: row; align-items: stretch; margin-bottom:0;}
.card-horizontal .card-img { width: 40%; height: auto; min-height: 150px; }
.card-horizontal .card-body { width: 60%; padding: 20px; }
.card-horizontal .card-title { font-size: 18px; }

/* ─── Home Grids ─── */
.cat-section { margin-bottom: 80px; }
.cat-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid var(--border); padding-bottom: 15px;
}
.cat-header h2 {
    font-size: 28px; font-weight: 800; color: var(--primary); margin: 0; display: flex; align-items: center; gap: 12px;
}
.cat-header h2::before { content: ''; display: block; width: 6px; height: 28px; background: var(--accent); border-radius: 4px; }
.cat-header a.view-all { font-size: 14px; font-weight: 700; color: var(--primary-light); display: flex; align-items: center; gap: 6px; }
.cat-header a.view-all:hover { color: var(--accent); }

.mag-grid-1 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.mag-grid-1 .card-featured .card-img { height: 350px; }
.mag-grid-1 .card-featured .card-title { font-size: 28px; }
.stacked-cards { display: flex; flex-direction: column; gap: 30px; }

.mag-grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.mag-grid-4 .card-img { height: 180px; }
.mag-grid-4 .card-title { font-size: 18px; }

/* ─── Category Page ─── */
.cat-hero {
    background-color: var(--primary); color: white; padding: 60px 24px; text-align: center; border-bottom: 5px solid var(--accent);
}
.cat-hero h1 { font-size: 48px; font-weight: 800; margin: 0 0 15px 0; letter-spacing: -1px; }
.cat-hero p { font-size: 18px; color: #cbd5e1; max-width: 700px; margin: 0 auto 20px; line-height: 1.6; }
.cat-stats { display: inline-block; background: rgba(255,255,255,0.1); padding: 8px 16px; border-radius: 30px; font-size: 14px; font-weight: 600; }

.cat-container { display: grid; grid-template-columns: 2.5fr 1fr; gap: 40px; max-width: 1400px; margin: 60px auto; padding: 0 24px; }

/* Sidebar */
.sidebar-sticky { position: sticky; top: 100px; }
.widget {
    background: var(--bg-card); border-radius: var(--radius-md); border: 1px solid var(--border); padding: 24px; margin-bottom: 30px; box-shadow: var(--shadow-sm);
}
.widget-title { font-size: 16px; font-weight: 800; text-transform: uppercase; color: var(--primary); margin: 0 0 20px 0; display: flex; align-items: center; gap: 10px; }
.widget-title::before { content: ''; display: block; width: 4px; height: 16px; background: var(--accent); border-radius: 2px; }
.side-list { list-style: none; padding: 0; margin: 0; }
.side-list li { margin-bottom: 15px; border-bottom: 1px solid var(--border); padding-bottom: 15px; }
.side-list li:last-child { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }
.side-list a { font-size: 15px; font-weight: 600; line-height: 1.4; display: block; }
.side-list a:hover { color: var(--primary-light); }

/* ─── Article Page ─── */
.art-header { max-width: 900px; margin: 60px auto 40px; padding: 0 24px; text-align: center; }
.breadcrumb { font-size: 13px; color: var(--text-muted); font-weight: 600; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.breadcrumb a { color: var(--primary); }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb span { margin: 0 8px; color: var(--border); }
.art-title { font-size: 46px; font-weight: 800; line-height: 1.15; color: var(--primary); margin: 0 0 20px 0; letter-spacing: -0.5px; }
.art-subtitle { font-size: 20px; color: var(--text-muted); line-height: 1.5; margin: 0 0 30px 0; font-weight: 500; }
.art-meta-pill { display: inline-flex; align-items: center; gap: 15px; background: var(--bg-card); padding: 8px 24px; border-radius: 40px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); font-size: 14px; font-weight: 600; color: var(--text-muted); }
.art-meta-pill strong { color: var(--primary); }
.art-hero-img { max-width: 1200px; margin: 0 auto 60px; padding: 0 24px; }
.art-hero-img img { width: 100%; height: auto; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); background: #e2e8f0; }

.art-container { max-width: 1200px; margin: 0 auto 60px; padding: 0 24px; display: grid; grid-template-columns: 2.5fr 1fr; gap: 60px; }
.art-content { font-family: 'Merriweather', serif; font-size: 18px; line-height: 1.8; color: var(--text-body); }
.art-content h2 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 28px; font-weight: 800; color: var(--primary); margin: 40px 0 20px; }
.art-content h3 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 22px; font-weight: 700; color: var(--primary-light); margin: 30px 0 15px; }
.art-content p { margin-bottom: 24px; }
.art-content a { color: var(--accent); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(20, 184, 166, 0.4); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.art-content a:hover { text-decoration-color: var(--accent); }

.art-tldr { background: var(--bg-card); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius-md); padding: 30px; margin: 0 0 40px 0; font-family: 'Plus Jakarta Sans', sans-serif; box-shadow: var(--shadow-sm); }
.art-tldr-title { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.art-tldr ul { margin: 0; padding-left: 20px; }
.art-tldr li { margin-bottom: 10px; font-size: 16px; color: var(--text-main); font-family: 'Plus Jakarta Sans', sans-serif;}

.author-box { text-align: center; }
.author-avatar { width: 80px; height: 80px; object-fit: cover; border-radius: 50%; margin: 0 auto 15px; }
.author-name { font-size: 18px; font-weight: 800; margin: 0 0 5px; color: var(--primary); }
.author-role { font-size: 13px; color: var(--accent); font-weight: 700; text-transform: uppercase; margin-bottom: 15px; display: block; }
.author-bio { font-size: 14px; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* ─── Footer ─── */
.site-footer { background-color: var(--primary); color: white; padding: 80px 24px 40px; margin-top: 80px; font-family: 'Plus Jakarta Sans', sans-serif;}
.footer-inner { max-width: 1400px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 60px; }
.footer-logo { font-size: 32px; font-weight: 800; margin-bottom: 20px; }
.footer-logo span { color: var(--accent); }
.footer-col h4 { font-size: 15px; font-weight: 700; text-transform: uppercase; color: var(--accent); margin: 0 0 20px 0; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a { color: #cbd5e1; font-size: 15px; }
.footer-links a:hover { color: white; padding-left: 6px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 14px; color: rgba(255,255,255,0.5); }

/* ─── Article Content Components ─── */
.art-content .hl { background: rgba(20,184,166,0.18); color: var(--primary); padding: 2px 6px; border-radius: 4px; font-weight: 700; }

.art-content .art-table { width: 100%; border-collapse: collapse; margin: 30px 0; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; }
.art-content .art-table th { background: var(--primary); color: white; padding: 12px 16px; text-align: left; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.art-content .art-table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
.art-content .art-table tr:last-child td { border-bottom: none; }
.art-content .art-table tr:hover td { background: var(--bg-body); }
.art-content .art-table .verdict-danger { color: #dc2626; font-weight: 700; }
.art-content .art-table .verdict-warn { color: #d97706; font-weight: 700; }
.art-content .art-table .verdict-ok { color: #16a34a; font-weight: 700; }

.art-img { width: 100%; border-radius: var(--radius-md); margin: 30px 0; box-shadow: var(--shadow-sm); display: block; }

.pro-advice { background: var(--primary); color: #e2e8f0; border-radius: var(--radius-md); padding: 24px 30px; margin: 30px 0; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 16px; line-height: 1.7; border-left: 5px solid var(--accent); }
.pro-advice strong { color: var(--accent); }

.art-tool { background: var(--bg-body); border: 1px solid var(--border); border-left: 5px solid var(--accent); border-radius: var(--radius-md); padding: 30px; margin: 40px 0; font-family: 'Plus Jakarta Sans', sans-serif; }
.art-tool h2, .art-tool h3 { color: var(--primary); margin-top: 0; font-family: 'Plus Jakarta Sans', sans-serif; }
.art-tool label { display: block; font-weight: 700; margin-bottom: 8px; color: var(--text-muted); font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; }
.art-tool select, .art-tool input[type="number"] { width: 100%; padding: 12px 16px; border: 1px solid var(--border); border-radius: var(--radius-md); font-size: 17px; background: white; color: var(--text-main); font-family: 'Plus Jakarta Sans', sans-serif; }
.art-tool select:focus, .art-tool input[type="number"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(20,184,166,0.15); }
.art-tool-grid { display: grid; grid-template-columns: 1fr 60px 1fr; gap: 20px; align-items: end; margin: 20px 0; }
.art-tool-sep { font-size: 2rem; color: var(--accent); text-align: center; line-height: 1; padding-bottom: 12px; }
.tool-result { margin-top: 15px; padding: 15px 20px; border-radius: var(--radius-md); background: white; border: 1px solid var(--border); font-weight: 700; font-family: 'Plus Jakarta Sans', sans-serif; display: none; }
.tool-result.danger { border-color: #dc2626; color: #dc2626; background: #fef2f2; }
.tool-result.warn { border-color: #d97706; color: #d97706; background: #fffbeb; }
.tool-result.ok { border-color: #16a34a; color: #16a34a; background: #f0fdf4; }

/* Responsive basics */
@media (max-width: 992px) {
    .mag-grid-1, .mag-grid-4, .cat-container, .art-container { grid-template-columns: 1fr; }
    .hero-banner { height: 350px; }
    .footer-inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
    .main-nav { display: none; } /* Add mobile menu later if needed */
    .card-horizontal { flex-direction: column; }
    .card-horizontal .card-img { width: 100%; height: 200px; }
    .card-horizontal .card-body { width: 100%; }
    .footer-inner { grid-template-columns: 1fr; }
}
