/* 
 * AfroAr Modern - Main Stylesheet
 * Premium, High-End Magazine Layout
 */

:root {
    --color-primary: #0B2447;
    --color-primary-dark: #071A33;
    --color-accent: #1B8A5A;
    --color-accent-light: #E8F5EE;
    --color-text: #1A1F2B;
    --color-text-muted: #6B7280;
    --color-bg-light: #F7F8FA;
    --color-bg-white: #FFFFFF;
    --color-border: #E5E7EB;
    
    /* Modern Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    
    /* Hover Shadows */
    --shadow-hover: 0 25px 50px -12px rgba(30, 58, 138, 0.25);
    
    /* Glassmorphism */
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.3);
    
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-md: 12px;
    --radius-lg: 24px;
    
    /* Spacing Scale */
    --spacing-1: 4px;
    --spacing-2: 8px;
    --spacing-3: 16px;
    --spacing-4: 24px;
    --spacing-5: 32px;
    --spacing-6: 48px;
    --spacing-7: 64px;
    --spacing-8: 80px;

    /* Type Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;

    /* Footer Colors */
    --footer-bg: #0F172A;
    --footer-text: #94A3B8;
    --footer-heading: #F8FAFC;
    --footer-border: rgba(255, 255, 255, 0.1);
}

body {
    font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, -apple-system, sans-serif;
    color: var(--color-text);
    background-color: var(--color-bg-light);
    line-height: 1.8;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Cairo', sans-serif;
    color: var(--color-primary);
    font-weight: 800;
    line-height: 1.3;
    margin-top: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-accent);
}

/* Layout Containers */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.section-title {
    font-size: 2rem;
    position: relative;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60%;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    border-radius: 4px;
}

.text-center {
    text-align: center;
}
.text-center.section-title::after {
    right: 20%;
}

/* Header & Glassmorphism */
.glass-header {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: var(--glass-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.admin-bar .glass-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .glass-header {
        top: 46px;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px;
}

.site-branding img {
    max-height: 75px;
    width: auto;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.08));
    transition: var(--transition);
    transform-origin: right center;
}

.site-branding a:hover img {
    transform: scale(1.05);
    filter: drop-shadow(0 6px 12px rgba(0,0,0,0.15));
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-3);
}

.search-toggle {
    background: transparent;
    border: none;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-2);
    border-radius: 50%;
    transition: var(--transition);
}

.search-toggle:hover {
    color: var(--color-accent);
    background: var(--color-bg-light);
}

.site-title a {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 20px; /* reduced gap to fit more items */
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}

.main-navigation ul li {
    position: relative;
}

.main-navigation a {
    color: var(--color-text);
    font-weight: 700;
    font-size: 1.05rem;
    position: relative;
    padding: 8px 0;
    display: block;
}

.main-navigation a:hover {
    color: var(--color-primary);
}

.main-navigation > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: var(--color-accent);
    transition: var(--transition);
    border-radius: 3px;
}

.main-navigation > ul > li > a:hover::after {
    width: 100%;
}

/* Submenu Styles */
.main-navigation ul ul.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    min-width: 220px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    border-radius: 8px;
    border: 1px solid rgba(0,0,0,0.05);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    flex-direction: column;
    padding: 10px 0;
    gap: 0;
}

.main-navigation ul li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul.sub-menu li {
    width: 100%;
}

.main-navigation ul ul.sub-menu li a {
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: #444;
}

.main-navigation ul ul.sub-menu li a:hover {
    background-color: #f8f9fa;
    color: var(--color-primary);
    padding-right: 25px; /* slight indent on hover for RTL */
}

/* Dropdown arrow for items with children */
.main-navigation ul li.menu-item-has-children > a::before {
    content: '\25BC';
    font-size: 0.6em;
    margin-right: 6px;
    vertical-align: middle;
    opacity: 0.5;
    float: left;
    margin-top: 6px;
}

/* Nested submenus (3rd level) */
.main-navigation ul ul.sub-menu ul.sub-menu {
    top: 0;
    right: 100%;
}

