/* MODERN SPORTS THEME - FINAL CLEAN BUILD */
@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;600;700;900&display=swap');

:root {
    --primary-red: #D22E26;
    --primary-blue: #0072CE;
    --primary-green: #009639;
    --primary-black: #000000;
    --bg-light: #F4F6F8;
    --bg-white: #FFFFFF;
    --text-dark: #111111;
    --text-medium: #444444;
    --border-color: #E0E0E0;
    --container-width: 1380px;
    /* Increased from 1280px */
}

* {
    box-sizing: border-box;
    outline: none;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Cairo', sans-serif;
    background: var(--bg-light);
    color: var(--text-dark);
    direction: rtl;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    width: 100%;
    position: relative;
}

html {
    overflow-x: hidden;
    width: 100%;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.2s;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* --- HEADER --- */
.ticker-wrap {
    width: 100%;
    overflow: hidden;
    white-space: nowrap;
    position: relative;
}

.ticker-move {
    display: inline-block;
    white-space: nowrap;
    /* Start off-screen right (100% of container) and move to off-screen left (-100% of self) */
    /* Since we don't know exact widths, we use a large enough distance or padding trick */
    padding-left: 100%;
    /* Push initial content off screen */
    animation: ticker 90s linear infinite;
    /* Increased duration for slower speed */
}

.ticker-move:hover {
    animation-play-state: paused;
}

.ticker-item {
    display: inline-block;
    padding: 0 30px;
    font-size: 14px;
}

@keyframes ticker {
    0% {
        transform: translate3d(0, 0, 0);
    }

    100% {
        transform: translate3d(-100%, 0, 0);
    }
}

.ticker-move.reverse {
    /* To move Left to Right:
       Start at -100% (Left) -> Move to 0 (Right)
    */
    animation-direction: reverse;
}

.top-bar {
    background: #000;
    /* Force black background as requested */
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
    font-weight: bold;
    height: 45px;
    /* Fixed height for consistency */
    display: flex;
    align-items: center;
}

.top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.site-header {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 999;
    padding: 10px 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Optimized Menu for More Items */
.site-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
}

/* Hide Mobile Menu Toggle by default on desktop */
.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    color: var(--primary-black);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    /* Reduced from 25px */
    margin: 0;
    padding: 0;
    align-items: center;
}

.main-nav a {
    font-weight: 700;
    font-size: 14px;
    /* Reduced from 16px */
    position: relative;
    padding: 5px 0;
    white-space: nowrap;
    /* Prevent breaking */
    text-decoration: none;
    /* Bootstrap invalidation */
    color: #333;
}

.main-nav a:hover {
    color: var(--primary-red);
    text-decoration: none;
}

.main-nav a.active {
    color: var(--primary-red);
    border-bottom: 3px solid var(--primary-red);
}

/* --- HERO SLIDER --- */
.hero-slider-section {
    height: 550px;
    direction: ltr;
    margin-bottom: 20px;
    /* Reduced from 50px */
    position: relative;
    background: #000;
}

.swiper-slide {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.slide-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    /* Strong gradient */
    display: flex;
    align-items: flex-end;
    padding-bottom: 60px;
    direction: rtl;
}

.slide-content {
    max-width: 900px;
    padding-right: 30px;
    border-right: 5px solid var(--primary-green);
    z-index: 10;
    position: relative;
}

.slide-badge {
    background: var(--primary-red);
    color: #fff;
    padding: 5px 15px;
    font-weight: bold;
    font-size: 13px;
    margin-bottom: 15px;
    display: inline-block;
    border-radius: 4px;
}

