/* Travel Research Feed - Styles */

:root {
    /* Magpie pink palette */
    --primary: #ea5686;
    --primary-dark: #d63f6f;
    --accent: #ea5686;
    --accent-light: #f06595;

    /* Neutrals */
    --bg: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --border-light: #f1f5f9;

    /* Gradients */
    --gradient-hero: linear-gradient(135deg, #ea5686 0%, #d63f6f 50%, #c2365a 100%);
    --gradient-accent: linear-gradient(135deg, #ea5686 0%, #d63f6f 100%);

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Spacing */
    --container-max: 1280px;
    --container-padding: 1.5rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
}

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input, select {
    font-family: inherit;
}

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

/* Header - main site nav */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0.75rem var(--container-padding);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.header-logo img {
    height: 60px;
    width: auto;
}

.header-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.header-nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
    padding: 0.25rem 0;
}

.header-nav-link:hover {
    color: var(--primary);
}

.header-nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

.header-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-md);
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
}

.header-mobile-toggle svg {
    width: 1.5rem;
    height: 1.5rem;
}

.header-mobile-nav {
    display: none;
    flex-direction: column;
    padding: 0 var(--container-padding) 1rem;
    max-width: var(--container-max);
    margin: 0 auto;
}

.header-mobile-nav.open {
    display: flex;
}

.header-mobile-link {
    padding: 0.75rem 0;
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
}

.header-mobile-link:hover {
    color: var(--primary);
}

.header-mobile-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Sponsor Banner */
.sponsor-banner {
    background: linear-gradient(135deg, #fff5f8 0%, #fce7f0 100%);
    border-bottom: 1px solid #fcd5e3;
    padding: 0.375rem var(--container-padding);
}

.sponsor-banner-inner {
    max-width: var(--container-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.sponsor-banner-text {
    font-size: 0.6875rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sponsor-banner-link {
    display: flex;
    align-items: center;
    transition: opacity var(--transition-fast);
}

.sponsor-banner-link:hover {
    opacity: 0.8;
}

.sponsor-banner-link img {
    height: 18px;
    width: auto;
}

/* Hero Section */
.hero {
    background: var(--gradient-hero);
    padding: 4rem var(--container-padding);
    text-align: center;
}

.hero-content {
    max-width: 640px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.75rem;
    letter-spacing: -0.025em;
}

.hero-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
}

.search-container {
    max-width: 560px;
    margin: 0 auto;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    width: 1.25rem;
    height: 1.25rem;
    color: var(--text-muted);
    pointer-events: none;
}

.search-box input {
    width: 100%;
    padding: 1rem 3rem 1rem 3.5rem;
    font-size: 1rem;
    border: none;
    border-radius: 100px;
    background: white;
    color: var(--text);
    box-shadow: var(--shadow-lg);
    transition: box-shadow var(--transition-base);
}

.search-box input:focus {
    outline: none;
    box-shadow: var(--shadow-xl), 0 0 0 3px rgba(234, 86, 134, 0.25);
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.clear-btn {
    position: absolute;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--text-muted);
    transition: all var(--transition-fast);
}

.clear-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.clear-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Main Content */
.main {
    flex: 1;
    padding: 2rem 0 4rem;
}

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* Filters Bar */
.filters-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 0.5rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border-radius: 100px;
    transition: all var(--transition-fast);
}

.filter-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text);
}

.filter-btn.active {
    background: var(--primary);
    color: white;
}

.active-filters {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    flex: 1;
}

.active-filter {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    font-weight: 500;
    background: rgba(234, 86, 134, 0.1);
    color: var(--accent);
    border-radius: 100px;
    border: 1px solid rgba(234, 86, 134, 0.2);
}

.active-filter button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    color: var(--accent);
    transition: all var(--transition-fast);
}

.active-filter button:hover {
    background: rgba(234, 86, 134, 0.2);
}

.active-filter button svg {
    width: 0.75rem;
    height: 0.75rem;
}

.sort-group {
    margin-left: auto;
}

.sort-group select {
    padding: 0.5rem 2rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    background: var(--bg-secondary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 0.5rem center;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    appearance: none;
    transition: all var(--transition-fast);
}

.sort-group select:hover {
    background-color: var(--bg-tertiary);
}

.sort-group select:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(234, 86, 134, 0.25);
}