/* Hero Section */
.hero-section {
    padding: 80px 0;
    background: radial-gradient(circle at top right, rgba(34, 197, 94, 0.05), transparent 40%),
                radial-gradient(circle at bottom left, rgba(30, 58, 138, 0.05), transparent 40%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 48px;
    align-items: stretch;
}

.hero-magazine, .hero-featured {
    display: flex;
    flex-direction: column;
}

.mag-showcase {
    display: flex;
    gap: 40px;
    align-items: center;
    background: var(--color-bg-white);
    padding: 40px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    flex-grow: 1;
    border: 1px solid var(--color-border);
}

.mag-cover {
    flex-shrink: 0;
    width: 220px;
    position: relative;
}

.mag-cover img {
    width: 100%;
    height: 310px; /* fixed height for consistency */
    object-fit: cover;
    border-radius: 8px;
    box-shadow: -10px 10px 20px rgba(0,0,0,0.15);
    transition: var(--transition);
}

.mag-cover.3d-tilt:hover img {
    transform: perspective(1000px) rotateY(-15deg) rotateX(5deg) scale(1.05);
    box-shadow: -20px 20px 30px rgba(0,0,0,0.2);
}

.mag-details h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

/* Premium Buttons */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 24px;
}

.btn {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), #2a4db3);
    color: white !important;
    box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 58, 138, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--color-text) !important;
    border: 2px solid var(--color-border);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    border-color: var(--color-primary);
    color: var(--color-primary) !important;
}

/* Featured News Slider */
.featured-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.featured-header .section-title {
    margin-bottom: 0;
}

.slider-nav-btns {
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-nav-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.slider-nav-btn:hover {
    background: var(--color-primary);
    color: #ffffff;
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.slider-nav-btn:active {
    transform: scale(0.94);
}

.featured-slider {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    height: 100%;
    min-height: 420px;
    box-shadow: var(--shadow-lg);
    flex-grow: 1;
    display: flex;
    background: var(--color-primary-dark);
}

.featured-slides-track {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 420px;
    flex-grow: 1;
}

.featured-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

.featured-slide.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 2;
}

.featured-card {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg);
}

.featured-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    overflow: hidden;
}

.featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1);
    transition: transform 6s cubic-bezier(0.25, 1, 0.5, 1);
}

.featured-slide.is-active .featured-img img {
    transform: scale(1.06);
}

.featured-fallback-img {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0B2447 0%, #1B8A5A 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.featured-fallback-img img {
    max-height: 90px;
    opacity: 0.35;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.25));
}

.featured-gradient-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 36, 71, 0.15) 0%, rgba(11, 36, 71, 0.35) 45%, rgba(11, 36, 71, 0.85) 100%);
    pointer-events: none;
}

.glass-panel {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    padding: 20px 24px;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: var(--glass-border);
    transition: var(--transition);
    z-index: 3;
}

.featured-card:hover .glass-panel {
    bottom: 24px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.2);
}

.featured-slide-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.slide-badge {
    background: var(--color-accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 50px;
    display: inline-block;
    box-shadow: 0 2px 6px rgba(27, 138, 90, 0.3);
}

.slide-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.glass-panel h3 {
    font-size: 1.35rem;
    line-height: 1.45;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.glass-panel h3 a {
    color: var(--color-text);
    transition: color 0.2s ease;
}

.glass-panel h3 a:hover {
    color: var(--color-primary);
}

.glass-panel p {
    margin-bottom: 0.75rem;
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--color-text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.featured-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.slide-counter-badge {
    font-size: 0.75rem;
    color: var(--color-text-muted);
    font-weight: 700;
    background: rgba(0, 0, 0, 0.05);
    padding: 2px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
}

.read-more {
    font-weight: 800;
    font-size: 0.92rem;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
}

.read-more:hover {
    color: var(--color-primary);
    transform: translateX(-5px);
}

.featured-slider-dots {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 10;
    display: flex;
    gap: 6px;
    align-items: center;
    background: rgba(11, 36, 71, 0.45);
    padding: 6px 10px;
    border-radius: 30px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider-dot:hover {
    background: rgba(255, 255, 255, 0.85);
}

.slider-dot.is-active {
    width: 22px;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

/* News Ticker */
.news-ticker-section {
    background: var(--color-primary);
    color: white;
    padding: 12px 0;
    overflow: hidden;
}
.news-ticker {
    display: flex;
    align-items: center;
}
.ticker-label {
    background: var(--color-accent);
    color: white;
    padding: 6px 18px;
    border-radius: 50px;
    font-weight: 800;
    font-size: 0.9rem;
    margin-left: 20px;
    white-space: nowrap;
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.ticker-pulse {
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    animation: ticker-pulse-anim 1.8s infinite;
}
@keyframes ticker-pulse-anim {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}
.ticker-content-wrapper {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
    -webkit-mask-image: linear-gradient(to left, transparent, black 3%, black 97%, transparent);
}
.ticker-content {
    display: flex;
    white-space: nowrap;
    animation: ticker 35s linear infinite;
}
.ticker-content:hover {
    animation-play-state: paused;
}
@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}
.ticker-item {
    padding: 0 18px;
    display: inline-flex;
    align-items: center;
    font-size: 0.95rem;
}
.ticker-item::before {
    content: "•";
    color: var(--color-accent);
    margin-left: 14px;
    font-size: 1.2rem;
    line-height: 0;
}
.ticker-item a {
    color: rgba(255,255,255,0.92);
    transition: color 0.2s ease;
}
.ticker-item a:hover {
    color: #ffffff;
    text-shadow: 0 0 8px rgba(255,255,255,0.4);
}

/* Grid Layouts */
.sections-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 48px;
    padding: 80px 24px;
}

.grid-layout.three-cols {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns is better for 2fr width */
    gap: 30px;
}

.grid-layout.two-cols {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Categories Grid */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--spacing-4);
}

.category-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: var(--spacing-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: var(--transition);
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    background-color: var(--color-accent-light);
    border-color: var(--color-accent);
}

.category-icon {
    width: 52px;
    height: 52px;
    background: var(--color-accent-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-3);
    color: var(--color-primary);
    transition: var(--transition);
}

.category-card:hover .category-icon {
    background: var(--color-accent);
    color: var(--color-bg-white);
    transform: scale(1.08);
}

.category-icon svg {
    width: 24px;
    height: 24px;
}

.category-name {
    font-size: var(--text-lg);
    color: var(--color-primary);
    margin-bottom: var(--spacing-1);
}

.category-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Content Cards */
.content-card {
    background: var(--color-bg-white);
    padding: 0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.card-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom: 1px solid var(--color-border);
    transition: var(--transition);
}

.content-card:hover .card-thumb img {
    transform: scale(1.05);
}

.content-card-body {
    padding: var(--spacing-4);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.content-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--spacing-2);
}

.content-badge {
    background: var(--color-bg-light);
    color: var(--color-primary);
    padding: var(--spacing-1) var(--spacing-2);
    border-radius: var(--spacing-1);
    font-size: var(--text-xs);
    font-weight: 700;
}

.content-date {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
}

.content-title {
    font-size: var(--text-lg);
    margin-bottom: var(--spacing-2);
}

.content-excerpt {
    flex-grow: 1;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-3);
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;  
    overflow: hidden;
}

.author-meta {
    display: flex;
    align-items: center;
    gap: var(--spacing-2);
    margin-bottom: var(--spacing-3);
}

.avatar-fallback {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-accent);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: var(--text-sm);
}

