/* Custom CSS for Riyad Al-Turath Website - Matching Uploaded Design */

:root {
    --primary-cream: #f4f1e8;
    --secondary-cream: #e8dcc7;
    --brown-primary: #135f7a;
    --brown-secondary: #4a8b8b;
    --brown-dark: #204d5d;
    --burgundy-accent: #204d5d;
    --burgundy-light: #135f7a;
    --teal-primary: #4a8b8b;
    --teal-secondary: #357a7a;
    --gold-accent: #357a7a;
    --gold-light: #d4af37;
    --text-dark: #2c1810;
    --text-medium: #135f7a;
    --text-light: #8b7355;
    --bg-pattern: #f9f7f1;
    --bg-gradient: linear-gradient(135deg, #f9f7f1 0%, #f4f1e8 50%, #e8dcc7 100%);
    --border-decorative: #d4c4a8;
    --shadow-light: rgba(139, 111, 71, 0.15);
    --shadow-medium: rgba(139, 111, 71, 0.25);
    --shadow-heavy: rgba(139, 111, 71, 0.4);
    --shadow-burgundy: rgba(131, 61, 37, 0.2);
    --border-radius: 12px;
    --border-radius-lg: 20px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.2s ease;
    --hover-scale: 1.05;
    --hover-lift: -8px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    --primary-cream: #1a1f2e;
    --secondary-cream: #242b3d;
    --brown-primary: #4a9fb8;
    --brown-secondary: #5fb0c9;
    --brown-dark: linear-gradient(135deg, #1a2332 0%, #243447 100%);
    --burgundy-accent: #5fb0c9;
    --burgundy-light: #4a9fb8;
    --teal-primary: #5fb0c9;
    --teal-secondary: #6ac5da;
    --gold-accent: #ffd700;
    --gold-light: #ffed4e;
    --text-dark: #e8e6e3;
    --text-medium: #b8c5d0;
    --text-light: #99a8b5;
    --bg-pattern: #151a27;
    --bg-gradient: linear-gradient(135deg, #151a27 0%, #1a1f2e 50%, #242b3d 100%);
    --border-decorative: #3a4556;
    --shadow-light: rgba(0, 0, 0, 0.3);
    --shadow-medium: rgba(0, 0, 0, 0.4);
    --shadow-heavy: rgba(0, 0, 0, 0.6);
    --shadow-burgundy: rgba(0, 0, 0, 0.35);
}

/* Dark Mode Smooth Transition */
body,
.header-section,
.search-section,
.sections-overview,
.about-section,
.authors-section,
.publications-section,
.statistics-section,
.contact-section,
.footer,
.section-card,
.author-card,
.publication-card,
.stat-card,
.contact-item,
.search-box-wrapper,
.search-categories,
.mobile-navbar {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Dark Mode Toggle Button */
.theme-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--brown-primary);
    border: 2px solid var(--gold-accent);
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: 0 6px 20px var(--shadow-heavy);
    background: var(--gold-accent);
    color: var(--brown-primary);
}

/* Language Toggle Button */
.lang-toggle {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--burgundy-accent);
    border: 2px solid var(--gold-accent);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px var(--shadow-heavy);
    background: var(--burgundy-light);
}

.lang-toggle:active {
    transform: scale(0.95);
}

.lang-text {
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.5px;
}

@keyframes langSwitch {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-5deg); }
    75% { transform: translateY(3px) rotate(5deg); }
}

.lang-toggle.switching {
    animation: langSwitch 0.4s ease;
}

html[dir="rtl"], html[dir="ltr"] {
    transition: direction 0.3s ease;
}

/* LTR Adjustments for English */
html[dir="ltr"] body {
    font-family: 'Georgia', 'Times New Roman', serif;
}

html[dir="ltr"] h1, html[dir="ltr"] h2, html[dir="ltr"] h3,
html[dir="ltr"] h4, html[dir="ltr"] h5, html[dir="ltr"] h6 {
    font-family: 'Helvetica Neue', 'Arial', sans-serif;
}

html[dir="ltr"] .header-nav {
    flex-direction: row;
}

html[dir="ltr"] .theme-toggle {
    left: auto;
    right: 20px;
}

html[dir="ltr"] .lang-toggle {
    left: auto;
    right: 20px;
}

html[dir="ltr"] .mobile-navbar {
    text-align: left;
}

html[dir="ltr"] .header-logo-left {
    order: 2;
}

html[dir="ltr"] .text-start {
    text-align: left !important;
}

html[dir="ltr"] .text-end {
    text-align: right !important;
}

.theme-toggle i {
    transition: transform 0.3s ease;
}

.theme-toggle:active {
    transform: scale(0.95);
}

/* Language Toggle Button */
.lang-toggle {
    position: fixed;
    top: 80px;
    left: 20px;
    z-index: 9999;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--burgundy-accent);
    border: 2px solid var(--gold-accent);
    color: white;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px var(--shadow-medium);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.lang-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 6px 20px var(--shadow-heavy);
    background: var(--burgundy-light);
}

.lang-toggle:active {
    transform: scale(0.95);
}

.lang-text {
    font-family: 'Cairo', sans-serif;
    letter-spacing: 0.5px;
}

/* Animation for language switch */
@keyframes langSwitch {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-3px) rotate(-5deg); }
    75% { transform: translateY(3px) rotate(5deg); }
}

.lang-toggle.switching {
    animation: langSwitch 0.4s ease;
}

/* Dark Mode Specific Adjustments */
[data-theme="dark"] .header-bg {
    opacity: 0.1;
    filter: brightness(0.5);
}

[data-theme="dark"] .card-image,
[data-theme="dark"] .about-image img {
    filter: brightness(0.9) contrast(1.1);
}