/* Newsletter Layout */
.newsletter-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 2rem;
    align-items: start;
}

.newsletter-sidebar {
    position: sticky;
    top: 80px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 1rem;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.sidebar-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.sidebar-link {
    display: block;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
    cursor: pointer;
    border: none;
    background: none;
    text-align: left;
    width: 100%;
    line-height: 1.4;
}

.sidebar-link:hover {
    background: white;
    color: var(--text);
    box-shadow: var(--shadow-sm);
}

.sidebar-link.active {
    background: white;
    color: var(--primary-dark);
    box-shadow: var(--shadow-sm);
    border-left: 3px solid var(--primary);
}

.sidebar-link-date {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.125rem;
    font-weight: 400;
}

.sidebar-nav .loading-state {
    padding: 1rem;
}

.sidebar-nav .loading-spinner {
    width: 1.5rem;
    height: 1.5rem;
}

/* Newsletter Content */
.newsletter-content {
    min-height: 400px;
}

/* Newsletter rendered container - matches /newsletter/ page design */
.newsletter-rendered {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 12px rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

.newsletter-banner {
    width: 100%;
    overflow: hidden;
}

.newsletter-banner img {
    width: 100%;
    height: auto;
    display: block;
}

.newsletter-header {
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
}

.newsletter-date {
    font-size: 0.8125rem;
    color: var(--text-muted);
    text-align: right;
    margin-bottom: 0.5rem;
}

.newsletter-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.newsletter-intro {
    padding: 1.5rem 2rem;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(234, 86, 134, 0.04) 0%, transparent 100%);
}

.newsletter-intro p {
    margin-bottom: 0.75rem;
}

.newsletter-intro p:last-child {
    margin-bottom: 0;
}

.newsletter-intro a {
    color: var(--primary);
}

.newsletter-articles {
    padding: 0;
}

/* Article cards in newsletter */
.article-card {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.15s;
}

.article-card:hover {
    background: rgba(248, 250, 252, 0.5);
}

.article-card:last-child {
    border-bottom: none;
}

.article-card-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

.article-card-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.375rem;
    line-height: 1.35;
}

.article-card-meta {
    font-size: 0.8125rem;
    color: var(--text-muted);
    margin-bottom: 0.875rem;
}

.article-card-summary {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.article-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: gap 0.15s;
}

.article-card-link:hover {
    gap: 0.5rem;
    color: var(--primary-dark);
}

/* Section Images */
.section-image {
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin-bottom: 1.25rem;
}

/* Text Sections */
.text-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.text-section:last-child {
    border-bottom: none;
}

.text-section-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.text-section-content {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-secondary);
}

.text-section-content p {
    margin-bottom: 0.875rem;
}

.text-section-content p:last-child {
    margin-bottom: 0;
}

.text-section-content a {
    color: var(--primary);
}

.text-section-content ul,
.text-section-content ol {
    margin-bottom: 0.875rem;
    padding-left: 1.5rem;
}

.text-section-content li {
    margin-bottom: 0.375rem;
}

/* Video Sections */
.video-section {
    padding: 2rem;
    border-bottom: 1px solid var(--border);
}

.video-section:last-child {
    border-bottom: none;
}

.video-section-title {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 1rem;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--text);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Commentary */
.article-commentary {
    background: linear-gradient(135deg, rgba(234, 86, 134, 0.08) 0%, rgba(234, 86, 134, 0.02) 100%);
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
    margin-top: 1.25rem;
}

.commentary-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 0.375rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.commentary-text {
    font-size: 0.9375rem;
    line-height: 1.65;
    color: var(--text);
    font-style: italic;
}

