﻿/* Import global design system variables */
@import url('./global-variables.css');
@import url('./utility-classes.css');

/* ========================================
   AL-FIKR CUSTOM STYLES
   ======================================== */

/* Global Resets */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family-primary);
    line-height: var(--line-height-normal);
    font-size: var(--font-size-sm);
    color: var(--gray-900);
    background-color: var(--white);
}

/* Page Header */
.page-header {
    background: var(--gradient-hero);
    color: var(--text-on-primary);
    padding: var(--spacing-24) 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .page-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--overlay-primary);
        pointer-events: none;
    }

.page-title {
    font-size: var(--font-size-5xl);
    font-weight: var(--font-weight-bold);
    margin: 0 0 var(--spacing-4) 0;
    position: relative;
    z-index: 2;
}

.page-subtitle {
    font-size: var(--font-size-xl);
    font-weight: var(--font-weight-normal);
    margin: 0;
    opacity: 0.9;
    position: relative;
    z-index: 2;
    max-width: 600px;
    margin: 0 auto;
}
/* Utility Classes */
.loader {
    display: none;
}

/* Buttons */
button {
    cursor: pointer;
    border: none;
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--border-radius-lg) !important;
    font-size: var(--font-size-base);
    transition: var(--transition-base);
    font-family: var(--font-family-primary);
}

/* Header Section */
.main-header {
    background-color: var(--white);
    padding: var(--spacing-2) var(--spacing-10);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: var(--z-index-fixed);
    box-shadow: var(--shadow-sm);
}

.header-content {
    width: 100%;
    max-width: var(--container-max-width);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--container-padding);
}

.logo {
    display: flex;
    align-items: center;
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    color: var(--blue-500);
    text-decoration: none;
    transition: var(--transition-base);
}

.logo:hover {
    color: var(--blue-600);
}

    .logo img {
        height: 40px;
        margin-left: var(--spacing-2);
        transition: var(--transition-base);
    }

.header-nav {
    display: flex;
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: var(--spacing-2);
}

    .header-nav span {
        margin-left: var(--spacing-5);
        color: var(--gray-600);
        font-size: var(--font-size-sm);
        font-weight: var(--font-weight-medium);
    }

/* Auth Buttons Modern Styles */
.auth-buttons {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: nowrap;
}

.btn-signin, .btn-signup {
    border-radius: 999px;
    font-weight: 600;
    font-size: 1rem;
    padding: 7px 22px;
    border: 2px solid var(--primary-color);
    transition: background 0.2s, color 0.2s, border 0.2s;
    cursor: pointer;
    outline: none;
    min-width: 100px;
}

.btn-signin {
    background: var(--white);
    color: var(--primary-500);
}

.btn-signin:hover {
    background: var(--primary-500);
    color: var(--white);
}

@media (max-width: 576px) {
    .auth-buttons {
        gap: 6px;
    }
    .btn-signin, .btn-signup {
        font-size: 0.95rem;
        padding: 6px 12px;
        min-width: 80px;
    }
    .auth-separator {
        font-size: 1.1rem;
    }
}

/* Remove old login/signup button styles to avoid conflicts */
.btn-seconnect, .btn-connect {
    display: none !important;
}

.btn-menu {
    background: var(--blue-800) !important;
    color: var(--white) !important;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    margin-left: var(--spacing-1);
    justify-content: center;
    transition: var(--transition-base);
    border: none;
    cursor: pointer;
}

    .btn-menu:hover {
        background: var(--primary-500);
        transform: scale(1.05);
        color:var(--white)
    }

    .btn-menu i {
        font-size: var(--font-size-base);
    }

/* Progress Bar Styles */
/*.scroll-progress {
    position: fixed;
    top: 60px;*/ /* Ajustez cette valeur selon la hauteur de votre navbar */
    /*left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    background-size: 200% 100%;
    width: 0%;
    transition: width 0.1s ease-out;
    animation: gradientShift 3s ease infinite;
    box-shadow: 0 0 20px rgba(247, 166, 0, 0.5);
}

@keyframes gradientShift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}*/

/* Version responsive pour différentes tailles de navbar */
/*@media (max-width: 768px) {
    .scroll-progress {
        top: 56px;*/ /* Hauteur navbar mobile généralement plus petite */
    /*}
}*/

/* Si votre navbar a une classe spécifique, vous pouvez calculer dynamiquement */
/* Exemple avec une navbar Bootstrap standard */
/*@media (min-width: 992px) {
    .scroll-progress {
        top: 72px;*/ /* Hauteur navbar desktop plus grande */
    /*}
}*/

