@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700&display=swap');

/* Base Styles */
:root {
    --primary-color: #004643;
    --secondary-color: #f9bc60;
    --background-color: #f8f7f4;
    --text-color: #3a3a3a;
    --heading-font: 'Cairo', sans-serif;
    --body-font: 'Cairo', sans-serif;
}

body {
    font-family: var(--body-font);
    background-color: var(--background-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    direction: rtl;
    text-align: right;
    font-size: 16px;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* Enhanced Header & Navigation */
header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 0.5rem 0;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
    padding: 0.75rem 1rem !important;
    font-weight: 600;
    text-decoration: none;
    color: var(--text-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0, 70, 67, 0.8), rgba(0, 70, 67, 0.8)), url('../images/hero-bg-.jpg') no-repeat center center;
    background-size: cover;
    padding: 120px 0;
    color: #fff;
    position: relative;
    margin-bottom: 3rem;
    border-radius: 0 0 2rem 2rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.hero-section h1 {
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 0.8s ease-out;
}

.hero-section .lead {
    font-size: 1.25rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

/* Search Bar */
.search-bar {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.search-bar-gray {
    background: #fff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.search-bar .form-control,
.search-bar .form-select {
    border: none;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.search-bar-gray .form-control,
.search-bar-gray .form-select {
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
}

.search-bar .btn-primary {
    width: 100%;
    padding: 0.75rem;
}

/* Modern Button Styles */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #006b67 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 70, 67, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #003330 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 70, 67, 0.3);
}

.btn-secondary {
    background-color: #f1f5f9;
    color: var(--primary-color);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
    color: #003330;
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 0.625rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: #fff;
    transform: translateY(-2px);
}

/* Enhanced Cards */
.card {
    position: relative;
    background-color: white;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    overflow: hidden;
    height: 100%;
    animation: fadeInUp 0.6s ease-out backwards;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.card-img-top {
    height: 220px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.card-body {
    padding: 1.5rem;
}

.card-title {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.card-text {
    color: #666;
    margin-bottom: 1rem;
}

/* Favorite Icon */
.favorite-icon {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.favorite-icon:hover {
    transform: scale(1.15);
    background-color: #fff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.favorite-icon i {
    font-size: 1.1rem;
    color: #cbd5e0;
    transition: all 0.3s ease;
}

.favorite-icon:hover i {
    color: #ff4757;
}

.favorite-icon.favorited i {
    color: #ff4757;
}

/* Modern Section Titles */
.section-title {
    position: relative;
    color: var(--primary-color);
    padding-bottom: 1.25rem;
    margin-bottom: 3rem;
    text-align: center;
    font-weight: 800;
    font-size: 2.25rem;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 5px;
    background: linear-gradient(90deg, var(--secondary-color), #ff9f1c);
    border-radius: 10px;
}


/* Modern Form Elements */
select,
input {
    padding: 0.75rem 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    outline: none;
}

select:focus,
input:focus {
    border-color: #abd1c6;
    box-shadow: 0 0 0 3px rgba(171, 209, 198, 0.2);
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: #fff;
    padding-top: 4rem;
    margin-top: auto;
    /* Sticky footer */
}

footer a {
    color: var(--secondary-color) !important;
    text-decoration: none;
    transition: opacity 0.3s;
}

footer a:hover {
    opacity: 0.8;
}

/* Utilities */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.rounded-lg {
    border-radius: 1rem !important;
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

/* Sticky Sidebar Utility */
.sticky-sidebar {
    position: sticky;
    top: 6rem; /* Adjust based on header height + spacing */
    height: fit-content;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

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

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

::-webkit-scrollbar-thumb {
    background: #abd1c6;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* Footer Styles */
.main-footer {
    background-color: #004643;
    /* Dark primary color for high contrast */
    color: #ffffff;
    margin-top: auto;
}

.footer-heading {
    color: #f9bc60;
    /* Secondary accent color */
    font-weight: bold;
    margin-bottom: 1.5rem;
}

.footer-text {
    color: #e8e4e6;
    line-height: 1.6;
}

.footer-link {
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer-link:hover {
    color: #f9bc60;
    text-decoration: none;
}

.copyright-section {
    background-color: rgba(0, 0, 0, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #e8e4e6;
}

/* Featured Badge Ribbon */
.featured-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: linear-gradient(135deg, #f9bc60 0%, #e8a040 100%);
    color: #004643;
    padding: 0.4rem 1rem;
    font-weight: 700;
    font-size: 0.85rem;
    border-radius: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 15;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: fadeInDown 0.5s ease-out;
}

.featured-badge::before {
    content: '⭐';
    margin-left: 0.3rem;
}

/* Featured card highlight */
.card.featured {
    border: 2px solid #f9bc60;
    box-shadow: 0 4px 12px rgba(249, 188, 96, 0.3);
}

.card.featured:hover {
    box-shadow: 0 8px 20px rgba(249, 188, 96, 0.4);
}

/* Animation for featured badge */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Responsive adjustments */
@media (max-width: 768px) {
    .featured-badge {
        font-size: 0.75rem;
        padding: 0.3rem 0.75rem;
        top: 10px;
        left: 10px;
    }
}