.study-card {
    border-top: 4px solid var(--color-accent);
}

.article-row {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--color-bg-white);
    padding: 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
    transition: var(--transition);
}

.article-author-img img {
    border-radius: 50%;
    border: 3px solid var(--color-bg-light);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    width: 70px;
    height: 70px;
    object-fit: cover;
}

.article-info h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.article-author {
    font-size: 0.9rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

/* Horizontal Scroll for Magazine Shelf */
.magazine-shelf-section {
    padding: 60px 0 100px;
    background: var(--color-bg-white);
    border-top: 1px solid var(--color-border);
}

.horizontal-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 10px 40px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--color-accent) var(--color-bg-light);
}

.horizontal-scroll-container::-webkit-scrollbar {
    height: 8px;
}
.horizontal-scroll-container::-webkit-scrollbar-track {
    background: var(--color-bg-light);
    border-radius: 10px;
}
.horizontal-scroll-container::-webkit-scrollbar-thumb {
    background-color: var(--color-accent);
    border-radius: 10px;
}

.mag-mini-card {
    flex: 0 0 200px;
    scroll-snap-align: start;
}

.mag-mini-card a.mag-link {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 15px;
    border: 2px solid var(--color-primary);
}

.mag-mini-card img,
.mag-mini-card .no-cover {
    width: 100%;
    height: auto;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    transition: var(--transition);
    display: block;
}

.no-cover {
    background: var(--color-bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    font-weight: 700;
}

.mag-mini-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(7, 26, 51, 0.85); /* Navy Dark */
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    padding: var(--spacing-3);
    text-align: center;
}

.mag-mini-card a.mag-link:hover .mag-mini-card-overlay {
    opacity: 1;
}

.mag-mini-card a.mag-link:hover img {
    transform: scale(1.05);
}

.mag-mini-card h5 {
    font-size: 1rem;
    text-align: center;
}

/* Animations */
.fade-in-up {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.js-enabled .fade-in-up:not(.is-visible) {
    opacity: 0;
    transform: translateY(40px);
}

.delay-1 {
    transition-delay: 0.15s;
}

/* Footer */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding-top: var(--spacing-8);
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--spacing-5);
    margin-bottom: var(--spacing-7);
}
.footer-title {
    color: var(--footer-heading);
    margin-bottom: var(--spacing-4);
    font-size: var(--text-xl);
}
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}
.footer-links li {
    margin-bottom: var(--spacing-2);
}
.footer-links a {
    color: var(--footer-text);
}
.footer-links a:hover {
    color: var(--color-accent);
    padding-right: var(--spacing-2);
}
.social-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: var(--spacing-3);
}
.social-links a {
    color: var(--footer-text);
    background: rgba(255,255,255,0.05);
    padding: var(--spacing-2) var(--spacing-3);
    border-radius: var(--spacing-1);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}