/* Version simple sans animation */
/*.scroll-progress-simple .scroll-progress-bar {
    background: #f7a600;
    animation: none;
    box-shadow: 0 0 10px rgba(247, 166, 0, 0.3);
}*/
/* Base dropdown menu */
.custom-dropdown-menu {
    position: absolute;
    background: var(--white);
    width: 250px;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 10px 0;
    display: none;
    z-index: 10000;
}

/* Position for LTR */
html[dir="ltr"] .custom-dropdown-menu {
    right: 0;
    left: auto;
}

/* Position for RTL */
html[dir="rtl"] .custom-dropdown-menu {
    left: 0;
    right: auto;
}

/* Dropdown items */
.custom-dropdown-menu .list-group-item {
    font-size: 0.95rem;
    cursor: pointer;
    padding: 8px 15px;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap; /* Prevent text wrapping */
}

    .custom-dropdown-menu .list-group-item:hover {
        background-color: var(--gray-100);
    }

/* Icon alignment */
html[dir="ltr"] .custom-dropdown-menu .list-group-item i {
    margin-right: 6px;
}

html[dir="rtl"] .custom-dropdown-menu .list-group-item i {
    margin-left: 6px;
}

/* Language options */
.language-options .form-check {
    margin-bottom: 5px;
}

.language .form-check {
    display: flex;
    align-items: center;
}

html[dir="ltr"] .language .form-check-label img {
    margin-right: 5px;
}

html[dir="rtl"] .language .form-check-label img {
    margin-left: 5px;
}

/* Separator */
.custom-separator {
    width: 90%;
    margin: 8px auto;
    height: 1px;
}

/* Responsive adjustments */

/* Tablets */
@media (max-width: 992px) {
    .custom-dropdown-menu {
        width: 220px;
        font-size: 0.9rem;
    }
}

/* Small tablets & large phones */
@media (max-width: 768px) {
    .custom-dropdown-menu {
        width: 200px;
    }
}

/* Mobile screens */
@media (max-width: 576px) {
    .custom-dropdown-menu {
        position: fixed;
        top: 50px;
        left: 0;
        right: 0;
        width: 100vw;
        border-radius: 0;
        padding: 10px 0;
        box-shadow: var(--shadow-lg);
    }

    html[dir="rtl"] .custom-dropdown-menu {
        left: 0;
        right: 0;
    }

    html[dir="ltr"] .custom-dropdown-menu {
        right: 0;
        left: 0;
    }

    .custom-dropdown-menu .list-group-item {
        justify-content: center; /* Center items for small screens */
        white-space: normal; /* Allow wrapping on small screens */
        text-align: center;
    }

    .language-options {
        text-align: center;
    }
}

/* Search bar scrolled - responsive + sans fond */
.search-bar-scrolled {
    display: flex;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: none !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-radius: 25px;
    margin: 0;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    z-index: 9999;
    transition: all 0.3s ease;
    animation: slideInFromTop 0.4s ease-out;
    flex: 1;
    flex-wrap: wrap;
}

/* Animation d'apparition */
@keyframes slideInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-bar-scrolled .search-container {
    width: 100%;
    margin: 0;
}

.search-bar-scrolled .input-search {
    position: relative;
    flex: 1;
    margin-right: 8px;
    min-width: 0;
    width: 100%;
}

.search-bar-scrolled .form-control {
    border: 1px solid var(--gray-200);
    background: transparent;
    padding: 8px 40px 8px 15px;
    font-size: 14px;
/*    border-radius: 20px;*/
    width: 100%;
    outline: none;
    transition: all 0.3s ease;
    min-width: 0;
}

    .search-bar-scrolled .form-control:focus {
        background-color: rgba(255,255,255,0.95);
        box-shadow: inset 0 2px 8px rgba(0,0,0,0.06), 0 0 0 3px rgba(99, 186, 180, 0.1);
    }

    .search-bar-scrolled .form-control::placeholder {
        color: var(--gray-500);
        font-style: italic;
    }

.search-bar-scrolled .btn-search-icon {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, var(--blue-500) 0%, var(--blue-700) 100%);
    border: none;
   /* border-radius: 50%;*/
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--overlay-blue);
    font-size: 12px;
}

    .search-bar-scrolled .btn-search-icon:hover {
        background: var(--blue-800);
        transform: translateY(-50%) scale(1.05);
        box-shadow: 0 4px 12px var(--overlay-blue);
    }

    .search-bar-scrolled .btn-search-icon i {
        transition: transform 0.3s ease;
    }

    .search-bar-scrolled .btn-search-icon:hover i {
        color:var(--white);
        transform: scale(1.1);
    }