.slide-title {
    font-size: 40px;
    font-weight: 900;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 15px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.slide-meta {
    color: #ddd;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    gap: 15px;
}

/* --- SECTIONS --- */
.section {
    padding: 40px 0;
}

/* --- BANNER / AD AREAS --- */
.banner-section {
    padding: 30px 0;
    text-align: center;
    background: transparent;
}

.banner-content {
    background: #e9ecef;
    /* Placeholder color, user can remove */
    border-radius: 8px;
    padding: 20px;
    display: inline-block;
    width: 100%;
    max-width: 100%;
    /* Responsive */
    min-height: 120px;
    /* Minimum height for visibility */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.banner-content img {
    max-width: 100%;
    height: auto;
    display: block;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.section-title {
    font-size: 26px;
    font-weight: 900;
    color: #000;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title::before {
    content: '';
    display: block;
    width: 6px;
    height: 24px;
    background: var(--primary-red);
}

/* --- MAGAZINE LAYOUT --- */
.magazine-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Featured Post */
.mag-featured .post-image {
    height: 380px;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    position: relative;
    background: #eee;
}

.mag-featured img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.3s;
}

.mag-featured:hover img {
    transform: scale(1.02);
}

.mag-featured .post-title {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 10px;
    line-height: 1.3;
}

.mag-excerpt {
    color: #555;
    font-size: 15px;
    line-height: 1.6;
}

/* Side List */
.mag-small-post {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: 0.2s;
    align-items: center;
}

.mag-small-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-color: var(--primary-blue);
}

.mag-small-post .post-image {
    width: 85px;
    height: 85px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #eee;
}

.mag-small-post img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.mag-small-post .post-content {
    flex: 1;
}

.mag-small-post .post-title {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.4;
}

.mag-date {
    font-size: 12px;
    color: #888;
}

/* --- GRID LAYOUT --- */
.news-grid {
    display: grid;
    /* Force 4 columns on desktop to fill space evenly */
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
}

@media (max-width: 1200px) {
    .news-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
}

.news-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-red);
}

.news-card a {
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
}

.news-card .card-image {
    height: 240px;
    width: 100%;
    background: #f4f4f4;
    position: relative;
    overflow: hidden;
}

.news-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.news-card:hover img {
    transform: scale(1.08);
    /* Smoother zoom */
}

.news-card .card-content {
    padding: 24px;
    /* More padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-card h3 {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 15px 0;
    color: var(--text-dark);
}

.news-card .date-badge {
    font-size: 12px;
    color: #888;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* --- FOOTER --- */
.site-footer {
    background: #111;
    color: #fff;
    padding: 70px 0 30px;
    margin-top: 80px;
    border-top: 5px solid var(--primary-green);
    font-size: 14px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-col h3 {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 25px;
    color: #fff;
    border-bottom: 2px solid #333;
    padding-bottom: 10px;
    display: inline-block;
}

.footer-col ul {
    list-style: none;
    padding: 0;
}

.footer-col li {
    margin-bottom: 12px;
}

.footer-col a {
    color: #bbb;
}

.footer-col a:hover {
    color: #fff;
    padding-right: 5px;
}

.footer-logo {
    max-width: 140px;
    margin-bottom: 20px;
}

/* FIXED LOGO SIZE */

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .hero-slider-section {
        height: 350px;
    }

    .slide-title {
        font-size: 22px;
    }

    .magazine-grid {
        grid-template-columns: 1fr;
    }

    .mag-small-post {
        flex-direction: row;
    }

    .site-logo {
        height: 45px;
    }

    .mobile-menu-toggle {
        display: block;
        /* Show on mobile */
    }

    .main-nav {
        /* Add mobile menu styling here if needed, or if handled mainly by JS toggle class */
        display: none;
        /* Hide default nav on mobile unless toggled */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #fff;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 15px;
    }

    /* Top Bar Mobile Fix */
    .top-bar {
        height: auto;
        padding: 5px 0;
    }

    .top-bar .container {
        flex-direction: column;
        gap: 5px;
        justify-content: center;
        text-align: center;
    }

    /* Overlay Fix */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        /* Below header (999) */
        display: none;
    }

    /* Overlay Fix */
    .mobile-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        /* Below header (999) */
        display: none;
    }

    .mobile-overlay.active {
        display: block;
    }
}