.social-links a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}
.social-links a:hover {
    color: var(--color-bg-white);
    background: var(--color-accent);
}
.footer-bottom {
    border-top: 1px solid var(--footer-border);
    padding: var(--spacing-4) 0;
    text-align: center;
    font-size: var(--text-sm);
}

/* Responsive */
@media (max-width: 1024px) {
    .sections-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
    }
    .mag-showcase {
        flex-direction: column;
        text-align: center;
    }
    .mag-cover {
        width: 100%;
        max-width: 250px;
    }
    .action-buttons {
        justify-content: center;
    }
    .grid-layout.three-cols {
        grid-template-columns: 1fr;
    }
    .footer-container {
        grid-template-columns: 1fr;
    }
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Header — unified with the site design system (navy primary + green accent)
   ========================================================================== */
.classic-header {
    background-color: var(--color-bg-white);
}

/* Branding Row */
.header-branding-row {
    padding: 20px 0;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
}

.branding-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.site-branding .custom-logo {
    max-height: 72px;
    width: auto;
}

.secondary-logo img {
    max-height: 72px;
    width: auto;
    opacity: 0.9;
}

.branding-text {
    text-align: center;
    flex-grow: 1;
}

.branding-text .main-title {
    margin: 0;
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-primary);
    letter-spacing: -0.01em;
}

.branding-text .sub-title {
    margin: 6px 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.02em;
}

.branding-text .eng-title {
    margin: 4px 0 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
    font-family: Arial, sans-serif; /* Cleaner font for English */
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Navigation Row — deep navy, sticky, consistent with --color-primary */
.header-nav-row {
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    box-shadow: 0 2px 12px rgba(11, 36, 71, 0.18);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.admin-bar .header-nav-row {
    top: 32px;
}

@media screen and (max-width: 782px) {
    .admin-bar .header-nav-row {
        top: 46px;
    }
}

.header-nav-row .container.nav-container,
.nav-container {
    max-width: 1440px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Base Nav Overrides for the new layout */
.header-nav-row .main-navigation {
    flex-grow: 1;
    min-width: 0;
}

.header-nav-row .main-navigation ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
    white-space: nowrap;
}

.header-nav-row .main-navigation > ul > li {
    position: relative;
    flex-shrink: 0;
}

.header-nav-row .main-navigation > ul > li > a {
    color: rgba(255, 255, 255, 0.88);
    text-decoration: none;
    padding: 0.95rem 0.65rem;
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    border-right: none;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.header-nav-row .main-navigation > ul > li:first-child > a {
    border-left: none;
}

.header-nav-row .main-navigation > ul > li > a:hover,
.header-nav-row .main-navigation > ul > li.current-menu-item > a {
    background-color: rgba(255, 255, 255, 0.08);
    color: #fff;
}

/* Accent underline on hover / active — ties back to --color-accent */
.header-nav-row .main-navigation > ul > li > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 0;
    height: 3px;
    background: var(--color-accent);
    border-radius: 3px 3px 0 0;
    transition: width 0.25s ease;
}

.header-nav-row .main-navigation > ul > li > a:hover::after,
.header-nav-row .main-navigation > ul > li.current-menu-item > a::after {
    width: calc(100% - 1.3rem);
}

/* Dropdown indicator */
.header-nav-row .main-navigation ul li.menu-item-has-children > a::before {
    content: '\25BC';
    font-size: 0.5em;
    margin-right: 5px;
    vertical-align: middle;
    opacity: 0.7;
    order: -1;
    margin-top: 0;
}

@media (max-width: 1360px) {
    .header-nav-row .main-navigation > ul > li > a {
        padding: 0.95rem 0.45rem;
        font-size: 0.86rem;
    }
    .header-nav-row .main-navigation > ul > li > a:hover::after,
    .header-nav-row .main-navigation > ul > li.current-menu-item > a::after {
        width: calc(100% - 0.9rem);
    }
}

@media (max-width: 1180px) {
    .header-nav-row .main-navigation > ul > li > a {
        padding: 0.9rem 0.35rem;
        font-size: 0.82rem;
    }
    .header-nav-row .main-navigation > ul > li > a:hover::after,
    .header-nav-row .main-navigation > ul > li.current-menu-item > a::after {
        width: calc(100% - 0.7rem);
    }
}

/* Removed old max-width: 992px rules to avoid conflicts */

/* Submenu Styles — light card, matches the rest of the site's dropdowns */
.header-nav-row .main-navigation ul ul.sub-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-bg-white);
    min-width: 230px;
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 10px 10px;
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--color-accent);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    padding: 6px 0;
}