.search-bar-scrolled .btn-secondary {
    background: linear-gradient(135deg, var(--primary-500) 0%, var(--primary-600) 100%);
    border: none;
    border-radius: 20px;
    padding: 8px 12px;
    color: var(--white);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px var(--overlay-primary);
    min-width: 40px;
    font-size: 13px;
    flex-shrink: 0;
}

    .search-bar-scrolled .btn-secondary:hover {
        background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-500) 100%);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px var(--overlay-primary);
    }

/* Responsive - tablette */
@media (max-width: 425px) {
    .search-bar-scrolled.mobile-collapsed .form-control,
    .search-bar-scrolled.mobile-collapsed .btn-close-search {
        display: none;
    }

    .search-bar-scrolled.mobile-expanded .form-control,
    .search-bar-scrolled.mobile-expanded .btn-close-search {
        display: block;
        animation: fadeIn 0.3s ease-out;
    }

    .search-bar-scrolled {
        padding: 0.5rem;
        background: white;
        border-radius: 25px;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .btn-close-search {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #666;
        padding: 0 0.5rem;
        cursor: pointer;
        display: none;
    }

    .search-bar-scrolled .input-search {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .search-bar-scrolled .form-control {
        flex: 1;
        padding: 8px 12px;
        border: 1px solid #ccc;
        /*border-radius: 20px;*/
        font-size: 14px;
    }

    .search-bar-scrolled .btn-search-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}
/* Version mobile spécifique */
@media (max-width: 425px) {
    .btn-advanced-search {
        display: none !important;
    }

    .search-bar-scrolled.mobile-collapsed .form-control,
    .search-bar-scrolled.mobile-collapsed .btn-close-search {
        display: none;
    }

    .search-bar-scrolled.mobile-expanded .form-control,
    .search-bar-scrolled.mobile-expanded .btn-close-search {
        display: block;
        animation: fadeIn 0.3s ease-out;
    }

    .search-bar-scrolled {
        padding: 0.5rem;
        background: white;
        border-radius: 25px;
        align-items: center;
        justify-content: space-between;
        box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    }

    .btn-close-search {
        background: none;
        border: none;
        font-size: 1.5rem;
        color: #666;
        padding: 0 0.5rem;
        cursor: pointer;
        display: none;
    }

    .search-bar-scrolled .input-search {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .search-bar-scrolled .form-control {
        flex: 1;
        padding: 8px 12px;
        border: 1px solid #ccc;
      /*  border-radius: 20px;*/
        font-size: 14px;
    }

    .search-bar-scrolled .btn-search-icon {
        width: 36px;
        height: 36px;
        font-size: 16px;
    }
}


/* Placeholder de recherche */
#search-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
    padding: 0 1rem;
    margin: 0;
    flex: 1;
}

    #search-placeholder.d-none {
        display: none !important;
    }

/* Header adapté */
.main-header .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 1rem;
    position: relative;
}

.main-header .header-nav {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: flex-end;
}



.hero-section {
    position: relative;
    min-height: 350px; /* Moderate increase from 300px */
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
    overflow: hidden;
    margin: 0; /* Removed margins to fill full width */
    border-radius: 0; /* Removed border-radius for full width */
    padding: 0 2rem;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    width: 90%;
}

@media (max-width: 1200px) {
    .hero-section {
        margin: 0;
        min-height: 280px; /* Slightly more than original 240px */
    }
}

@media (max-width: 992px) {
    .hero-section {
        margin: 0;
        min-height: 250px; /* Slightly more than original 200px */
        border-radius: 0;
        padding: 0 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        margin: 0;
        min-height: 220px; /* Reasonable height for tablets */
        border-radius: 0;
        padding: 0 0.5rem;
    }

    .hero-content h1 {
        font-size: 1.2rem;
        margin-bottom: 18px;
    }
}

@media (max-width: 576px) {
    .hero-section {
        margin: 0;
        min-height: 300px; /* Reduced from 500px */
        border-radius: 0;
        padding: 0 0.2rem;
    }

    .hero-content {
        max-width: 98vw;
        width: 100%;
    }

        .hero-content h1 {
            font-size: 1rem;
            margin-bottom: 12px;
        }
}

