/* ==================== VARIABLES ==================== */
:root {
    --primary-color: #6366F1;
    --primary-dark: #4F46E5;
    --primary-light: #818CF8;
    --accent-color: #F59E0B;
    --accent-dark: #D97706;
    --accent-light: #FCD34D;

    --bg-dark: #0F0B2E;
    --bg-darker: #0A0721;
    --card-bg: rgba(99, 102, 241, 0.05);
    --card-border: rgba(99, 102, 241, 0.1);

    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --text-muted: #9CA3AF;

    --shadow-sm: 0 2px 8px rgba(99, 102, 241, 0.1);
    --shadow-md: 0 4px 16px rgba(99, 102, 241, 0.15);
    --shadow-lg: 0 8px 32px rgba(99, 102, 241, 0.2);
    --shadow-glow: 0 0 30px rgba(245, 158, 11, 0.3);

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==================== RESET ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

textarea {
    resize: none !important;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans Arabic', 'Segoe UI', -apple-system, sans-serif;
    background: linear-gradient(135deg, var(--bg-darker) 0%, var(--bg-dark) 100%);
    color: var(--text-primary);
    direction: rtl;
    overflow-x: hidden;
    line-height: 1.6;
    min-height: 100vh;
}

/* ==================== BACKGROUND DECORATION ==================== */
.bg-decoration {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(99, 102, 241, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(245, 158, 11, 0.08) 0%, transparent 50%);
}

.bg-decoration::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* ==================== CONTAINER ==================== */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ==================== NAVBAR ==================== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(10, 7, 33, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--card-border);
    padding: 1rem 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

/* Logo with secret admin access */
.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-icon svg {
    filter: drop-shadow(0 4px 12px rgba(245, 158, 11, 0.4));

}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
}

/* Search Bar */
.search-bar {
    position: relative;
    flex: 1;
    max-width: 500px;
    margin: 0 2rem;
}

.search-bar input {
    width: 100%;
    padding: 0.875rem 3rem 0.875rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: var(--transition);
}

.search-bar input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.search-bar i {
    position: absolute;
    right: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    transition: var(--transition);
    font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
    background: var(--card-bg);
}

.categories-nav {
    display: flex;
    gap: 0.5rem;
}

/* ==================== BREAKING NEWS ==================== */
.breaking-news {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.1) 0%, rgba(220, 38, 38, 0.05) 100%);
    border-bottom: 2px solid rgba(239, 68, 68, 0.3);
    padding: 0.75rem 0;
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.breaking-news-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.breaking-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.2);
    border-radius: 8px;
    color: #FCA5A5;
    font-weight: 700;
    white-space: nowrap;
}

.breaking-badge i {
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.breaking-text {
    flex: 1;
    color: var(--text-primary);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ==================== HERO SECTION ==================== */
.hero {
    position: relative;
    padding: 6rem 0 4rem;
    overflow: hidden;
}

.hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    margin-bottom: 2rem;
    font-weight: 600;
    color: var(--accent-color);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 4px 20px rgba(245, 158, 11, 0.3));
}

.hero-description {
    font-size: clamp(1.05rem, 2.2vw, 1.28rem);
    font-weight: 500;
    line-height: 2;
    margin-bottom: 3rem;
    letter-spacing: 0.02em;
    background: linear-gradient(
        270deg,
        #cbd5e1,
        #f1f5f9,
        #a5b4fc,
        #f1f5f9,
        #fbbf24,
        #f1f5f9,
        #cbd5e1
    );
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: heroTextShimmer 6s ease-in-out infinite;
    text-shadow: none;
}

@keyframes heroTextShimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-stats {
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
    transition: var(--transition);
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.stat-item i {
    font-size: 2rem;
    color: var(--accent-color);
}

.stat-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==================== SECTIONS ==================== */
.featured-section,
.news-section,
.about-section {
    padding: 4rem 0;
    position: relative;
    z-index: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h2 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.section-header h2 i {
    color: var(--accent-color);
}

/* Filter Buttons */
.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 50px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--primary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* ==================== NEWS GRID ==================== */
.featured-grid,
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* Loading State */
.loading {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 4rem 0;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--card-border);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* News Card */
.news-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-glow);
    border-color: var(--accent-color);
}

.news-card-image {
    position: relative;
    width: 100%;
    padding-bottom: 60%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
}

.news-card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-card-badges {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
}

.badge {
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
}

.badge-featured {
    background: rgba(245, 158, 11, 0.9);
    color: #fff;
}

.badge-breaking {
    background: rgba(239, 68, 68, 0.9);
    color: #fff;
}

