/* Critical CSS - Above the fold content */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.7;
    color: #333;
    background: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.container--narrow,
body.page-narrow .container {
    max-width: 900px;
}

/* Header */
header {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-top {
    background: linear-gradient(135deg, #c41e3a 0%, #8b1538 100%);
    color: white;
    padding: 8px 0;
    font-size: 0.85rem;
    text-align: center;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #c41e3a;
    cursor: pointer;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

a.logo {
    text-decoration: none;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #c41e3a;
}

/* Welcome Banner */
.welcome-banner {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(255, 152, 0, 0.2);
}

.welcome-banner h2 {
    color: #e65100;
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.welcome-banner p {
    color: #333;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 0.8rem;
}

.welcome-banner .highlight {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    border-left: 3px solid #ff9800;
}

.welcome-banner .highlight strong {
    color: #e65100;
}

/* Hero Banner */
.hero-banner {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                linear-gradient(135deg, #c41e3a 0%, #ffd700 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero-banner h1 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-banner p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
}

/* Section Headers */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #ffd700;
}

.section-title {
    font-size: 1.8rem;
    color: #c41e3a;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Homepage: section H2 links to guides/blog index (secondary entry beside “View all”) */
.section-title-link {
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    padding: 0.2rem 0.45rem;
    margin: -0.2rem -0.45rem;
    transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.section-title-link:hover {
    background: rgba(196, 30, 58, 0.1);
    color: #9a1830;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.section-title-link:focus-visible {
    outline: 2px solid #c41e3a;
    outline-offset: 3px;
}

.view-all-link {
    color: #c41e3a;
    text-decoration: none;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: gap 0.3s;
}

.view-all-link:hover {
    gap: 0.6rem;
}

/* Article List (Compact Style) */
.article-list {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 3rem;
}

.article-list-item {
    display: flex;
    gap: 1.5rem;
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.3s;
    cursor: pointer;
}

.article-list-item:last-child {
    border-bottom: none;
}

.article-list-item:hover {
    background: #f8f9fa;
}

.article-icon {
    font-size: 2.5rem;
    min-width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #c41e3a, #ffd700);
    border-radius: 12px;
    flex-shrink: 0;
}

.article-info {
    flex: 1;
}

.article-list-item .article-tag {
    display: inline-block;
    background: #e8ecf4;
    color: #0d2d5c;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.article-list-item h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.article-list-item p {
    color: #4a4a4a;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

.article-meta-compact {
    display: flex;
    gap: 1.5rem;
    color: #5c5c5c;
    font-size: 0.85rem;
}

.article-meta-compact span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Ad Slots */
.ad-container {
    background: white;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ad-slot {
    border: 2px dashed #bdbdbd;
    padding: 20px;
    color: #424242;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}

/* Sidebar */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 2rem;
    margin: 2rem 0;
}

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.widget {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.widget h3 {
    color: #c41e3a;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    padding-bottom: 0.8rem;
    border-bottom: 2px solid #ffd700;
}

.widget-list {
    list-style: none;
}

.widget-list li {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: #333;
    text-decoration: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s;
}

.widget-list a:hover {
    color: #c41e3a;
}

.post-count {
    background: #f5f5f5;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
    color: #666;
}

/* Footer */
footer {
    background: #2c2c2c;
    color: #ccc;
    padding: 3rem 0 1rem;
    margin-top: 3rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: #ffd700;
    margin-bottom: 1rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    display: block;
    margin-bottom: 0.5rem;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #e0e0e0;
}

.footer-bottom-links a {
    color: #ffe69c;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.footer-bottom-links a:hover {
    color: #fff8e1;
}

.comments-loading,
.comments-loading p {
    color: #424242;
}

/* Language selector (i18n pages) */
.language-selector {
    position: relative;
    margin-left: 1rem;
}

.language-btn {
    background: transparent;
    border: 2px solid #c41e3a;
    color: #c41e3a;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s;
}

.language-btn:hover {
    background: #c41e3a;
    color: white;
}

.language-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 0.5rem;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    min-width: 180px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.language-dropdown.show {
    display: block;
}

.language-option {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-option:hover {
    background: #f5f5f5;
}

.language-option.active {
    background: #fff3e0;
    color: #c41e3a;
    font-weight: 600;
}

body[dir="rtl"] .language-dropdown {
    right: auto;
    left: 0;
}

/* Breadcrumb, static inner pages */
.breadcrumb {
    padding: 1.5rem 0;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #666;
    text-decoration: none;
}

.breadcrumb a:hover {
    color: #c41e3a;
}

.breadcrumb span {
    color: #999;
    margin: 0 0.5rem;
}

.page-header {
    background: linear-gradient(135deg, #c41e3a, #ffd700);
    color: white;
    padding: 3rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.8rem;
}

.page-header p {
    font-size: 1.2rem;
    opacity: 0.95;
}

.content-section {
    background: white;
    border-radius: 10px;
    padding: 3rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.content-section h2 {
    color: #c41e3a;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #ffd700;
}

.content-section h3 {
    color: #e64a19;
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
}

.content-section p {
    margin-bottom: 1.5rem;
    color: #555;
    line-height: 1.8;
}

.content-section ul {
    margin: 1.5rem 0 1.5rem 2rem;
}

.content-section li {
    margin-bottom: 1rem;
    color: #555;
    line-height: 1.8;
}

.highlight-box {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.highlight-box p {
    margin-bottom: 0;
}

.important-notice {
    background: linear-gradient(135deg, #fff3e0 0%, #ffe0b2 100%);
    border-left: 5px solid #ff9800;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.important-notice h3 {
    color: #e65100;
    margin-top: 0;
}

.content-section .info-box {
    background: #e3f2fd;
    border-left: 5px solid #1976d2;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 8px;
}

.content-section .info-box h3 {
    color: #1976d2;
    margin-top: 0;
}

.last-updated {
    background: #f5f5f5;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .hero-banner h1 {
        font-size: 2rem;
    }
    
    .nav-menu {
        display: none;
    }

    .article-list-item {
        flex-direction: column;
        gap: 1rem;
    }

    .article-icon {
        width: 100%;
        height: 80px;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .content-section {
        padding: 2rem 1.5rem;
    }
}