.header-nav-row .main-navigation ul li:hover > ul.sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-nav-row .main-navigation ul ul.sub-menu li {
    width: 100%;
}

.header-nav-row .main-navigation ul ul.sub-menu li a {
    border: none;
    padding: 10px 20px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--color-text);
    transition: var(--transition);
}

.header-nav-row .main-navigation ul ul.sub-menu li a:hover {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
    padding-right: 25px;
}

.header-nav-row .main-navigation ul ul.sub-menu ul.sub-menu {
    top: 0;
    right: 100%;
    border-top: 1px solid var(--color-border);
    border-right: 3px solid var(--color-accent);
    border-radius: 10px 0 10px 10px;
}

/* Header Actions in Nav Row */
.header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.header-actions .search-toggle {
    color: rgba(255, 255, 255, 0.88);
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.75rem;
    border-radius: 50%;
    display: flex;
    transition: var(--transition);
}

.header-actions .search-toggle:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.1);
}

.header-actions .mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    z-index: 1000;
}

.header-actions .mobile-menu-toggle .bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.header-actions .mobile-menu-toggle.is-active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.header-actions .mobile-menu-toggle.is-active .bar:nth-child(2) {
    opacity: 0;
}

.header-actions .mobile-menu-toggle.is-active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .header-actions .mobile-menu-toggle {
        display: flex;
    }

    .header-nav-row .nav-container {
        position: relative;
    }

    .header-nav-row .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--color-primary);
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        z-index: 999;
        display: none; /* Hidden by default */
        max-width: 100%;
        padding: 10px 0;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }

    .header-nav-row .main-navigation.is-open {
        display: block; /* Shown when toggled */
    }

    .header-nav-row .main-navigation > ul {
        flex-direction: column;
        align-items: stretch;
    }

    .header-nav-row .main-navigation > ul > li {
        width: 100%;
    }

    .header-nav-row .main-navigation > ul > li > a {
        padding: 12px 20px;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }
    
    .header-nav-row .main-navigation > ul > li > a::after {
        display: none; /* Hide hover underline on mobile */
    }

    .header-nav-row .main-navigation ul ul.sub-menu {
        position: static;
        box-shadow: none;
        border: none;
        border-radius: 0;
        background-color: rgba(0, 0, 0, 0.1);
        display: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        padding-right: 15px;
    }

    .header-nav-row .main-navigation ul li.is-open > ul.sub-menu {
        display: flex;
    }
    
    .header-nav-row .main-navigation ul ul.sub-menu li a {
        color: rgba(255, 255, 255, 0.85);
        padding: 10px 20px;
    }

    .branding-text .main-title {
        font-size: 1.8rem;
    }
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .branding-text .main-title {
        font-size: 1.8rem;
    }
}
@media (max-width: 768px) {
    .branding-content {
        flex-direction: column;
        text-align: center;
    }
    .branding-text {
        order: 3;
    }
    .secondary-logo {
        display: none;
    }
}

/* ==========================================================================
   Breadcrumbs Component
   ========================================================================== */
.breadcrumbs-bar {
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    padding: 14px 0;
    margin-bottom: 2rem;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.breadcrumbs .crumb-link {
    color: var(--color-text-muted);
    transition: color 0.2s ease;
}

.breadcrumbs .crumb-link:hover {
    color: var(--color-accent);
}

.breadcrumbs .crumb-separator {
    color: #CBD5E1;
    font-size: 0.8rem;
}

.breadcrumbs .crumb-current {
    color: var(--color-primary);
    font-weight: 600;
    max-width: 450px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ==========================================================================
   Single Post & Editorial Layout
   ========================================================================== */
.single-post-wrapper {
    padding-bottom: 4rem;
}

.single-article-container {
    max-width: 1000px;
    margin: 0 auto;
}

.single-post-header {
    margin-bottom: 2.5rem;
    text-align: right;
}

.header-category {
    margin-bottom: 1.25rem;
}

.category-badge {
    display: inline-block;
    background: var(--color-accent-light);
    color: var(--color-accent);
    padding: 6px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid rgba(27, 138, 90, 0.2);
    transition: var(--transition);
}

.category-badge:hover {
    background: var(--color-accent);
    color: #fff;
}

.single-post-title {
    font-size: 2.4rem;
    line-height: 1.35;
    color: var(--color-primary);
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.single-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    padding: 14px 20px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

.meta-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-author .author-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--color-border);
}

.author-details {
    display: flex;
    flex-direction: column;
}

.author-by {
    font-size: 0.75rem;
    color: var(--color-text-muted);
}

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

.meta-divider {
    width: 1px;
    height: 24px;
    background-color: var(--color-border);
}

.meta-date, .meta-read-time {
    display: flex;
    align-items: center;
    gap: 8px;
}

.meta-date svg, .meta-read-time svg {
    color: var(--color-accent);
}

/* Single Featured Image */
.single-featured-image-frame {
    margin-bottom: 3rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--color-border);
    background: #000;
}

