/* Estilos extraidos de header.php, index.php y footer.php */

/* From header.php */
:root {
            --bg-color: #f0f0f0;
            --menu-bg: #111111;
            --text-main: #1a1a1a;
            --text-light: #ffffff;
            --accent-red: #e30613;
            --accent-dark: #900008;
            --section-bg: #ffffff;
            --shadow: 0 4px 15px rgba(0,0,0,0.05);
            --shadow-hover: 0 8px 25px rgba(0,0,0,0.15);
            --font-headers: 'Oswald', sans-serif;
            --font-body: 'Roboto', sans-serif;
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: var(--font-body);
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-main);
            line-height: 1.6;
            background-image: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 20.5V18H0v-2h20v-2H0v-2h20v-2H0V8h20V6H0V4h20V2H0V0h22v20h2V0h2v20h2V0h2v20h2V0h2v20h2V0h2v20h2v2H20v-1.5zM0 20h2v20H0V20zm4 0h2v20H4V20zm4 0h2v20H8V20zm4 0h2v20h-2V20zm4 0h2v20h-2V20zm4 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2zm0 4h20v2H20v-2z' fill='%23e5e5e5' fill-opacity='0.4' fill-rule='evenodd'/%3E");
        }


        /* Top Header / Ads Placeholder */
        .top-banner {
            background-color: var(--section-bg);
            padding: 20px;
            text-align: center;
            border-bottom: 2px solid var(--border-color);
            font-weight: bold;
            color: var(--accent-red);
        }

        /* Navigation Menu */
        .main-nav {
            background-color: var(--menu-bg);
            border: none;
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
            height: 60px;
            width: 80%;
            margin: 0 auto;
        }

        .nav-logo {
            font-size: 1.5rem;
            font-weight: bold;
            color: var(--accent-red);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .nav-logo img {
            height: 40px;
            background: white;
            padding: 2px;
            border-radius: 4px;
        }

        .nav-links {
            list-style: none;
            display: flex;
            gap: 20px;
        }

        .nav-links li a {
            color: var(--text-light);
            text-decoration: none;
            text-transform: uppercase;
            font-size: 0.9rem;
            font-weight: bold;
            padding: 10px;
        }

        .nav-links li a:hover, .nav-links li a.active {
            background-color: var(--accent-red);
        }

        .hamburger {
            display: none;
            flex-direction: column;
            gap: 5px;
            cursor: pointer;
        }
        
        .hamburger div {
            width: 25px;
            height: 3px;
            background-color: var(--text-light);
            border-radius: 2px;
        }

        /* Main Container */
        .container {
            width: 80%;
            margin: 20px auto;
            padding: 0 20px;
            display: flex;
            gap: 20px;
            align-items: flex-start;
            box-sizing: border-box;
        }
        
        .main-content-area {
            flex: 3;
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

        .portada-wrapper {
            width: 80%;
            margin: 20px auto 0;
            padding: 0 20px;
            box-sizing: border-box;
        }

        .portada-container {
            border-spacing: 0;
            background: white;
            border-radius: 4px;
            overflow: hidden;
            box-shadow: var(--shadow);
            margin-bottom: 0;
            background-color: #ddd;
            position: relative;
        }

        .portada-overlay {
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 100%;
            display: flex;
            align-items: flex-end;
            gap: 20px;
            background: linear-gradient(to top, rgba(22, 179, 85, 1) 0%, rgba(22, 179, 85, 0.85) 40%, rgba(22, 179, 85, 0.4) 75%, transparent 100%);
            padding: 30px 40px;
            color: white;
        }

        .portada-title {
            font-family: var(--font-headers);
            font-style: italic;
            margin: 0;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
            font-size: 2.5rem;
            text-transform: uppercase;
        }

        /* Carousel */
        .news-carousel {
            position: relative;
            width: 100%;
            border-radius: 12px;
            overflow: hidden;
            box-shadow: var(--shadow);
            margin-bottom: 20px;
        }
        .carousel-inner {
            position: relative;
            width: 100%;
            height: 300px;
        }
        .carousel-item {
            position: absolute;
            top: 0; left: 0;
            width: 100%; height: 100%;
            opacity: 0;
            transition: opacity 0.5s ease-in-out;
            z-index: 1;
        }
        .carousel-item.active {
            opacity: 1;
            z-index: 2;
        }
        .carousel-caption {
            position: absolute;
            bottom: 0; left: 0; width: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
            color: white;
            padding: 40px 20px 20px 20px;
        }
        .carousel-caption h3 {
            font-family: var(--font-headers);
            font-size: 1.5rem;
            margin-bottom: 5px;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
        }
        .carousel-caption .badge {
            background-color: var(--accent-red);
            color: white;
            padding: 4px 8px;
            border-radius: 4px;
            font-size: 0.8rem;
            font-weight: bold;
        }
        .carousel-btn {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            background: rgba(0,0,0,0.5);
            color: white;
            border: none;
            padding: 10px 15px;
            cursor: pointer;
            z-index: 3;
            font-size: 1.2rem;
            border-radius: 4px;
            transition: background 0.3s;
        }
        .carousel-btn:hover {
            background: var(--accent-red);
        }
        .carousel-btn.prev { left: 10px; }
        .carousel-btn.next { right: 10px; }

        .hero-news-grid {
            display: grid;
            grid-template-columns: 2.5fr 1fr 1fr;
            gap: 20px;
        }

        .section-title {
            text-transform: uppercase;
            font-weight: bold;
            border-bottom: 3px solid var(--accent-red);
            padding-bottom: 3px;
            margin-bottom: 10px;
            font-size: 1.1rem;
            font-family: var(--font-headers);
            font-style: italic;
        }

        /* Top Section: Matches spans across main area */
        .sticky-header {
            position: sticky;
            top: 0;
            z-index: 1000;
            box-shadow: var(--shadow);
            background-color: var(--menu-bg);
            border-bottom: 2px solid var(--accent-red);
        }

        .top-bar {
            background-color: var(--accent-red);
            display: flex;
            justify-content: flex-end;
            padding: 8px 30px;
            gap: 25px;
            font-size: 0.85rem;
        }

        .top-bar a {
            color: #ffffff;
            text-decoration: none;
            font-weight: bold;
            transition: opacity 0.2s;
            display: inline-block;
        }

        .top-bar a:hover {
            opacity: 0.8;
        }

        .filter-bar {
            background-color: var(--section-bg);
            padding: 15px;
            text-align: center;
            box-shadow: var(--shadow);
            margin-bottom: 20px;
            border-bottom: 1px solid var(--border-color);
        }

        .matches-section {
            width: 100%;
        }

        .matches-container {
            display: flex;
            gap: 20px;
        }

        .match-card {
            background-color: var(--section-bg);
            border: 1px solid var(--border-color);
            border-radius: 4px;
            box-shadow: var(--shadow);
            flex: 1;
            padding: 15px;
            text-align: center;
            transition: transform 0.3s ease, box-shadow 0.3s ease;
        }
        .match-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }

        .match-teams {
            display: flex;
            justify-content: space-between;
            align-items: center;
            font-weight: bold;
            margin-bottom: 10px;
        }
        
        .match-time {
            font-size: 0.85rem;
            color: #666;
        }

        /* Main News */
        .main-news-section {
            display: flex;
        }
        .main-news-card {
            background-color: var(--menu-bg);
            color: var(--text-light);
            padding: 20px;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            border-bottom: 5px solid var(--accent-red); /* Changed from left to bottom for modern look */
            border-radius: 12px;
            background-size: cover;
            background-position: center;
            position: relative;
            min-height: 300px;
            overflow: hidden;
            box-shadow: var(--shadow);
            transition: transform 0.3s ease;
        }
        .main-news-card:hover {
            transform: translateY(-3px);
            box-shadow: var(--shadow-hover);
        }

        .main-news-card::before {
            content: '';
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.9), rgba(0,0,0,0));
            z-index: 1;
        }
        
        .main-news-card h2, .main-news-card p {
            position: relative;
            z-index: 2;
        }

        .main-news-card h2 {
            font-size: 2rem;
            margin-bottom: 10px;
            text-transform: uppercase;
            text-decoration: none;
            color: #fff;
        }
        
        .main-news-card a {
            text-decoration: none;
            color: inherit;
        }

        /* Middle Column (Smaller News) */
        .side-news-column {
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        /* Results Column */
        .results-column {
            display: flex;
            flex-direction: column;
        }

        .badge {
            background-color: var(--accent-red);
            color: #fff;
            padding: 4px 10px;
            font-size: 0.75rem;
            font-weight: bold;
            display: inline-block;
            margin-bottom: 10px;
            align-self: flex-start;
            text-transform: uppercase;
        }

        .main-news-card .date-time {
            font-size: 0.75rem;
            color: #ccc;
            margin-top: 15px;
            display: flex;
            align-items: center;
        }

        .side-news-item {
            flex: 1;
            text-decoration: none;
            color: #fff;
            position: relative;
            background-size: cover;
            background-position: center;
            display: flex;
            flex-direction: column;
            justify-content: flex-end;
            padding: 15px;
            overflow: hidden;
            background-color: #333;
            border-radius: 12px;
            box-shadow: var(--shadow);
            transition: transform 0.3s ease;
        }
        .side-news-item:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-hover);
        }

        .side-news-item::before {
            content: '';
            position: absolute;
            top: 0; left: 0; width: 100%; height: 100%;
            background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
            z-index: 1;
        }

        .side-news-item > * {
            position: relative;
            z-index: 2;
        }

        .side-news-item .title {
            font-size: 1.05rem;
            font-weight: bold;
            line-height: 1.2;
            margin-bottom: 5px;
        }

        .results-list {
            background-color: var(--section-bg);
            border: none;
            border-radius: 4px;
            box-shadow: var(--shadow);
            padding: 15px;
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .result-item {
            display: flex;
            flex-direction: column;
            border-bottom: 1px solid var(--border-color);
            padding: 10px 0;
            font-weight: bold;
            font-size: 0.65rem;
        }
        .result-item:last-child {
            border-bottom: none;
        }
        
        .result-meta {
            text-align: center;
            margin-bottom: 5px;
        }
        
        .result-league {
            color: var(--accent-red);
            font-size: 0.7rem;
            text-transform: uppercase;
            line-height: 1.2;
        }
        
        .result-category {
            color: #777;
            font-size: 0.6rem;
            text-transform: uppercase;
        }

        .result-match {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
        }

        .result-score {
            font-size: 1.5rem;
            font-family: var(--font-headers);
            font-weight: bold;
            color: var(--accent-red);
            padding: 0 15px;
        }
        
        .team-box {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
            flex: 1;
        }
        
        .team-logo {
            width: 40px;
            height: 40px;
            object-fit: contain;
            margin: 0 !important;
            order: 1;
        }
        
        .team-box span {
            order: 2;
            font-family: var(--font-body);
            font-size: 0.8rem;
            font-weight: normal;
            line-height: 1.2;
            color: #444;
            text-align: center;
        }

        .matchday-results-grid {
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 15px;
        }
        
        .matchday-card {
            background-color: var(--section-bg);
            border-radius: 8px;
            padding: 20px;
            text-align: center;
            box-shadow: var(--shadow);
            transition: transform 0.2s ease, box-shadow 0.2s ease;
            position: relative;
            overflow: hidden;
            border: 1px solid var(--border-color);
            border-bottom: 2px solid #ddd;
        }
        
        .matchday-card:hover {
            transform: translateY(-5px);
            box-shadow: var(--shadow-hover);
        }

        /* Tables */
        .tables-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
            margin-top: 0;
        }

        .tables-row > div {
            min-width: 0;
        }

        .table-card {
            background-color: var(--section-bg);
            border-radius: 4px;
            box-shadow: var(--shadow);
            padding: 20px;
            border: 1px solid var(--border-color);
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
            background-color: transparent;
        }

        .data-table th, .data-table td {
            text-align: left;
            padding: 8px 10px;
            border-bottom: 1px solid var(--border-color);
            font-size: 0.95rem;
            vertical-align: middle;
        }

        .data-table th {
            background-color: var(--accent-red);
            color: var(--text-light);
            text-transform: uppercase;
            font-family: var(--font-headers);
            font-style: italic;
            font-size: 0.95rem;
            padding: 6px 10px;
        }
        
        .data-table tbody tr {
            transition: background-color 0.2s ease;
        }
        
        .data-table tbody tr:hover {
            background-color: #f0f4f8;
        }

        /* Sidebar */
        .sidebar {
            flex: 1;
            background-color: var(--section-bg);
            padding: 20px;
            border-radius: 4px;
            border: none;
            box-shadow: var(--shadow);
            margin-top: 0;
        }

        .sidebar-item {
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 1px solid var(--border-color);
        }

        .sidebar-item:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }

        .sidebar-item-title {
            font-weight: bold;
            font-size: 0.95rem;
            color: var(--text-main);
            text-decoration: none;
        }

        /* Footer */
        .main-footer {
            background-color: var(--menu-bg);
            color: var(--text-light);
            text-align: center;
            padding: 20px;
            margin-top: 40px;
            border-top: 5px solid var(--accent-red);
        }
        
        .main-footer p {
            margin: 5px 0;
            font-size: 0.9rem;
        }

        /* Buttons and Modals */
        .btn-more {
            background-color: var(--menu-bg);
            color: var(--text-light);
            border: 1px solid var(--accent-red);
            padding: 4px 12px;
            font-size: 0.75rem;
            font-weight: bold;
            cursor: pointer;
            text-transform: uppercase;
        }
        .btn-more:hover {
            background-color: var(--accent-red);
        }

        .jornada-select {
            background-color: var(--menu-bg);
            color: var(--text-light);
            border: 1px solid var(--accent-red);
            padding: 4px 12px;
            font-size: 0.75rem;
            font-weight: bold;
            cursor: pointer;
            text-transform: uppercase;
            outline: none;
        }
        .jornada-select:hover {
            background-color: var(--accent-red);
        }

        .modal-overlay {
            display: none;
            position: fixed;
            top: 0; left: 0; width: 100%; height: 100%;
            background-color: rgba(0,0,0,0.7);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }
        
        .modal-content {
            background-color: var(--bg-color);
            padding: 25px;
            width: 80%;
            max-width: 600px;
            border-top: 5px solid var(--accent-red);
            position: relative;
            max-height: 80vh;
            overflow-y: auto;
        }
        
        .modal-close {
            position: absolute;
            top: 10px; right: 15px;
            font-size: 1.5rem;
            font-weight: bold;
            cursor: pointer;
            color: #333;
        }
        .img-goleador { 
            width: 38px; 
            height: 38px; 
            border-radius: 50%; 
            object-fit: cover; 
            margin-right: 0px;
            border: 2px solid var(--accent-red);
            box-shadow: var(--shadow);
        }
        
        .player-name, .team-name {
            font-family: var(--font-headers);
            font-size: 1rem;
            font-weight: bold;
            text-transform: uppercase;
        }

        .player-name-small {
            font-family: var(--font-body);
            font-size: 0.75rem;
            font-weight: normal;
            line-height: 1.2;
            color: #555;
        }
        
        .team-icon-small {
            width: 40px; 
            height: 40px; 
            margin-right: 15px; 
            object-fit: contain;
        }

        .filters-wrapper {
            background-color: var(--accent-dark);
            border-radius: 4px;
            padding: 15px 25px;
            box-shadow: var(--shadow);
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin: 0 auto 30px auto;
            width: 80%;
            box-sizing: border-box;
            border-top: 4px solid var(--accent-red);
        }

        .filters-label {
            font-family: var(--font-headers);
            font-weight: bold;
            color: var(--text-light);
            font-size: 1.1rem;
            text-transform: uppercase;
        }

        .custom-select {
            padding: 10px 15px;
            border: 1px solid var(--border-color);
            border-radius: 6px;
            font-family: var(--font-body);
            font-size: 0.95rem;
            color: var(--text-dark);
            background-color: #f9f9f9;
            cursor: pointer;
            transition: all 0.3s ease;
            outline: none;
            min-width: 150px;
        }

        .custom-select:hover, .custom-select:focus {
            border-color: var(--accent-red);
            box-shadow: 0 0 5px rgba(22, 179, 85, 0.2); /* Usa un tono suave del verde */
            background-color: #fff;
        }

        @media (max-width: 768px) {
            .filters-wrapper {
                flex-direction: column;
                align-items: stretch;
                width: 100%;
                border-radius: 0;
            }
            .filters-label {
                text-align: center;
                margin-bottom: 5px;
            }
        }

        /* Responsive Layout */
        @media (max-width: 1200px) {
            .container, .main-nav {
                width: 95%;
            }
            .hero-news-grid {
                grid-template-columns: 1.5fr 1fr;
            }
            .results-column {
                grid-column: span 2;
                margin-top: 15px;
            }
        }

        @media (max-width: 900px) {
            .tables-row {
                grid-template-columns: 1fr;
            }
            .portada-wrapper {
                width: 100%;
                padding: 0;
                margin-top: 0;
            }
            .portada-container {
                height: 250px;
                border-radius: 0;
                margin-bottom: 0;
            }
            .portada-overlay {
                padding: 20px;
            }
            .portada-title {
                font-size: 1.8rem;
            }
        }

        .table-responsive {
            width: 100%;
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
        }

        @media (max-width: 768px) {
            .top-bar {
                transform: none;
                margin: 0;
                justify-content: center;
                padding: 10px;
            }
            .container, .main-nav {
                width: 100%;
            }
            .container {
                flex-direction: column;
            }
            .main-content-area, .sidebar {
                width: 100%;
            }
            .hero-news-grid, .matchday-results-grid {
                grid-template-columns: 1fr;
            }
            .results-column {
                grid-column: span 1;
            }
            .hamburger {
                display: flex;
            }
            .nav-links {
                display: none;
                flex-direction: column;
                position: absolute;
                top: 100%;
                left: 0;
                width: 100%;
                background-color: var(--menu-bg);
                border-top: 1px solid #333;
            }
            .nav-links.active {
                display: flex;
            }
            .nav-links li {
                width: 100%;
                text-align: center;
            }
            .nav-links li a {
                padding: 15px;
                border-bottom: 1px solid #222;
                display: block;
            }
            
            .matches-container {
                flex-direction: column;
            }
            .modal-content {
                width: 95%;
                padding: 10px;
            }
            
            /* Fit tables on mobile without scroll */
            .table-responsive {
                overflow-x: visible;
            }
            .data-table {
                width: 100%;
                table-layout: fixed; /* Force fit */
            }
            .data-table th, .data-table td {
                padding: 4px 1px;
                font-size: 0.65rem;
                word-wrap: break-word;
            }
            .data-table th:nth-child(2), .data-table td:nth-child(2) {
                width: 35%; /* Give more space to names */
            }
            .data-table img.team-icon-small {
                width: 30px !important;
                height: 30px !important;
                margin-right: 0 !important;
                margin: 0 auto;
            }
            .img-goleador {
                width: 30px !important;
                height: 30px !important;
                margin: 0 auto 5px auto !important;
            }
            .truncate-text {
                display: inline-block;
                max-width: 65px;
                white-space: nowrap;
                overflow: hidden;
                text-overflow: ellipsis;
                vertical-align: middle;
            }
            .hide-on-mobile {
                display: none !important;
            }
            .data-table td .team-box-inner {
                justify-content: center;
            }
            .data-table img {
                margin-right: 0 !important;
                margin-left: 0 !important;
            }
            
            /* Main News Mobile Adjustments */
            .main-news-card h2 {
                font-size: 1.2rem;
                margin-bottom: 5px;
            }
            .main-news-card .badge {
                padding: 2px 6px;
                font-size: 0.65rem;
                margin-bottom: 5px;
            }
            .main-news-card .date-time {
                margin-top: 5px;
                font-size: 0.7rem;
            }
        }

