/* Calendario CSS */

.calendario-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
    margin-top: 0;
    padding-top: var(--header-height);
    background-color: #000;
}

.calendario-bg-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    z-index: 0;
}

.calendario-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, transparent 20%),
        linear-gradient(to right, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 40%, rgba(0, 0, 0, 0.2) 70%, transparent 100%),
        linear-gradient(to top, rgba(0, 0, 0, 0.3) 0%, transparent 30%);
    z-index: 1;
}

.calendario-hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    margin-left: 5%;
    padding-right: 20px;
    animation: fadeUp 1s ease-out;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.season-badge {
    display: inline-block;
    background: rgba(243, 106, 33, 0.2);
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 8px 18px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    backdrop-filter: blur(10px);
}

.calendario-hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 24px;
    font-weight: 900;
    color: var(--white);
    text-shadow: 
        2px 2px 8px rgba(0, 0, 0, 0.8),
        0 4px 12px rgba(0, 0, 0, 0.6),
        0 0 30px rgba(0, 0, 0, 0.3);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.calendario-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.95);
    margin-bottom: 0;
    max-width: 580px;
    line-height: 1.8;
    text-shadow: 
        1px 1px 4px rgba(0, 0, 0, 0.7),
        0 2px 8px rgba(0, 0, 0, 0.5);
    font-weight: 400;
}

/* Filtros */
.calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 30px;
    padding: 25px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
    min-width: 150px;
}

.filter-group.filter-search {
    flex: 2;
    min-width: 250px;
}

.filter-group label {
    font-weight: 600;
    color: var(--dark);
    font-size: 0.9rem;
}

.filter-select,
.filter-input {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: var(--white);
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(243, 106, 33, 0.1);
}

.filter-input[type="text"] {
    width: 100%;
}

/* Tabla */
.calendar-layout {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
}

.calendar-layout::-webkit-scrollbar {
    height: 8px;
}

.calendar-layout::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.calendar-layout::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.calendar-layout::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

.calendar-table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

.calendar-table th {
    background: var(--dark);
    color: white;
    padding: 18px 12px;
    text-align: center;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-table td {
    padding: 15px 12px;
    text-align: center;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 0.95rem;
    vertical-align: middle;
}

.calendar-table tr:hover {
    background: #f9f9f9;
}

.calendar-table tr.match-row.hidden {
    display: none;
}

.team-cell {
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

/* Desktop - Simetría y orden */
@media (min-width: 769px) {
    .calendar-table {
        border-collapse: separate;
        border-spacing: 0;
    }

    .calendar-table th {
        padding: 20px 16px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
    }

    .calendar-table th:last-child {
        border-right: none;
    }

    .calendar-table td {
        padding: 18px 16px;
        border-right: 1px solid #f0f0f0;
    }

    .calendar-table td:last-child {
        border-right: none;
    }

    .calendar-table tr:last-child td {
        border-bottom: none;
    }

    .team-cell {
        padding: 18px 16px;
        gap: 12px;
    }

    .match-day {
        padding: 18px 16px;
    }

    .score-cell {
        padding: 12px 16px;
        min-width: 90px;
    }
}

.team-logo-calendar {
    width: 30px;
    height: 30px;
    object-fit: contain;
    flex-shrink: 0;
}

.font-bold {
    font-weight: 700;
    color: var(--primary);
}

.match-day {
    font-weight: 700;
    color: var(--dark);
    background: #f4f4f4;
}

.score-cell {
    font-weight: 900;
    background: #f4f4f4;
    border-radius: 4px;
    min-width: 80px;
    white-space: nowrap;
}

/* Partidos próximos */
.match-row.upcoming {
    border-left: 5px solid var(--primary);
    background: #fff8f0;
}

.match-row.upcoming .score-cell {
    color: var(--primary);
    font-size: 0.9rem;
}

/* Partidos pasados */
.match-row.past {
    opacity: 0.85;
    background: #f9f9f9;
}

.match-row.past .score-cell {
    background: var(--primary);
    color: var(--white);
    font-size: 1.1rem;
    padding: 8px 12px;
}

/* No Results Message */
.no-results-message {
    text-align: center;
    padding: 60px 30px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.search-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    display: block;
    color: var(--text-light);
    opacity: 0.4;
}

.no-results-message h3 {
    font-size: 1.5rem;
    color: var(--dark);
    margin-bottom: 12px;
    font-weight: 700;
}

.no-results-message p {
    font-size: 1rem;
    color: var(--text-light);
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

/* Responsive */
@media (max-width: 768px) {
    .calendar-filters {
        flex-direction: column;
        padding: 20px;
        gap: 15px;
    }
    
    .filter-group {
        width: 100%;
        min-width: 100%;
    }

    .filter-group.filter-search {
        min-width: 100%;
    }
    
    .calendar-layout {
        margin-left: -20px;
        margin-right: -20px;
        padding-left: 20px;
        padding-right: 20px;
        width: calc(100% + 40px);
    }
    
    .calendar-table {
        font-size: 1.05rem;
        min-width: 850px;
    }
    
    .calendar-table th,
    .calendar-table td {
        padding: 20px 14px;
        white-space: nowrap;
    }

    .team-logo-calendar {
        width: 35px;
        height: 35px;
    }
    
    .calendar-table th {
        font-size: 0.95rem;
        padding: 22px 14px;
    }

    .calendar-table td {
        font-size: 1rem;
    }

    .team-cell {
        font-size: 1.05rem;
        gap: 14px;
    }

    .match-day {
        font-size: 1rem;
    }

    .score-cell {
        font-size: 1.15rem;
        padding: 12px 16px;
        min-width: 90px;
    }
    
    .calendario-hero {
        height: 60vh;
        min-height: 400px;
    }
    
    .calendario-bg-img {
        object-position: center center;
    }
    
    .calendario-hero-content {
        margin-left: 0;
        padding: 0 20px;
        text-align: center;
        margin: 0 auto;
    }
    
    .calendario-hero-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    .calendario-hero-subtitle {
        font-size: 1rem;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .calendar-layout {
        margin-left: -16px;
        margin-right: -16px;
        padding-left: 16px;
        padding-right: 16px;
        width: calc(100% + 32px);
    }

    .calendar-table {
        min-width: 800px;
        font-size: 1rem;
    }

    .calendar-table th,
    .calendar-table td {
        padding: 18px 12px;
    }

    .calendar-table th {
        font-size: 0.9rem;
        padding: 20px 12px;
    }

    .calendar-table td {
        font-size: 0.95rem;
    }

    .team-cell {
        font-size: 1rem;
        gap: 12px;
    }

    .team-logo-calendar {
        width: 32px;
        height: 32px;
    }

    .match-day {
        font-size: 0.95rem;
    }

    .score-cell {
        font-size: 1.1rem;
        padding: 12px 16px;
        min-width: 85px;
    }
}