.featured-hero-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

.featured-image-caption {
    padding: 10px 16px;
    background-color: var(--color-bg-white);
    color: var(--color-text-muted);
    font-size: 0.85rem;
    border-top: 1px solid var(--color-border);
    text-align: center;
}

/* Spotlight PDF Card */
.pdf-spotlight-card {
    background: linear-gradient(135deg, #F0FDF4 0%, #FFFFFF 100%);
    border: 2px solid #86EFAC;
    border-radius: var(--radius-md);
    padding: 30px;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
    position: relative;
    overflow: hidden;
}

.pdf-spotlight-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    height: 100%;
    background: var(--color-accent);
}

.pdf-spotlight-inner {
    display: flex;
    align-items: center;
    gap: 30px;
}

.pdf-cover-frame {
    position: relative;
    flex-shrink: 0;
    width: 180px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    overflow: hidden;
}

.pdf-cover-img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.pdf-pill-tag {
    position: absolute;
    bottom: 8px;
    right: 8px;
    left: 8px;
    text-align: center;
    background: rgba(11, 36, 71, 0.9);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 6px;
    border-radius: 4px;
}

.pdf-spotlight-content {
    flex-grow: 1;
}

.pdf-badge-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--color-accent);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.pdf-headline {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 10px;
    font-weight: 800;
}

.pdf-desc {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

.pdf-action-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
}

.pdf-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
}

/* Article Content & Reading Typography */
.single-content-container {
    max-width: 860px;
    margin: 0 auto;
}

.reading-typography {
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 1.16rem;
    line-height: 2.1;
    color: #27272A;
}

.reading-typography p {
    margin-bottom: 1.8rem;
    text-align: justify;
}

.reading-typography h2 {
    font-size: 1.8rem;
    color: var(--color-primary);
    margin-top: 2.8rem;
    margin-bottom: 1.2rem;
    position: relative;
    padding-bottom: 8px;
}

.reading-typography h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    border-radius: 3px;
}

.reading-typography h3 {
    font-size: 1.45rem;
    color: var(--color-primary);
    margin-top: 2.2rem;
    margin-bottom: 1rem;
}

.reading-typography blockquote {
    margin: 2.5rem 0;
    padding: 24px 30px;
    background: linear-gradient(135deg, var(--color-bg-light), #FFFFFF);
    border-right: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    font-size: 1.18rem;
    line-height: 1.9;
    color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    font-style: italic;
}

.reading-typography blockquote p:last-child {
    margin-bottom: 0;
}

.reading-typography ul, .reading-typography ol {
    margin: 1.5rem 0 2rem 0;
    padding-right: 25px;
}

.reading-typography li {
    margin-bottom: 0.8rem;
}

.reading-typography img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    box-shadow: var(--shadow-md);
}

.reading-typography table {
    width: 100%;
    border-collapse: collapse;
    margin: 2.5rem 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background-color: var(--color-bg-white);
}

.reading-typography th, .reading-typography td {
    padding: 14px 18px;
    border: 1px solid var(--color-border);
    text-align: right;
}

.reading-typography th {
    background-color: var(--color-primary);
    color: #fff;
    font-weight: 700;
}

.reading-typography tr:nth-child(even) {
    background-color: var(--color-bg-light);
}

/* Post Tags Cloud */
.single-tags-section {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--color-border);
}

.tags-heading {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 1rem;
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    padding: 6px 14px;
    border-radius: 20px;
    color: var(--color-text-muted);
    font-size: 0.85rem;
    transition: var(--transition);
}

.tag-chip:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

/* Social Share Bar */
.single-share-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin: 2.5rem 0;
    padding: 18px 24px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.share-label {
    font-weight: 700;
    color: var(--color-primary);
}

.share-buttons {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    color: #fff !important;
}