/* Newsletter footer */
.newsletter-footer {
    padding: 2rem;
    background: var(--bg-secondary);
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.newsletter-footer p {
    margin-bottom: 0.75rem;
}

.newsletter-footer p:last-child {
    margin-bottom: 0;
}

.newsletter-footer a {
    color: var(--primary);
}

.newsletter-empty {
    text-align: center;
    padding: 4rem 2rem;
}

.newsletter-empty .empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.newsletter-empty h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.newsletter-empty p {
    color: var(--text-muted);
}

/* Mobile sidebar */
.sidebar-toggle {
    display: none;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    margin-bottom: 1rem;
    width: 100%;
    justify-content: center;
}

.sidebar-toggle svg {
    width: 1rem;
    height: 1rem;
}

/* Tags Section */
.tags-section {
    margin-bottom: 2rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
}

.tags-header {
    margin-bottom: 0.75rem;
}

.tags-label {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all var(--transition-fast);
    cursor: pointer;
}

.tag-pill:hover {
    border-color: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.tag-pill.active {
    background: var(--gradient-accent);
    color: white;
    border-color: transparent;
}

.tag-pill.tag-more {
    color: var(--text-muted);
    background: transparent;
    border-style: dashed;
    font-size: 0.75rem;
}

.tag-pill.tag-more:hover {
    color: var(--text);
    border-color: var(--text-muted);
    background: white;
    transform: none;
    box-shadow: none;
}

.tag-pill .tag-count {
    margin-left: 0.375rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.6875rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.08);
    border-radius: 100px;
}

.tag-pill.active .tag-count {
    background: rgba(255, 255, 255, 0.25);
}

/* Feed Grid */
.feed-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
}

/* Card */
.card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: all var(--transition-base);
    cursor: pointer;
}

.card:hover {
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

/* Card Image */
.card-image {
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: var(--bg-tertiary);
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform var(--transition-slow);
}

.card:hover .card-image img {
    transform: scale(1.03);
}

.card-image-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--cat-color, #6366f1) 0%, color-mix(in srgb, var(--cat-color, #6366f1) 60%, #000) 100%);
    opacity: 0.9;
    height: 100px;
}

.card-image-icon {
    font-size: 2rem;
    filter: grayscale(1) brightness(2);
    opacity: 0.5;
}

.card-header {
    padding: 1.25rem 1.25rem 0;
}

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

.card-source {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.card-favicon {
    width: 16px;
    height: 16px;
    border-radius: 3px;
    object-fit: contain;
}

.card-source-icon {
    width: 1rem;
    height: 1rem;
    border-radius: 0.25rem;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.625rem;
}

.card-date {
    color: var(--text-muted);
}

.card-featured {
    color: var(--accent);
    font-weight: 500;
}

.card-title-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.card-title {
    flex: 1;
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text);
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-link {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.card-link:hover {
    color: var(--primary-dark);
    background: rgba(234, 86, 134, 0.12);
    transform: scale(1.05);
}

.card-link svg {
    width: 1rem;
    height: 1rem;
}

.card-body {
    padding: 0 1.25rem;
}

.card-summary {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.card-tag {
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--primary-dark);
    background: rgba(234, 86, 134, 0.1);
    border-radius: 100px;
    transition: all var(--transition-fast);
}

.card-tag:hover {
    background: rgba(234, 86, 134, 0.2);
}

/* Card Footer Layout */
.card-footer {
    padding: 1rem 1.25rem 1.25rem;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.75rem;
}

/* Vote Buttons */
.card-votes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}

.vote-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
    line-height: 1;
}

.vote-btn svg {
    width: 0.875rem;
    height: 0.875rem;
}

.vote-btn:hover {
    color: var(--text);
    background: var(--bg-tertiary);
    border-color: var(--text-muted);
}

.vote-btn.vote-up.voted {
    color: #16a34a;
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.3);
}

.vote-btn.vote-down.voted {
    color: #dc2626;
    background: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.3);
}

/* Modal Votes */
.modal-votes {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.modal-votes-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.modal-votes .vote-btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

.modal-votes .vote-btn svg {
    width: 1rem;
    height: 1rem;
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.loading-spinner {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
}

.empty-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.empty-state h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

/* Load More */
.load-more {
    text-align: center;
    padding: 2rem 0;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: white;
    background: var(--gradient-accent);
    border-radius: 100px;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text);
    background: white;
    border: 1px solid var(--border);
    border-radius: 100px;
    transition: all var(--transition-base);
}

.btn-secondary:hover {
    background: var(--bg-secondary);
    border-color: var(--text-muted);
}

/* Modal */
.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal.open {
    opacity: 1;
    visibility: visible;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
}

.modal-container {
    position: relative;
    width: 100%;
    max-width: 720px;
    max-height: calc(100vh - 4rem);
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    transform: translateY(20px);
    transition: transform var(--transition-base);
}

.modal.open .modal-container {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
    color: var(--text-secondary);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text);
    transform: scale(1.05);
}

.modal-close svg {
    width: 1.25rem;
    height: 1.25rem;
}