.hero-content h1 {
    font-size: 1.8rem;
    margin-bottom: 30px;
    text-shadow: 2px 2px 4px var(--overlay-bg);
}
/*****test */
/* === NAVBAR : Champ large === */
/* Navbar : largeur max raisonnable */
header .search-container {
    flex: 1;
    justify-content: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

header .input-search {
    flex: 1;
    max-width: 450px; /* largeur max réduite */
    min-width: 250px;
}

    header .input-search .form-control {
        width: 100%;
        padding-right: 3rem;
        text-align: left;
    }

    /* Ajuste l'icône de recherche */
 /*   header .input-search .btn-search-icon {
        right: 8px;
    }*/
.input-search .btn-search-icon {
    position: absolute;
    top: 50%;
    right: 1px;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #18407C;
    font-size: 1.1rem;
    padding: 0.375rem 0.75rem;
    z-index: 2;
}

    .input-search .btn-search-icon:focus {
        outline: none;
        background-color: #18407C;
        color: white;
        border-radius: 4px;
    }

/* === TABLETTE === */
@media (max-width: 768px) {
    header .input-search {
        min-width: 180px;
    }
}

/* === MOBILE : on garde ton système actuel === */
@media (max-width: 425px) {
    header .input-search {
        min-width: 0;
        flex: 1;
    }
}

/* Search */
.search-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

.input-search {
    position: relative;
    flex: 1 1 500px;
    max-width: 700px;
}

    .input-search .form-control {
        padding-right: 3rem;
        text-align: left;
    }

   

.hero-nav-tabs {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    transform: translateX(-25px);
    padding: 1rem;
}
.hero-nav-tabs a {
    text-decoration:none;
}
.hero-nav-tabs a:hover{
    color: white;
}
.tab-button {
    background-color: var(--blue-800);
    color: var(--white);
    padding: 5px 18px;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .tab-button:hover,
    .tab-button.active {
        background-color: var(--primary-500);
    }

.search-bar-container-custom {
    background-color: var(--primary-50);
    border-radius: 30px;
    padding: 10px 25px;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-md);
    max-width: 600px;
    margin: 0 auto;
}

.search-input-custom {
    flex-grow: 1;
    border: none;
    outline: none;
    font-size: 1.1rem;
    padding: 10px 15px;
    background: transparent;
    color: var(--secondary-700);
}

    .search-input-custom::placeholder {
        color: var(--gray-400);
        font-style: italic;
    }

/* Disciplines Section */
.disciplines-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.discipline-tag {
    border: 1px solid var(--gray-200);
    color: var(--gray-700) !important;
    font-size: 0.875rem;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-base);
    cursor: pointer;
    box-shadow: 0 4px 12px var(--gray-200);
}

    .discipline-tag:hover {
        background-color: var(--secondary-700);
        color: var(--white)  !important;
        transform: translateY(-2px);
        box-shadow: 0 4px 12px var(--overlay-blue);
    }

/* Featured Content Section */
.featured-content {
    background: var(--white);
}

.featured-card {
    background: linear-gradient(135deg, var(--primary-400) 0%, #ECB63C 80%, #fbbf24 100%);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
    width: 100%;
    margin: 0;
}

    .featured-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    }

    .featured-card .card-body {
        color: var(--white);
        padding: 2rem;
    }

    .featured-card .card-title {
        font-size: 1.8rem;
        font-weight: 700;
        margin-bottom: 0.5rem;
        color: var(--black);
    }

    .featured-card .card-subtitle {
        font-size: 1.1rem;
        color: var(--black);
        line-height: 1.5;
        font-weight: 400;
    }

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.Badge-recent-encounters {
    color: var(--blue);
}

.rencontre-badge {
    background: rgba(255,255,255,0.25);
    color: var(--white);
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.3);
    margin-left:3px;
}

.btn-inscription {
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.4);
    color: var(--white);
    font-weight: 600;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    transition: var(--transition);
}

    .btn-inscription:hover {
        background: rgba(255,255,255,0.3);
        border-color: rgba(255,255,255,0.6);
        transform: translateY(-2px);
    }

