/* =============================================
   BLOG SHARED STYLES — Countrol
   ============================================= */

/* --- Theme Variables (same as main site) --- */
:root {
    --orange: #FF9500;
    --orange-light: #FFB340;
    --cyan: #32D4DE;
    --green: #34C759;
    --blue: #007AFF;
    --radius-lg: 24px;
    --radius-md: 16px;
}
[data-theme="dark"] {
    --bg: #0A0A0B;
    --bg-alt: #08080A;
    --bg-card: #141416;
    --bg-card-border: rgba(255,255,255,0.06);
    --bg-card-hover-border: rgba(255,255,255,0.1);
    --bg-subtle: rgba(255,255,255,0.06);
    --bg-subtle-border: rgba(255,255,255,0.08);
    --bg-subtle-hover: rgba(255,255,255,0.1);
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255,255,255,0.55);
    --text-tertiary: rgba(255,255,255,0.3);
    --nav-bg: rgba(10,10,11,0.75);
    --nav-border: rgba(255,255,255,0.05);
    --btn-primary-bg: #FFFFFF;
    --btn-primary-color: #0A0A0B;
    --btn-primary-shadow: rgba(255,255,255,0.15);
    --divider: rgba(255,255,255,0.04);
    --glow-orange: rgba(255,149,0,0.08);
    --toggle-bg: rgba(255,255,255,0.08);
    --dropdown-bg: #1E1E20;
    --dropdown-border: rgba(255,255,255,0.08);
    --dropdown-hover: rgba(255,255,255,0.06);
}
[data-theme="light"] {
    --bg: #FFFFFF;
    --bg-alt: #F8F8FA;
    --bg-card: #F4F4F6;
    --bg-card-border: rgba(0,0,0,0.06);
    --bg-card-hover-border: rgba(0,0,0,0.12);
    --bg-subtle: rgba(0,0,0,0.04);
    --bg-subtle-border: rgba(0,0,0,0.08);
    --bg-subtle-hover: rgba(0,0,0,0.07);
    --text-primary: #1A1A1A;
    --text-secondary: rgba(0,0,0,0.5);
    --text-tertiary: rgba(0,0,0,0.3);
    --nav-bg: rgba(255,255,255,0.78);
    --nav-border: rgba(0,0,0,0.06);
    --btn-primary-bg: #1A1A1A;
    --btn-primary-color: #FFFFFF;
    --btn-primary-shadow: rgba(0,0,0,0.15);
    --divider: rgba(0,0,0,0.06);
    --glow-orange: rgba(255,149,0,0.06);
    --toggle-bg: rgba(0,0,0,0.06);
    --dropdown-bg: #FFFFFF;
    --dropdown-border: rgba(0,0,0,0.08);
    --dropdown-hover: rgba(0,0,0,0.04);
}

/* --- Reset & Base --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg);
    color: var(--text-primary);
    overflow-x: hidden;
    line-height: 1.7;
    transition: background 0.4s ease, color 0.4s ease;
}

/* --- NAV --- */
nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--nav-bg);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--nav-border);
    transition: background 0.4s, border-color 0.4s;
}
.nav-logo {
    display: flex; align-items: center; gap: 10px;
    text-decoration: none; color: var(--text-primary);
    font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em;
    transition: color 0.4s;
}
.nav-logo-icon {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, #2DD4A0, #34C759);
    display: flex; align-items: center; justify-content: center;
}
.nav-logo-icon svg { width: 18px; height: 18px; fill: white; }

.nav-right { display: flex; align-items: center; gap: 0.75rem; }
.nav-links { display: flex; align-items: center; gap: 2rem; list-style: none; }
.nav-links a {
    color: var(--text-secondary); text-decoration: none;
    font-size: 0.875rem; font-weight: 500; transition: color 0.2s;
}
.nav-links a:hover { color: var(--text-primary); }
.nav-cta {
    padding: 8px 20px;
    background: var(--btn-primary-bg) !important;
    color: var(--btn-primary-color) !important;
    border-radius: 100px; font-weight: 600 !important;
    font-size: 0.85rem !important;
    transition: transform 0.2s, opacity 0.2s, background 0.4s, color 0.4s !important;
}
.nav-cta:hover { transform: scale(1.03); opacity: 0.9; }