.badge-category {
    background: rgba(99, 102, 241, 0.9);
    color: #fff;
}

.news-card-content {
    padding: 1.5rem;
}

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

.news-card-summary {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit--clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding-top: 1rem;
    border-top: 1px solid var(--card-border);
}

.news-card-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Featured News Card (Larger) */
.news-card.featured {
    grid-column: span 2;
}

.news-card.featured .news-card-image {
    padding-bottom: 50%;
}

.news-card.featured .news-card-title {
    font-size: 1.8rem;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

.page-btn {
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-weight: 500;
}

.page-btn:hover,
.page-btn.active {
    background: var(--primary-color);
    color: var(--text-primary);
    border-color: var(--primary-color);
}

/* ==================== NEWS MODAL ==================== */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 3000;
    display: none;
}

.news-modal.active {
    display: block;
}

.news-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
}

.news-modal-container {
    position: relative;
    width: 95%;
    max-width: 900px;
    height: 95vh;
    margin: 2.5vh auto;
    background: var(--bg-dark);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    overflow: hidden;
    animation: modalZoomIn 0.3s ease-out;
}

@keyframes modalZoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.news-modal-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    width: 50px;
    height: 50px;
    background: rgba(0, 0, 0, 0.8);
    border: none;
    border-radius: 50%;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
}

.news-modal-close:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

.news-modal-content {
    height: 100%;
    overflow-y: auto;
    padding: 2rem;
}

.modal-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 16px;
    margin-bottom: 2rem;
}

.modal-meta {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.modal-category,
.modal-date,
.modal-views {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border-radius: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-category {
    background: var(--primary-color);
    color: #fff;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 900;
    color: var(--text-primary);
    line-height: 1.3;
    margin-bottom: 1rem;
}

.modal-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--card-border);
}

.modal-content-text {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.9;
    margin-bottom: 3rem;
}

.modal-content-text p {
    margin-bottom: 1.5rem;
}

/* Share Buttons */
.modal-share {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 16px;
}

.modal-share h3 {
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.share-buttons {
    display: flex;
    gap: 1rem;
}

.share-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    transform: translateY(-5px);
}

.share-btn.facebook {
    background: #1877F2;
}

.share-btn.twitter {
    background: #1DA1F2;
}

.share-btn.whatsapp {
    background: #25D366;
}

.share-btn.telegram {
    background: #0088cc;
}

/* Comments */
.modal-comments {
    padding-top: 2rem;
    border-top: 2px solid var(--card-border);
}