.date-box {
    background: rgba(255,255,255,0.25);
    border-radius: 15px;
    padding: 1.5rem;
    text-align: center;
    min-width: 100px;
    margin: 2rem;
    border: 1px solid rgba(255,255,255,0.3);
    backdrop-filter: blur(10px);
}

    .date-box .month {
        font-size: 0.8rem;
        font-weight: 600;
        text-transform: uppercase;
        color: rgba(255,255,255,0.9);
        letter-spacing: 1px;
    }

    .date-box .day {
        font-size: 2.5rem;
        font-weight: 800;
        line-height: 1;
        color: var(--white);
        margin: 0.5rem 0;
    }

    .date-box .time {
        font-size: 0.9rem;
        color: rgba(255,255,255,0.9);
        font-weight: 500;
    }

/* Recent Encounters Section */
.encounter-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: var(--transition);
    height: 100%;
}

    .encounter-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }

.encounter-image {
    position: relative;
    overflow: hidden;
    height: 150px;
}

    .encounter-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

.encounter-card:hover .encounter-image img {
    transform: scale(1.05);
}

.encounter-content {
    padding: 1rem;
}

.encounter-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: 0.5rem;
}

.encounter-description {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.encounter-date {
    font-size: 0.75rem;
    color: #adb5bd;
}

/* Section Titles */
.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 2rem;
    position: relative;
}

    .section-title::after {
        content: '';
        position: absolute;
        bottom: -10px;
        left: 0;
        width: 50px;
        height: 3px;
        background: linear-gradient(90deg, var(--blue), var(--primary-color));
        border-radius: 2px;
    }

/* Notification animations */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

.notification-toast {
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 10px;
    border: none;
}

.discipline-tag.active {
    background-color: var(--secondary-color) !important;
    color: var(--white) !important;
    transform: translateY(-2px);
}

.filter-indicator {
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--blue-500), var(--blue-700));
    color: var(--white);
    box-shadow: 0 3px 10px var(--overlay-blue);
}

    .filter-indicator .btn {
        background: rgba(255,255,255,0.2);
        border: 1px solid rgba(255,255,255,0.3);
        color: var(--white);
    }

        .filter-indicator .btn:hover {
            background: rgba(255,255,255,0.3);
            border-color: rgba(255,255,255,0.5);
        }

/* Partners Section */
.partners-section {
    min-height: 400px;
    display: flex;
    align-items: center;
}

.partners-content {
    padding-right: 2rem;
}

.btn-partners {
    background: var(--blue);
    border: none;
    color: var(--white);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    transition: var(--transition);
}

    .btn-partners:hover {
        background: #2c5282;
        transform: translateY(-2px);
    }

.btn-partners-secondary {
    background: var(--blue);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: var(--transition);
}

    .btn-partners-secondary:hover {
        background: #2c5282;
        transform: scale(1.1);
    }

.partners-text {
    color: #555;
    line-height: 1.7;
    font-size: 1rem;
    margin-bottom: 0;
}
/*
.partners-logos {
    display: flex;
    justify-content: center;
    align-items: center;
}

.partners-card {
    background: var(--white);
    border-radius: var(--border-radius);
    padding: 2.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: 3px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

    .partners-card::before {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 0;
        height: 0;
        border-style: solid;
        border-width: 0 40px 40px 0;
        border-color: transparent var(--primary-color) transparent transparent;
    }

.partner-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    transition: var(--transition);
}

    .partner-logo:hover {
        transform: scale(1.05);
    }

  */
.partner-logo img {
    max-height: 50px;
    width: auto;
    transition: filter 0.3s ease;
}

.partner-logo:hover img {
    transform: translateY(-5px);
}
.custom-shadow-box {
    position: relative;
    border-radius: 20px;
    background-color: var(--white-color);
    z-index: 1;
    box-shadow: 10px 10px 0 var(--primary-color), 20px 20px 0 var(--secondary-color);
}

/* Footer */
.footer {
    background: #252C40 !important;
    color: #ecf0f1;
    margin-top: 2.5rem; /* Add top margin for better separation */
    padding-top: 2rem; /* Add top padding for visual comfort */
}

.footer-icon {
  
    color: var(--primary-color);
    font-size: 1rem;
}

.footer-tagline {
    color: #bdc3c7;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 2px;
    margin-bottom: 0;
}

.footer-heading {
    font-size: 1rem;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 1rem;
}

.footer-links {
    margin: 0;
    padding: 0;
}

    .footer-links li {
        margin-bottom: 0.5rem;
    }

    .footer-links a {
        color: #bdc3c7;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.3s ease;
    }

        .footer-links a:hover {
            color: var(--primary-color);
        }

.footer-copyright {
    color: #95a5a6;
    line-height: 1.6;
}

