/* Custom Premium Design Effects */

@keyframes pulse-primary {

    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
    }
}

.animate-pulse-primary {
    animation: pulse-primary 2s infinite ease-in-out;
}

.glass-badge {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.premium-shadow {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.premium-card-hover {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.premium-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.2);
}

/* Kufi font optimization */
.kufi {
    font-family: 'Inter', 'Noto Sans Arabic', sans-serif;
    /* Fallback if specific kufi font fails */
    letter-spacing: -0.01em;
}

/* smooth scroll for tabs */
#newsTabs {
    scroll-behavior: smooth;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

#newsTabs::-webkit-scrollbar {
    display: none;
}

/* Header Redesign Styles */
.header-row-2 {
    transition: all 0.3s ease;
}

/* Breaking News Badge */
.breaking-badge-premium {
    background: #ffeb3b;
    box-shadow: 0 4px 15px rgba(255, 235, 59, 0.3);
}

.breaking-badge-premium:hover {
    background: #fdd835;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 235, 59, 0.4);
}

/* Dark Mode Toggle Switch */
#darkModeToggle {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#darkModeToggle:hover {
    transform: rotate(15deg);
}

/* Dark Mode Global Styles */
body.dark-mode {
    background-color: #0f172a;
    color: #f8fafc;
}

body.dark-mode header,
body.dark-mode nav,
body.dark-mode .bg-white {
    background-color: #1e293b !important;
    border-color: #334155 !important;
}

body.dark-mode .text-gray-900,
body.dark-mode .text-gray-800,
body.dark-mode .text-gray-700,
body.dark-mode .text-secondary {
    color: #f1f5f9 !important;
}

body.dark-mode .text-gray-600,
body.dark-mode .text-gray-500 {
    color: #94a3b8 !important;
}

body.dark-mode .bg-gray-50,
body.dark-mode .bg-gray-100 {
    background-color: #334155 !important;
}

body.dark-mode .border-gray-100 {
    border-color: #334155 !important;
}

/* Refined Dark Mode Toggle */
#darkModeToggle .toggle-dot {
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

body.dark-mode #darkModeToggle {
    background-color: #3b82f6;
    border-color: #2563eb;
}

body.dark-mode #darkModeToggle .toggle-dot {
    transform: translateX(24px);
    background-color: #1e293b;
}

body.dark-mode #darkModeToggle .toggle-dot i {
    color: #fbbf24;
    content: "\ef65";
    /* ri-sun-line */
}

/* Navigation Dark Mode & Alignment */
body.dark-mode .nav-link {
    color: #cbd5e1 !important;
}

body.dark-mode .nav-link:hover {
    color: #ffffff !important;
}

nav .container ul {
    justify-content: flex-start !important;
    /* Right aligned in RTL */
}

/* Custom amrkhaled Logo Dot Animation (Optional) */
.logo-dot {
    display: inline-block;
    color: #ef4444;
    /* red-500 */
}

/* Responsive Font Fixes for Navigation */
@media (max-width: 1024px) {
    nav .container ul {
        gap: 0.5rem !important;
    }
}

nav .nav-link {
    padding: 12px 16px !important;
    position: relative;
    transition: all 0.2s ease;
}

nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: #FFC145;
    transition: all 0.3s ease;
}

nav .nav-link:hover::after,
nav .nav-link.active::after {
    width: 70%;
}

/* New Urgent Button Style */
.btn-urgent-yellow {
    background-color: #ffeb3b;
    /* Bright Yellow */
    background-image: linear-gradient(to bottom, #fff176, #ffd108);
    border: 1px solid #fbc02d;
    box-shadow: 0 4px 6px -1px rgba(255, 193, 7, 0.3), 0 2px 4px -1px rgba(255, 193, 7, 0.1);
}

.btn-urgent-yellow:hover {
    background-image: linear-gradient(to bottom, #fff59d, #ffc107);
    box-shadow: 0 6px 12px -2px rgba(255, 193, 7, 0.4);
}

/* --- New Classic Header Layout --- */

/* Identity Bar */
.header-identity-bar {
    background-color: #ffffff;
    border-bottom: 1px solid #f1f5f9;
    padding: 1.5rem 0;
}

/* Navigation Bar */
.header-nav-bar {
    background-color: #1e293b;
    /* Fallback Dark Blue */
    background: linear-gradient(to bottom, #1e293b, #0f172a);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* Nav Link Classic */
.nav-link-classic {
    color: #ffffff !important;
    font-weight: 700;
    padding: 1rem 1.25rem;
    transition: all 0.2s ease;
    display: inline-block;
    position: relative;
    opacity: 0.9;
}

.nav-link-classic:hover {
    background-color: rgba(255, 255, 255, 0.1);
    opacity: 1;
}

.nav-link-classic.active,
.nav-link-classic:active {
    background-color: #a61a2e;
    /* Brand Red highlight */
    color: #fff;
}

/* Responsive Toggles */
.mobile-toggle-classic {
    color: #ffffff;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s;
}

.mobile-toggle-classic:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* --- Dark Premium Header Layout --- */
.header-premium nav ul li a {
    position: relative;
    padding: 1.5rem 0;
    /* Tall click area */
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: 100%;
}

.header-premium nav ul li a:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

.header-premium nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ef4444, #f59e0b);
    transition: width 0.3s ease;
}

.header-premium nav ul li a:hover::after {
    width: 100%;
}

/* --- minimal Header Layout --- */
.header-minimal nav ul li a {
    position: relative;
    padding: 0.5rem 0;
    color: inherit;
    transition: color 0.3s ease;
}

.header-minimal nav ul li a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background-color: #a61a2e;
    transition: width 0.3s ease;
}

.header-minimal nav ul li a:hover::after {
    width: 100%;
}

.header-minimal nav ul li a:hover {
    color: #a61a2e;
}