[data-theme="dark"] .search-dropdown-menu,
[data-theme="dark"] .dropdown-menu {
    background: #2a3142;
    border-color: var(--border-decorative);
}

[data-theme="dark"] .search-dropdown-menu .dropdown-item,
[data-theme="dark"] .dropdown-menu .dropdown-item {
    color: var(--text-dark);
}

[data-theme="dark"] .search-dropdown-menu .dropdown-item:hover,
[data-theme="dark"] .dropdown-menu .dropdown-item:hover {
    background: var(--brown-primary);
    color: white;
}

[data-theme="dark"] .main-search-input,
[data-theme="dark"] .search-input,
[data-theme="dark"] .contact-form .form-control {
    background: #2a3142;
    color: var(--text-dark);
    border-color: var(--border-decorative);
}

[data-theme="dark"] .main-search-input::placeholder,
[data-theme="dark"] .search-input::placeholder,
[data-theme="dark"] .contact-form .form-control::placeholder {
    color: var(--text-light);
}

[data-theme="dark"] .overlay-l,
[data-theme="dark"] .overlay-r,
[data-theme="dark"] .overlay-contact {
    filter: brightness(0.6) opacity(0.3);
}

[data-theme="dark"] .mobile-navbar {
    background: #1a1f2e;
}

[data-theme="dark"] .hamburger-line {
    background: var(--text-dark);
}

[data-theme="dark"] .back-to-top {
    background: var(--brown-primary);
    border: 2px solid var(--gold-accent);
}

[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1f2e;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--brown-primary);
}

/* Ensure text remains readable */
[data-theme="dark"] .card-title,
[data-theme="dark"] .section-title,
[data-theme="dark"] .author-name,
[data-theme="dark"] .publication-title {
    color: var(--gold-accent);
}

/* Mobile Responsive for Theme Toggle */
@media (max-width: 768px) {
    .theme-toggle {
        width: 45px;
        height: 45px;
        top: 140px;
        left: 20px;
        font-size: 1.1rem;
    }
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

h1, h2, h3, h4, h5, h6 {

    font-weight: 700;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--brown-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--brown-secondary);
}

/* Header Section Styles */
.header-section {
       background: var(--secondary-cream);
    position: relative;
    overflow: hidden;
    border-bottom: 3px dotted #fff;
}
.dropdown-toggle{border: none;}
.header-bg {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: url('/image/bg.jpg') center/contain;
    opacity: 0.3;
    z-index: 1;
}

.header-bg::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: rgba(244, 241, 232, 0.5);
    z-index: 2;
}

.header-content {
    position: relative;
    z-index: 3;
    align-items: center;
}