.footer-links-bottom a {
    color: #95a5a6;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-links-bottom a:hover {
        color: var(--primary-color);
    }

.tracking-wide {
    letter-spacing: 0.1em;
}

/* Carousel */
.carousel-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    height: 420px;
    position: relative;
    /* Ensures card never renders too narrow */
    min-width: 200px;
    max-width: 240px;
    width: 100%;
    flex: 0 0 auto;
}




.book-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 1rem 1.2rem;
    overflow: hidden;
}

.book-info {
    flex-grow: 1;
    margin-bottom: 0.5rem;
}

.book-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 2.8rem;
    max-height: 3rem;
}

    .book-title[dir="rtl"],
    .book-title:lang(ar) {
        font-family: 'Amiri', serif;
        text-align: right;
        line-height: 1.6;
    }

.book-isbn {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

    .book-isbn[dir="rtl"],
    .book-isbn:lang(ar) {
        font-family: 'Amiri', serif;
        text-align: right;
        direction: rtl;
    }

.btn-read {
    background: linear-gradient(135deg, var(--primary-color) 0%, #e67e22 100%);
    border: none;
    border-radius: 30px;
    padding: 5px 1.5rem;
    font-weight: 600;
    color: var(--white);
    letter-spacing: 0.5px;
    transition: var(--transition);
    box-shadow: 0 6px 20px rgba(243, 156, 18, 0.3);
    font-size: 0.9rem;
    align-self: flex-start;
}

    .btn-read:hover {
        background: linear-gradient(135deg, #e67e22 0%, var(--primary-color) 100%);
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(243, 156, 18, 0.4);
    }

.carousel-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 480px;
    margin: 0 auto;
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 20px;
    width: 100%;
    margin: 0 auto;
}



.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 30px;
    height: 30px;
    background: var(--white);
  /*  border: 2px solid #e9ecef;*/
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    z-index: 10;
    color: var(--secondary-color);
    font-size: 1.2rem;
}

    .carousel-nav:hover {
        background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
        border-color: transparent;
        color: var(--white);
        /*transform: translateY(-50%) scale(1.1);*/
        box-shadow: 0 6px 20px rgba(52, 152, 219, 0.3);
    }

/*.carousel-nav-left {
    left: 10px;
}*/

.carousel-nav-left {
    left: 0;
    transform: translate(-50%, -50%);
}

.carousel-nav-right {
    right: 0;
    transform: translate(50%, -50%);
}


.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 15px;
    gap: 8px;
}

    .carousel-dots .dot {
        height: 8px;
        width: 8px;
        margin: 0 2px;
        background-color: #ccc;
        border-radius: 50%;
        display: inline-block;
        cursor: pointer;
        transition: background-color 0.3s;
    }

        .carousel-dots .dot.active {
            background-color: var(--secondary-color);
            transform: scale(1.2);
        }

/* Book Cards */
.carte-livre {
    background-color: var(--white);
    border: 1px solid #ddd;
    width: 100%;
    max-width: 300px;
    min-height: 400px;
    border-radius: 12px;
    box-shadow: 0 -2px 6px rgba(0, 0, 0, 0.05), 3px 0 9px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 12px;
}
.card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

    .card-link:hover {
        text-decoration: none;
        color: inherit;
    }

    .badge-type {
        color: #000;
        font-size: 0.75rem;
        border-radius: 6px;
        user-select: none;
        position: absolute;
        top: 8px;
        left: 8px;
        z-index: 10;
    }

