/*
Theme Name: Evroliga Tabela
Theme URI: https://evroligatabela.com
Description: Custom theme for Evroliga Tabela - Euroleague standings and statistics
Author: Evroliga Tabela Team
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: evroliga-theme
Tags: sports, basketball, euroleague, responsive, seo-ready
*/

/* ===========================
   CSS Variables
=========================== */
:root {
    --primary-color: #1a4d8f;
    --secondary-color: #ff6600;
    --text-color: #333333;
    --bg-color: #ffffff;
    --light-bg: #f5f5f5;
    --border-color: #e0e0e0;
    --success-color: #4caf50;
    --font-main: 'Roboto', Arial, sans-serif;
    --font-heading: 'Montserrat', Arial, sans-serif;
    --max-width: 1200px;
    --spacing: 20px;
}

/* ===========================
   Reset & Base Styles
=========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===========================
   Typography
=========================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 15px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
    margin-bottom: 15px;
}

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

a:hover {
    color: var(--secondary-color);
}

/* ===========================
   Layout
=========================== */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing);
}

/* Header */
.site-header {
    background: var(--primary-color);
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-branding {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-title {
    font-size: 1.8rem;
    color: white;
    margin: 0;
}

.site-title a {
    color: white;
}

/* Navigation */
.main-navigation {
    margin-top: 10px;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.main-navigation a {
    color: white;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.main-navigation a:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Main Content */
.site-main {
    padding: 40px 0;
    min-height: calc(100vh - 200px);
}

/* Footer */
.site-footer {
    background: var(--light-bg);
    padding: 30px 0;
    margin-top: 60px;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
    color: var(--primary-color);
}

.footer-bottom {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    text-align: center;
    color: #666;
}

/* ===========================
   Standings Table
=========================== */
.standings-table-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin-bottom: 30px;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table thead {
    background: var(--primary-color);
    color: white;
}

.standings-table th,
.standings-table td {
    padding: 12px 15px;
    text-align: left;
}

.standings-table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.standings-table tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
}

.standings-table tbody tr:hover {
    background: var(--light-bg);
}

.standings-table tbody tr:last-child {
    border-bottom: none;
}

.standings-table .position {
    font-weight: 700;
    color: var(--primary-color);
    width: 50px;
}

.standings-table .team-name {
    font-weight: 600;
}

.standings-table .wins {
    color: var(--success-color);
    font-weight: 600;
}

/* ===========================
   Responsive Design
=========================== */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .main-navigation ul {
        flex-direction: column;
        gap: 10px;
    }

    .standings-table {
        font-size: 0.85rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 8px 10px;
    }
}

/* ===========================
   Utility Classes
=========================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none; }

/* Screen Reader Text (accessibility) */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--light-bg);
    clip: auto !important;
    clip-path: none;
    color: var(--primary-color);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-bg);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================
   Header Inner Layout
=========================== */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.site-branding {
    display: block;
}

.mobile-menu-toggle {
    display: none;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    cursor: pointer;
    font-family: var(--font-main);
    transition: background 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255,255,255,0.25);
}

.mobile-menu-toggle .menu-icon {
    margin-right: 4px;
}

/* ===========================
   Language Switcher
=========================== */
.language-switcher {
    display: flex;
    gap: 4px;
    align-items: center;
}

.language-switcher .lang-link {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    transition: background 0.3s, color 0.3s;
    letter-spacing: 0.5px;
}

.language-switcher .lang-link:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}

.language-switcher .lang-link.active {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ===========================
   Dropdown Navigation
=========================== */
.main-navigation {
    margin-top: 0;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    position: relative;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    color: white;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 4px;
    transition: background 0.3s ease;
    display: block;
    white-space: nowrap;
}

.main-navigation a:hover,
.main-navigation .current-menu-item > a {
    background: rgba(255,255,255,0.15);
    color: white;
}

.main-navigation .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    min-width: 220px;
    border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    padding: 8px 0;
    z-index: 999;
    flex-direction: column;
    gap: 0;
}

.main-navigation li:hover > .sub-menu {
    display: flex;
}