/* Logo Sections */
.header-logo-left,
.header-logo-right {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.logo-right {
    width: 110px;
    height: auto;
    filter: drop-shadow(2px 2px 4px var(--shadow-light));
}
.logo-left
{
    width: 140px;
    height: auto;
    filter: drop-shadow(2px 2px 4px var(--shadow-light));
}
.logo-text-left,
.logo-text-right {

    text-align: center;
}

.logo-subtitle-left,
.logo-subtitle-right {
    font-size: 1.1rem;
    color: var(--brown-primary);
    font-weight: 600;
    margin: 0;
    line-height: 1.3;
}

.logo-description-left {
    font-size: 0.9rem;
    color: var(--text-medium);
    margin: 0;
    line-height: 1.2;
}

/* Center Header Content */
.header-center {
    text-align: center;
}

.main-title {
    font-size: 3.5rem;
    color: var(--brown-dark);
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px var(--shadow-light);
    line-height: 1.2;
}

.main-subtitle {

    font-size: 1.4rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
    font-weight: 500;
}

/* Header Navigation */
.header-nav {
    display: flex;
    justify-content: center;
    gap: 0;
    background: var(--brown-primary);
    padding: 0.5rem;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.nav-item {
    margin: 0 5px;
    background: transparent;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
    border-radius: calc(var(--border-radius) - 2px);
    white-space: nowrap;
}

.nav-item:hover,
.nav-item.active {
    background: var(--secondary-cream);
    color: var(--brown-dark);
    transform: translateY(-1px);
}
.dropdown:hover{background: var(--secondary-cream);
    color: var(--brown-dark);border-radius: 10px;}
/* Search Section */
.search-section {
    background: var(--secondary-cream);
    padding: 7rem 0;
    /* border-top: 3px solid var(--border-decorative); */
    border-top: 3px dotted #fff;
    border-bottom: 3px solid var(--border-decorative);
}

.search-box-wrapper {
    border: 1px solid var(--brown-primary);
    display: flex;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 5px 20px var(--shadow-medium);
    backdrop-filter: blur(10px);
    overflow: visible;
    position: relative;
    z-index: 9;
}

.main-search-input {
    flex: 1;
    border: none;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    background: transparent;
    outline: none;
    color: var(--text-dark);
    border-right: none;
}

.search-input-container {
    flex: 1;
    display: flex;
    position: relative;
}

.search-dropdown {
position: relative;
    border-top-right-radius: 10px;
    background: var(--brown-primary);
    border-bottom-right-radius: 10px;
}

.search-dropdown-toggle {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-dark);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: 'Cairo', sans-serif;
    font-size: 0.95rem;
    min-width: 120px;
    justify-content: space-between;
}
.search-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.search-dropdown-toggle .dropdown-text {
color:#f0f0f0}

.search-dropdown-toggle i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
    color: #f0f0f0;
}
.overlay-l,.overlay-r,.overlay-contact{
    position: absolute;
    width: 170px;
    height: 100%;
    top: 32px;
    margin-top: 0;
    z-index: 10;
   background-image: url('/image/islamic-bg.png');
    background-repeat: no-repeat;
    background-position: center;

}
    .overlay-contact{
        background-image: url('../image/bgtitle.png');
        z-index: 0;
        width: 100%;
        transform: scale(1.5);
        filter: opacity(0.5);
        height: 18%;
    }
    .overlay-l{left: 0;transform: rotate(180deg);}
.search-dropdown-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.search-dropdown-menu {
    border: 1px solid var(--border-decorative);
    border-radius: var(--border-radius);
    box-shadow: 0 8px 25px var(--shadow-medium);
    background: white;
    font-family: 'Cairo', sans-serif;
    min-width: 180px;
    z-index: 1000;
}

.search-dropdown-menu .dropdown-item {
    padding: 0.75rem 1rem;
    color: var(--text-dark);
    transition: var(--transition-fast);
    border: none;
    font-size: 0.95rem;
}

.search-dropdown-menu .dropdown-item:hover {
    background: var(--primary-cream);
    color: var(--brown-primary);
    transform: translateX(5px);
}

.search-dropdown-menu .dropdown-item:active {
    background: var(--secondary-cream);
}

.main-search-btn {
    background: var(--brown-primary);
    border: none;
    padding: 1rem 2rem;
    color: white;
    position: relative;
    border-bottom-left-radius: 10px;
    border-top-left-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.main-search-btn:hover {
    background: var(--brown-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--shadow-medium);
}

/* Hero Content Section */
.hero-content {
    background: var(--bg-pattern);
    padding: 3rem 0;
}

/* Advanced Search Categories */
.advanced-search-container {
    margin-top: 2rem;
}

.search-title {
    text-align: center;
}

.category-title {
    color: var(--primary-brown);
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.category-subtitle {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 0;
}

.search-categories {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: 0 5px 25px var(--shadow-light);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.search-category-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--primary-cream);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.search-category-item:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

.category-dot {
    width: 12px;
    height: 12px;
    min-width: 12px;
    border-radius: 50%;
    background: var(--brown-primary);
    box-shadow: 0 0 0 3px rgba(90, 62, 43, 0.15);
    transition: var(--transition);
}

.search-category-item span {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.95rem;
}
.category-grid .active span{
    color: #fff !important;
}
/* Search Category Interactions */
.search-category-item.active {
    background: var(--brown-primary);
    color: var(--gold-accent);
    transform: scale(1.05);
    box-shadow: 0 8px 25px var(--shadow-heavy);
}

.search-category-item.active .category-dot {
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

.search-category-item.pulse {
    animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Search Input Shake Animation */
.main-search-input.shake {
    animation: shake 0.6s ease-in-out;
    border-color: #dc3545;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* Mobile Navigation */
.mobile-navbar {
    background: var(--brown-primary);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.mobile-nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo-img {
    height: 40px;
    width: auto;
}

.mobile-toggle {
    background: none;
    border: none;
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    transition: var(--transition);
}

.mobile-nav-links {
    list-style: none;
    padding: 1rem 0 0;
    margin: 0;
}

.mobile-nav-link {
    display: block;
    padding: 0.75rem 0;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    color: var(--gold-accent);
    padding-right: 1rem;
}

/* Mobile Dropdown Styles */
.mobile-nav-links .dropdown {
    position: relative;
}

.mobile-nav-links .dropdown-toggle {
    background: none;
    border: none;
    text-align: right;
    width: 100%;
    font-size: inherit;
    font-family: inherit;
}

.mobile-dropdown {
    background: var(--brown-secondary);
    border: none;
    border-radius: 0;
    margin-top: 0;
    position: static !important;
    transform: none !important;
    width: 100% !important;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.mobile-dropdown .dropdown-item {
    color: white;
    padding: 0.5rem 1.5rem;
    font-size: 0.9rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.mobile-dropdown .dropdown-item:hover {
    background: rgba(255,255,255,0.1);
    color: var(--gold-accent);
}

.mobile-dropdown .dropdown-item:last-child {
    border-bottom: none;
}

/* Search Container */
.search-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-wrapper {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-medium);
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.search-wrapper:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px var(--shadow-medium);
}

.search-category-dropdown {
    flex: 0 0 250px;
    min-width: 200px;
}

.search-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-weight: 500;
    background-color: #f8f9fa;
    transition: var(--transition);
}

.search-select:focus {
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 111, 71, 0.25);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    min-width: 300px;
}

.search-input {
    border: 2px solid #e9ecef;
    border-left: none;
    border-radius: 8px 0 0 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.search-input:focus {
    border-color: var(--brown-primary);
    box-shadow: none;
}

.search-btn {
    background: var(--brown-primary);
    border: 2px solid var(--brown-primary);
    border-radius: 0 8px 8px 0;
    color: white;
}

.section-title {

    font-size: 2.5rem;
    color: var(--brown-dark);
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--brown-primary), var(--gold-accent));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

/* Section Cards */
.section-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-top: 4px solid var(--brown-primary);
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(139, 111, 71, 0.05) 0%,
        rgba(244, 241, 232, 0.1) 100%);
    z-index: 1;
    opacity: 0;
    transition: var(--transition);
}

.section-card:hover::before {
    opacity: 1;
}

.section-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px var(--shadow-medium);
    border-top-color: var(--gold-accent);
}

.card-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--brown-primary), var(--brown-secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition);
    position: relative;
    z-index: 2;
}

.section-card:hover .card-icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, var(--gold-accent), var(--brown-secondary));
}

.card-icon i {
    font-size: 2rem;
    color: white;
}

.card-title {

    font-size: 1.4rem;
    color: var(--brown-dark);
    margin-bottom: 1rem;
    font-weight: 600;
    position: relative;
    z-index: 2;
}