/* --- Theme Toggle --- */
.icon-btn {
    width: 38px; height: 38px; border-radius: 50%;
    border: none; background: var(--toggle-bg); cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.3s, transform 0.25s;
    position: relative; flex-shrink: 0; color: var(--text-primary);
}
.icon-btn:hover { background: var(--bg-subtle-hover); transform: scale(1.08); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 18px; height: 18px; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

/* --- Language Picker --- */
.lang-picker { position: relative; }
.lang-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 0 12px; height: 38px; border-radius: 19px;
    border: 1px solid var(--bg-subtle-border);
    background: var(--toggle-bg); cursor: pointer;
    color: var(--text-primary);
    font-family: inherit; font-size: 0.8rem; font-weight: 600;
    transition: background 0.3s, transform 0.25s, border-color 0.3s;
    white-space: nowrap;
}
.lang-btn:hover { background: var(--bg-subtle-hover); transform: scale(1.04); }
.lang-btn .lang-flag { font-size: 1rem; line-height: 1; }
.lang-btn .lang-code { letter-spacing: 0.04em; }
.lang-btn .lang-chevron {
    width: 12px; height: 12px; opacity: 0.5;
    transition: transform 0.2s;
}
.lang-picker.open .lang-chevron { transform: rotate(180deg); }

.lang-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    background: var(--dropdown-bg);
    border: 1px solid var(--dropdown-border);
    border-radius: 14px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.18), 0 2px 8px rgba(0,0,0,0.08);
    min-width: 160px;
    padding: 6px;
    opacity: 0; pointer-events: none;
    transform: translateY(-8px) scale(0.97);
    transform-origin: top right;
    transition: all 0.2s cubic-bezier(0.4,0,0.2,1);
    z-index: 200;
}
.lang-picker.open .lang-dropdown {
    opacity: 1; pointer-events: all;
    transform: translateY(0) scale(1);
}
.lang-option {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 12px; border-radius: 9px; cursor: pointer;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-primary);
    transition: background 0.15s;
}
.lang-option:hover { background: var(--dropdown-hover); }
.lang-option.active { background: var(--bg-subtle); font-weight: 600; }
.lang-option .lo-flag { font-size: 1.1rem; }

/* --- Article Layout --- */
.article-wrapper {
    max-width: 780px;
    margin: 0 auto;
    padding: 120px 2rem 4rem;
}

.article-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
}
.article-breadcrumb a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.2s;
}
.article-breadcrumb a:hover { color: var(--text-primary); }
.article-breadcrumb .sep { opacity: 0.4; }

.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}
.article-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.tag-alcohol { background: rgba(255,149,0,0.12); color: var(--orange); }
.tag-smoking { background: rgba(50,212,222,0.12); color: var(--cyan); }
.tag-coffee { background: rgba(139,90,43,0.15); color: #B87333; }
.tag-drugs { background: rgba(175,82,222,0.12); color: #AF52DE; }
.tag-wellness { background: rgba(52,199,89,0.12); color: var(--green); }
.tag-money { background: rgba(255,179,64,0.12); color: #FFB340; }

.article-date {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}
.article-reading-time {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

.article-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 1.5rem;
}
.gradient-text {
    background: linear-gradient(135deg, var(--orange), var(--cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.article-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 2.5rem;
    font-weight: 400;
}

/* --- Article Content --- */
.article-content h2 {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 2.5rem 0 1rem;
    line-height: 1.3;
}
.article-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 2rem 0 0.75rem;
    line-height: 1.3;
}
.article-content p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}
.article-content ul, .article-content ol {
    margin: 1rem 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}
.article-content li {
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}
.article-content strong {
    color: var(--text-primary);
    font-weight: 600;
}
.article-content blockquote {
    border-left: 3px solid var(--orange);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--bg-subtle);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-style: italic;
    color: var(--text-secondary);
}
.article-content a {
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}
.article-content a:hover { opacity: 0.8; }

/* --- Info/Tip Boxes --- */
.tip-box {
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-size: 0.95rem;
    line-height: 1.7;
}
.tip-box.green {
    background: rgba(52,199,89,0.08);
    border: 1px solid rgba(52,199,89,0.15);
}
.tip-box.orange {
    background: rgba(255,149,0,0.08);
    border: 1px solid rgba(255,149,0,0.15);
}
.tip-box.blue {
    background: rgba(0,122,255,0.08);
    border: 1px solid rgba(0,122,255,0.15);
}
.tip-box .tip-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

/* --- CTA Box --- */
.cta-box {
    background: linear-gradient(135deg, rgba(255,149,0,0.08), rgba(50,212,222,0.08));
    border: 1px solid rgba(255,149,0,0.15);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin: 2.5rem 0;
    text-align: center;
}
.cta-box h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}
.cta-box p {
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-size: 1rem;
}
.cta-box .cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.cta-box .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: transform 0.2s, opacity 0.2s;
}
.cta-box .cta-btn:hover { transform: scale(1.03); opacity: 0.9; }
.cta-btn-primary {
    background: var(--btn-primary-bg);
    color: var(--btn-primary-color);
}
.cta-btn-secondary {
    background: var(--bg-subtle);
    color: var(--text-primary);
    border: 1px solid var(--bg-subtle-border);
}

