/**
 * IndianTravelling.info - High Performance, Semantic CSS3
 * Inspired by the clean typography & layout of TrustyRead
 * 100% Responsive, Zero-Dependency, 95+ PageSpeed Optimized
 */

:root {
    --bg-main: #f8fafc;
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --brand-primary: #ea580c; /* Travel Sunset Saffron */
    --brand-primary-hover: #c2410c;
    --brand-secondary: #0284c7; /* Clear Sky Azure */
    --brand-accent: #10b981; /* Nature Green */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.04);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --max-width: 1240px;
}

[data-theme="dark"] {
    --bg-main: #0b1120;
    --bg-surface: #1e293b;
    --bg-alt: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #64748b;
    --border-color: #334155;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.5);
}

/* Base Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.68;
    letter-spacing: -0.011em;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: background-color 0.2s ease, color 0.2s ease;
}

a {
    color: var(--brand-primary);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--brand-primary-hover);
}

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

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Top Bar */
.top-bar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.8125rem;
    color: var(--text-secondary);
    padding: 0.4rem 0;
}

.top-bar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.trending-ticker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    overflow: hidden;
    white-space: nowrap;
}

.trending-badge {
    background: var(--brand-primary);
    color: #fff;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.top-socials {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

/* Header & Navigation */
.site-header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow 0.2s ease;
}

.site-header.scrolled {
    box-shadow: var(--shadow-md);
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.brand-logo {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
    color: var(--text-primary);
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, #ea580c 0%, #f97316 100%);
    color: #fff;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 2px 4px rgba(234, 88, 12, 0.3);
}

.brand-text {
    display: flex;
    flex-direction: column;
}

.brand-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    color: var(--text-primary);
}

.brand-title span {
    color: var(--brand-primary);
}

.brand-tagline {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.nav-wrap {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 1.25rem;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-weight: 600;
    padding: 0.35rem 0.2rem;
    position: relative;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--brand-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.theme-toggle-btn, .mobile-toggle-btn {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: background-color 0.15s ease;
}

.theme-toggle-btn:hover {
    background: var(--border-color);
}

.mobile-toggle-btn {
    display: none;
}

/* Ad Units Styling */
.ad-unit {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--bg-surface);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ad-badge {
    position: absolute;
    top: 4px;
    right: 8px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
    font-weight: 600;
}

.ad-content-box {
    padding: 1.25rem 0.5rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.ad-leaderboard {
    max-width: 970px;
    margin: 1rem auto;
}

/* Page Layouts (TrustyRead 2-Col System) */
.layout-2col {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 2.25rem;
    margin-top: 1.75rem;
    margin-bottom: 3rem;
}

/* Hero / Featured Area */
.hero-featured {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr;
    gap: 1.5rem;
}

.hero-primary {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: #000;
    height: 440px;
    box-shadow: var(--shadow-md);
}

.hero-primary img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.85;
    transition: transform 0.4s ease;
}

.hero-primary:hover img {
    transform: scale(1.03);
}

.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem 1.75rem;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(15,23,42,0.95) 100%);
    color: #fff;
}

.hero-overlay .cat-badge {
    margin-bottom: 0.5rem;
}

.hero-overlay h2 {
    font-size: 1.85rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0.75rem;
    color: #fff;
}

.hero-overlay p {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hero-side-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.hero-side-card {
    display: flex;
    gap: 1rem;
    background: var(--bg-surface);
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.hero-side-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.hero-side-thumb {
    width: 120px;
    height: 100px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
}

.hero-side-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-side-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-side-content h3 {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.4rem;
}

.hero-side-content h3 a {
    color: var(--text-primary);
}

.hero-side-content h3 a:hover {
    color: var(--brand-primary);
}

/* Post Cards Grid */
.section-heading-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -0.65rem;
    left: 0;
    width: 48px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: 2px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.post-card {
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--bg-alt);
}

.card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.post-card:hover .card-media img {
    transform: scale(1.05);
}

.cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--brand-primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.2rem 0.55rem;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.card-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-meta {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.65rem;
}

.card-title a {
    color: var(--text-primary);
}

.card-title a:hover {
    color: var(--brand-primary);
}

.card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 1.15rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-footer {
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
}

.card-author {
    font-weight: 600;
    color: var(--text-secondary);
}

.read-more-link {
    font-weight: 700;
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.widget {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--brand-primary);
}

/* Author Widget (E-E-A-T) */
.author-box {
    text-align: center;
}

.author-avatar {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 0.75rem;
    object-fit: cover;
    border: 3px solid var(--brand-primary);
}

.author-name {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
}

.verified-icon {
    color: var(--brand-secondary);
    font-size: 0.9rem;
}

.author-role {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.65rem;
    text-transform: uppercase;
}

.author-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 0.85rem;
}

