/**
 * ArtGraduates.com Stylesheet
 * Version 062 - 13 Feb 2026
 * Changes:
 * - Article cards: title-name/title-text display block (name + subtitle on separate lines)
 * - Removed colon pseudo-element from card titles
 *
 * Previous v061:
 * - Back-to-top mobile: bottom 20px -> 80px globally (fixes overlap with footer icons)
 *   Removed inline overrides from index.php, magazine/article.php, magazine/index.php
 *
 * Previous v060:
 * - Mobile social icons: padding 4px -> 3px (tighter spacing, touch target 42px)
 *
 * Previous v058:
 * - Magazine titles: Fluid typography with clamp() for responsive scaling
 * - Magazine titles: Added text-wrap: balance for better line breaks
 * - Magazine titles: Improved line-height (1.25 → 1.2) for tighter vertical rhythm
 * - Magazine titles: Added word-break: break-word fallback
 * - Added @media (max-width: 400px) for extra small screens
 * - Fixed long title overflow on mobile (DE, FR languages)
 * 
 * Previous v053:
 * - Mobile nav: uniform visual spacing (gap: 2px, padding: 8px 6px)
 * - Mobile nav: fixed btn-submit specificity (.nav a.btn-submit)
 */

/* ===== CSS RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Firefox sticky header fix - ensure no overflow issues */
html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