.card-description {
    color: var(--text-medium);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    position: relative;
    z-index: 2;
}

.card-stats {
    padding-top: 1rem;
    border-top: 1px solid var(--border-decorative);
    position: relative;
    z-index: 2;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brown-primary);
    display: block;
}

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

/* About Section */
.about-section {
    background: white;
    padding: 4rem 0;
    border-top: 1px solid var(--border-decorative);
}

.about-text {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-medium);
}

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

.about-image img {
    filter: grayscale(47);
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 8px 25px var(--shadow-light);
    opacity: 0.8;
}

.about-image img:hover {
    transform: scale(1.02);
}

/* Authors Section */
.authors-section {
    background: var(--bg-pattern);
    padding: 4rem 0;
}

.authors-filter {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.filter-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: white;
    border: 2px solid var(--border-decorative);
    color: var(--text-dark);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--brown-primary);
    border-color: var(--brown-primary);
    color: white;
    transform: translateY(-1px);
}

.search-authors {
    flex: 0 0 300px;
    min-width: 250px;
}

.search-authors input {
    border-radius: 25px;
    border: 2px solid var(--border-decorative);
    padding: 0.6rem 1.2rem;
    background: white;
    transition: var(--transition);
}

.search-authors input:focus {
    border-color: var(--brown-primary);
    box-shadow: 0 0 0 0.2rem rgba(139, 111, 71, 0.25);
    outline: none;
}

/* Author Cards */
.author-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: 0 3px 15px var(--shadow-light);
    transition: var(--transition);
    height: 100%;
    border-right: 4px solid var(--brown-primary);
    position: relative;
    overflow: hidden;
}

.author-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(139, 111, 71, 0.1) 50%,
        transparent 100%);
    transition: var(--transition);
}

.author-card:hover::before {
    right: 100%;
}

.author-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px var(--shadow-medium);
    border-right-color: var(--gold-accent);
}

.author-name {

    font-size: 1.2rem;
    font-weight: 600;
    color: var(--brown-dark);
    margin-bottom: 0.5rem;
}

.author-period {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.author-books {
    background: var(--primary-cream);
    padding: 0.4rem 0.8rem;
    border-radius: 15px;
    font-size: 0.9rem;
    color: var(--brown-primary);
    font-weight: 500;
    display: inline-block;
}

.author-specialty {
    color: var(--text-medium);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 0.5rem;
    background: var(--secondary-cream);
    padding: 0.3rem 0.6rem;
    border-radius: 12px;
    display: inline-block;
}

/* Footer */
.footer {
    background: var(--brown-dark);
    color: var(--secondary-cream);
    padding: 2rem 0 0;
    text-align: center;
    border-top: 3px solid var(--gold-accent);
}
.footer-links h5{
    margin-bottom: 1.1rem;
}
.footer-links li,.footer-links a{
    list-style: none;
    text-decoration: none;
    color: var(--secondary-cream);
}
.footer-links a:hover{
    color: var(--gold-accent);
    text-decoration: underline;
    transition: all 0.3s ease;
}
.footer-links li{
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}
.department::before{
   content: '';
    background:linear-gradient(313deg, #ffffff, transparent);
    position: absolute;
    padding: 0 5px;
    border-radius: 5px;
    width: 100%;
    height: 3px;
    bottom: -3px;
}
.f-logo{
    filter: invert(1) !important;
}
.footer-text {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--secondary-cream);
    line-height: 1.6;
}

.footer-contact {
    font-size: 0.9rem;
    color: rgba(244, 241, 232, 0.8);
}

.contact-separator {
    margin: 0 1rem;
    color: var(--gold-accent);
    font-weight: 600;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    background: var(--brown-primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    box-shadow: 0 4px 15px var(--shadow-medium);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--gold-accent);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px var(--shadow-medium);
}

/* Contact Section Styles */
.contact-section {
    background: linear-gradient(135deg, var(--primary-cream) 0%, var(--secondary-cream) 100%);
    position: relative;
    overflow: hidden;
}


.contact-section .container {
    position: relative;
    z-index: 2;
}

.section-subtitle {
    color: var(--text-medium);
    font-size: 1.1rem;
    margin-bottom: 0;
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Information */
.contact-info {
    padding: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.9rem;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px var(--shadow-light);
    transition: var(--transition);
}

.contact-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px var(--shadow-medium);
}

.contact-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--brown-primary), var(--burgundy-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1.5rem;
}

.contact-icon i {
    font-size: 1.5rem;
    color: white;
}

.contact-details h4 {
    color: var(--brown-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contact-details p {
    color: var(--text-medium);
    margin: 0;
    line-height: 1.6;
}

/* Contact Form */
.contact-form-container {
    padding: 1rem;
}

.contact-form-card {
    background: white;
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 40px var(--shadow-medium);
    margin-bottom: 2rem;
}

.form-title {
    color: var(--brown-primary);
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.form-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: var(--gold-accent);
    border-radius: 2px;
}

.form-group {
    margin-bottom: 1.5rem;
}

.contact-form .form-control {
    border: 2px solid #f0f0f0;
    border-radius: var(--border-radius);
    padding: 1rem 1.2rem;
    font-size: 1rem;
    background: #fafafa;
    transition: var(--transition);
    font-family: 'Cairo', sans-serif;
}

.contact-form .form-control:focus {
    border-color: var(--brown-primary);
    background: white;
    box-shadow: 0 0 0 0.2rem rgba(131, 61, 37, 0.25);
}

.contact-form .form-control::placeholder {
    color: #999;
    font-weight: 400;
}

.btn-send-message {
    width: 100%;
    background: linear-gradient(135deg, var(--brown-primary), var(--burgundy-light));
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: var(--transition);
    cursor: pointer;
}

.btn-send-message:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-burgundy);
    background: linear-gradient(135deg, var(--burgundy-light), var(--brown-primary));
}

