/* =====================================
   Responsive Styles
   ===================================== */

/* Footer Styles */
.site-footer {
    background: var(--dark-card);
    border-top: 1px solid var(--border-color);
    margin-top: var(--spacing-xl);
}

.footer-main {
    padding: var(--spacing-xl) 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-lg);
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    margin-bottom: var(--spacing-sm);
}

.footer-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.875rem;
}

.footer-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--spacing-sm);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: var(--spacing-sm);
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-right: 0.5rem;
}

.footer-contact {
    list-style: none;
}

.footer-contact li {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.footer-contact i {
    color: var(--primary-color);
    width: 20px;
}

.social-links {
    display: flex;
    gap: var(--spacing-sm);
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--dark-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.social-links a:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: var(--spacing-md) 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

.copyright {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.footer-bottom-links {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
}

.footer-bottom-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: var(--transition-fast);
}

.footer-bottom-links a:hover {
    color: var(--primary-color);
}

/* Scroll to Top Button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 999;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-lg);
}

.scroll-to-top:hover {
    background: #008c5a;
    transform: translateY(-3px);
}

.scroll-to-top.visible {
    display: flex;
}

/* ===================================== 
   Tablet (768px - 1024px)
   ===================================== */
@media (max-width: 1024px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    .main-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex;
    }
    
    .matches-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
    
    .news-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    /* Footer responsive for tablet */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===================================== 
   Mobile (max-width: 768px)
   ===================================== */
@media (max-width: 768px) {
    .top-bar-content {
        font-size: 0.75rem;
    }
    
    .top-bar-right {
        gap: var(--spacing-sm);
    }
    
    .date-time {
        display: none;
    }
    
    .logo a {
        font-size: 1.25rem;
    }
    
    .logo i {
        font-size: 1.5rem;
    }
    
    .logo small {
        display: none;
    }
    
    .search-btn {
        width: 36px;
        height: 36px;
    }
    
    .mobile-menu-btn {
        width: 36px;
        height: 36px;
    }
    
    .main-content {
        padding: var(--spacing-md) 0;
    }
    
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--spacing-sm);
    }
    
    .section-title {
        font-size: 1.25rem;
    }
    
    .matches-grid {
        grid-template-columns: 1fr;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .match-card {
        padding: var(--spacing-sm);
    }
    
    .team-logo {
        width: 32px;
        height: 32px;
    }
    
    .team-name {
        font-size: 0.875rem;
    }
    
    .team-score {
        font-size: 1.25rem;
    }
    
    .news-image {
        height: 180px;
    }
    
    .news-content {
        padding: var(--spacing-sm);
    }
    
    .news-title {
        font-size: 1rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        left: 20px;
    }
    
    .search-box {
        flex-direction: column;
    }
    
    .filters-row {
        flex-direction: column;
    }
    
    .filter-group {
        min-width: 100%;
    }
}

/* ===================================== 
   Small Mobile (max-width: 480px)
   ===================================== */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    .top-bar {
        padding: 0.25rem 0;
    }
    
    .main-header {
        padding: var(--spacing-sm) 0;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
    
    .match-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-watch, .btn-details {
        width: 100%;
        justify-content: center;
    }
    
    .tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .tab-btn {
        white-space: nowrap;
        padding: var(--spacing-sm);
        font-size: 0.875rem;
    }
    
    .league-table {
        overflow-x: auto;
    }
    
    .league-table th,
    .league-table td {
        padding: 0.5rem;
        font-size: 0.75rem;
    }
}

/* ===================================== 
   Print Styles
   ===================================== */
@media print {
    .site-header,
    .site-footer,
    .scroll-to-top,
    .search-overlay,
    .mobile-menu {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* ===================================== 
   إصلاح الإعلانات للموبايل
   ===================================== */

/* إصلاح عام لمنع overflow أفقي في الموبايل */
@media (max-width: 768px) {
    html, body {
        overflow-x: hidden !important;
        max-width: 100vw !important;
        width: 100% !important;
    }
    
    .container {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }
    
    /* إصلاح الإعلانات للموبايل */
    .ad-container,
    .ad-container *,
    .ad-container iframe,
    .ad-container ins {
        max-width: 100% !important;
        overflow: hidden !important;
    }
}

/* إصلاح إضافي للأجهزة الصغيرة جداً */
@media (max-width: 480px) {
    .ad-container {
        margin: 10px 5px !important;
        padding: 5px !important;
    }
    
    .ad-label {
        font-size: 10px !important;
    }
}