/* ===== GLOBAL STYLES ===== */
body {
    font-family: Arial, sans-serif;
    background: linear-gradient(135deg, #f8f8f8, #eaeaea);
    color: #333;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: #d33;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    text-decoration: underline;
    color: #a22;
}

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

/* ===== HEADER ===== */
.header {
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 15px 0;
    position: -webkit-sticky; /* Safari */
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%; /* Explicit width for Firefox sticky */
    left: 0;
}

.container-header {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    /* No height/width - display at original size (200x103px = sharp) */
    display: block;
}

.nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav a {
    color: #333;
    font-weight: 500;
    text-decoration: none;
}

.nav a:hover {
    color: #d33;
    text-decoration: none;
}

/* Active navigation link */
.nav a.active {
    color: #d33;
    font-weight: 600;
    text-decoration: none;
}

/* Active state for submit button - same fill color, just bold text */
.btn-submit.active {
    background-color: #d33;
    text-decoration: none !important;
    transform: none !important;
    box-shadow: none !important;
}

/* Make active submit button text bold white */
.btn-submit.active span {
    font-weight: 700 !important;
    color: white !important;
}

.btn-submit {
    background-color: #d33;
    color: white !important;
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Mobile/Desktop button text toggle */
.btn-text-short {
    display: none;
}

.btn-text-full {
    display: inline;
}

/* Mobile-only line break (hidden on desktop, visible on mobile) */
.mobile-br {
    display: none;
}

/* Unified button hover effect - lift and brighten */
.btn-submit:hover {
    background-color: #e55;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* ===== MAIN WRAPPER ===== */
.main-wrapper {
    flex: 1;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ===== CONTAINER (White Box) ===== */
.container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

/* ===== INTRO BOX ===== */
.intro-box {
    text-align: center;
}

.intro-box h1 {
    font-size: 32px;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.3;
}

/* H1 spans - desktop: inline with separators */
.intro-box h1 .h1-brand,
.intro-box h1 .h1-tagline,
.intro-box h1 .h1-subtitle {
    display: inline;
}

.intro-box h1 .h1-sep {
    display: inline;
}

.intro-box p {
    font-size: 16px;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto 12px auto;
    text-align: left;
}

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

/* ===== FILTER BOX ===== */
.filter-box {
    padding: 25px;
}

.filter-form {
    display: grid;
    gap: 15px;
}

.search-group {
    width: 100%;
}

.search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 15px;
}

.search-input:focus {
    outline: none;
    border-color: #d33;
}

.filter-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.filter-select {
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
}

.filter-select:focus {
    outline: none;
    border-color: #d33;
}

.btn-filter {
    padding: 12px 25px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 15px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-filter:hover {
    background-color: #555;
}

.btn-reset {
    display: inline-block;
    padding: 12px 25px;
    background-color: #f0f0f0;
    color: #666;
    border-radius: 5px;
    text-align: center;
    font-weight: bold;
    text-decoration: none;
}

.btn-reset:hover {
    background-color: #e0e0e0;
    color: #333;
}

.results-count {
    margin-top: 0;
    padding-top: 0;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* ===== ARTISTS GRID ===== */
.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.artist-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

.artist-card.featured {
    border: 2px solid #d33;
}

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #d33;
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
    z-index: 10;
}

.artist-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
    background-color: #f5f5f5;
}

.artist-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

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

.artist-info {
    padding: 20px;
}

.artist-name {
    font-size: 20px;
    margin-bottom: 10px;
}

.artist-name a {
    color: #222;
    text-decoration: none;
}

.artist-name a:hover {
    color: #d33;
}

.artist-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.meta-country,
.meta-category {
    padding: 4px 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.meta-category {
    background-color: #ffe5e5;
    color: #d33;
}

.artist-bio {
    color: #555;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.artist-actions {
    display: flex;
    gap: 10px;
}

.btn-view,
.btn-website {
    flex: 1;
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view {
    background-color: #d33;
    color: white;
}

/* Unified button hover effect - lift and brighten */
.btn-view:hover {
    background-color: #e55;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.btn-website {
    background-color: #f0f0f0;
    color: #333;
}

.btn-website:hover {
    background-color: #ffffff;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}


/* ===== NO RESULTS ===== */
.no-results {
    text-align: center;
    padding: 60px 30px;
}

.no-results h2 {
    color: #666;
    margin-bottom: 15px;
}

/* ===== CTA BOX ===== */
.cta-box {
    text-align: center;
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    padding: 50px 30px;
}

.cta-box h2 {
    font-size: 26px;
    margin-bottom: 15px;
    color: #222;
}

.cta-box p {
    font-size: 16px;
    margin-bottom: 25px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.btn-cta {
    display: inline-block;
    padding: 15px 40px;
    background-color: #d33;
    color: white;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-cta:hover {
    background-color: #a22;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* ===== FORMS ===== */
.form-container {
    max-width: 700px;
    margin: 0 auto;
}

/* Form container H1 - responsive */
.form-container h1 {
    font-size: 32px;
    color: #222;
    margin-bottom: 10px;
    text-align: center;
}

.form-container > p:first-of-type {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
}

/* H1 responsive text - desktop: show full, hide short */
.h1-full {
    display: inline;
}
.h1-short {
    display: none;
}

/* Unified H1 styles for all content pages */
.legal-content h1,
.donate-container h1 {
    font-size: 32px;
    color: #222;
    margin-bottom: 15px;
    text-align: center;
}

.form-intro {
    text-align: center;
    color: #666;
    margin-bottom: 30px;
}

.artist-form {
    margin-top: 30px;
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 35px;
    border-bottom: 2px solid #f0f0f0;
}

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

.form-section h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #222;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="url"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    font-family: inherit;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #d33;
}

.form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-group input[type="file"] {
    padding: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: normal;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.form-actions {
    text-align: center;
    margin-top: 30px;
}

.btn-submit-form {
    padding: 15px 50px;
    background-color: #d33;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-submit-form:hover {
    background-color: #a22;
    transform: translateY(-2px);
}

.form-note {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
}

/* ===== IMAGE PREVIEWS ===== */
.image-preview {
    margin-top: 15px;
}

.image-preview img {
    max-width: 300px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.image-preview-grid img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ===== ALERTS ===== */
.alert {
    padding: 15px 20px;
    border-radius: 5px;
    margin-bottom: 25px;
}

.alert-error {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
}

.alert-success {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
}

.alert ul {
    margin: 10px 0 0 20px;
}

/* ===== FOOTER ===== */
.footer {
    background: white;
    padding: 30px 0;
    margin-top: auto;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.05);
}

.container-footer {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.container-footer p {
    margin: 5px 0;
    color: #666;
    font-size: 14px;
}

.container-footer a {
    color: #666;
    margin: 0 10px;
}

.container-footer a:hover {
    color: #d33;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .mobile-br {
        display: block;
    }

    /* Header - balanced vertical spacing */
    .header {
        padding: 10px 0 8px 0;
    }
    
    /* Logo - reduced size but still prominent */
    .logo img {
        max-height: 65px;
        width: auto;
    }
    
    /* Header layout - comfortable spacing around logo */
    .container-header {
        flex-direction: column;
        gap: 10px;
        padding: 6px 15px 4px 15px;
    }
    
    /* Nav row - uniform visual spacing between all items */
    .nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 2px; /* Minimal gap, padding creates visual spacing */
        margin-top: 6px;
    }
    
    .nav a {
        padding: 8px 6px; /* Tighter horizontal padding for text links */
        display: inline-block;
        min-height: 36px;
        line-height: 20px;
        box-sizing: border-box;
    }
    
    /* Button needs higher specificity to override .nav a */
    .nav a.btn-submit {
        padding: 8px 14px; /* More padding for button visual balance */
        font-size: 14px;
        min-height: 36px;
        line-height: 20px;
        box-sizing: border-box;
        border-radius: 18px;
    }
    
    /* Show short button text (Join) on mobile */
    .btn-text-full {
        display: none;
    }
    
    .btn-text-short {
        display: inline;
    }
    
    /* Main wrapper - reduced padding */
    .main-wrapper {
        padding: 15px 12px;
    }
    
    /* Container - reduced padding and margins */
    .container {
        padding: 18px 14px;
        margin-bottom: 15px;
    }
    
    /* Intro box - reduced spacing and left alignment */
    .intro-box {
        padding: 18px 14px;
    }
    
    .intro-box h1 {
        font-size: 24px;
        line-height: 1.2;
        margin-bottom: 12px;
        text-align: center;
    }
    
    /* H1 spans - mobile: stacked on 3 lines, hide separators */
    .intro-box h1 .h1-brand,
    .intro-box h1 .h1-tagline,
    .intro-box h1 .h1-subtitle {
        display: block !important;
    }
    
    .intro-box h1 .h1-sep {
        display: none !important;
    }
    
    /* Form container H1 - mobile */
    .form-container h1 {
        font-size: 24px;
    }
    
    /* H1 responsive text - mobile: show short, hide full */
    .h1-full {
        display: none !important;
    }
    .h1-short {
        display: inline !important;
    }
    
    /* Unified H1 mobile sizes for all content pages */
    .legal-content h1,
    .donate-container h1 {
        font-size: 24px;
    }
    
    .intro-box p {
        font-size: 15px;
        line-height: 1.5;
        text-align: left;
        margin-bottom: 10px;
    }
    
    /* Artists grid */
    .artists-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Filter group */
    .filter-group {
        grid-template-columns: 1fr;
    }
    
    /* Form row */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Artist actions */
    .artist-actions {
        flex-direction: column;
    }
    
    /* Artist name h2 - reduced line-height */
    .artist-name {
        font-size: 18px;
        line-height: 1.2;
    }
    
    /* CTA box */
    .cta-box {
        padding: 25px 14px;
    }
    
    .cta-box h2 {
        font-size: 22px;
        line-height: 1.2;
    }
}

/* ===== PROFILE PAGE ===== */
.profile-header {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    margin-bottom: 30px;
}

.profile-image-large img {
    width: 100%;
    border-radius: 10px;
}

.profile-details h1 {
    font-size: 32px;
    margin-bottom: 15px;
}

.profile-meta {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    flex-wrap: wrap;
}

.profile-bio {
    line-height: 1.8;
    color: #555;
    margin: 20px 0;
}

.profile-website-btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: #d33;
    color: white;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Unified button hover effect - lift and brighten */
.profile-website-btn:hover {
    background-color: #e55;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .profile-header {
        grid-template-columns: 1fr;
    }
}

/* Advertisement Space */
.ad-space {
    background: #f9f9f9;
    border: 2px dashed #ddd;
    padding: 20px;
    text-align: center;
    margin: 30px 0;
    border-radius: 8px;
}

.ad-space.sidebar {
    max-width: 300px;
    margin: 20px auto;
}

.ad-space.banner {
    max-width: 100%;
    min-height: 100px;
}

.ad-space p {
    color: #999;
    font-size: 14px;
    margin: 0;
}

/* ===== FOOTER SOCIAL LINKS ===== */
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1rem;
}

.footer-links {
    text-align: center;
}

/* Footer responsive navigation - desktop/mobile versions */
.footer-nav-mobile {
    display: none;
}

.footer-social {
    text-align: center;
}

.footer-social p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    color: #666;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: #d33;
    color: white;
    transform: translateY(-3px);
}

.social-links svg {
    width: 20px;
    height: 20px;
}

/* ===== BACK TO TOP BUTTON ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(221, 51, 51, 0.8);
    color: white;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 28px;
    font-weight: bold;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    border: 2px solid rgba(255,255,255,0.3);
}

.back-to-top:hover {
    background: rgba(221, 51, 51, 1);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.back-to-top.show {
    display: flex;
}

/* ===== SELECTED ARTIST (dříve Featured) ===== */
.selected-star {
    color: #FFD700;
    font-size: 18px;
    margin-left: 8px;
    vertical-align: middle;
    display: inline-block;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.selected-badge {
    background: linear-gradient(135deg, #FFD700, #FFA500);
    color: #333;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    display: inline-block;
    margin-left: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Selected Artist card border */
.artist-card.selected {
    border: 2px solid #FFD700;
    box-shadow: 0 4px 12px rgba(255,215,0,0.3);
}

/* ===== SMART PAGINATION ===== */
.pagination-controls {
    margin: 20px 0;
    text-align: center;
}

.per-page-selector {
    display: inline-block;
    margin-right: 20px;
    padding: 10px 15px;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.per-page-selector label {
    margin-right: 10px;
    font-weight: 600;
    color: #333;
}

.per-page-selector select {
    padding: 6px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: 14px;
}

.per-page-selector select:focus {
    outline: none;
    border-color: #d33;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination a:hover {
    background: #f0f0f0;
    border-color: #d33;
    text-decoration: none;
    transform: translateY(-2px);
}

.pagination a.active,
.pagination span.active {
    background: #d33;
    color: white;
    border-color: #d33;
}

.pagination .dots {
    border: none;
    background: transparent;
    color: #666;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links p:last-child {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        gap: 0.3rem;
    }
    
    .footer-links p:last-child a {
        white-space: nowrap;
    }
    
    /* Show mobile version, hide desktop version */
    .footer-nav-desktop {
        display: none;
    }
    
    .footer-nav-mobile {
        display: block;
    }
    
    .footer-social {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
        gap: 0;
        flex-wrap: nowrap;
        padding: 0;
    }
    
    .social-links a {
        width: 36px;
        height: 36px;
        padding: 3px;
        box-sizing: content-box;
    }
    
    .social-links svg {
        width: 18px;
        height: 18px;
    }
    
    .back-to-top {
        bottom: 80px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 24px;
    }
    
    .per-page-selector {
        display: block;
        margin: 10px auto 20px;
    }
    
    .pagination {
        gap: 5px;
    }
    
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 35px;
    }
}


/* =============================================================================
   MAGAZINE STYLES
   Version 2.0 - 28 Jan 2026
   Using CSS custom properties for dark mode support
   ============================================================================= */

/* Nav Magazine link - shows full text on desktop, short on mobile */
.nav-mag-full {
    display: inline;
}

.nav-mag-short {
    display: none;
}

@media (max-width: 768px) {
    .nav-mag-full {
        display: none;
    }
    
    .nav-mag-short {
        display: inline;
    }
}

/* ===== MAGAZINE HEADER ===== */
.magazine-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.magazine-header-row h1 {
    font-size: 2.5rem;
    color: var(--text-heading, #222);
    margin: 0;
}

.magazine-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rss-dropdown {
    position: relative;
}

.rss-button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-primary, #333);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 5px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    cursor: pointer;
}

.rss-button:hover {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
    text-decoration: none;
}

.rss-button svg {
    flex-shrink: 0;
}

.rss-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 8px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 180px;
    z-index: 100;
    display: none;
}

.rss-dropdown-menu.show {
    display: block;
}

.rss-dropdown-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-primary, #333);
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.9rem;
}

.rss-dropdown-menu a:first-child {
    border-radius: 8px 8px 0 0;
}

.rss-dropdown-menu a:last-child {
    border-radius: 0 0 8px 8px;
}

.rss-dropdown-menu a:hover {
    background: var(--bg-hover, #f5f5f5);
    text-decoration: none;
}

.rss-dropdown-menu a svg {
    opacity: 0.7;
}

.rss-dropdown-menu .rss-copy-link {
    border-top: 1px solid var(--border-color, #ddd);
}

.magazine-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.magazine-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: var(--text-heading, #222);
}

.magazine-intro {
    font-size: 1.05rem;
    color: var(--text-secondary, #666);
    max-width: 700px;
    margin: 0 0 30px;
    line-height: 1.6;
}

/* Desktop line break for magazine intro */
.magazine-intro .intro-line-2 {
    display: block;
}

@media (max-width: 768px) {
    .magazine-intro .intro-line-2 {
        display: inline;
    }
}

/* ===== LANGUAGE DROPDOWN ===== */
.language-dropdown {
    position: relative;
}

.language-dropdown-btn {
    padding: 10px 20px;
    background-color: #d33;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.language-dropdown-btn:hover {
    background-color: #e55;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.language-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 150px;
    z-index: 100;
    display: none;
}

.language-dropdown-menu.show {
    display: block;
}

.language-dropdown-menu a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary, #333);
    text-decoration: none;
    transition: background 0.2s ease;
}

.language-dropdown-menu a:hover {
    background: var(--bg-hover, #f5f5f5);
    text-decoration: none;
}

.language-dropdown-menu a.active {
    color: #d33;
    font-weight: 600;
}

/* ===== FEATURED ARTICLE (Hero) ===== */
.featured-article {
    margin-bottom: 50px;
    background: var(--bg-card, #fff);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md, 0 4px 20px rgba(0,0,0,0.1));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, transparent);
}

.featured-article:hover {
    box-shadow: var(--shadow-lg, 0 8px 30px rgba(0,0,0,0.15));
    transform: translateY(-3px);
}

.featured-article a {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Horizontal layout for desktop */
.featured-article.featured-horizontal a {
    display: flex;
    flex-direction: row;
}

.featured-article.featured-horizontal .featured-image {
    flex: 0 0 40%;
    max-width: 40%;
    overflow: hidden;
}

.featured-article.featured-horizontal .featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px 0 0 12px;
    transition: transform 0.3s ease;
}

.featured-article.featured-horizontal .featured-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 25px 35px;
}

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

/* Legacy vertical layout */
.featured-article .featured-image {
    width: 100%;
    overflow: hidden;
}

.featured-article .featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease;
}

.featured-article .featured-content {
    padding: 30px;
}

.featured-article .featured-type {
    display: inline-block;
    background: var(--accent-primary, #d33);
    color: #fff;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.featured-article h2 {
    font-size: clamp(1.5rem, 2.5vw + 0.5rem, 2rem);
    line-height: 1.25;
    margin-bottom: 15px;
    color: var(--text-heading, #222);
    text-wrap: balance; /* Modern CSS for better line breaks */
    word-break: break-word; /* Fallback for long words */
}

/* Title split for featured article - inline on desktop */
.featured-article h2 .title-name::after {
    content: ": ";
}

.featured-article h2 .title-text {
    display: inline;
}

.featured-article .featured-subtitle {
    font-size: 1.15rem;
    color: var(--text-secondary, #666);
    line-height: 1.6;
    margin-bottom: 20px;
}

.featured-article .featured-meta {
    font-size: 0.95rem;
    color: var(--text-muted, #888);
    display: flex;
    align-items: center;
    gap: 10px;
}

.featured-article .person-name {
    font-weight: 600;
    color: var(--accent-primary, #d33);
}

.featured-article .meta-sep {
    color: var(--text-muted, #ccc);
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin: 20px 0 30px;
}

.language-switcher a {
    padding: 8px 16px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 20px;
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    text-decoration: none;
    transition: all 0.2s ease;
    background: var(--bg-card, #fff);
}

.language-switcher a:hover {
    border-color: var(--accent-primary, #d33);
    color: var(--accent-primary, #d33);
    text-decoration: none;
}

.language-switcher a.active {
    background-color: var(--accent-primary, #d33);
    border-color: var(--accent-primary, #d33);
    color: #fff;
}

.original-badge {
    color: var(--accent-primary, #d33);
    font-size: 0.6rem;
    vertical-align: super;
}

/* ===== MAGAZINE SEARCH BOX ===== */
.magazine-search,
.magazine-search-inline {
    max-width: 500px;
    margin: 0 auto 40px;
}

.magazine-search form,
.magazine-search-inline form {
    display: flex;
    gap: 10px;
}

.magazine-search .search-input,
.magazine-search-inline .search-input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-input, #ddd);
    border-radius: 8px;
    font-size: 1rem;
    background: var(--bg-input, #fff);
    color: var(--text-primary, #333);
    transition: border-color 0.2s ease;
}

.magazine-search .search-input:focus,
.magazine-search-inline .search-input:focus {
    outline: none;
    border-color: var(--accent-primary, #d33);
}

.search-button {
    padding: 12px 24px;
    background-color: var(--accent-primary, #d33);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
}

.search-button:hover {
    background-color: var(--accent-primary-hover, #e55);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.magazine-search-inline {
    margin: 25px auto;
    padding: 20px;
    background: var(--bg-card, #f9f9f9);
    border-radius: 12px;
    border: 1px solid var(--border-color, #eee);
}

/* ===== MAGAZINE ARTICLES GRID ===== */
.magazine-articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

/* ===== ARTICLE CARD ===== */
.article-card {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-sm, 0 2px 10px rgba(0,0,0,0.08));
    transition: all 0.3s ease;
    border: 1px solid var(--border-color, transparent);
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg, 0 8px 25px rgba(0,0,0,0.12));
}

.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card .card-image {
    position: relative;
    overflow: hidden;
}

.article-card .card-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px 12px 0 0;
    transition: transform 0.3s ease;
}

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

.article-card .card-content {
    padding: 20px;
}

.article-card h2,
.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--text-heading, #222);
    line-height: 1.4;
}

/* Title split for article cards - name on line 1, subtitle on line 2 */
.article-card h2 .title-name,
.article-card h3 .title-name {
    display: block;
}

.article-card h2 .title-name::after,
.article-card h3 .title-name::after {
    content: none;
}

.article-card h2 .title-text,
.article-card h3 .title-text {
    display: block;
}

.article-card .card-subtitle,
.article-card p {
    font-size: 0.9rem;
    color: var(--text-secondary, #666);
    margin-bottom: 15px;
    line-height: 1.5;
}

.article-card .card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted, #888);
}

.article-card .person-name {
    font-weight: 600;
    color: var(--accent-primary, #d33);
}

/* ===== ARTICLE PAGE ===== */
.magazine-article {
    max-width: 800px;
    margin: 0 auto;
}

.article-header {
    text-align: center;
    margin-bottom: 30px;
}

.article-header h1 {
    font-size: clamp(1.5rem, 3vw + 0.5rem, 2.4rem);
    line-height: 1.25;
    margin-bottom: 20px;
    color: var(--text-heading, #222);
    font-weight: 700;
    text-wrap: balance; /* Modern CSS for better line breaks */
    word-break: break-word; /* Fallback for long words */
}

/* H1 title parts - inline by default (desktop) */
.article-header h1 .title-name::after {
    content: ": ";
}

.article-header h1 .title-text {
    display: inline;
}

.article-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary, #666);
    line-height: 1.5;
    margin-bottom: 20px;
    font-weight: 400;
}

/* Article meta row - date and language dropdown on same line */
.article-meta-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    font-size: 0.95rem;
    color: var(--text-muted, #888);
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.article-meta {
    font-size: 0.95rem;
    color: var(--text-muted, #888);
    margin-bottom: 30px;
}

/* Compact language dropdown for article */
.lang-dropdown {
    position: relative;
}

.lang-dropdown-btn {
    padding: 6px 14px;
    background: var(--accent-primary, #d33);
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lang-dropdown-btn:hover {
    background: var(--accent-primary-hover, #e55);
}

.lang-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 8px;
    background: var(--bg-card, #fff);
    border: 1px solid var(--border-color, #ddd);
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    min-width: 120px;
    z-index: 100;
    display: none;
}

.lang-dropdown-menu.show {
    display: block;
}

.lang-dropdown-menu a {
    display: block;
    padding: 8px 14px;
    color: var(--text-primary, #333);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.lang-dropdown-menu a:hover {
    background: var(--bg-hover, #f5f5f5);
    text-decoration: none;
}

.lang-dropdown-menu a.active {
    color: var(--accent-primary, #d33);
    font-weight: 600;
}

/* Featured Image */
.article-featured-image {
    margin: 0 0 30px;
}

.article-featured-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
}

.article-featured-image figcaption {
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-muted, #888);
    margin-top: 12px;
    font-style: italic;
}

/* Article Content */
.article-content {
    font-size: 1.1rem;
    line-height: 1.85;
    color: var(--text-primary, #333);
}

.article-content p {
    margin-bottom: 1.5em;
}

/* Interview Q&A Styling - Professional magazine look */
.interview-intro {
    font-size: 1.15rem;
    color: var(--text-primary, #444);
    border-left: 4px solid var(--accent-primary, #d33);
    padding-left: 20px;
    margin-bottom: 30px;
    line-height: 1.8;
    font-style: italic;
}

/* Film Review Block */
.film-review-block {
    margin: 40px 0;
    padding: 30px;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 12px;
    border-left: 4px solid var(--accent-primary, #d33);
}

.film-review-block h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-heading, #222);
}

.film-review-block h2 a {
    color: var(--accent-primary, #d33);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

.film-review-block h2 a:hover {
    border-bottom-color: var(--accent-primary, #d33);
}

.film-review-block p {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-primary, #444);
    margin-bottom: 1em;
}

.film-review-block p:last-child {
    margin-bottom: 0;
}

.film-review-block ol {
    margin: 1em 0;
    padding-left: 1.5em;
}

.film-review-block ol li {
    margin-bottom: 0.5em;
    line-height: 1.6;
    color: var(--text-primary, #444);
}

.interview-qa {
    margin-top: 20px;
}

.interview-qa .question {
    margin-bottom: 8px;
    padding: 15px 20px;
    background: var(--bg-hover, #f8f8f8);
    border-radius: 8px;
    border-left: 4px solid var(--accent-primary, #d33);
}

/* Hide the number labels */
.interview-qa .question .q-label {
    display: none;
}

.interview-qa .question p {
    font-weight: 700;
    color: var(--text-heading, #222);
    font-size: 1.1rem;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.interview-qa .answer {
    margin-bottom: 18px;
    padding-left: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color, #eee);
}

.interview-qa .answer:last-child {
    border-bottom: none;
}

.interview-qa .answer p {
    color: var(--text-primary, #444);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Bio Section - Author card style */
.article-bio {
    background: var(--bg-card, #f9f9f9);
    padding: 25px;
    border-radius: 12px;
    margin: 30px 0;
    border: 1px solid var(--border-color, #eee);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.article-bio .bio-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--accent-primary, #d33);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.article-bio h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
    color: var(--text-heading, #222);
    text-align: center;
}

.article-bio p {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--text-secondary, #555);
    text-align: left;
    max-width: 100%;
}

.article-bio .external-link {
    margin-top: 15px;
    text-align: center;
    width: 100%;
}

.article-bio .external-link a {
    display: inline-block;
    padding: 10px 24px;
    background: var(--accent-primary, #d33);
    color: #fff;
    border-radius: 25px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.article-bio .external-link a:hover {
    background: var(--accent-primary-hover, #e55);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-decoration: none;
}

/* Original Language Notice */
.original-language-notice {
    background: var(--bg-card, #fff);
    padding: 12px 18px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid var(--border-color, #eee);
    border-left: 4px solid var(--accent-primary, #d33);
}

.original-language-notice p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text-secondary, #666);
}

.original-language-notice a {
    color: var(--accent-primary, #d33);
    font-weight: 600;
}

/* ===== RELATED ARTICLES & DISCOVER ARTISTS ===== */
.related-articles,
.discover-artists {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--border-color, #eee);
}

.related-articles h2,
.discover-artists h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: var(--text-heading, #222);
    text-align: center;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

/* Magazine-specific artist grid - same as atelier landing pages */
.discover-artists .artists-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.discover-artists .artist-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.discover-artists .artist-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.discover-artists .artist-image {
    overflow: hidden;
}

.discover-artists .artist-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 10px 10px 0 0;
    transition: transform 0.3s ease;
}

.discover-artists .artist-card:hover .artist-image img {
    transform: scale(1.05);
}

.discover-artists .artist-info {
    padding: 20px;
    text-align: center;
}

.discover-artists .artist-name {
    font-size: 20px;
    margin-bottom: 10px;
}

.discover-artists .artist-name a {
    color: #222;
    text-decoration: none;
}

.discover-artists .artist-name a:hover {
    color: #d33;
}

.discover-artists .artist-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

.discover-artists .meta-country {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    color: #666;
}

.discover-artists .meta-category {
    background: #ffe5e5;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 13px;
    color: #d33;
}

/* ===== MAGAZINE SEARCH RESULTS ===== */
.search-header {
    text-align: center;
    margin-bottom: 30px;
}

.search-header h1 {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-heading, #222);
}

.search-results {
    max-width: 800px;
    margin: 0 auto;
}

.search-result-item {
    margin-bottom: 25px;
    border-bottom: 1px solid var(--border-color, #eee);
    padding-bottom: 25px;
}

.search-result-item a {
    display: flex;
    gap: 20px;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    opacity: 0.9;
}

.search-result-item .result-image {
    flex-shrink: 0;
    width: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.search-result-item .result-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.search-result-item .result-content h2 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: var(--text-heading, #222);
}

/* Title split for search results - inline on desktop */
.search-result-item .result-content h2 .title-name::after {
    content: ": ";
}

.search-result-item .result-content h2 .title-text {
    display: inline;
}

.search-result-item .result-content p {
    font-size: 0.95rem;
    color: var(--text-secondary, #666);
    margin-bottom: 10px;
}

.search-result-item .result-meta {
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    display: flex;
    gap: 15px;
}

/* ===== NO RESULTS ===== */
.no-results,
.no-articles {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary, #666);
}

/* ===== BACK LINK ===== */
.back-link {
    text-align: center;
    margin: 40px 0;
}

.back-link a {
    color: var(--accent-primary, #d33);
    font-weight: 600;
    text-decoration: none;
}

.back-link a:hover {
    text-decoration: underline;
}

/* ===== MAGAZINE PAGINATION ===== */
.magazine-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 40px 0;
}

.magazine-pagination .page-link {
    padding: 8px 14px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    color: var(--text-secondary, #666);
    text-decoration: none;
    transition: all 0.2s ease;
    background: var(--bg-card, #fff);
}

.magazine-pagination .page-link:hover {
    border-color: var(--accent-primary, #d33);
    color: var(--accent-primary, #d33);
}

.magazine-pagination .page-link.current {
    background: var(--accent-primary, #d33);
    border-color: var(--accent-primary, #d33);
    color: #fff;
}

/* ===== MAGAZINE RESPONSIVE ===== */
@media (max-width: 1024px) {
    .magazine-articles-grid,
    .articles-grid,
    .discover-artists .artists-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .magazine-header-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .magazine-header-row h1 {
        font-size: 1.8rem;
    }
    
    .magazine-header h1 {
        font-size: 1.8rem;
    }
    
    .featured-article .featured-image {
        height: auto;
    }
    
    /* Mobile: revert horizontal layout to vertical */
    .featured-article.featured-horizontal a {
        flex-direction: column;
    }
    
    .featured-article.featured-horizontal .featured-image {
        flex: none;
        max-width: 100%;
    }
    
    .featured-article.featured-horizontal .featured-image img {
        border-radius: 12px 12px 0 0;
        height: auto;
        object-fit: cover;
    }
    
    .featured-article.featured-horizontal .featured-content {
        padding: 20px;
    }
    
    .featured-article h2 {
        font-size: 1.5rem;
    }
    
    .featured-article .featured-content {
        padding: 20px;
    }
    
    .featured-article .featured-subtitle {
        font-size: 1rem;
    }
    
    /* Mobile title split - featured article */
    .featured-article h2 {
        font-size: clamp(1.25rem, 4.5vw, 1.5rem);
        line-height: 1.2;
    }
    
    .featured-article h2 .title-name {
        display: block;
        margin-bottom: 0.25em;
    }
    
    .featured-article h2 .title-name::after {
        content: "";
    }
    
    .featured-article h2 .title-text {
        display: block;
    }
    
    /* Mobile title split - article cards */
    .article-card h2 .title-name,
    .article-card h3 .title-name {
        display: block;
        margin-bottom: 3px;
    }
    
    .article-card h2 .title-name::after,
    .article-card h3 .title-name::after {
        content: "";
    }
    
    .article-card h2 .title-text,
    .article-card h3 .title-text {
        display: block;
    }
    
    /* Mobile H1 split - name on first line, title on second */
    .article-header h1 {
        font-size: clamp(1.25rem, 5vw, 1.6rem);
        line-height: 1.2;
    }
    
    .article-header h1 .title-name {
        display: block;
        margin-bottom: 0.25em;
    }
    
    .article-header h1 .title-name::after {
        content: "";
    }
    
    .article-header h1 .title-text {
        display: block;
    }
    
    .article-subtitle {
        font-size: 1rem;
        /* Limit lines to prevent overflow */
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .article-meta-row {
        gap: 12px;
    }
    
    .lang-dropdown-btn {
        padding: 5px 12px;
        font-size: 0.8rem;
    }
    
    .magazine-articles-grid,
    .articles-grid,
    .discover-artists .artists-grid {
        grid-template-columns: 1fr;
    }
    
    .language-switcher {
        gap: 6px;
    }
    
    .language-switcher a {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
    
    .interview-qa .answer {
        padding-left: 0;
        margin-top: 8px;
        margin-bottom: 15px;
        padding-bottom: 15px;
    }
    
    .interview-qa .question {
        padding: 12px 15px;
        margin-bottom: 8px;
    }
    
    .interview-qa .question p {
        font-size: 1rem;
    }
    
    .article-bio {
        padding: 20px;
        margin: 20px 0;
    }
    
    .article-bio .bio-avatar {
        width: 70px;
        height: 70px;
    }
    
    .article-bio h3 {
        font-size: 1.05rem;
    }
    
    .article-bio p {
        font-size: 0.9rem;
    }
    
    .related-articles,
    .discover-artists {
        margin-top: 20px;
        padding-top: 20px;
    }
    
    .related-articles h2,
    .discover-artists h2 {
        font-size: 1.2rem;
        margin-bottom: 15px;
    }
    
    .search-result-item a {
        flex-direction: column;
    }
    
    .search-result-item .result-image {
        width: 100%;
    }
    
    /* Mobile title split for search results */
    .search-result-item .result-content h2 .title-name {
        display: block;
        margin-bottom: 3px;
    }
    
    .search-result-item .result-content h2 .title-name::after {
        content: "";
    }
    
    .search-result-item .result-content h2 .title-text {
        display: block;
    }
    
    .magazine-search form,
    .magazine-search-inline form {
        flex-direction: column;
    }
    
    .search-button {
        width: 100%;
    }
    
    .magazine-search-inline {
        margin: 15px auto;
        padding: 15px;
    }
    
    .original-language-notice {
        margin: 15px 0;
        padding: 10px 15px;
    }
}

/* ===== MAGAZINE DARK MODE OVERRIDES ===== */
[data-theme="dark"] .magazine-header h1,
[data-theme="dark"] .article-header h1,
[data-theme="dark"] .related-articles h2,
[data-theme="dark"] .discover-artists h2,
[data-theme="dark"] .article-bio h3,
[data-theme="dark"] .interview-qa .question p,
[data-theme="dark"] .article-card h2,
[data-theme="dark"] .article-card h3,
[data-theme="dark"] .search-header h1,
[data-theme="dark"] .search-result-item .result-content h2 {
    color: #ffffff;
}

[data-theme="dark"] .magazine-intro,
[data-theme="dark"] .article-subtitle,
[data-theme="dark"] .article-bio p,
[data-theme="dark"] .article-card .card-subtitle,
[data-theme="dark"] .article-card p,
[data-theme="dark"] .original-language-notice p,
[data-theme="dark"] .search-result-item .result-content p {
    color: #cccccc;
}

[data-theme="dark"] .article-content,
[data-theme="dark"] .article-content p,
[data-theme="dark"] .interview-qa .answer p,
[data-theme="dark"] .interview-intro {
    color: #e0e0e0;
}

[data-theme="dark"] .film-review-block {
    background: #1e1e1e;
    border-color: #ff6fce;
}

[data-theme="dark"] .film-review-block h2 {
    color: #ffffff;
}

[data-theme="dark"] .film-review-block h2 a {
    color: #ff6fce;
}

[data-theme="dark"] .film-review-block p,
[data-theme="dark"] .film-review-block ol li {
    color: #e0e0e0;
}

[data-theme="dark"] .article-meta,
[data-theme="dark"] .article-featured-image figcaption,
[data-theme="dark"] .article-card .card-meta,
[data-theme="dark"] .search-result-item .result-meta {
    color: #999999;
}

[data-theme="dark"] .article-card,
[data-theme="dark"] .article-bio,
[data-theme="dark"] .magazine-search-inline,
[data-theme="dark"] .original-language-notice,
[data-theme="dark"] .discover-artists .artist-card {
    background: #1e1e1e;
    border-color: #3a3a3a;
}

[data-theme="dark"] .article-bio .bio-avatar {
    border-color: #ff6fce;
}

[data-theme="dark"] .article-bio .external-link a {
    background: #ff6fce;
    color: #1a1a1a;
}

[data-theme="dark"] .article-bio .external-link a:hover {
    background: #ff8fd9;
}

[data-theme="dark"] .language-switcher a {
    background: #1e1e1e;
    border-color: #3a3a3a;
    color: #cccccc;
}

[data-theme="dark"] .language-switcher a:hover {
    border-color: #ff6fce;
    color: #ff6fce;
}

[data-theme="dark"] .language-switcher a.active {
    background: #ff6fce;
    border-color: #ff6fce;
    color: #1a1a1a;
}

[data-theme="dark"] .interview-intro {
    border-left-color: #ff6fce;
}

[data-theme="dark"] .original-language-notice {
    border-left-color: #ff6fce;
}

/* Article language dropdown dark mode */
[data-theme="dark"] .lang-dropdown-btn {
    background: #ff6fce;
    color: #1a1a1a;
}

[data-theme="dark"] .lang-dropdown-btn:hover {
    background: #ff8fd9;
}

[data-theme="dark"] .lang-dropdown-menu {
    background: #1e1e1e;
    border-color: #3a3a3a;
}

[data-theme="dark"] .lang-dropdown-menu a {
    color: #f0f0f0;
}

[data-theme="dark"] .lang-dropdown-menu a:hover {
    background: #2a2a2a;
}

[data-theme="dark"] .lang-dropdown-menu a.active {
    color: #ff6fce;
}

[data-theme="dark"] .magazine-search .search-input,
[data-theme="dark"] .magazine-search-inline .search-input {
    background: #2a2a2a;
    border-color: #3a3a3a;
    color: #f0f0f0;
}

[data-theme="dark"] .magazine-pagination .page-link {
    background: #1e1e1e;
    border-color: #3a3a3a;
    color: #cccccc;
}

[data-theme="dark"] .magazine-pagination .page-link:hover {
    border-color: #ff6fce;
    color: #ff6fce;
}

[data-theme="dark"] .magazine-pagination .page-link.current {
    background: #ff6fce;
    border-color: #ff6fce;
    color: #1a1a1a;
}

[data-theme="dark"] .back-link a {
    color: #ff6fce;
}

[data-theme="dark"] .original-badge {
    color: #ff6fce;
}

[data-theme="dark"] .article-card .person-name {
    color: #ff6fce;
}

[data-theme="dark"] .discover-artists .artist-name a {
    color: #ffffff;
}

[data-theme="dark"] .discover-artists .artist-name a:hover {
    color: #ff6fce;
}

/* Featured article dark mode */
[data-theme="dark"] .featured-article {
    background: #1e1e1e;
    border-color: #3a3a3a;
}

[data-theme="dark"] .featured-article h2 {
    color: #ffffff;
}

[data-theme="dark"] .featured-article .featured-subtitle {
    color: #cccccc;
}

[data-theme="dark"] .featured-article .featured-meta {
    color: #999999;
}

[data-theme="dark"] .featured-article .person-name {
    color: #ff6fce;
}

[data-theme="dark"] .featured-article .featured-type {
    background: #ff6fce;
    color: #1a1a1a;
}

/* Language dropdown dark mode */
[data-theme="dark"] .language-dropdown-btn {
    background: #ff6fce;
    color: #1a1a1a;
}

[data-theme="dark"] .language-dropdown-btn:hover {
    background: #ff8fd9;
}

[data-theme="dark"] .language-dropdown-menu {
    background: #1e1e1e;
    border-color: #3a3a3a;
}

[data-theme="dark"] .language-dropdown-menu a {
    color: #f0f0f0;
}

[data-theme="dark"] .language-dropdown-menu a:hover {
    background: #2a2a2a;
}

[data-theme="dark"] .language-dropdown-menu a.active {
    color: #ff6fce;
}

[data-theme="dark"] .magazine-header-row h1 {
    color: #ffffff;
}

[data-theme="dark"] .rss-button {
    background: #2a2a2a;
    color: #cccccc;
    border-color: #3a3a3a;
}

[data-theme="dark"] .rss-button:hover {
    background: #ff6600;
    color: white;
    border-color: #ff6600;
}

[data-theme="dark"] .rss-dropdown-menu {
    background: #1e1e1e;
    border-color: #3a3a3a;
}

[data-theme="dark"] .rss-dropdown-menu a {
    color: #cccccc;
}

[data-theme="dark"] .rss-dropdown-menu a:hover {
    background: #2a2a2a;
}

[data-theme="dark"] .rss-dropdown-menu .rss-copy-link {
    border-top-color: #3a3a3a;
}

/* Search button dark mode */
[data-theme="dark"] .search-button {
    background: #ff6fce;
    color: #1a1a1a;
}

[data-theme="dark"] .search-button:hover {
    background: #ff8fd9;
}

/* Interview dark mode */
[data-theme="dark"] .interview-qa .question {
    background: #252525;
    border-left-color: #ff6fce;
}

[data-theme="dark"] .interview-qa .question p {
    color: #ffffff;
}

[data-theme="dark"] .interview-qa .answer {
    border-bottom-color: #3a3a3a;
}

/* Discover artists dark mode */
[data-theme="dark"] .discover-artists .artist-card {
    background: #1e1e1e;
}

[data-theme="dark"] .discover-artists .artist-name a {
    color: #ffffff;
}

[data-theme="dark"] .discover-artists .artist-name a:hover {
    color: #ff6fce;
}

[data-theme="dark"] .discover-artists .meta-country {
    background: #2a2a2a;
    color: #aaaaaa;
}

[data-theme="dark"] .discover-artists .meta-category {
    background: rgba(255, 111, 206, 0.15);
    color: #ff6fce;
}

/* =============================================================================
   RTL SUPPORT (Arabic)
   ============================================================================= */

[dir="rtl"],
html[lang="ar"] {
    direction: rtl;
}

[dir="rtl"] .container-header,
html[lang="ar"] .container-header {
    flex-direction: row-reverse;
}

[dir="rtl"] .nav,
html[lang="ar"] .nav {
    flex-direction: row-reverse;
}

[dir="rtl"] .magazine-header-row,
html[lang="ar"] .magazine-header-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .magazine-header-actions,
html[lang="ar"] .magazine-header-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .article-meta-row,
html[lang="ar"] .article-meta-row {
    flex-direction: row-reverse;
}

[dir="rtl"] .interview-qa .question,
[dir="rtl"] .interview-qa .answer,
html[lang="ar"] .interview-qa .question,
html[lang="ar"] .interview-qa .answer {
    text-align: right;
}

[dir="rtl"] .magazine-article,
html[lang="ar"] .magazine-article {
    text-align: right;
}

[dir="rtl"] .article-bio,
html[lang="ar"] .article-bio {
    text-align: right;
}

/* ===== EXTRA SMALL SCREENS (360px and below) ===== */
@media (max-width: 400px) {
    /* Extra small - further reduce title sizes */
    .featured-article h2 {
        font-size: clamp(1.1rem, 5vw, 1.35rem);
    }
    
    .article-header h1 {
        font-size: clamp(1.15rem, 5.5vw, 1.4rem);
    }
    
    .article-subtitle {
        font-size: 0.9rem;
    }
    
    .featured-article .featured-subtitle {
        font-size: 0.9rem;
    }
    
    /* Tighter spacing on very small screens */
    .featured-article .featured-content {
        padding: 15px;
    }
    
    .article-header {
        margin-bottom: 20px;
    }
    
    .article-header h1 .title-name {
        margin-bottom: 0.15em;
    }
}

[dir="rtl"] .featured-content,
html[lang="ar"] .featured-content {
    text-align: right;
}

[dir="rtl"] .article-card,
html[lang="ar"] .article-card {
    text-align: right;
}