.btn-send-message:active {
    transform: translateY(0);
}

/* Social Media Section */
.social-media-section {
    background: linear-gradient(135deg, var(--brown-primary), var(--burgundy-light));
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    text-align: center;
}

.social-title {
    color: white;
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--border-radius);
    color: white;
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
    font-size: 0.9rem;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    color: white;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.social-link i {
    font-size: 1.2rem;
}

/* Social Media Colors */
.social-link.facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
}

.social-link.twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
}

.social-link.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    border-color: #e6683c;
}

.social-link.youtube:hover {
    background: #ff0000;
    border-color: #ff0000;
}

.social-link.telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
}

.social-link.linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
}

/* Enhanced About Swiper (4 items) */
.about-swiper {padding:5px 5px 72px;}
.about-swiper-wrapper {--about-gap:26px;}
.about-swiper .swiper-wrapper {align-items:stretch;}
.about-slide-card {display:flex; flex-direction:column; height:100%; border:1px solid rgba(193,150,83,.35); background:linear-gradient(145deg,#fff 0%,#fffdf9 40%,#f9f4ec 100%); box-shadow:0 4px 14px rgba(131,61,37,0.08);}
.about-slide-card::after {content:""; position:absolute; inset:0; background:repeating-linear-gradient(135deg,rgba(193,150,83,.07) 0 2px,transparent 2px 8px); opacity:0; mix-blend-mode:multiply; transition:opacity .6s; pointer-events:none;}
.about-slide-card:hover::after {opacity:.5;}
.about-slide-media {aspect-ratio:4/5;}
.about-slide-media img {object-fit:cover; filter:saturate(90%) contrast(105%);}
.about-slide-card:hover .about-slide-media img {filter:saturate(110%) contrast(108%) brightness(1.03);}
.about-slide-body {padding:1rem 1rem 1.25rem;}
.about-slide-title {font-size:.95rem; line-height:1.55; min-height:3.1em;}
.about-slide-text {font-size:.72rem; line-height:1.7; max-height:6.3em; overflow:hidden; mask-image:linear-gradient(#000 80%,transparent);}
.about-badge-date {font-size:.62rem; padding:.4rem .65rem; box-shadow:0 2px 8px rgba(0,0,0,.15);}
/* Skeleton */
.about-skeleton-group {display:grid; grid-template-columns:repeat(auto-fill,minmax(230px,1fr)); gap:var(--about-gap); width:100%;}
.about-skeleton {height:330px; border-radius:22px; background:linear-gradient(110deg,#ece7de 8%,#f6f2ec 18%,#ece7de 33%); background-size:200% 100%; animation:about-shimmer 1.4s linear infinite; position:relative; overflow:hidden;}
@keyframes about-shimmer {to {background-position: -200% 0;}}
/* Pagination refined */
.about-swiper-pagination .swiper-pagination-bullet {width:12px;height:12px; background:#cab79c; margin:0 5px !important; opacity:.5;}
.about-swiper-pagination .swiper-pagination-bullet-active {background:linear-gradient(135deg,var(--brown-primary),var(--gold-accent)); opacity:1;}
/* Nav refined */
.about-swiper-nav {top:42%; background:rgba(255,255,255,.92);}
.about-swiper-nav:focus {outline:3px solid var(--gold-accent);}
/* 4 items layout breakpoints */
@media (min-width:1400px){.about-swiper {padding-left:25px; padding-right:25px;}}
@media (min-width:1200px){.about-swiper .swiper-slide {width:calc(25% - var(--about-gap));}}
@media (max-width:1199.98px){.about-slide-title{font-size:.92rem;} .about-slide-text{font-size:.7rem;}}
@media (max-width:992px){.about-slide-title{font-size:1rem;} .about-slide-text{font-size:.76rem;} .about-swiper-nav{display:none;}}
@media (max-width:768px){.about-slide-title{font-size:.95rem;} .about-slide-text{font-size:.74rem;}}
@media (max-width:576px){.about-slide-title{font-size:.9rem;} .about-slide-text{font-size:.72rem;}}

/* Publications Section - Professional Design */
.publications-section {
    background: linear-gradient(135deg, var(--bg-pattern) 0%, #fefdfb 50%, var(--primary-cream) 100%);
    position: relative;
    overflow: hidden;
}

.publications-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 80%, rgba(193,150,83,0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(131,61,37,0.05) 0%, transparent 50%);
    pointer-events: none;
}

.publications-slider-wrapper {
    position: relative;
    z-index: 2;
}

/* Loading State */
.slider-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    box-shadow: 0 10px 30px var(--shadow-light);
    backdrop-filter: blur(10px);
}

.loading-spinner i {
    font-size: 2rem;
    color: var(--brown-primary);
    margin-bottom: 1rem;
    display: block;
}

.loading-spinner span {
    color: var(--text-medium);
    font-weight: 500;
}

/* Main Slider */
.publications-swiper {
    padding: 20px 60px 80px;
    overflow: visible;
    height: 500px;
}

.publications-swiper .swiper-slide {
    height: 400px;
    background: transparent;
}

/* Publication Card */
.publication-card {
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow:
        0 8px 32px rgba(131,61,37,0.12),
        0 2px 8px rgba(0,0,0,0.04);
    transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    height: 400px;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(193,150,83,0.2);
}

.publication-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(193,150,83,0.05) 100%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.publication-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(131,61,37,0.2),
        0 8px 25px rgba(0,0,0,0.1);
}

.publication-card:hover::before {
    opacity: 1;
}

/* Card Header */
.card-header {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/4;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
    filter: contrast(1.05) saturate(0.95);
}

.publication-card:hover .card-image {
    transform: scale(1.08);
    filter: contrast(1.1) saturate(1.05);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0) 0%,
        rgba(0,0,0,0.1) 40%,
        rgba(0,0,0,0.7) 100%
    );
    opacity: 0;
    transition: opacity 0.4s ease;
}

.publication-card:hover .card-overlay {
    opacity: 1;
}

.publication-date {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, var(--brown-primary), var(--gold-accent));
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 2;
}

.card-status {
    position: absolute;
    bottom: 15px;
    left: 15px;
    background: rgba(255,255,255,0.95);
    color: var(--brown-primary);
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease;
}

.publication-card:hover .card-status {
    opacity: 1;
    transform: translateY(0);
}

/* Card Body */
.card-body {
    padding: 24px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

.publication-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--brown-primary);
    line-height: 1.4;
    margin-bottom: 12px;
    min-height: 2.8em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.publication-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-accent), transparent);
    border-radius: 2px;
}