.share-facebook { background-color: #1877F2; }
.share-facebook:hover { background-color: #0E5FC7; transform: translateY(-2px); }

.share-twitter { background-color: #0F1419; }
.share-twitter:hover { background-color: #272C30; transform: translateY(-2px); }

.share-whatsapp { background-color: #25D366; }
.share-whatsapp:hover { background-color: #1EBE5D; transform: translateY(-2px); }

.share-copy {
    background-color: var(--color-primary);
}
.share-copy:hover {
    background-color: var(--color-accent);
    transform: translateY(-2px);
}
.share-copy.copied {
    background-color: var(--color-accent);
}

/* Author Spotlight Card */
.author-spotlight-card {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 28px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin: 3rem 0;
}

.author-avatar-large img {
    width: 90px;
    height: 90px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-border);
}

.author-bio-content {
    flex-grow: 1;
}

.author-role {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.author-fullname {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 8px;
}

.author-description {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 12px;
}

.author-archive-link {
    font-weight: 700;
    color: var(--color-accent);
    font-size: 0.9rem;
}

.author-archive-link:hover {
    text-decoration: underline;
}

/* Prev / Next Post Navigation */
.post-prev-next-nav {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 3rem 0;
}

.nav-direction .nav-card {
    display: block;
    padding: 20px;
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
    box-sizing: border-box;
}

.nav-direction .nav-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.nav-direction .nav-label {
    display: block;
    font-size: 0.8rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 6px;
}

.nav-direction .nav-title {
    font-size: 1rem;
    color: var(--color-primary);
    margin: 0;
    line-height: 1.4;
}

/* Related Posts Section */
.related-posts-section {
    margin-top: 4.5rem;
    padding-top: 3rem;
    border-top: 2px solid var(--color-border);
}

.related-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 1.5rem;
}

.related-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-accent);
}

.related-card-img-link {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--color-bg-light);
}

.related-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.related-card:hover .related-thumb {
    transform: scale(1.05);
}

.related-thumb-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A8A 0%, #1B8A5A 100%);
}

.related-thumb-fallback img {
    max-height: 45px;
    opacity: 0.4;
}

.pdf-tag-micro {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #EF4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 4px;
}

.related-card-body {
    padding: 16px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.related-card-date {
    font-size: 0.8rem;
    color: var(--color-text-muted);
    margin-bottom: 6px;
}

.related-card-title {
    font-size: 1.05rem;
    line-height: 1.45;
    margin: 0;
}

.related-card-title a {
    color: var(--color-primary);
}

.related-card-title a:hover {
    color: var(--color-accent);
}

/* ==========================================================================
   Static Pages Layout
   ========================================================================== */
.static-page-wrapper {
    padding-bottom: 4rem;
}

.static-page-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    margin: 0 auto;
    max-width: 960px;
}

.static-page-header {
    margin-bottom: 2rem;
    text-align: right;
}

.static-page-title {
    font-size: 2.4rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    font-weight: 800;
}

.header-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--color-accent), var(--color-primary));
    border-radius: 4px;
}

.page-featured-image {
    margin-bottom: 2.5rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.page-featured-image img {
    width: 100%;
    height: auto;
    display: block;
}

.page-body {
    font-size: 1.15rem;
    line-height: 2.0;
}

/* ==========================================================================
   Archive & Category Layout
   ========================================================================== */
.archive-wrapper {
    padding-bottom: 4rem;
}

.archive-hero-header {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 100%);
    color: #fff;
    padding: 50px 0;
    margin-bottom: 3.5rem;
    position: relative;
}

.archive-hero-inner {
    text-align: right;
    max-width: 800px;
}

.archive-count-pill {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: #A7F3D0;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.archive-hero-title {
    font-size: 2.5rem;
    color: #fff;
    margin-bottom: 12px;
    font-weight: 800;
}

.archive-hero-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

/* 3-Column Articles Feed Grid */
.articles-cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.article-feed-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.article-feed-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(27, 138, 90, 0.4);
}

.card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background-color: var(--color-bg-light);
}

.card-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.card-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.article-feed-card:hover .card-thumb {
    transform: scale(1.05);
}

.card-media-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1E3A8A 0%, #1B8A5A 100%);
}

.card-media-fallback img {
    max-height: 60px;
    opacity: 0.35;
}

.card-pdf-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #EF4444;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 800;
    padding: 3px 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4);
}

.article-feed-card .card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.article-feed-card .card-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    margin-bottom: 12px;
}

.meta-dot {
    color: #CBD5E1;
}

.article-feed-card .card-title {
    font-size: 1.25rem;
    line-height: 1.45;
    margin-bottom: 12px;
    font-weight: 700;
}

.article-feed-card .card-title a {
    color: var(--color-primary);
}

.article-feed-card:hover .card-title a {
    color: var(--color-accent);
}

