/* Responsive Design */

/* Common styles for all screen sizes */
.team-vs-container,
.match-teams {
    display: flex !important;
    flex-direction: row !important;
   
    align-items: center;
    justify-content: center;
}

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

/* Large devices (desktops, less than 1200px) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .match-card {
        padding: 1rem;
    }
    
    .team-logo img {
        max-width: 40px;
    }
}

/* Tablets and Medium devices (less than 992px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 720px;
        padding: 0 20px;
    }
    
    .navbar-nav {
        margin-top: 1rem;
    }
    
    /* Grid layouts for tablets */
    .match-grid,
    .highlight-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .competition-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.25rem;
    }

    /* Card styles for tablets */
    .match-card,
    .highlight-card {
        padding: 1.25rem;
    }

    /* Team layout for tablets */
    .team {
        min-width: 110px;
        flex: 0 1 auto;
    }

    .team-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.75rem;
    }

    .team-logo img {
        max-width: 45px;
        height: auto;
    }

    .team-name {
        font-size: 0.95rem;
        margin-top: 0.5rem;
        max-width: 100px;
        font-weight: 500;
    }

    .vs {
        font-size: 1.2rem;
        margin: 0 1rem;
        flex-shrink: 0;
        font-weight: 500;
        opacity: 0.8;
    }

    /* Highlight card specific styles */
    .highlight-card .team-vs-container,
    .highlight-card .match-teams {
        padding: 1rem 0.5rem;
        gap: 1rem;
    }

    .highlight-card .team {
        min-width: 100px;
    }

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

    .highlight-card .team-logo img {
        max-width: 42px;
    }

    /* Meta information styles */
    .match-meta {
        flex-direction: row;
        justify-content: center;
        gap: 1.25rem;
        flex-wrap: wrap;
        margin-top: 1rem;
    }

    .match-date,
    .match-competition {
        font-size: 0.9rem;
    }

    /* Section titles and buttons */
    .section-title {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .watch-now-btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
        font-weight: 500;
    }

    /* Video container height */
    .video-container {
        height: 450px;
    }

    /* Column adjustments */
    .col-md-4 {
        width: 50%;
    }
}

/* Large tablets (iPad Pro) */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .col-md-4 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }

    .team-vs-container,
    .match-teams {
        justify-content: center;
        align-items: center;
    }

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

    .team-logo {
        width: 60px;
        height: 60px;
        margin-bottom: 0.5rem;
    }

    .team-name {
        font-size: 0.9rem;
    }
}

/* All Mobile Devices (less than 768px) */
@media (max-width: 767.98px) {
    .container {
        max-width: 540px;
        padding: 0 15px;
    }
    
    .match-grid {
        grid-template-columns: 1fr;
    }
    
    .highlight-grid {
        grid-template-columns: 1fr;
    }
    
    .competition-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Common styles for all mobile team layouts */
    .team-vs-container,
    .match-teams {
        display: flex !important;
        flex-direction: row !important;
   
        align-items: center;
       
    }

    .team {
        min-width: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        flex: 1;
    }

    .team-logo {
        width: 45px;
        height: 45px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0.5rem;
    }

    .team-logo img {
        max-width: 35px;
        height: auto;
    }

    .team-name {
        font-size: 0.85rem;
        margin-top: 0.25rem;
        max-width: 85px;
        text-align: center;
        word-break: break-word;
    }

    .vs {
        font-size: 1rem;
        margin: 0 0.75rem;
        flex-shrink: 0;
        display: flex;
        align-items: center;
    }

    /* Highlight card specific styles */
    .highlight-card .match-teams {
        justify-content: space-around;
        padding: 1rem 0.5rem;
    }

    .highlight-card .team {
        flex: 0 1 auto;
        min-width: 90px;
    }

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

    .highlight-card .team-logo img {
        max-width: 40px;
    }

    .highlight-card .vs {
        margin: 0 1rem;
    }

    .match-meta {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
        flex-wrap: wrap;
    }

    .match-date,
    .match-competition {
        font-size: 0.85rem;
    }

    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .watch-now-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Extra Small Devices Adjustments (less than 380px) */
@media (max-width: 379.98px) {
    .container {
        padding: 0 10px;
    }

    .team {
        min-width: 70px;
    }

    .team-logo {
        width: 40px;
        height: 40px;
    }

    .team-logo img {
        max-width: 30px;
    }

    .team-name {
        font-size: 0.75rem;
        max-width: 75px;
    }

    .vs {
        font-size: 0.9rem;
        margin: 0 0.5rem;
    }

    .highlight-card .team {
        min-width: 80px;
    }

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

    .highlight-card .team-logo img {
        max-width: 35px;
    }
}

/* Extra small devices (phones, less than 576px) */
@media (max-width: 575.98px) {
    .container {
        width: 100%;
        padding-right: 12px;
        padding-left: 12px;
    }
    
    .competition-grid {
        grid-template-columns: 1fr;
    }
    
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .video-container {
        height: 250px;
    }
    
    .match-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .match-date,
    .match-competition {
        font-size: 0.85rem;
    }
    
    .highlight-title {
        font-size: 1rem;
    }
    
    .pagination {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-link {
        padding: 0.4rem 0.8rem;
    }

    .team-vs-container {
        padding: 0.5rem;
    }

    .team {
        min-width: 70px;
    }

    .team-name {
        font-size: 0.8rem;
        max-width: 80px;
    }
}