.publication-description {
    color: var(--text-medium);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 16px;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.publication-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 16px;
    border-top: 1px solid var(--border-decorative);
    margin-top: auto;
}

.publication-author {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: 500;
}

.publication-pages {
    font-size: 0.75rem;
    color: var(--brown-primary);
    background: var(--primary-cream);
    padding: 4px 10px;
    border-radius: 12px;
    font-weight: 600;
}

/* Action Buttons */
.card-actions {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.publication-card:hover .card-actions {
    opacity: 1;
    transform: translateY(0);
}

.btn-action {
    background: var(--brown-primary);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    width: 100%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-action:hover {
    background: var(--gold-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(193,150,83,0.4);
}

/* Navigation */
.swiper-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(193,150,83,0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--brown-primary);
    cursor: pointer;
    transition: all 0.4s ease;
    z-index: 10;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.swiper-nav:hover {
    background: var(--brown-primary);
    color: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 8px 30px rgba(131,61,37,0.3);
}

.swiper-nav-prev {
    right: 10px;
}

.swiper-nav-next {
    left: 10px;
}

/* Pagination */
.publications-pagination {
    position: absolute;
    bottom: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.publications-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(193,150,83,0.4);
    opacity: 1;
    transition: all 0.4s ease;
    cursor: pointer;
}

.publications-pagination .swiper-pagination-bullet-active {
    background: var(--brown-primary);
    transform: scale(1.3);
    box-shadow: 0 0 0 4px rgba(131,61,37,0.2);
}

/* Progress Bar */
.swiper-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: rgba(193,150,83,0.2);
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--brown-primary), var(--gold-accent));
    width: 0;
    transition: width 0.3s ease;
}

/* Statistics */
.publications-stats {
    background: rgba(255,255,255,0.8);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(193, 150, 83, 0.2);
    box-shadow: 0 8px 32px rgba(131,61,37,0.1);
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-item i {
    font-size: 2rem;
    color: var(--brown-primary);
    margin-bottom: 0.5rem;
    display: block;
}

.stat-number {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--brown-primary);
    display: block;
    margin-bottom: 0.25rem;
}

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

/* Statistics Section Styles */
.statistics-section {
    background: var(--bg-gradient);
    position: relative;
    overflow: visible;
}

.statistics-section::before {
    display: none;
}

.overlay-stats-bottom {
    position: absolute;
    bottom: 11px;
    left: 50%;
    transform: translateX(-50%) scale(1.5) scaleY(-1);
    background-image: url(/image/bgtitle.png);
    background-repeat: no-repeat;
    background-position: center;
    z-index: 1;
    width: 100%;
    filter: opacity(0.5);
    height: 43%;
    pointer-events: none;
}

.stats-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-cream) 0%, var(--secondary-cream) 100%);
    z-index: 2;
}

.statistics-section .container {
    position: relative;
    z-index: 3;
}

.stat-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid rgba(53, 122, 122, 0.2);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 4px 16px rgba(53, 122, 122, 0.15);
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--gold-accent), var(--teal-primary), var(--brown-primary));
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.stat-card:hover::before {
    transform: translateX(0);
}

.stat-card:hover {
    transform: translateY(var(--hover-lift)) scale(1.02);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.15),
        0 8px 25px rgba(53, 122, 122, 0.25);
    border-color: var(--gold-accent);
}

.stat-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--teal-primary), var(--brown-primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    position: relative;
    transition: var(--transition);
    box-shadow: 0 8px 25px rgba(53, 122, 122, 0.3);
}

.stat-icon::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: linear-gradient(45deg, var(--gold-accent), transparent, var(--teal-primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover .stat-icon::after {
    opacity: 1;
}


.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--brown-primary);
    margin-bottom: 0.5rem;
    font-family: 'Amiri', serif;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.stat-card:hover .stat-number {
    color: var(--gold-accent);
    transform: scale(1.05);
}

.stat-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.stat-card:hover .stat-label {
    color: var(--brown-primary);
}

.stat-progress {
    width: 100%;
    height: 4px;
    background: rgba(53, 122, 122, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 1rem;
}

.stat-progress .progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--teal-primary), var(--gold-accent));
    border-radius: 2px;
    width: 0;
    transition: width 2s ease-in-out;
    position: relative;
}

.stat-progress .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

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

.stat-decoration {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    overflow: hidden;
}

.decoration-line {
    position: absolute;
    bottom: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, var(--gold-accent), var(--teal-primary));
    transition: left 0.6s ease;
}

.stat-card:hover .decoration-line {
    left: 0;
}

.stats-additional-info {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius);
    padding: 1rem 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Counter Animation */
