/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #E30613;
    --secondary-color: #1a1a1a;
    --accent-color: #FFD700;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 5px 20px rgba(227, 6, 19, 0.2);
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    direction: rtl;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Top Bar */
.top-bar {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-time i {
    margin-left: 8px;
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

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

/* Header */
.header {
    background-color: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo-wrapper {
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.logo-text {
    font-size: 32px;
    font-weight: 900;
    color: var(--secondary-color);
    letter-spacing: -1px;
}

.logo-tv {
    font-size: 32px;
    font-weight: 900;
    color: var(--primary-color);
}

.logo-tagline {
    display: block;
    font-size: 14px;
    color: var(--text-light);
    margin-top: -5px;
}

/* Navigation */
.main-nav {
    flex: 1;
    margin: 0 40px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
    justify-content: center;
}

.nav-link {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-dark);
    padding: 8px 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--text-dark);
}

/* Header Actions */
.header-actions {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-toggle,
.admin-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--bg-light);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.search-toggle:hover,
.admin-link:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

/* Search Overlay */
.search-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.search-overlay.active {
    display: flex;
}

.search-container {
    width: 90%;
    max-width: 600px;
    position: relative;
}

.search-close {
    position: absolute;
    top: -50px;
    left: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: 30px;
    cursor: pointer;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    font-size: 18px;
    border: none;
    border-radius: 50px;
    font-family: 'Cairo', sans-serif;
}

.search-submit {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    transform: scale(1.1);
}

/* Breaking News */
.breaking-news {
    background: linear-gradient(135deg, var(--primary-color), #c10511);
    color: var(--white);
    padding: 12px 0;
    overflow: hidden;
}

.breaking-news-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breaking-label {
    background-color: var(--white);
    color: var(--primary-color);
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 14px;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
}

.breaking-label i {
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.breaking-news-slider {
    flex: 1;
    overflow: hidden;
}

.breaking-item {
    display: inline-block;
    padding-left: 50px;
    animation: scroll 20s linear infinite;
}

.breaking-item a {
    color: var(--white);
    font-weight: 600;
}

@keyframes scroll {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Main Content */
.main-content {
    padding: 30px 0;
}

/* Featured Section */
.featured-section {
    margin-bottom: 50px;
}

.main-featured {
    position: relative;
    height: 500px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.featured-link {
    display: block;
    height: 100%;
    position: relative;
}

.featured-image {
    width: 100%;
    height: 100%;
    position: relative;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.featured-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, transparent 100%);
}

.featured-content {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    padding: 40px;
    color: var(--white);
    z-index: 10;
}

.featured-category {
    display: inline-block;
    background-color: var(--primary-color);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
}

.featured-title {
    font-size: 36px;
    font-weight: 900;
    margin-bottom: 15px;
    line-height: 1.3;
}

.featured-excerpt {
    font-size: 18px;
    margin-bottom: 20px;
    opacity: 0.9;
}

.featured-meta {
    display: flex;
    gap: 20px;
    font-size: 14px;
    opacity: 0.8;
}

.featured-meta i {
    margin-left: 5px;
}

/* News Grid Section */
.news-grid-section {
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 30px;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--secondary-color);
    position: relative;
    display: inline-block;
    padding-bottom: 10px;
}

.section-line {
    height: 4px;
    width: 60px;
    background-color: var(--primary-color);
    margin-top: 5px;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.news-card {
    background-color: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.news-card-link {
    display: block;
}

.news-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-card:hover .news-card-image img {
    transform: scale(1.1);
}

.news-card-category {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 600;
}

.news-card-content {
    padding: 20px;
}

.news-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
    color: var(--text-dark);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-excerpt {
    font-size: 15px;
    color: var(--text-light);
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: var(--text-light);
}

.news-card-meta i {
    margin-left: 5px;
    color: var(--primary-color);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}

.pagination-btn {
    padding: 10px 20px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-weight: 600;
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.pagination-btn:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

.pagination-numbers {
    display: flex;
    gap: 10px;
}

.pagination-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.pagination-number:hover,
.pagination-number.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 20px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    margin-bottom: 15px;
}

.footer-description {
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 20px;
    line-height: 1.8;
}

.footer-social {
    display: flex;
    gap: 10px;
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.footer-social-link:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.footer-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--white);
}

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

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
}

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

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

.footer-contact li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.7);
}

.footer-contact i {
    color: var(--primary-color);
    font-size: 18px;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive */
@media (max-width: 768px) {
    .top-bar-content {
        flex-direction: column;
        gap: 10px;
    }

    .header-content {
        flex-wrap: wrap;
    }

    .mobile-menu-toggle {
        display: block;
    }

    .main-nav {
        width: 100%;
        order: 3;
        margin: 20px 0 0 0;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-link {
        padding: 15px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .featured-title {
        font-size: 24px;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .pagination {
        flex-direction: column;
    }
}