.article-feed-card .card-excerpt {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 20px;
    flex-grow: 1;
}

.article-feed-card .card-footer {
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
}

.card-read-link {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--color-accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.card-read-link .arrow {
    transition: transform 0.2s ease;
}

.article-feed-card:hover .card-read-link .arrow {
    transform: translateX(-4px);
}

/* Magazine Issues Grid */
.magazine-issues-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.mag-issue-card {
    background-color: var(--color-bg-white);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
}

.mag-issue-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: var(--color-accent);
}

.mag-issue-cover {
    width: 70%;
    margin: 0 auto 20px;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.16);
    transition: transform 0.4s ease;
}

.mag-issue-card:hover .mag-issue-cover {
    transform: scale(1.04) translateY(-4px);
}

.mag-cover-img {
    width: 100%;
    height: auto;
    display: block;
}

.mag-no-cover {
    height: 240px;
    background: var(--color-bg-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--color-text-muted);
    border: 1px dashed var(--color-border);
}

.mag-no-cover img {
    max-height: 50px;
    opacity: 0.3;
}

.mag-issue-info {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.mag-issue-date {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 700;
    margin-bottom: 8px;
}

.mag-issue-title {
    font-size: 1.25rem;
    line-height: 1.45;
    margin-bottom: 20px;
    flex-grow: 1;
}

.mag-issue-title a {
    color: var(--color-primary);
}

.mag-issue-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-sm {
    padding: 10px 18px !important;
    font-size: 0.88rem !important;
}

/* Modern Pagination */
.archive-pagination {
    margin-top: 4rem;
    text-align: center;
}

.archive-pagination .nav-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-bg-white);
    padding: 10px 18px;
    border-radius: 50px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.archive-pagination .page-numbers:hover {
    background-color: var(--color-accent-light);
    color: var(--color-accent);
}

.archive-pagination .page-numbers.current {
    background-color: var(--color-primary);
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(11, 36, 71, 0.3);
}

.archive-pagination .prev,
.archive-pagination .next {
    padding: 0 18px;
    background-color: var(--color-bg-light);
}

/* Empty State */
.archive-empty-state {
    text-align: center;
    padding: 80px 20px;
    background-color: var(--color-bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.archive-empty-state h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.archive-empty-state p {
    color: var(--color-text-muted);
    font-size: 1rem;
    margin-bottom: 24px;
}

/* ==========================================================================
   Responsive Adaptations for Inner Pages
   ========================================================================== */
@media (max-width: 992px) {
    .articles-cards-grid,
    .magazine-issues-grid,
    .related-cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .single-post-title {
        font-size: 2rem;
    }
    
    .pdf-spotlight-inner {
        flex-direction: column;
        text-align: center;
    }
    
    .pdf-cover-frame {
        width: 140px;
    }
    
    .pdf-action-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .articles-cards-grid,
    .magazine-issues-grid,
    .related-cards-grid {
        grid-template-columns: 1fr;
    }
    
    .static-page-card {
        padding: 24px 18px;
    }
    
    .single-post-title {
        font-size: 1.6rem;
    }
    
    .author-spotlight-card {
        flex-direction: column;
        text-align: center;
    }
    
    .post-prev-next-nav {
        grid-template-columns: 1fr;
    }
    
    .single-share-bar {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .reading-typography {
        font-size: 1.08rem;
    }
}

/* ==========================================================================
   Footer Branding & Institutional Partners
   ========================================================================== */
.footer-branding-section {
    padding: 10px 0 40px 0;
}

.footer-branding-card {
    background: #ffffff;
    border-radius: var(--radius-lg);
    padding: 36px 30px 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
}

.footer-main-logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-main-logo-wrap img.footer-main-logo {
    max-height: 85px;
    width: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.12));
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-main-logo-wrap a:hover img {
    transform: scale(1.06);
}

.footer-partners-list {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 36px;
    width: 100%;
    padding-top: 24px;
    border-top: 1px solid var(--color-border);
}

.partner-item {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    background: #F8FAFC;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.partner-item:hover {
    transform: translateY(-4px);
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: var(--color-accent);
}

.partner-item img {
    max-height: 65px;
    max-width: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

.partner-item img.partner-wide {
    max-width: 160px;
}

@media (max-width: 768px) {
    .footer-branding-card {
        padding: 24px 16px;
    }
    
    .footer-partners-list {
        gap: 16px;
    }
    
    .partner-item {
        padding: 8px 12px;
    }
    
    .partner-item img {
        max-height: 50px;
        max-width: 90px;
    }
    
    .partner-item img.partner-wide {
        max-width: 120px;
    }
}
