/* ==========================================
   ستوديو بهجة - Bahja Studio Theme
   ========================================== */

/* Color System */
:root {
    --primary-color: #2f275a;
    --secondary-color: #e62c4e;
    --accent-color: #11af9e;
    --highlight-color: #fece1b;
    --light-bg: #f8f9fa;
    --dark-text: #2f275a;
    --light-text: #ffffff;
}

/* RTL Support */
body {
    direction: rtl;
    text-align: right;
    font-family: 'Rubik', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--light-bg);
}

/* Headings with Zain font */
h1, h2, h3, h4, h5, h6,
.navbar-brand,
.section-title,
.card-title,
.hero-section h1 {
    font-family: 'Zain', 'Rubik', sans-serif;
    font-weight: 700;
}

/* ==========================================
   Buttons
   ========================================== */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}
.btn-primary:hover {
    background-color: #241c47;
    border-color: #241c47;
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}
.btn-secondary:hover {
    background-color: #c4253f;
    border-color: #c4253f;
}

.btn-accent {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: white;
}
.btn-accent:hover {
    background-color: #0d8c7f;
    border-color: #0d8c7f;
    color: white;
}

.btn-highlight {
    background-color: var(--highlight-color);
    border-color: var(--highlight-color);
    color: var(--dark-text);
}
.btn-highlight:hover {
    background-color: #e5b918;
    border-color: #e5b918;
}

/* ==========================================
   Navbar
   ========================================== */
.navbar-bahja {
    background-color: var(--primary-color) !important;
    padding: 1rem 0;
}

.navbar-bahja .navbar-brand {
    color: var(--highlight-color) !important;
    font-size: 1.8rem;
    font-weight: bold;
}

