/* FutbolAzteca.com.mx - Mexican Football News Portal */
/* Color palette: Mexican Green, White, Red accents */

:root {
    --primary-green: #006847;
    --primary-green-dark: #004d35;
    --primary-green-light: #00a86b;
    --accent-red: #CE1126;
    --accent-red-dark: #a00d1e;
    --accent-gold: #FFD700;
    --bg-dark: #0a0f14;
    --bg-card: #121a22;
    --bg-card-hover: #1a242e;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.85);
    --text-muted: rgba(255, 255, 255, 0.6);
    --border-color: rgba(0, 104, 71, 0.3);
    --shadow-color: rgba(0, 104, 71, 0.3);
    --gradient-mexico: linear-gradient(90deg, var(--primary-green), #fff, var(--accent-red));
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== HEADER ===== */
.header {
    background: linear-gradient(180deg, rgba(10, 15, 20, 0.98) 0%, rgba(10, 15, 20, 0.95) 100%);
    backdrop-filter: blur(20px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--primary-green);
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-primary);
}

.logo-icon {
    font-size: 2.5rem;
    filter: drop-shadow(0 0 10px var(--primary-green));
}

.logo-text {
    font-size: 1.8rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -1px;
}

.logo-text span:first-child {
    color: var(--primary-green);
}

.logo-text span:last-child {
    color: var(--accent-red);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 10px 18px;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    color: var(--text-primary);
    background: rgba(0, 104, 71, 0.2);
}

.nav-link.active {
    color: var(--primary-green-light);
    background: rgba(0, 104, 71, 0.3);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 3px;
    transition: all 0.3s;
}

/* ===== TICKER ===== */
.ticker-wrapper {
    background: linear-gradient(90deg, var(--primary-green-dark), var(--primary-green), var(--primary-green-dark));
    padding: 12px 0;
    overflow: hidden;
    position: relative;
}

.ticker-label {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    background: var(--accent-red);
    color: white;
    padding: 12px 20px;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
    box-shadow: 5px 0 15px rgba(0, 0, 0, 0.3);
}

.ticker-label::after {
    content: '';
    position: absolute;
    right: -20px;
    top: 0;
    bottom: 0;
    width: 20px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.3), transparent);
}