/* Popular List Widget */
.popular-posts-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.popular-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.popular-counter {
    font-size: 1.25rem;
    font-weight: 900;
    color: var(--border-color);
    line-height: 1;
    min-width: 24px;
    text-align: center;
}

.popular-item:hover .popular-counter {
    color: var(--brand-primary);
}

.popular-info h4 {
    font-size: 0.88rem;
    font-weight: 600;
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.popular-info h4 a {
    color: var(--text-primary);
}

.popular-info h4 a:hover {
    color: var(--brand-primary);
}

.popular-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Categories Widget */
.categories-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.categories-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.45rem 0.6rem;
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: background 0.15s ease;
}

.categories-list li a:hover {
    background: var(--bg-alt);
    color: var(--brand-primary);
}

.cat-count {
    background: var(--bg-alt);
    color: var(--text-muted);
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    border-radius: 12px;
}

/* Sticky Newsletter Widget */
.newsletter-widget {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.08) 0%, rgba(2, 132, 199, 0.08) 100%);
    border: 1px solid var(--border-color);
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 0.75rem;
}

.newsletter-input {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-size: 0.88rem;
}

.newsletter-btn {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 0.65rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.newsletter-btn:hover {
    background: var(--brand-primary-hover);
}

/* Article Reading Page Styles */
.article-header {
    margin-bottom: 2rem;
}

.breadcrumbs {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.breadcrumbs a {
    color: var(--text-secondary);
}

.article-title {
    font-size: 2.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.article-byline {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.85rem 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.byline-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.byline-meta {
    display: flex;
    flex-direction: column;
}

.byline-author {
    font-weight: 700;
    color: var(--text-primary);
}

.article-featured-image {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 1.75rem 0;
    box-shadow: var(--shadow-md);
}

.article-featured-image img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
}

.image-caption {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-align: center;
    padding: 0.45rem 0;
    background: var(--bg-alt);
}

/* Table of Contents */
.toc-box {
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 2rem 0;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.toc-list {
    margin-top: 1rem;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.toc-list li a {
    color: var(--text-secondary);
    font-size: 0.92rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.toc-list li a:hover {
    color: var(--brand-primary);
    padding-left: 4px;
}

.toc-list li.toc-h3 {
    margin-left: 1.25rem;
    font-size: 0.86rem;
}

/* Key Takeaways Box */
.key-takeaways {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.05) 0%, rgba(16, 185, 129, 0.05) 100%);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--brand-accent);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    margin: 1.75rem 0;
}

.key-takeaways h3 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.65rem;
    color: var(--text-primary);
}

.key-takeaways ul {
    margin-left: 1.25rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
}

/* Article Prose Typography */
.article-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin: 2.25rem 0 1rem;
    color: var(--text-primary);
    scroll-margin-top: 80px;
}

.article-content h3 {
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 1.85rem 0 0.75rem;
    color: var(--text-primary);
    scroll-margin-top: 80px;
}

.article-content h4 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 1.25rem 0 0.5rem;
}

.article-content p {
    margin-bottom: 1.35rem;
}

.article-content ul, .article-content ol {
    margin: 1.25rem 0 1.5rem 1.5rem;
    color: var(--text-secondary);
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content blockquote {
    border-left: 4px solid var(--brand-primary);
    padding: 0.85rem 1.25rem;
    margin: 1.75rem 0;
    background: var(--bg-alt);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    color: var(--text-secondary);
}

/* Callout Boxes */
.callout {
    padding: 1.15rem 1.35rem;
    border-radius: var(--radius-md);
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.callout-tip {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.callout-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.callout-info {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

/* Responsive Table in Prose */
.table-responsive {
    overflow-x: auto;
    margin: 1.75rem 0;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}

.article-content table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    text-align: left;
}

.article-content th {
    background: var(--bg-alt);
    font-weight: 700;
    padding: 0.75rem 1rem;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-primary);
}

.article-content td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.article-content tr:last-child td {
    border-bottom: none;
}

/* FAQ Accordion Styling */
.faq-section {
    margin: 2.5rem 0;
}

.faq-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    margin-bottom: 0.85rem;
    overflow: hidden;
}

.faq-card summary {
    font-weight: 700;
    font-size: 1.05rem;
    padding: 1rem 1.25rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-primary);
}

.faq-card summary::-webkit-details-marker {
    display: none;
}

.faq-card summary::after {
    content: '+';
    font-size: 1.35rem;
    color: var(--brand-primary);
    font-weight: 400;
}

.faq-card[open] summary::after {
    content: '−';
}

.faq-answer {
    padding: 0 1.25rem 1.15rem;
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.65;
}