.main-navigation .sub-menu li {
    width: 100%;
}

.main-navigation .sub-menu a {
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 400;
}

.main-navigation .sub-menu a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

/* ===========================
   Breadcrumbs
=========================== */
.breadcrumbs {
    padding: 12px 0 20px;
    font-size: 0.85rem;
    color: #666;
}

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

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

/* ===========================
   Page Header
=========================== */
.page-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.page-header .page-title {
    margin-bottom: 5px;
}

.page-description {
    color: #666;
    font-size: 1.1rem;
    margin-bottom: 0;
}

.search-result-count {
    color: #666;
    font-size: 0.95rem;
}

/* ===========================
   Two-Column Layout (Content + Sidebar)
=========================== */
.content-with-sidebar {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

.content-main {
    min-width: 0;
}

.sidebar-area {
    position: sticky;
    top: 80px;
    overflow-x: hidden;
    max-width: 100%;
}

/* ===========================
   News Grid & Cards
=========================== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.news-item {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.news-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.news-thumbnail {
    overflow: hidden;
    aspect-ratio: 16/9;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.news-item-content {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-item h3,
.news-item h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    line-height: 1.4;
}

.news-item h3 a,
.news-item h4 a {
    color: var(--text-color);
}

.news-item h3 a:hover,
.news-item h4 a:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 0.82rem;
    color: #888;
    margin-bottom: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.news-excerpt {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
    flex: 1;
}

.read-more {
    display: inline-block;
    margin-top: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-color);
}

.read-more:hover {
    color: var(--secondary-color);
}

/* ===========================
   Article Single (Entry)
=========================== */
.entry-header {
    margin-bottom: 24px;
}

.entry-title {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 16px;
}

.entry-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    font-size: 0.88rem;
    color: #666;
}

.entry-meta a {
    color: var(--primary-color);
}

.author-avatar-small {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 4px;
}

.author-avatar-small img {
    border-radius: 50%;
}

.reading-time {
    color: #888;
}

.reading-time::before {
    content: "\231B ";
}

.last-updated-notice {
    background: #fff8e1;
    border-left: 3px solid #ffc107;
    padding: 8px 14px;
    margin-top: 14px;
    font-size: 0.85rem;
    color: #7a6400;
    border-radius: 0 4px 4px 0;
}

.post-thumbnail {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    height: auto;
    display: block;
}

/* ===========================
   Article Typography
=========================== */
.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-color);
}

.entry-content p:first-of-type::first-letter {
    font-size: 3.2em;
    float: left;
    line-height: 1;
    margin-right: 8px;
    margin-top: 4px;
    font-weight: 700;
    color: var(--primary-color);
    font-family: var(--font-heading);
}

.entry-content h2 {
    margin-top: 32px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--light-bg);
}

.entry-content h3 {
    margin-top: 24px;
}

.entry-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 16px 20px;
    margin: 24px 0;
    background: var(--light-bg);
    border-radius: 0 6px 6px 0;
    font-style: italic;
    color: #444;
}

.entry-content blockquote p:last-child {
    margin-bottom: 0;
}

.entry-content ul, .entry-content ol {
    padding-left: 24px;
    margin-bottom: 16px;
}