/* From index.php */

/* From footer.php */
.site-footer {
            background-color: #111111;
            color: white;
            padding: 60px 0 20px 0;
            font-size: 0.85rem;
            margin-top: 50px;
        }
        .footer-logo { max-height: 80px; margin-bottom: 20px; }
        .footer-social { margin-top: 15px; }
        .footer-social a { color: white; font-size: 1.2rem; margin-right: 15px; text-decoration: none; }
        .footer-social a:hover { color: var(--accent-red); }
        .footer-title { font-size: 0.9rem; font-weight: 800; margin-bottom: 20px; text-transform: uppercase; color: white; font-family: var(--font-headers); letter-spacing: 0.5px;}
        .footer-links { list-style: none; padding: 0; margin: 0; }
        .footer-links li { margin-bottom: 10px; }
        .footer-links a { color: #bbb; text-decoration: none; transition: color 0.3s; }
        .footer-links a:hover { color: white; }
        
        .newsletter-form { display: flex; margin-top: 15px; }
        .newsletter-form input {
            padding: 10px 15px;
            border: none;
            border-radius: 4px 0 0 4px;
            font-size: 0.85rem;
            width: 100%;
            outline: none;
        }
        .newsletter-form button {
            background-color: var(--accent-red);
            color: white;
            border: none;
            padding: 0 20px;
            font-weight: 700;
            font-size: 0.8rem;
            border-radius: 0 4px 4px 0;
            text-transform: uppercase;
            cursor: pointer;
            transition: opacity 0.3s;
        }
        .newsletter-form button:hover {
            opacity: 0.9;
        }
        .copyright {
            text-align: center;
            padding-top: 30px;
            margin-top: 40px;
            border-top: 1px solid #333;
            color: #777;
            font-size: 0.75rem;
            max-width: 1200px;
            margin-left: auto;
            margin-right: auto;
        }
        .footer-grid {
            display: grid;
            grid-template-columns: 2fr 1fr 1fr 1fr 2.5fr;
            gap: 30px;
            max-width: 1200px;
            margin: 0 auto;
            padding: 0 20px;
        }
        @media (max-width: 991px) {
            .footer-grid { grid-template-columns: repeat(3, 1fr); }
        }
        @media (max-width: 767px) {
            .footer-grid { grid-template-columns: 1fr; text-align: center; }
            .newsletter-form { justify-content: center; }
        }