.stat-number.counting {
    animation: pulse 0.1s ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .stat-card {
        padding: 1.5rem;
        min-height: 240px;
        margin-bottom: 1rem;
    }

    .stat-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .statistics-section {
        padding: 3rem 0;
    }

    .stat-card {
        padding: 1rem;
        min-height: 200px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Responsive Design */
@media (max-width: 992px) {
    .header-section {
        padding: 1.5rem 0;
        min-height: auto;
    }

    .header-content {
        min-height: auto;
        gap: 2rem;
    }

    .main-title {
        font-size: 2.5rem;
    }

    .main-subtitle {
        font-size: 1.2rem;
    }

    .header-nav {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .nav-item {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }

    .logo-left,
    .logo-right {
        width: 60px;
    }

    .category-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .authors-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-buttons {
        justify-content: center;
    }

    .about-stats {
        justify-content: center;
        gap: 1rem;
    }
}

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

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }

    .header-logo-left,
    .header-logo-right {
        justify-content: center;
        order: 2;
    }

    .header-center {
        order: 1;
    }

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

    .main-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }

    .header-nav {
        flex-direction: column;
        gap: 0;
        padding: 0.25rem;
    }

    .nav-item {
        padding: 0.7rem 1rem;
        border-radius: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .search-section {
        padding: 1.5rem 0;
    }

    .search-box-wrapper {
        margin: 0 1rem;
    }

    .main-search-input {
        padding: 0.8rem 1rem;
        font-size: 1rem;
    }

    .main-search-btn {
        padding: 0.8rem 1.5rem;
        font-size: 0.9rem;
    }

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

    .category-grid {
        grid-template-columns: 1fr;
        gap: 0.8rem;
    }

    .search-category-item {
        padding: 0.8rem;
    }

    .category-dot {
        width: 10px;
        height: 10px;
        min-width: 10px;
    }

    .search-category-item span {
        font-size: 0.9rem;
    }
}

/* Mobile Responsive for Search Dropdown */
@media (max-width: 768px) {
    .search-box-wrapper {
        flex-direction: column;
        max-width: 100%;
        margin: 0 1rem;
    }

    .search-input-container {
        flex-direction: column;
        border-bottom: 1px solid var(--border-decorative);
    }

    .search-dropdown {
        border-right: none;
        border-bottom: 1px solid var(--border-decorative);
    }

    .search-dropdown-toggle {
        justify-content: center;
        min-width: unset;
        padding: 0.75rem 1rem;
        text-align: center;
    }

    .main-search-input {
        border-right: none;
        text-align: center;
        padding: 0.75rem 1rem;
    }

    .main-search-btn {
        padding: 0.75rem 1.5rem;
        border-radius: 0;
    }

    .search-dropdown-menu {
        min-width: 100%;
        left: 0 !important;
        right: 0;
        transform: none !important;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .search-box-wrapper {
        margin: 0 0.5rem;
    }

    .search-dropdown-toggle {
        font-size: 0.9rem;
        padding: 0.6rem 0.75rem;
    }

    .main-search-input {
        font-size: 1rem;
        padding: 0.6rem 0.75rem;
    }

    .main-search-btn {
        padding: 0.6rem 1rem;
        font-size: 0.9rem;
    }
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* Loading Animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

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

.shimmer {
    animation: shimmer 1.5s infinite;
}

/* Text Selection */
::selection {
    background: var(--brown-primary);
    color: white;
}

::-moz-selection {
    background: var(--brown-primary);
    color: white;
}

/* Focus Styles for Accessibility */
button:focus,
input:focus,
select:focus,
a:focus {
    outline: 2px solid var(--brown-primary);
}

/* Print Styles */
@media print {
    .mobile-navbar,
    .footer,
    .back-to-top {
        display: none !important;
    }

    .header-section {
        min-height: auto;
        padding: 1rem 0;
    }

    .search-section {
        display: none;
    }

    .section-card,
    .author-card {
        box-shadow: none;
        border: 1px solid var(--border-decorative);
        page-break-inside: avoid;
    }

    .hero-content {
        display: none;
    }
}

/* Desktop hover dropdown (>=992px) */
@media (min-width: 992px) {
  .header-nav .dropdown { position: relative; }
  .header-nav .dropdown .dropdown-menu {
    display: block; /* keep in flow for transition */
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
    margin-top: 0;
    background: var(--brown-primary);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 0 0 8px 8px;
  }
  .header-nav .dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
  }
  .header-nav .dropdown:hover .dropdown-toggle {
    color: var(--brown-dark) !important;
  }
  .header-nav .dropdown .dropdown-menu .dropdown-item {
    color: #fff;
    transition: background .2s ease, padding-right .2s ease;
  }
  .header-nav .dropdown .dropdown-menu .dropdown-item:hover {
    background: var(--secondary-cream);
    color: var(--brown-primary);
    padding-right: 10px;
  }
  /* Keep button styled like other nav items */
  .header-nav .dropdown-toggle {
    background: transparent !important;
    box-shadow: none;
    color: white !important;
    border: none !important;
  }
}

/* ============================================
   DARK MODE - PERFORMANCE & POLISH
   ============================================ */

/* Prevent flash of unstyled content on page load */
html {
  transition: background-color 0.3s ease;
}

/* Optimize dark mode for images and media */
[data-theme="dark"] img:not(.logo-left):not(.logo-right):not(.mobile-logo-img):not(.f-logo) {
  opacity: 0.92;
  transition: opacity 0.3s ease, filter 0.3s ease;
}

[data-theme="dark"] img:not(.logo-left):not(.logo-right):not(.mobile-logo-img):not(.f-logo):hover {
  opacity: 1;
}

/* Dark mode badge and tag adjustments */
[data-theme="dark"] .author-books,
[data-theme="dark"] .author-specialty,
[data-theme="dark"] .publication-pages,
[data-theme="dark"] .about-badge-date {
  background: var(--brown-primary);
  color: white;
}

/* Dark mode form styling */
[data-theme="dark"] .search-select,
[data-theme="dark"] .form-select {
  background: #2a3142;
  color: var(--text-dark);
  border-color: var(--border-decorative);
}

[data-theme="dark"] .search-select:focus,
[data-theme="dark"] .form-select:focus {
  background: #2a3142;
  border-color: var(--brown-primary);
  box-shadow: 0 0 0 0.2rem rgba(74, 159, 184, 0.25);
}

/* Dark mode navigation enhancements */
[data-theme="dark"] .nav-item:hover,
[data-theme="dark"] .nav-item.active {
  background: var(--gold-accent);
  color: #1a1f2e;
}

[data-theme="dark"] .mobile-nav-link:hover,
[data-theme="dark"] .mobile-nav-link.active {
  color: var(--gold-accent);
}

/* Dark mode swiper navigation */
[data-theme="dark"] .swiper-nav,
[data-theme="dark"] .about-swiper-nav {
  background: rgba(26, 31, 46, 0.95);
  border-color: var(--gold-accent);
  color: var(--gold-accent);
}

[data-theme="dark"] .swiper-nav:hover,
[data-theme="dark"] .about-swiper-nav:hover {
  background: var(--brown-primary);
  color: white;
}

/* Dark mode pagination bullets */
[data-theme="dark"] .publications-pagination .swiper-pagination-bullet,
[data-theme="dark"] .about-swiper-pagination .swiper-pagination-bullet {
  background: var(--brown-primary);
}

[data-theme="dark"] .publications-pagination .swiper-pagination-bullet-active,
[data-theme="dark"] .about-swiper-pagination .swiper-pagination-bullet-active {
  background: var(--gold-accent);
}

/* Dark mode filter buttons */
[data-theme="dark"] .filter-btn {
  background: #2a3142;
  border-color: var(--border-decorative);
  color: var(--text-dark);
}

[data-theme="dark"] .filter-btn:hover,
[data-theme="dark"] .filter-btn.active {
  background: var(--brown-primary);
  border-color: var(--brown-primary);
  color: white;
}

/* Dark mode suggestion tags */
[data-theme="dark"] .suggestion-tag {
  background: rgba(74, 159, 184, 0.3);
  color: var(--text-dark);
}

[data-theme="dark"] .suggestion-tag:hover {
  background: rgba(74, 159, 184, 0.5);
}

/* Dark mode social links */
[data-theme="dark"] .social-link {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.15);
}

/* Performance optimization: Use will-change for animated elements */
.theme-toggle,
.back-to-top,
.section-card,
.author-card,
.publication-card,
.stat-card {
  will-change: transform;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .theme-toggle {
    transition: none;
  }
}

/* Dark mode skeleton loading */
[data-theme="dark"] .about-skeleton {
  background: linear-gradient(110deg, #242b3d 8%, #2a3142 18%, #242b3d 33%);
  background-size: 200% 100%;
}

/* Dark mode for contact form enhancements */
[data-theme="dark"] .contact-form-card {
  background: #1a1f2e;
}

[data-theme="dark"] .form-title {
  color: var(--gold-accent);
}

/* Dark mode loading spinner */
[data-theme="dark"] .slider-loading {
  background: rgba(26, 31, 46, 0.95);
  border: 1px solid var(--border-decorative);
}

[data-theme="dark"] .loading-spinner i {
  color: var(--gold-accent);
}

/* Ensure proper contrast for accessibility */
[data-theme="dark"] a {
  color: var(--text-dark);
}

[data-theme="dark"] a:hover {
  color: var(--gold-accent);
}

/* Dark mode card overlays optimization */
[data-theme="dark"] .card-overlay {
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0) 0%,
    rgba(0,0,0,0.3) 40%,
    rgba(0,0,0,0.85) 100%
  );
}