.entry-content li {
    margin-bottom: 6px;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.entry-content a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ===========================
   Tags
=========================== */
.tags-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.tag-badge {
    display: inline-block;
    background: var(--light-bg);
    color: var(--text-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.tag-badge:hover {
    background: var(--primary-color);
    color: white;
}

/* ===========================
   Source Attribution (E-E-A-T)
=========================== */
.source-attribution {
    background: #f0f7ff;
    border: 1px solid #cce0f5;
    border-radius: 8px;
    padding: 20px;
    margin-top: 30px;
}

.source-attribution h4 {
    font-size: 1rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.source-attribution p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 8px;
}

.source-attribution ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 12px;
}

.source-attribution li {
    padding: 4px 0;
    font-size: 0.9rem;
}

.source-attribution li::before {
    content: "\2713 ";
    color: var(--success-color);
    font-weight: 700;
    margin-right: 6px;
}

.editorial-note {
    font-size: 0.82rem;
    color: #777;
    border-top: 1px solid #cce0f5;
    padding-top: 10px;
    margin-bottom: 0;
}

/* ===========================
   Social Sharing
=========================== */
.social-sharing {
    margin-top: 24px;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.social-sharing h4 {
    font-size: 0.95rem;
    margin-bottom: 12px;
    color: #555;
}

.share-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: white;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.share-btn:hover {
    opacity: 0.85;
    color: white;
    transform: translateY(-1px);
}

.share-facebook { background: #1877f2; }
.share-twitter { background: #1da1f2; }
.share-whatsapp { background: #25d366; }
.share-viber { background: #7360f2; }

/* ===========================
   Author Bio Enhanced (E-E-A-T)
=========================== */
.author-bio-enhanced {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-top: 24px;
    overflow: hidden;
}

.author-bio-header {
    background: var(--primary-color);
    padding: 12px 20px;
}

.author-bio-header h3 {
    color: white;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.author-bio-body {
    display: flex;
    gap: 16px;
    padding: 20px;
}

.author-bio-body .author-avatar img {
    border-radius: 50%;
    border: 3px solid var(--light-bg);
}

.author-info h4 {
    margin-bottom: 4px;
    font-size: 1.1rem;
}

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

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

.author-role {
    display: inline-block;
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.author-description {
    font-size: 0.92rem;
    color: #555;
    line-height: 1.6;
}

.author-stats {
    margin-top: 8px;
}

.author-stat {
    font-size: 0.82rem;
    color: #888;
}

/* ===========================
   Related Posts
=========================== */
.related-posts {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.related-posts h3 {
    margin-bottom: 16px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.related-post-item {
    background: var(--light-bg);
    border-radius: 6px;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.related-post-item:hover {
    transform: translateY(-2px);
}

.related-post-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
}

.related-post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-post-item h4 {
    font-size: 0.92rem;
    padding: 10px 12px 4px;
    margin-bottom: 0;
    line-height: 1.3;
}

.related-post-item h4 a {
    color: var(--text-color);
}

.related-post-item h4 a:hover {
    color: var(--primary-color);
}

.related-post-date {
    display: block;
    font-size: 0.78rem;
    color: #888;
    padding: 0 12px 10px;
}

/* ===========================
   Post Navigation
=========================== */
.post-navigation {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.post-navigation .nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
    flex: 1;
}

.post-navigation a {
    font-size: 0.92rem;
    color: var(--primary-color);
    font-weight: 500;
}

.post-navigation .nav-next {
    text-align: right;
}

/* ===========================
   Sidebar & Widgets
=========================== */
.widget {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.widget-title {
    font-size: 1rem;
    color: var(--primary-color);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.widget-list {
    list-style: none;
    padding: 0;
}

.widget-list li {
    padding: 8px 0;
    border-bottom: 1px solid var(--light-bg);
    font-size: 0.9rem;
}

.widget-list li:last-child {
    border-bottom: none;
}

.widget-list a {
    color: var(--text-color);
    display: block;
}

.widget-list a:hover {
    color: var(--primary-color);
}

.widget-post-date {
    display: block;
    font-size: 0.78rem;
    color: #999;
    margin-top: 2px;
}

/* Trust Badges Widget */
.trust-badges-widget {
    background: #f0f7ff;
    border-color: #cce0f5;
}

.trust-badge-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    font-size: 0.88rem;
    color: #444;
}

.trust-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    flex-shrink: 0;
}

/* ===========================
   Team Hero
=========================== */
.team-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    background: linear-gradient(135deg, var(--primary-color), #2a6cc4);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.team-logo img {
    width: 120px;
    height: 120px;
    object-fit: contain;
    background: white;
    border-radius: 8px;
    padding: 10px;
}

.team-hero-info h1 {
    color: white;
    margin-bottom: 6px;
}

.team-location {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 4px;
}

.team-arena {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 0;
}

/* Team Info Table */
.team-info-table {
    width: 100%;
    border-collapse: collapse;
}

.team-info-table tr {
    border-bottom: 1px solid var(--light-bg);
}

.team-info-table tr:last-child {
    border-bottom: none;
}

.team-info-table td {
    padding: 8px 4px;
    font-size: 0.9rem;
}

.team-info-table td:first-child {
    color: #666;
    width: 40%;
}

.team-related-news {
    margin-top: 30px;
}

.team-related-news h2 {
    margin-bottom: 16px;
}

/* ===========================
   Teams Grid (Archive)
=========================== */
.teams-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.team-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: white;
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.team-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    color: var(--text-color);
}

.team-card-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.team-card-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.team-card-info h2 {
    font-size: 1rem;
    margin-bottom: 4px;
}

.team-card-location {
    font-size: 0.82rem;
    color: #888;
}

/* ===========================
   404 Error Page
=========================== */
.error-404-page {
    text-align: center;
    padding: 40px 0;
}

.error-404-page h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.error-message {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.error-search {
    max-width: 500px;
    margin: 0 auto 40px;
}

.error-search .search-form {
    display: flex;
    gap: 8px;
}

.error-search .search-field {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

.error-search .search-submit {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}

.error-links {
    margin-bottom: 40px;
}

.error-links h3 {
    margin-bottom: 16px;
}

.error-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    max-width: 700px;
    margin: 0 auto;
}

.error-link-card {
    display: block;
    padding: 16px;
    background: var(--light-bg);
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    transition: background 0.2s ease, transform 0.2s ease;
}

.error-link-card:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.error-link-card strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.error-link-card span {
    font-size: 0.85rem;
    opacity: 0.8;
}

.error-recent-posts h3 {
    margin-bottom: 16px;
}

/* ===========================
   Author Page
=========================== */
.author-page-header {
    display: flex;
    align-items: center;
    gap: 24px;
    background: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.author-page-avatar img {
    border-radius: 50%;
    border: 4px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.author-page-info h1 {
    margin-bottom: 4px;
}

.author-page-bio {
    font-size: 0.95rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 8px;
}

.author-articles-heading {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

/* ===========================
   Hero Section (Front Page)
=========================== */
.hero-section {
    text-align: center;
    padding: 40px 0 30px;
}

.hero-section h1 {
    font-size: 2.6rem;
    color: var(--primary-color);
}

.hero-section .lead {
    font-size: 1.15rem;
    color: #555;
    max-width: 600px;
    margin: 0 auto;
}

/* ===========================
   Quick Links Grid
=========================== */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.quick-link-card {
    background: white;
    padding: 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quick-link-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.quick-link-card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.quick-link-card p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 14px;
}

/* ===========================
   Buttons
=========================== */
.button {
    display: inline-block;
    padding: 10px 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
}

.button:hover {
    background: #153d73;
    color: white;
    transform: translateY(-1px);
}

/* ===========================
   Pagination
=========================== */
.pagination .nav-links,
.posts-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 30px;
}

.pagination .nav-links a,
.pagination .nav-links span,
.posts-pagination .nav-links a,
.posts-pagination .nav-links span {
    display: inline-block;
    padding: 8px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
    color: var(--text-color);
    text-decoration: none;
}

.pagination .nav-links .current,
.posts-pagination .nav-links .current {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.pagination .nav-links a:hover,
.posts-pagination .nav-links a:hover {
    background: var(--light-bg);
}

/* No Results */
.no-results {
    text-align: center;
    padding: 40px 0;
}

.no-results h1 {
    color: var(--primary-color);
    margin-bottom: 12px;
}

.no-results p {
    color: #666;
    margin-bottom: 20px;
}

/* ===========================
   SEO Content Section
=========================== */
.seo-content {
    margin-top: 50px;
    background: var(--light-bg);
    padding: 30px;
    border-radius: 8px;
}

.seo-content h2 {
    color: var(--primary-color);
    margin-bottom: 16px;
}

/* ===========================
   Back to Top Button
=========================== */
.back-to-top {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 999;
    transition: background 0.3s ease;
}

.back-to-top:hover {
    background: #153d73;
}

/* ===========================
   Search Form (Inline)
=========================== */
.search-form {
    display: flex;
    gap: 8px;
}

.search-field {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: var(--font-main);
}

.search-field:focus {
    outline: none;
    border-color: var(--primary-color);
}

.search-submit {
    padding: 10px 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-family: var(--font-main);
    transition: background 0.3s ease;
}

.search-submit:hover {
    background: #153d73;
}

/* ===========================
   Table of Contents (TOC)
=========================== */
.table-of-contents {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 0 8px 8px 0;
    padding: 0;
    margin-bottom: 24px;
    overflow: hidden;
}

.toc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #eef2f7;
    cursor: pointer;
}

.toc-header h4 {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--primary-color);
}

.toc-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #666;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
}

.toc-body {
    padding: 12px 16px 16px;
}

.toc-body ol {
    list-style: decimal;
    padding-left: 20px;
    margin-bottom: 0;
}

.toc-body li {
    padding: 4px 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.toc-body li a {
    color: var(--text-color);
    text-decoration: none;
}

.toc-body li a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.toc-body li.toc-sub {
    padding-left: 16px;
    font-size: 0.85rem;
}

.toc-body.collapsed {
    display: none;
}

/* ===========================
   Side Ads (Left & Right Banners)
=========================== */
.side-ad {
    position: fixed;
    top: 80px;
    z-index: 90;
    width: 160px;
}

.side-ad-left {
    left: calc((100vw - var(--max-width)) / 2 - 180px);
}

.side-ad-right {
    right: calc((100vw - var(--max-width)) / 2 - 180px);
}

.side-ad-widget {
    margin-bottom: 10px;
}

.side-ad-widget img {
    max-width: 160px;
    height: auto;
    display: block;
}

/* Horizontal Ads */
.ad-horizontal {
    text-align: center;
    padding: 10px 0;
}

.ad-horizontal-widget {
    display: inline-block;
}

.ad-in-article {
    text-align: center;
    margin: 24px 0;
    padding: 16px 0;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.ad-in-article-widget {
    display: inline-block;
}

/* Ad placeholder for demo/setup */
.ad-placeholder {
    background: #f0f0f0;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.85rem;
    min-height: 90px;
}

/* ===========================
   Sidebar — Custom Widgets
=========================== */

/* Standings widget */
.sidebar-standings-widget {
    background: white;
}

.sidebar-standings-wrap {
    max-height: 440px;
    overflow-y: auto;
    margin: 0 -10px;
    padding: 0 10px;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #eee;
}

.sidebar-standings-wrap::-webkit-scrollbar {
    width: 5px;
}

.sidebar-standings-wrap::-webkit-scrollbar-track {
    background: #eee;
    border-radius: 3px;
}

.sidebar-standings-wrap::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.sidebar-standings-wrap table {
    font-size: 0.82rem;
    width: 100%;
}

.sidebar-standings-wrap th,
.sidebar-standings-wrap td {
    padding: 5px 4px;
}

.sidebar-standings-placeholder {
    text-align: center;
    padding: 20px 0;
}

.standings-cta p {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.sidebar-btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 8px 20px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s;
}

.sidebar-btn:hover {
    background: #15407a;
    color: white;
}

.widget-footer-link {
    text-align: right;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.widget-footer-link a {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-color);
}

.widget-footer-link a:hover {
    color: var(--secondary-color);
}

/* Latest news in sidebar */
.sidebar-news-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

.sidebar-news-item {
    display: flex;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-bg);
    align-items: flex-start;
    list-style: none;
}

.sidebar-news-item:last-child {
    border-bottom: none;
}

.sidebar-news-thumb {
    flex-shrink: 0;
    width: 70px;
    min-width: 70px;
    height: 50px;
    border-radius: 4px;
    overflow: hidden;
    display: block;
}

.sidebar-news-thumb img {
    width: 70px;
    height: 50px;
    object-fit: cover;
    display: block;
}

.sidebar-news-info {
    flex: 1;
    min-width: 0;
}

.sidebar-news-title {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-color);
    line-height: 1.3;
    margin-bottom: 3px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.sidebar-news-title:hover {
    color: var(--primary-color);
}

/* Quick links in sidebar */
.quick-links-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0;
}

.quick-links-list li {
    border-bottom: 1px solid var(--light-bg);
    list-style: none;
}

.quick-links-list li:last-child {
    border-bottom: none;
}

.quick-links-list a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 8px;
    color: var(--text-color);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 4px;
    transition: background 0.15s;
}

.quick-links-list a:hover {
    background: var(--light-bg);
    color: var(--primary-color);
}

.ql-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

/* Category count badge */
.cat-count {
    color: #999;
    font-size: 0.8rem;
}

/* Sidebar ad */
.sidebar-ad-widget {
    padding: 0;
    border: none;
    background: transparent;
}

/* ===========================
   Responsive Design (Improved)
=========================== */

/* Hide side ads on screens narrower than 1500px */
@media (max-width: 1500px) {
    .side-ad {
        display: none;
    }
}

/* Tablets and smaller desktops */
@media (max-width: 1024px) {
    .content-with-sidebar {
        grid-template-columns: 1fr 280px;
        gap: 24px;
    }

    .team-hero {
        padding: 20px;
    }

    .team-logo img {
        width: 90px;
        height: 90px;
    }
}

/* Tablets portrait */
@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .header-inner {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none;
        width: 100%;
        order: 3;
    }

    .main-navigation.active {
        display: block;
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 2px;
    }

    .main-navigation .sub-menu {
        position: static;
        box-shadow: none;
        padding-left: 16px;
        background: rgba(255,255,255,0.05);
        display: none;
    }

    .main-navigation li:hover > .sub-menu,
    .main-navigation li.open > .sub-menu {
        display: flex;
    }

    .main-navigation .sub-menu a {
        color: rgba(255,255,255,0.85);
        font-size: 0.88rem;
    }

    .main-navigation .sub-menu a:hover {
        color: white;
        background: rgba(255,255,255,0.1);
    }

    .language-switcher {
        order: 2;
    }

    .content-with-sidebar {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .sidebar-area {
        position: static;
    }

    .sidebar-area .widget {
        margin-bottom: 16px;
    }

    .sidebar-news-item {
        gap: 10px;
    }

    .sidebar-news-thumb {
        width: 60px;
        min-width: 60px;
        height: 42px;
    }

    .sidebar-news-thumb img {
        width: 60px;
        height: 42px;
    }

    .sidebar-standings-wrap {
        max-height: 300px;
    }

    .entry-title {
        font-size: 1.7rem;
    }

    .entry-content p:first-of-type::first-letter {
        font-size: 2.4em;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

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

    .teams-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }

    .team-hero {
        flex-direction: column;
        text-align: center;
    }

    .author-page-header {
        flex-direction: column;
        text-align: center;
    }

    .author-bio-body {
        flex-direction: column;
        text-align: center;
    }

    .share-buttons {
        justify-content: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }

    .standings-table {
        font-size: 0.85rem;
    }

    .standings-table th,
    .standings-table td {
        padding: 8px 10px;
    }
}

/* Mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 0 12px;
    }

    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.3rem; }

    .hero-section {
        padding: 20px 0;
    }

    .hero-section h1 {
        font-size: 1.7rem;
    }

    .news-item h3 {
        font-size: 1rem;
    }

    .entry-title {
        font-size: 1.4rem;
    }

    .entry-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .share-btn {
        padding: 6px 12px;
        font-size: 0.8rem;
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

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

    .error-links-grid {
        grid-template-columns: 1fr;
    }

    .team-card {
        padding: 12px;
    }

    .team-card-logo {
        width: 45px;
        height: 45px;
    }

    .post-navigation .nav-links {
        flex-direction: column;
    }

    .post-navigation .nav-next {
        text-align: left;
    }
}

/* ===========================
   Print Styles
=========================== */
@media print {
    .site-header,
    .site-footer,
    .sidebar-area,
    .social-sharing,
    .back-to-top,
    .mobile-menu-toggle,
    .post-navigation,
    .related-posts,
    .breadcrumbs {
        display: none !important;
    }

    .content-with-sidebar {
        grid-template-columns: 1fr;
    }

    body {
        font-size: 12pt;
        color: black;
    }
}