.bookmark-btn {
    background: none;
    border: none;
    padding: 0;
    color: var(--gray-600);
    cursor: pointer;
    transition: var(--transition-base);
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

.active-bookmark {
    color: var(--danger-500);
}
.card-img {
    width: 100%;
    max-height: 200px;
    max-width: 150px;
    object-fit: cover;
    border-radius: var(--border-radius);
    margin: 35px 0 10px 10px;
    flex-shrink: 0;
}

.card-title {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 6px;
    color: var(--gray-900);
}

.card-author {
    font-size: 0.85rem;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    color: var(--gray-700);
    margin-bottom: 2px;
}

.card-date {
    font-size: 0.75rem;
    font-family: 'Georgia', serif;
    color: var(--gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.shadow-dark {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6) !important;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .carousel-container {
        margin: 0 50px;
    }
}

@media (max-width: 992px) {
    .carousel-card {
        flex: 0 0 50%;
    }
}

@media (max-width: 768px) {
    .carousel-container {
        margin: 0 40px;
    }

    .carousel-card {
        flex: 0 0 100%;
    }

    .carousel-nav {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .partners-section {
        min-height: auto;
        padding: 3rem 0;
    }

    .partners-content {
        padding-right: 0;
        margin-bottom: 2rem;
        text-align: center;
    }

    .partners-card {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .partner-logo {
        padding: 0.5rem;
    }

        .partner-logo img {
            max-height: 40px;
        }

    .footer-brand {
        text-align: center;
        margin-bottom: 2rem;
    }

    .footer-links-bottom {
        justify-content: center !important;
        margin-top: 1rem;
    }

        .footer-links-bottom a {
            margin: 0.25rem !important;
        }
}

@media (max-width: 576px) {
    .carousel-container {
        margin: 0 30px;
    }

    /*.carousel-nav-left {
        left: -15px;
    }*/

    .carousel-nav-right {
        right: -15px;
    }

    .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    .input-search {
        max-width: 100%;
        width: 100%;
        flex: 1 1 100%;
    }
    .input-search .form-control {
        width: 100%;
        font-size: 1rem;
        min-height: 44px;
    }
    .input-search .btn-search-icon {
        right: 8px;
        font-size: 1.2rem;
        min-width: 40px;
        min-height: 40px;
    }
    .tab-button,
    .btn-connect,
    .btn-seconnect {
        width: 100%;
        min-height: 44px;
        font-size: 1rem;
        margin: 0;
        justify-content: center;
        display: flex;
    }
    .hero-nav-tabs {
        flex-direction: column;
        transform: translateX(0px);
        gap: 10px;
        padding: 0.5rem 0;
    }

    .partners-card {
        padding: 1rem;
    }

    .partners-text {
        font-size: 0.9rem;
    }

    .btn-partners {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .footer .container {
        padding: 0 1rem;
    }

    .footer-links-bottom {
        flex-direction: column;
        align-items: center;
    }

        .footer-links-bottom a {
            margin: 0.25rem 0 !important;
        }
}

/* Sticky Header */
.sticky-header {
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1050;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    background: var(--white);
    transition: box-shadow 0.3s;
}

@media (max-width: 768px) {
    .main-header, .sticky-header {
        padding: 10px 10px;
        flex-direction: row; /* Keep row direction */
        align-items: center;
    }
    .header-content {
        flex-direction: row; /* Keep row direction */
        align-items: center;
        justify-content: space-between;
        padding: 0;
    }
    .logo {
        justify-content: flex-start;
        margin-bottom: 0;
    }
    .header-nav {
        justify-content: flex-end;
        width: auto;
        margin-top: 0;
    }
}

@media (max-width: 576px) {
    .main-header, .sticky-header {
        padding: 6px 2px;
    }
    .logo img {
        height: 32px;
    }
    .header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
    .logo {
        justify-content: flex-start;
    }
    .header-nav {
        justify-content: flex-end;
        width: auto;
    }
}

@media (max-width: 992px) {
    .footer .row {
        flex-direction: column !important;
    }
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-md-4 {
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 1.5rem;
        text-align: center;
    }
    .footer-brand {
        margin-bottom: 1.5rem;
    }
}
@media (max-width: 576px) {
    .footer {
        padding-top: 1.2rem;
        margin-top: 1.2rem;
    }
    .footer .container {
        padding: 0 0.2rem;
    }
    .footer .row {
        flex-direction: column !important;
        gap: 0.5rem;
    }
    .footer .col-lg-4,
    .footer .col-lg-2,
    .footer .col-md-4 {
        max-width: 100%;
        flex: 0 0 100%;
        margin-bottom: 1rem;
        text-align: center;
    }
    .footer-brand {
        margin-bottom: 1rem;
    }
    .footer-links-bottom {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.5rem;
    }
    .footer-links-bottom a {
        margin: 0.2rem 0 !important;
    }
    .footer-copyright {
        text-align: center;
        margin-bottom: 0.5rem;
    }
}


/* address advanced search css*/

.modal-content {
    border: none;
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.98);
}

.modal-header {
    /*    background: linear-gradient( 145deg, var(--primary-color) 0%,var(--secondary-color) 100% );
background:linear-gradient(    135deg,    #ecb43a 70%,    #f0d072 100%);
*/ background: linear-gradient(135deg, var(--primary-400) 0%, var(--primary-700) 80%, var(--primary-900) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
    padding: 10px 20px;
    border: none;
    position: relative;
    overflow: hidden;
}

    .modal-header::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="20" cy="20" r="2" fill="rgba(255,255,255,0.1)"/><circle cx="80" cy="40" r="1.5" fill="rgba(255,255,255,0.1)"/><circle cx="40" cy="80" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
        opacity: 0.3;
    }

.modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    position: relative;
    z-index: 1;
}

.btn-close {
    background: rgba(255, 255, 255, 0.3); border-radius: 50%;
    padding: 8px;
    opacity: 1;
    position: relative;
    z-index: 1;
}

    .btn-close:hover {
     
         background-color:var(--white);
    }

.modal-body {
    padding: 32px;
    background: var(--gray-50);
}

/* Search Criteria Styles */
.search-criteria-header {
    background: white;
    padding: 20px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-criteria-title {
    color: var(--gray-700);
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-criteria-subtitle {
    color: var(--gray-500);
    font-size: 0.9rem;
    margin: 4px 0 0 0;
}

.search-criterion {
    background: white;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius);
    padding: 24px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .search-criterion::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        transform: scaleY(0);
        transition: transform 0.3s ease;
    }

    .search-criterion:hover,
    .search-criterion:focus-within {
        border-color: var(--primary-color);
        box-shadow: 0 8px 25px rgba(37, 99, 235, 0.15);
        transform: translateY(-2px);
    }

        .search-criterion:hover::before,
        .search-criterion:focus-within::before {
            transform: scaleY(1);
        }

.criterion-number {
    position: absolute;
    top: 12px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Form Controls */
.form-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    display: block;
}

.form-control,
.form-select {
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background: white;
    text-align: center;
    width: 100%;
}

    .form-control:focus,
    .form-select:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
        outline: none;
    }

    .form-control::placeholder {
        color: var(--gray-500);
        font-style: italic;
        text-align: center;
    }

/* Center form elements within criteria */
.search-criterion .row {
    align-items: center;
    justify-content: center;
}

.search-criterion .col-md-3,
.search-criterion .col-md-5 {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.search-criterion .col-md-1 {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Improve spacing and alignment */
.search-criterion .form-label {
    margin-bottom: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-criterion .form-control,
.search-criterion .form-select {
    min-height: 45px;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Professional styling for select dropdowns */
.form-select {
    background-position: right 12px center;
    background-size: 16px 12px;
    padding-right: 40px;
}

/* Action Buttons */
.btn-remove {
    background: var(--danger-color);
    border: none;
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: absolute;
    top: 16px;
    right: 16px;
}

    .btn-remove:hover {
        background: #dc2626;
        transform: scale(1.1);
        box-shadow: 0 4px 12px rgba(239, 68, 68, 0.4);
    }

.btn-add-criterion {
    background: white;
    border: 2px dashed var(--gray-300);
    color: var(--gray-600);
    padding: 16px 24px;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

    .btn-add-criterion:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
        background: rgba(37, 99, 235, 0.05);
    }

/* Modal Footer */
.modal-footer {
    padding: 24px 32px;
    border: none;
    background: white;
    border-radius: 0 0 20px 20px;
}

.btn-search {
    background: linear-gradient( 145deg, var(--primary-color) 15%, var(--blue) 100%);
    border: none;
    color: white;
    padding: 14px 32px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

    .btn-search::before {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
    /*    background: linear-gradient(90deg, var(--blue), var(--primary-color));*/
        
        transition: left 0.5s;
    }

    .btn-search:hover::before {
        left: 100%;
    }

    .btn-search:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
    }

.btn-clear {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    color: var(--gray-600);
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    transition: all 0.3s ease;
}

    .btn-clear:hover {
        background: var(--gray-200);
        color: var(--gray-700);
    }

/* Animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.search-criterion {
    animation: slideInUp 0.4s ease forwards;
}


/* Search Stats */
.search-stats {
    background: linear-gradient(135deg, var(--success-color), #059669);
    color: white;
    padding: 16px;
    border-radius: var(--border-radius);
    margin-bottom: 24px;
    display: none;
}

    .search-stats.show {
        display: block;
        animation: slideInUp 0.4s ease;
    }

/* Responsive Design */
@media (max-width: 768px) {
    .modal-dialog {
        margin: 10px;
        max-width: none;
    }

    .modal-body {
        padding: 20px;
    }

    .search-criterion {
        padding: 20px;
    }

    .btn-remove {
        position: static;
        margin-top: 16px;
        width: 100%;
        border-radius: 8px;
        height: auto;
        padding: 12px;
    }
}