/* Article Share & Tags */
.article-footer-meta {
    margin: 2.5rem 0 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.share-strip {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.45rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    border: none;
    text-decoration: none;
}

.share-whatsapp { background: #25D366; }
.share-x { background: #000; }
.share-facebook { background: #1877F2; }
.share-linkedin { background: #0A66C2; }
.share-copy { background: #64748b; }

/* End of Post Author Box (E-E-A-T) */
.post-author-bio {
    display: flex;
    gap: 1.25rem;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin: 2.5rem 0;
}

.bio-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.bio-details h4 {
    font-size: 1.1rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    color: var(--text-primary);
}

.bio-details p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.55;
    margin-bottom: 0.5rem;
}

/* Related Posts Section */
.related-posts-section {
    margin: 3rem 0;
}

/* Footer Styling */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    margin-top: auto;
    border-top: 1px solid #1e293b;
    font-size: 0.9rem;
}

.footer-top {
    padding: 3.5rem 0 2.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.25fr;
    gap: 2.5rem;
}

.footer-col h4 {
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1.15rem;
    position: relative;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-links a {
    color: #94a3b8;
    transition: color 0.15s ease;
}

.footer-links a:hover {
    color: var(--brand-primary);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding: 1.5rem 0;
    font-size: 0.82rem;
    color: #64748b;
    text-align: center;
}

.compliance-notice {
    font-size: 0.76rem;
    color: #64748b;
    margin-top: 0.5rem;
    line-height: 1.5;
}

/* Form Controls */
.form-group {
    margin-bottom: 1.25rem;
}

.form-label {
    display: block;
    font-size: 0.88rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(234, 88, 12, 0.15);
}

textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.btn-primary {
    background: var(--brand-primary);
    color: #fff;
    border: none;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-primary:hover {
    background: var(--brand-primary-hover);
}

.alert {
    padding: 0.85rem 1.15rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.25rem;
    font-size: 0.92rem;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Prevent horizontal overflow globally */
html, body {
    overflow-x: hidden;
    width: 100%;
    position: relative;
}

/* Base mobile navigation helpers */
.mobile-search-li {
    display: none;
}
.mobile-extra-links {
    display: none;
}

/* Universal table responsiveness */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 1.5rem 0;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

.table-responsive table {
    margin: 0 !important;
    border: none !important;
}

/* ==============================================================================
 * Responsive Media Queries - Optimized for All Screen Sizes
 * ============================================================================== */

/* Tablet & Smaller Laptops (<= 1024px) */
@media (max-width: 1024px) {
    .layout-2col {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .hero-primary {
        height: 360px;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    .sidebar {
        margin-top: 1rem;
    }
}

/* Standard Tablets & Large Phones in Landscape (<= 768px) */
@media (max-width: 768px) {
    /* Header & Navigation */
    .desktop-search-form {
        display: none !important;
    }
    .mobile-toggle-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        min-height: 40px;
        border-radius: var(--radius-sm);
        border: 1px solid var(--border-color);
        background: var(--bg-alt);
        color: var(--text-primary);
        font-size: 1.3rem;
        cursor: pointer;
        padding: 0;
    }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        flex-direction: column;
        padding: 1rem 1.25rem 1.5rem 1.25rem;
        border-bottom: 3px solid var(--brand-primary);
        box-shadow: 0 15px 30px rgba(0, 0, 0, 0.18);
        gap: 0.35rem;
        z-index: 99999;
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    .nav-links.open {
        display: flex;
    }
    .nav-links a {
        display: block;
        padding: 0.75rem 0.85rem;
        border-radius: var(--radius-sm);
        font-size: 1.05rem;
        font-weight: 600;
        color: var(--text-primary);
    }
    .nav-links a:hover,
    .nav-links a.active {
        background: var(--bg-alt);
        color: var(--brand-primary);
    }
    .mobile-search-li {
        display: block;
        margin-bottom: 0.75rem;
        padding: 0 0 0.5rem 0;
        border-bottom: 1px solid var(--border-color);
    }
    .mobile-search-form {
        display: flex;
        width: 100%;
    }
    .mobile-search-form input {
        flex: 1;
        min-height: 44px;
        padding: 0.6rem 0.9rem;
        font-size: 16px;
        border: 1px solid var(--border-color);
        border-radius: var(--radius-sm) 0 0 var(--radius-sm);
        background: var(--bg-alt);
        color: var(--text-primary);
        outline: none;
    }
    .mobile-search-form button {
        width: 48px;
        min-height: 44px;
        border: none;
        background: var(--brand-primary);
        color: #fff;
        border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
        cursor: pointer;
        font-size: 1.1rem;
    }
    .mobile-extra-links {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        padding-top: 0.75rem;
        border-top: 1px solid var(--border-color);
        margin-top: 0.5rem;
    }
    .mobile-extra-links a {
        font-size: 0.92rem;
        color: var(--text-secondary);
        padding: 0.5rem 0.85rem;
    }

    /* Top Bar */
    .top-bar-inner {
        flex-direction: column;
        gap: 0.25rem;
    }
    .top-socials {
        display: none;
    }
    .trending-ticker {
        font-size: 0.75rem;
        max-width: 100%;
    }

    /* Hero */
    .hero-primary {
        height: 300px;
    }
    .hero-content h2 {
        font-size: 1.45rem;
    }

    /* Article Typography */
    .article-title {
        font-size: 1.65rem;
        line-height: 1.35;
    }
    .article-content {
        font-size: 1.05rem;
    }
    .article-content table {
        min-width: 520px;
    }

    /* Author Bio & Footer */
    .post-author-bio {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem 1.25rem;
    }
    .bio-avatar {
        margin: 0 auto 0.75rem auto;
    }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 1.75rem;
    }
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
    }
}

/* Standard Mobile Devices (<= 640px - iPhone, Samsung Galaxy, Pixel) */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    /* Header Compact Mode */
    .brand-tagline {
        display: none;
    }
    .brand-title {
        font-size: 1.3rem;
    }
    .brand-icon {
        width: 34px;
        height: 34px;
        font-size: 1.1rem;
    }

    /* Hero Section on Phones */
    .hero-primary {
        height: 260px;
        border-radius: var(--radius-md);
    }
    .hero-content {
        padding: 1rem;
    }
    .hero-content h2 {
        font-size: 1.25rem;
        line-height: 1.3;
    }
    .hero-badge {
        font-size: 0.7rem;
        padding: 0.15rem 0.45rem;
    }
    .hero-secondary-card {
        flex-direction: row;
        gap: 0.75rem;
        align-items: center;
        padding: 0.75rem;
    }
    .hero-secondary-card img {
        width: 80px;
        height: 65px;
    }
    .hero-secondary-card h3 {
        font-size: 0.92rem;
        line-height: 1.3;
    }

    /* Grid Layout - 1 Column for smooth vertical scroll */
    .posts-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .card-media {
        height: 200px;
    }

    /* Single Article Page Mobile Polish */
    .article-header {
        margin-bottom: 1.25rem;
    }
    .article-title {
        font-size: 1.45rem;
        line-height: 1.3;
    }
    .breadcrumbs {
        white-space: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 0.35rem;
        font-size: 0.78rem;
    }
    .article-byline {
        flex-wrap: wrap;
        gap: 0.65rem;
    }
    .byline-avatar {
        width: 40px;
        height: 40px;
    }
    .byline-meta {
        font-size: 0.78rem;
    }
    .article-content h2 {
        font-size: 1.3rem;
        margin-top: 1.75rem;
        line-height: 1.35;
    }
    .article-content h3 {
        font-size: 1.15rem;
        margin-top: 1.35rem;
    }
    .article-content h4 {
        font-size: 1.05rem;
    }
    .article-content p {
        font-size: 1.02rem;
        line-height: 1.75;
    }

    /* Callout & Summary Boxes */
    .key-takeaways,
    .callout-box,
    .pro-tip,
    .warning-box {
        padding: 1.1rem 1rem;
        margin: 1.25rem 0;
        border-radius: var(--radius-sm);
    }

    /* Social Share Buttons */
    .article-footer-meta {
        margin-top: 2rem;
        padding-top: 1.25rem;
    }
    .share-strip {
        flex-wrap: wrap;
        gap: 0.45rem;
    }
    .share-label {
        width: 100%;
        margin-bottom: 0.25rem;
        font-size: 0.88rem;
    }
    .share-btn {
        flex: 1 1 calc(50% - 0.5rem);
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        font-size: 0.82rem;
        border-radius: var(--radius-sm);
    }

    /* Forms */
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px !important; /* Prevents auto-zoom in iOS Safari */
    }
}

/* Small Budget Phones & Narrow Screens (<= 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.85rem;
    }
    .brand-title {
        font-size: 1.18rem;
    }
    .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 0.95rem;
    }
    .theme-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 0.95rem;
    }
    .mobile-toggle-btn {
        width: 36px;
        height: 36px;
        font-size: 1.15rem;
    }
    .hero-primary {
        height: 220px;
    }
    .hero-content h2 {
        font-size: 1.15rem;
    }
    .article-title {
        font-size: 1.32rem;
    }
    .card-media {
        height: 180px;
    }
    .card-content {
        padding: 1.1rem 1rem;
    }
    .share-btn {
        font-size: 0.78rem;
        padding: 0.4rem 0.5rem;
    }
    .share-btn#copyArticleLink {
        flex: 1 1 100%;
    }
}

/* Ultra Compact / Foldable Cover Screens (<= 360px) */
@media (max-width: 360px) {
    .container {
        padding: 0 0.65rem;
    }
    .brand-title {
        font-size: 1.05rem;
    }
    .article-title {
        font-size: 1.2rem;
    }
    .share-btn {
        flex: 1 1 100%;
    }
}