/* Hardware acceleration for smooth transitions */
.theme-toggle,
[data-theme="dark"],
.header-section,
.section-card,
.author-card,
.publication-card,
.stat-card {
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Ensure text remains crisp during transitions */
* {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a,a:hover,h4,p,h2,h1,h3,h5{font-style: normal !important;text-decoration: none !important;}
/* Final polish for dark mode experience */
[data-theme="dark"] ::selection {
  background: var(--gold-accent);
  color: #1a1f2e;
}

[data-theme="dark"] ::-moz-selection {
  background: var(--gold-accent);
  color: #1a1f2e;
}

/* Prevent content flash before loader - only on pages with loader */
body:has(.loader-container):not(.loader-complete) > *:not(.loader-container):not(script) {
    opacity: 0;
    pointer-events: none;
}

body:has(.loader-container).loader-complete > *:not(.loader-container) {
    animation: fadeInContent 0.6s ease-out forwards;
}

@keyframes fadeInContent {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Math CAPTCHA ─────────────────────────────────────────────────────────── */
.captcha-wrapper {
    background: rgba(var(--teal-rgb, 45, 106, 106), 0.06);
    border: 1px dashed var(--teal-primary, #2d6a6a);
    border-radius: 10px;
    padding: 12px 14px;
}
.captcha-question {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: var(--teal-primary, #2d6a6a);
    margin-bottom: 10px;
    font-family: 'Cairo', sans-serif;
}
.captcha-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.captcha-input {
    flex: 1;
    max-width: 160px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 2px;
}
.captcha-refresh-btn {
    background: none;
    border: 1px solid var(--teal-primary, #2d6a6a);
    color: var(--teal-primary, #2d6a6a);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.captcha-refresh-btn:hover {
    background: var(--teal-primary, #2d6a6a);
    color: #fff;
}