/* NAVIGATION DROPDOWNS (CMS) */
.nav-item {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    min-width: 200px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 1000;
    padding: 10px 0;
    list-style: none;
    /* Reset */
}

.dropdown-menu li {
    display: block;
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 8px 20px;
    font-size: 14px;
    color: #333;
    border-bottom: 1px solid #f9f9f9;
}

.dropdown-menu a:hover {
    background: #f4f4f4;
    color: var(--primary-red);
}

/* Hover to show (Desktop) */
@media (min-width: 901px) {
    .nav-item:hover .dropdown-menu {
        display: block;
        animation: fadeIn 0.2s ease;
    }
}

/* Mobile Dropdown */
@media (max-width: 900px) {
    .dropdown-menu {
        position: static;
        box-shadow: none;
        background: #f9f9f9;
        display: block;
        /* Always show children in mobile for simplicity, or handle toggle */
        padding-right: 20px;
        /* Indent */
        border-right: 2px solid #ddd;
    }
}

/* --- PREMIUM BUTTON STYLES --- */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-red) 0%, #b31b1b 100%);
    color: #fff;
    border: none;
    padding: 12px 25px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    box-shadow: 0 4px 15px rgba(210, 46, 38, 0.3);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(210, 46, 38, 0.4);
    background: linear-gradient(135deg, #e33e36 0%, #c41e1e 100%);
}

.btn-primary:active {
    transform: translateY(1px);
    box-shadow: 0 2px 10px rgba(210, 46, 38, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
}

.btn-primary:hover::after {
    left: 100%;
}

/* --- SEARCH OVERLAY --- */
.search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s ease;
}

.search-content {
    width: 100%;
    max-width: 800px;
    padding: 20px;
    text-align: center;
}

.search-content input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid #fff;
    font-size: 30px;
    color: #fff;
    padding: 15px 0;
    text-align: center;
    outline: none;
    font-weight: 700;
}

.search-content input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.search-content button[type="submit"] {
    margin-top: 30px;
    padding: 15px 50px;
    font-size: 18px;
    border-radius: 50px;
}

.close-search {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 40px;
    cursor: pointer;
    transition: 0.3s;
}

.close-search:hover {
    color: var(--primary-red);
    transform: rotate(90deg);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* --- PREMIUM FACEBOOK WIDGET (REFINED) --- */
.fb-premium-box {
    background: #fff;
    border-radius: 16px;
    /* Softer rounded corners */
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    /* Deeper, softer shadow */
    border: none;
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    margin-bottom: 30px;
    isolation: isolate;
}

.fb-premium-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.fb-premium-box::before {
    /* Brand Accent Top Bar */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-blue));
    z-index: 2;
}

.fb-header-styled {
    background: #fff;
    padding: 15px 20px 5px;
    /* LESS bottom padding to close gap */
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.fb-header-styled h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #1c1e21;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Cairo', sans-serif;
}

.fb-verify-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #e7f3ff;
    color: #1877f2;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.fb-widget-container {
    padding: 0;
    width: 100%;
    background: #fff;
}

.fb-widget-container iframe {
    width: 100% !important;
    display: block;
    margin-top: -10px;
    /* Pull content UP to close gap */
    margin-bottom: -4px;
}

/* --- BACK TO TOP BUTTON --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    width: 45px;
    height: 45px;
    background: var(--primary-red);
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 45px;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(227, 30, 36, 0.4);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    cursor: pointer;
    text-decoration: none;
    border: 2px solid #fff;
}

#back-to-top:hover {
    background: var(--primary-blue);
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(24, 119, 242, 0.5);
    border-color: #fff;
}

#back-to-top i {
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-3px);
    }

    60% {
        transform: translateY(-1.5px);
    }
}