.navbar-bahja .nav-link {
    color: var(--light-text) !important;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.navbar-bahja .nav-link:hover {
    color: var(--highlight-color) !important;
}

.navbar-bahja .nav-link.active {
    color: var(--highlight-color) !important;
    border-bottom: 2px solid var(--highlight-color);
}

/* ==========================================
   Hero Section
   ========================================== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1535 100%);
    color: white;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(254, 206, 27, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(17, 175, 158, 0.08) 0%, transparent 50%),
                radial-gradient(circle at 50% 50%, rgba(230, 44, 78, 0.05) 0%, transparent 50%);
}

.hero-section h1 {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.4;
}

.hero-section .highlight {
    color: var(--highlight-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    opacity: 0.9;
    line-height: 1.8;
}

/* ==========================================
   Section Titles
   ========================================== */
.section-title {
    color: var(--primary-color);
    font-weight: bold;
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

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

/* ==========================================
   Stats Section
   ========================================== */
.stats-section {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-number {
    font-family: 'Zain', sans-serif;
    font-size: 3rem;
    font-weight: bold;
    color: var(--highlight-color);
}

.stat-label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==========================================
   Cards
   ========================================== */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(47, 39, 90, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(47, 39, 90, 0.15);
}

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-title {
    color: var(--primary-color);
    font-weight: bold;
}

.card-category {
    background-color: var(--accent-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
}

.card-type {
    background-color: var(--secondary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    display: inline-block;
}

/* ==========================================
   Service Cards
   ========================================== */
.service-card {
    background: white;
    border-radius: 16px;
    padding: 40px 30px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(47, 39, 90, 0.12);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 2.2rem;
    position: relative;
    transition: all 0.3s ease;
}

.service-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0.12;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card:hover .service-icon::before {
    opacity: 0.18;
}

.service-card h5 {
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.service-card p {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ==========================================
   Category Cards
   ========================================== */
.category-card {
    background: white;
    border-radius: 16px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
}

.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: currentColor;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(47, 39, 90, 0.12);
}

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

.category-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
    font-size: 2rem;
    position: relative;
    transition: all 0.3s ease;
}

.category-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    background: currentColor;
    opacity: 0.12;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.category-card:hover .category-icon {
    transform: scale(1.1);
}

.category-card h6 {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

/* ==========================================
   Work/Portfolio Cards
   ========================================== */
.work-card {
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

.work-card .work-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(47, 39, 90, 0.95) 0%, transparent 100%);
    padding: 30px 20px 20px;
    color: white;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.work-card:hover .work-overlay {
    transform: translateY(0);
    opacity: 1;
}

/* ==========================================
   Event Cards
   ========================================== */
.event-card {
    position: relative;
}

.event-date {
    position: absolute;
    top: 15px;
    left: 15px;
    background: var(--secondary-color);
    color: white;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    min-width: 60px;
    z-index: 2;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    display: block;
}

.event-date .month {
    font-size: 0.8rem;
}

/* ==========================================
   Profile/Team Cards
   ========================================== */
.profile-card {
    text-align: center;
    padding: 30px 20px;
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 4px solid var(--highlight-color);
    margin-bottom: 15px;
    object-fit: cover;
}

.profile-name {
    color: var(--primary-color);
    font-weight: bold;
    margin-bottom: 5px;
}

.profile-specialization {
    color: var(--accent-color);
    font-size: 0.9rem;
}

/* ==========================================
   CTA Section
   ========================================== */
.cta-section {
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    color: white;
    padding: 80px 0;
}

.cta-section h2 {
    font-weight: 900;
}

/* ==========================================
   About / Info Sections
   ========================================== */
.info-box {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(47, 39, 90, 0.08);
    height: 100%;
}

.info-box .icon-circle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.timeline-item {
    position: relative;
    padding-right: 40px;
    padding-bottom: 30px;
    border-right: 3px solid var(--highlight-color);
}

.timeline-item::before {
    content: '';
    position: absolute;
    right: -8px;
    top: 5px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--secondary-color);
    border: 3px solid white;
}

.timeline-item:last-child {
    border-right: none;
    padding-bottom: 0;
}

/* ==========================================
   Contact Form
   ========================================== */
.contact-info-card {
    background: var(--primary-color);
    color: white;
    border-radius: 16px;
    padding: 40px;
    height: 100%;
}

.contact-info-card h4 {
    color: var(--highlight-color);
    margin-bottom: 25px;
}

.contact-info-item {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-info-item .icon {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 15px;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* ==========================================
   Footer
   ========================================== */
.footer {
    background-color: var(--primary-color);
    color: white;
    padding: 60px 0 20px;
}

.footer h5 {
    color: var(--highlight-color);
    font-weight: bold;
    margin-bottom: 20px;
}

.footer a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--highlight-color);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 40px;
}

.social-icons a {
    display: inline-flex;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--highlight-color);
    color: var(--primary-color) !important;
}

/* ==========================================
   Forms
   ========================================== */
.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.2rem rgba(17, 175, 158, 0.25);
}

.form-label {
    color: var(--primary-color);
    font-weight: 500;
}

/* ==========================================
   Tags
   ========================================== */
.tag {
    display: inline-block;
    background: var(--light-bg);
    color: var(--primary-color);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    margin: 3px;
    transition: all 0.3s ease;
}

.tag:hover {
    background: var(--primary-color);
    color: white;
}

/* ==========================================
   Empty State
   ========================================== */
.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 4rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

.empty-state h4 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

.empty-state p {
    color: #6c757d;
}

/* ==========================================
   Blog Cards
   ========================================== */
.blog-card .card-body {
    padding: 25px;
}

.blog-card .blog-meta {
    font-size: 0.85rem;
    color: #6c757d;
    margin-bottom: 10px;
}

.blog-card .blog-meta i {
    color: var(--accent-color);
}

/* ==========================================
   Library Items
   ========================================== */
.library-card {
    border-right: 4px solid var(--accent-color);
}

.library-card .file-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* ==========================================
   Page Header
   ========================================== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a1535 100%);
    color: white;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 70%, rgba(254, 206, 27, 0.06) 0%, transparent 50%),
                radial-gradient(circle at 70% 30%, rgba(17, 175, 158, 0.06) 0%, transparent 50%);
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.85;
    font-size: 1.1rem;
}

.breadcrumb-item a {
    color: var(--highlight-color);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255, 255, 255, 0.5);
}

/* ==========================================
   Workshop/Event Detail
   ========================================== */
.workshop-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.workshop-badge.upcoming {
    background: rgba(17, 175, 158, 0.1);
    color: var(--accent-color);
}

.workshop-badge.past {
    background: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* ==========================================
   Animations
   ========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-delay-1 { animation-delay: 0.1s; animation-fill-mode: both; }
.animate-delay-2 { animation-delay: 0.2s; animation-fill-mode: both; }
.animate-delay-3 { animation-delay: 0.3s; animation-fill-mode: both; }
.animate-delay-4 { animation-delay: 0.4s; animation-fill-mode: both; }

/* ==========================================
   Responsive
   ========================================== */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section {
        padding: 60px 0;
    }

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

    .navbar-bahja .navbar-brand {
        font-size: 1.4rem;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

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

    .cta-section {
        padding: 50px 0;
    }
}

@media (max-width: 576px) {
    .service-card {
        padding: 25px 20px;
    }

    .hero-section h1 {
        font-size: 1.7rem;
    }
}