/* --- Timeline --- */
.timeline {
    position: relative;
    margin: 2rem 0;
    padding-left: 2rem;
}
.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--orange), var(--green));
    border-radius: 2px;
}
.timeline-item {
    position: relative;
    margin-bottom: 1.5rem;
    padding-left: 1rem;
}
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2.35rem;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--orange);
    border: 2px solid var(--bg);
}
.timeline-item .tl-time {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--orange);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}
.timeline-item .tl-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}
.timeline-item .tl-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Comparison Table --- */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.9rem;
}
.comparison-table th {
    text-align: left;
    padding: 12px 16px;
    background: var(--bg-subtle);
    border-bottom: 2px solid var(--bg-card-border);
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.comparison-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bg-card-border);
    color: var(--text-secondary);
    vertical-align: top;
}
.comparison-table tr:hover td {
    background: var(--bg-subtle);
}
.comparison-table .highlight-row td {
    background: rgba(255,149,0,0.05);
    font-weight: 600;
    color: var(--text-primary);
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 2rem;
    border-top: 1px solid var(--divider);
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
}
.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s;
}
.footer-links a:hover { color: var(--text-primary); }
.footer-credit {
    font-size: 0.8rem;
    color: var(--text-tertiary);
}

/* --- Blog Index --- */
.blog-header {
    text-align: center;
    padding: 120px 2rem 3rem;
    max-width: 780px;
    margin: 0 auto;
}
.blog-header h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
}
.blog-header p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
}
.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: var(--bg-card-hover-border);
    box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}
.blog-card .card-emoji {
    font-size: 2.5rem;
    line-height: 1;
}
.blog-card .card-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    width: fit-content;
}
.blog-card .card-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: var(--text-primary);
}
.blog-card .card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    flex-grow: 1;
}
.blog-card .card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--text-tertiary);
    margin-top: 0.5rem;
}
.blog-card .card-read-more {
    color: var(--orange);
    font-weight: 600;
    font-size: 0.85rem;
}

/* --- Related Articles --- */
.related-articles {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--divider);
}
.related-articles h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    color: var(--text-primary);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.related-card {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, border-color 0.2s;
}
.related-card:hover {
    transform: translateY(-2px);
    border-color: var(--bg-card-hover-border);
}
.related-card .rc-emoji { font-size: 1.5rem; margin-bottom: 0.5rem; }
.related-card .rc-title {
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .nav-links { display: none; }
    nav { padding: 0 1rem; }
    .article-wrapper { padding: 100px 1.25rem 3rem; }
    .blog-grid { grid-template-columns: 1fr; padding: 0 1.25rem 3rem; }
    .blog-header { padding: 100px 1.25rem 2rem; }
    .comparison-table { font-size: 0.8rem; }
    .comparison-table th, .comparison-table td { padding: 8px 10px; }
}
@media (max-width: 480px) {
    .article-title { font-size: 1.75rem; }
    .related-grid { grid-template-columns: 1fr; }
}