.ticker-content {
    display: flex;
    animation: ticker-scroll 40s linear infinite;
    padding-left: 180px;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.ticker-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 0 30px;
    white-space: nowrap;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.ticker-teams {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.ticker-score {
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 12px;
    border-radius: 6px;
    font-weight: 800;
    font-size: 1.1rem;
}

.ticker-live {
    background: var(--accent-red);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    animation: pulse-live 1.5s infinite;
}

@keyframes pulse-live {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

/* ===== MAIN LAYOUT ===== */
.main-content {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    gap: 24px;
    padding: 24px 0;
}

/* ===== SIDEBAR - STANDINGS ===== */
.sidebar-left {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.standings-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.standings-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.standings-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.standings-table {
    width: 100%;
    border-collapse: collapse;
}

.standings-table th,
.standings-table td {
    padding: 10px 8px;
    text-align: center;
    font-size: 0.85rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.standings-table th {
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

.standings-table tr:hover {
    background: rgba(0, 104, 71, 0.1);
}

.standings-table .team-cell {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.standings-table .team-logo {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
}

.standings-table .position {
    font-weight: 700;
    width: 24px;
}

.standings-table .position.top-4 {
    color: var(--primary-green-light);
}

.standings-table .position.playoff {
    color: var(--accent-gold);
}

.standings-table .position.relegation {
    color: var(--accent-red);
}

.standings-table .points {
    font-weight: 800;
    color: var(--primary-green-light);
}

.standings-footer {
    padding: 12px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.standings-footer a {
    color: var(--primary-green-light);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

/* ===== NEWS GRID ===== */
.news-section h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.news-section h2::after {
    content: '';
    flex: 1;
    height: 2px;
    background: var(--gradient-mexico);
    border-radius: 2px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.news-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: block;
}

a.news-card,
a.news-card:visited,
a.news-card:hover,
a.news-card:active {
    text-decoration: none;
    color: var(--text-primary);
}

a.trending-item {
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary-green);
    box-shadow: 0 20px 40px rgba(0, 104, 71, 0.2);
}

.news-card.featured {
    grid-column: span 2;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.news-card.featured .news-image {
    height: 300px;
}

.news-image {
    position: relative;
    height: 180px;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image img {
    transform: scale(1.05);
}

.news-image .news-category {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary-green);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.news-image .news-source {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.news-content {
    padding: 20px;
}

.news-content h3 {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 10px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.featured .news-content h3 {
    font-size: 1.4rem;
}

.news-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}

.news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.news-meta .time {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ===== SIDEBAR RIGHT ===== */
.sidebar-right {
    position: sticky;
    top: 100px;
    height: fit-content;
}

.widget {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    margin-bottom: 20px;
}

.widget-header {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    padding: 14px 18px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.trending-list {
    padding: 0;
}

.trending-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background 0.3s;
    cursor: pointer;
}

.trending-item:hover {
    background: rgba(0, 104, 71, 0.1);
}

.trending-number {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-green);
    min-width: 30px;
}

.trending-text h4 {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    margin-bottom: 4px;
}

.trending-text span {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.social-widget {
    padding: 16px;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.3s;
}

.social-link:hover {
    background: rgba(0, 104, 71, 0.3);
    transform: translateY(-2px);
}

.social-link.facebook {
    background: rgba(24, 119, 242, 0.2);
}

.social-link.twitter {
    background: rgba(29, 161, 242, 0.2);
}

.social-link.instagram {
    background: rgba(225, 48, 108, 0.2);
}

.social-link.youtube {
    background: rgba(255, 0, 0, 0.2);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--bg-card);
    padding: 40px 0 20px;
    margin-top: 40px;
    border-top: 3px solid var(--primary-green);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--primary-green-light);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-section ul a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ===== LOADING ===== */
.news-loading {
    text-align: center;
    padding: 60px;
    grid-column: span 2;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-green);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .main-content {
        grid-template-columns: 280px 1fr;
    }

    .sidebar-right {
        display: none;
    }
}

@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .sidebar-left {
        position: static;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .news-card.featured {
        grid-column: span 1;
        grid-template-columns: 1fr;
    }

    .news-card.featured .news-image {
        height: 200px;
    }

    .ticker-label {
        display: none;
    }

    .ticker-content {
        padding-left: 20px;
    }
}

@media (max-width: 768px) {
    .header-top {
        flex-wrap: wrap;
        gap: 16px;
    }

    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-dark);
        flex-direction: column;
        padding: 20px;
        border-bottom: 2px solid var(--primary-green);
    }

    .nav-menu.active {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 1.4rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }
}
.footer-bottom {
    position: relative;
    z-index: 10;
}

.footer-link {
    pointer-events: auto !important;
    position: relative;
    z-index: 9999;
    color: inherit;
    text-decoration: underline;
}

/* Team logo images in standings/matches */
.team-logo img, .match .logo img {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: contain;
    vertical-align: middle;
    flex-shrink: 0;
}
.team-cell { display: flex; align-items: center; gap: 8px; }

/* Skip to content - accessibility */
.skip-link {
    position: absolute; left: -9999px; top: 0;
    background: #006847; color: #fff;
    padding: 8px 16px; z-index: 9999;
    border-radius: 0 0 4px 0; font-weight: 700;
}
.skip-link:focus { left: 0; }

@media (max-width: 768px) {
  .menu-toggle {
    z-index: 1001 !important;
    pointer-events: all !important;
    cursor: pointer !important;
    position: relative !important;
  }
  #navMenu.nav-menu {
    z-index: 1000 !important;
  }
}