.modal-content {
    padding: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
}

.modal-header {
    margin-bottom: 1.5rem;
}

.modal-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.modal-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text);
    letter-spacing: -0.025em;
}

.modal-section {
    margin-bottom: 1.5rem;
}

.modal-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.modal-summary {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text);
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* Editorial Commentary */
.modal-commentary {
    background: linear-gradient(135deg, rgba(234, 86, 134, 0.08) 0%, rgba(234, 86, 134, 0.03) 100%);
    padding: 1.25rem;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--accent);
}

.modal-commentary .modal-section-title {
    color: var(--primary-dark);
}

.modal-commentary-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    font-style: italic;
}

.modal-overview {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--text-secondary);
}

.modal-overview p {
    margin-bottom: 1rem;
}

.modal-overview p:last-child {
    margin-bottom: 0;
}

/* Authored article HTML styling within modal */
.modal-overview img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

.modal-overview h2 {
    font-size: 1.375rem;
    font-weight: 700;
    color: var(--text);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.modal-overview h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
}

.modal-overview blockquote {
    border-left: 3px solid var(--accent);
    padding-left: 1rem;
    color: var(--text-secondary);
    font-style: italic;
    margin: 1rem 0;
}

.modal-overview ul, .modal-overview ol {
    padding-left: 1.5rem;
    margin: 0.5rem 0;
}

.modal-overview li {
    margin-bottom: 0.375rem;
}

.modal-overview a {
    color: var(--primary-dark);
    text-decoration: underline;
}

.modal-overview pre {
    background: var(--bg-tertiary);
    padding: 1rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    font-size: 0.875rem;
    margin: 1rem 0;
}

.modal-overview strong {
    font-weight: 600;
    color: var(--text);
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.modal-tag {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--primary-dark);
    background: rgba(234, 86, 134, 0.1);
    border-radius: 100px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.modal-tag:hover {
    background: rgba(234, 86, 134, 0.2);
}

.modal-source-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
    font-weight: 500;
    color: white;
    background: var(--gradient-accent);
    border-radius: var(--radius-md);
    transition: all var(--transition-base);
}

.modal-source-link:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.modal-source-link svg {
    width: 1rem;
    height: 1rem;
}

/* Footer */
.footer {
    background: var(--text);
    padding: 2.5rem 0 1.5rem;
}

.footer-content {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
}

.footer-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #94a3b8;
    transition: color var(--transition-fast);
}

.footer-nav a:hover {
    color: white;
}

.footer-sponsor {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sponsor-label {
    font-size: 0.75rem;
    color: #64748b;
}

.sponsor-logo {
    display: flex;
    align-items: center;
    transition: opacity var(--transition-fast);
}

.sponsor-logo:hover {
    opacity: 0.8;
}

.sponsor-logo img {
    height: 24px;
    width: auto;
}

.footer-copyright {
    width: 100%;
    text-align: center;
    padding-top: 1.25rem;
    border-top: 1px solid #1e293b;
}

.footer-copyright p {
    font-size: 0.75rem;
    color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
    .header-nav {
        display: none;
    }

    .header-mobile-toggle {
        display: flex;
    }

    .header-logo img {
        height: 44px;
    }

    .hero {
        padding: 2.5rem var(--container-padding);
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .filters-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-wrap: wrap;
    }

    .sort-group {
        margin-left: 0;
    }

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

    .newsletter-layout {
        grid-template-columns: 1fr;
    }

    .newsletter-sidebar {
        position: static;
        max-height: none;
        display: none;
    }

    .newsletter-sidebar.open {
        display: block;
    }

    .sidebar-toggle {
        display: flex;
    }

    .newsletter-title {
        font-size: 1.5rem;
    }

    .newsletter-header,
    .newsletter-intro,
    .article-card,
    .text-section,
    .video-section,
    .newsletter-footer {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    .article-card-title,
    .text-section-title,
    .video-section-title {
        font-size: 1.25rem;
    }

    .modal {
        padding: 0;
    }

    .modal-container {
        max-height: 100vh;
        border-radius: 0;
    }

    .modal-content {
        max-height: 100vh;
    }

    .modal-title {
        font-size: 1.375rem;
    }

    .footer-nav {
        gap: 1rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* Selection */
::selection {
    background: rgba(234, 86, 134, 0.2);
}