.modal-comments h3 {
    color: var(--text-primary);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.comment-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 16px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 1rem;
    background: var(--bg-darker);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

.btn-primary {
    padding: 1rem 2rem;
    background: var(--primary-color);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    align-self: flex-end;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comment-item {
    padding: 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 16px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.comment-author {
    font-weight: 700;
    color: var(--text-primary);
}

.comment-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.comment-text {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ==================== ABOUT SECTION ==================== */
.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    padding: 2.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    text-align: center;
    transition: var(--transition);
}

.about-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: var(--shadow-glow);
}

.about-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.about-card h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.about-card p {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* ==================== FOOTER ==================== */
.footer {
    background: var(--bg-darker);
    border-top: 1px solid var(--card-border);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.footer-logo h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    width: 45px;
    height: 45px;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-5px);
}

.footer-section h4 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul li a,
.footer-section ul li {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-section ul li a:hover {
    color: var(--accent-color);
    transform: translateX(-5px);
}

.footer-section ul li i {
    color: var(--primary-color);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--card-border);
    text-align: center;
    color: var(--text-muted);
}

/* ==================== TOAST ==================== */
.toast {
    position: fixed;
    bottom: -100px;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    background: var(--primary-color);
    color: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    z-index: 20000;
    transition: var(--transition);
    font-weight: 600;
    min-width: 250px;
}

.toast.success {
    background: #10B981;
}

.toast.error {
    background: #EF4444;
}

.toast.warning {
    background: #F59E0B;
}

.toast.info {
    background: #3B82F6;
}

.toast.show {
    bottom: 2rem;
}

.toast i {
    font-size: 1.5rem;
}


.form-message {
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    text-align: center;
    display: none;
    margin-bottom: 1rem;
}

.form-message.success {
    display: block;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #10B981;
}

.form-message.error {
    display: block;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #EF4444;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1024px) {
    .featured-grid {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    }

    .news-card.featured {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }

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

    .search-bar {
        order: 3;
        width: 100%;
        max-width: none;
        margin: 1rem 0 0;
    }

    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        margin-top: 1rem;
    }

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

    .hero {
        padding: 4rem 0 2rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .stat-item {
        flex: 1;
        min-width: 150px;
    }

    .news-grid,
    .featured-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .modal-title {
        font-size: 1.8rem;
    }

    .modal-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .logo-text h1 {
        font-size: 1.3rem;
    }

    .logo-text p {
        font-size: 0.75rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-btn {
        flex: 1;
        text-align: center;
    }

    .news-modal-content {
        padding: 1rem;
    }

    .share-buttons {
        flex-wrap: wrap;
    }

    .toast {
        right: 1rem;
        left: 1rem;
        bottom: -100px;
        justify-content: center;
        text-align: center;
    }

    .toast.show {
        bottom: 1rem;
    }
}

.footer-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    color: var(--text-secondary);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
}

.footer-btn:hover {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ==================== TYPING INDICATOR ==================== */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 0 15px 15px 15px;
    width: fit-content;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.typing-dot {
    width: 8px;
    height: 8px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50%;
    animation: typingBounce 1.4s infinite ease-in-out both;
}

.typing-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.typing-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes typingBounce {

    0%,
    80%,
    100% {
        transform: scale(0);
        opacity: 0.5;
    }

    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==================== IMMERSIVE NEWS VIEWER (MODERN DESIGN) ==================== */
.immersive-viewer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 5000;
    background: #000;
    display: none;
    /* Hidden by default */
    opacity: 0;
    transition: opacity 0.5s ease;
    perspective: 2500px;
    /* Enable massive 3D depth */
    overflow: hidden;
    /* Ensure 3D elements don't cause scrollbars */
}

.immersive-viewer.active {
    display: flex !important;
    opacity: 1;
    animation: viewerFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ... */

.immersive-title {
    font-size: 2.5rem;
    /* Adjusted for reliability */
    line-height: 1.3;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(to left, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

@keyframes viewerFadeIn {
    to {
        opacity: 1;
    }
}

/* 1. DYNAMIC BACKGROUND */
.immersive-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(30px) brightness(0.4);
    transform: scale(1.1);
    transition: transform 10s ease;
    /* Subtle zoom */
}

/* 2. MAIN CONTENT LAYOUT */
.immersive-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    /* Split view */
    gap: 3rem;
    padding: 3rem;
    box-sizing: border-box;
    max-width: 1600px;
    margin: 0 auto;

    transform-style: preserve-3d;
    /* Keep children in 3D space */
    transition: transform 0.5s ease;
}

/* LEFT: IMAGE & META */
.immersive-visuals {
    display: flex;
    flex-direction: column;
    justify-content: center;
    perspective: 1000px;
}

.immersive-card-3d {
    width: 100%;
    aspect-ratio: 16/9;
    background-size: cover;
    background-position: center;
    border-radius: 30px;
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.8);
    transform: rotateY(5deg) rotateX(5deg);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.immersive-card-3d:hover {
    transform: rotateY(0) rotateX(0) scale(1.02);
    box-shadow: 0 30px 60px -10px rgba(99, 102, 241, 0.3);
}

.immersive-card-3d::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent 60%);
}

.immersive-card-3d img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* RIGHT: CONTENT SCROLL */
.immersive-text-panel {
    background: rgba(15, 11, 46, 0.85);
    /* Slightly darker for better readibility */
    backdrop-filter: blur(25px);
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 3rem;
    overflow-y: auto;
    position: relative;
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s backwards;
    /* Hide scrollbar for cleaner look but keep functionality */
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.5) rgba(0, 0, 0, 0.1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* TYPOGRAPHY & ELEMENTS */
.immersive-category {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    background: rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 50px;
    color: #A5B4FC;
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
}

.immersive-title {
    font-size: 2.5rem;
    /* Adjusted for reliability */
    line-height: 1.3;
    font-weight: 900;
    margin-bottom: 2rem;
    background: linear-gradient(to left, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.immersive-meta-row {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 1.5rem;
}

.immersive-meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.immersive-body {
    font-size: 1.15rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.9);
}

/* Actions */
.close-immersive {
    position: absolute;
    top: 2rem;
    right: 2rem;
    z-index: 100;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-immersive:hover {
    background: var(--primary-color);
    transform: rotate(90deg);
}

/* RESPONSIVE */
@media (max-width: 1024px) {
    .immersive-content {
        grid-template-columns: 1fr;
        padding: 1.5rem;
        gap: 2rem;
    }

    .immersive-visuals {
        display: none;
        /* Hide 3D card on tablet/mobile for focus */
    }

    .immersive-text-panel {
        padding: 1.5rem;
    }

    .immersive-title {
        font-size: 1.8rem;
    }
}

/* NAVIGATION BUTTONS */
.immersive-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 100;
}

.immersive-nav-btn:hover {
    background: var(--primary-color);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.immersive-nav-prev {
    left: 2rem;
}

.immersive-nav-next {
    right: 2rem;
}

/* MASSIVE 3D CIRCLE TRANSITIONS */
/* We set a deep transform-origin to simulate rotating around a giant cylinder */

/* SLOWER ANIMATION FOR VISIBILITY (1.2s) */
.slide-out-left {
    transform-origin: 50% 50% -50vw;
    animation: circleRotateOutLeft 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.slide-in-right {
    transform-origin: 50% 50% -50vw;
    animation: circleRotateInRight 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.slide-out-right {
    transform-origin: 50% 50% -50vw;
    animation: circleRotateOutRight 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

.slide-in-left {
    transform-origin: 50% 50% -50vw;
    animation: circleRotateInLeft 1.2s cubic-bezier(0.25, 1, 0.5, 1) forwards !important;
}

@keyframes circleRotateOutLeft {
    0% {
        transform: rotateY(0);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: rotateY(-60deg);
        opacity: 0;
        filter: blur(10px);
    }
}

@keyframes circleRotateInRight {
    0% {
        transform: rotateY(60deg);
        opacity: 0;
        filter: blur(10px);
    }

    100% {
        transform: rotateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes circleRotateOutRight {
    0% {
        transform: rotateY(0);
        opacity: 1;
        filter: blur(0);
    }

    100% {
        transform: rotateY(60deg);
        opacity: 0;
        filter: blur(10px);
    }
}

@keyframes circleRotateInLeft {
    0% {
        transform: rotateY(-60deg);
        opacity: 0;
        filter: blur(10px);
    }

    100% {
        transform: rotateY(0);
        opacity: 1;
        filter: blur(0);
    }
}

/* SCALED ACTIVE CARD */
.immersive-content {
    transform: scale(0.85);
    /* Make small */
    transition: transform 0.5s ease;
}

/* CAROUSEL PREVIEWS */
.carousel-preview {
    position: absolute;
    top: 50%;
    width: 300px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 20px;
    transform-origin: center;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0.4;
    cursor: pointer;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
    z-index: 10;
    filter: grayscale(0.5) blur(2px);
}

.carousel-preview:hover {
    opacity: 0.8;
    filter: grayscale(0) blur(0);
    transform: translateY(-50%) scale(1.1);
}

.carousel-preview.prev {
    left: 5%;
    transform: translateY(-50%) rotateY(45deg) perspective(1000px);
}

.carousel-preview.next {
    right: 5%;
    transform: translateY(-50%) rotateY(-45deg) perspective(1000px);
}

/* CAROUSEL PREVIEWS - IMAGE ONLY (MOBILE FRIENDLY) */
.carousel-preview {
    background-color: #000;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: block;
    overflow: hidden;
    width: 250px;
    /* Slightly smaller for better mobile fit */
    height: 150px;

    /* Reset complex layout */
    text-align: center;
    direction: ltr;
}

/* Hide rich info elements */
.preview-info,
.preview-label,
.preview-tag,
.preview-heading,
.preview-date {
    display: none !important;
}

/* Ensure image fills container */
.preview-img {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    border: none;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.carousel-preview:hover .preview-img {
    opacity: 1;
}

/* MOBILE RESPONSIVENESS - HIDE PREVIEWS ON SMALL SCREENS */
@media (max-width: 768px) {
    .carousel-preview {
        display: none !important;
    }

    .immersive-content {
        transform: scale(1) !important;
        /* Full size on mobile - force override */
        grid-template-columns: 1fr !important;
        /* Single column on mobile */
        padding: 1.5rem !important;
    }

    .immersive-visuals {
        width: 100% !important;
        max-width: 100% !important;
        margin-bottom: 1rem;
    }

    .immersive-card-3d {
        transform: none !important;
        /* Remove 3D tilt on mobile for better view */
        width: 100% !important;
        height: 250px !important;
        /* Fixed height for mobile */
        min-height: 250px !important;
        aspect-ratio: auto !important;
        /* Override aspect ratio */
    }

    .immersive-text-panel {
        max-height: none !important;
        /* Allow full scroll */
    }

    .immersive-nav-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .immersive-nav-prev {
        left: 1rem;
    }

    .immersive-nav-next {
        right: 1rem;
    }
}