:root {
    --primary-color: #b8860b; /* Gold color from logo */
    --secondary-color: #333;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --border-color: #dee2e6;
}

html {
    font-size: 14px;
    height: 100%;
}
/* سياسة الخصوصية */
.privacy-page {
    padding: 80px 15px;
    background-color: var(--light-color); /* لون خلفية فاتح */
    color: var(--secondary-color);
}

    .privacy-page .section-title {
        color: var(--primary-color);
        font-weight: 700;
        font-size: 2rem;
        margin-bottom: 40px;
        position: relative;
        display: inline-block;
    }

        .privacy-page .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            right: 0;
            width: 50px;
            height: 3px;
            background-color: var(--primary-color);
        }

    .privacy-page .card {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        padding: 20px;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .privacy-page h3,
    .privacy-page h4 {
        color: var(--primary-color);
        font-weight: 600;
        margin-top: 20px;
    }

    .privacy-page p,
    .privacy-page li {
        font-size: 1rem;
        line-height: 1.8;
        margin-bottom: 15px;
    }

    .privacy-page ul {
        margin-left: 20px;
    }

    .privacy-page li {
        list-style-type: disc;
    }

    .privacy-page .mt-4 {
        margin-top: 1.5rem !important;
    }

@media (max-width: 767.98px) {
    .privacy-page {
        padding: 40px 15px;
    }

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

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
    
    /* Ensure proper spacing on desktop */
    .container main,
    main.pb-5 {
        padding-bottom: 60px !important;
    }
    
    /* Footer spacing for desktop */
    footer {
        margin-top: 50px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--primary-color);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    position: relative;
    margin: 0;
    padding: 0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* Header Styles */
.navbar {
    background-color: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar-brand img {
    max-height: 60px;
}

.navbar-nav .nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    margin: 0 10px;
    transition: color 0.3s;
}

/* Keep nav items on a single line and tidy spacing */
.navbar .navbar-collapse {
    flex-wrap: nowrap;
    align-items: center;
}

/* Enable scroll only when authenticated (class added in layout) */
.navbar .navbar-collapse.auth-expanded {
    overflow: visible; /* السماح بإظهار القوائم المنسدلة خارج الشريط */
}

/* تحسين ظهور قائمة المستخدم المنسدلة في الهيدر */
.navbar .nav-item.dropdown .dropdown-menu {
    margin-top: 0.4rem;
}

.navbar .navbar-nav {
    flex-wrap: nowrap;
    gap: 6px;
}

/* على الشاشات الصغيرة تصبح الروابط عمودية داخل القوائم المنهارة */
@media (max-width: 991.98px) {
    .navbar .navbar-nav {
        flex-wrap: wrap;
        gap: 0;
    }
    .navbar .navbar-nav .nav-link {
        display: block;
        width: 100%;
        padding: 0.5rem 0;
        font-size: 1rem;
        white-space: nowrap !important; /* كلمة واحدة لكل سطر */
        overflow: hidden;
        text-overflow: ellipsis; /* لو النص طويل جداً */
    }
}

.navbar .navbar-nav .nav-link {
    white-space: nowrap;
    padding: 0.45rem 0.55rem;
    font-size: 0.9rem;
}

/* Responsive shrinking to avoid scroll while keeping one line */
@media (max-width: 1400px) {
    .navbar .navbar-nav .nav-link {
        font-size: 0.88rem;
        margin: 0 6px;
        padding: 0.4rem 0.5rem;
    }
    .navbar-brand img {
        width: 64px;
        height: 64px;
    }
}

@media (max-width: 1200px) {
    .navbar .navbar-nav .nav-link {
        font-size: 0.84rem;
        margin: 0 4px;
        padding: 0.35rem 0.45rem;
    }
    .navbar .navbar-nav { gap: 4px; }
    .navbar-brand img {
        width: 58px;
        height: 58px;
    }
}

@media (max-width: 992px) {
    /* Below this width Bootstrap collapses, so no need to keep one line */
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background-color: var(--light-color);
    padding: 80px 0;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

    .hero::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-image: url('/uploads/lawyer/default-logo.png');
        background-repeat: no-repeat;
        background-position: left center;
        background-size: contain;
        opacity: 0.1;
        z-index: 1;
    }

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Articles Section */
.articles-section {
    padding: 60px 0;
}

.section-title {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    right: 0;
    width: 50%;
    height: 3px;
    background-color: var(--primary-color);
}

.article-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.article-image {
    height: 200px;
    background-size: contain; /* عرض الصورة بالكامل */
    background-repeat: no-repeat;
    background-position: center;
    background-color: #f8f9fa; /* خلفية محايدة حول الصورة */
}

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

.article-title {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.article-date {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.article-excerpt {
    color: var(--secondary-color);
    margin-bottom: 20px;
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-height: 1.5em;
    line-height: 1.5em;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    font-weight: 500;
    padding: 8px 20px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #96700a;
    border-color: #96700a;
}

/* Contact Section */
.contact-section {
    background-color: var(--light-color);
    padding: 60px 0;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-left: 15px;
    margin-top: 3px;
}

.contact-text h4 {
    font-size: 1.1rem;
    margin-bottom: 5px;
    color: var(--secondary-color);
}

.contact-text p {
    color: #6c757d;
    margin-bottom: 0;
}

/* Footer */
footer {
    position: relative; /* خليه ياخد مكانه الطبيعي */
    width: 100%;
    white-space: normal;
    line-height: 1.5;
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    margin-top: auto; /* يدفع الفوتر لأسفل الصفحة */
    z-index: auto; /* مش محتاج رقم كبير */
    padding: 15px 0;
    clear: both; /* يتأكد إنه تحت أي عناصر float */
    text-align: center; /* تنسيق داخلي */
}

    footer a {
        color: white;
        font-weight: 500;
        text-decoration: none;
        transition: color 0.3s ease;
        margin: 0 8px;
    }

        footer a:hover {
            color: rgba(255, 255, 255, 0.8);
        }


/* Social Icons */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: white;
    color: var(--primary-color);
    transform: translateY(-3px);
}

/* Admin Footer */
.admin-footer {
    margin-top: 30px;
    font-size: 0.9rem;
    padding: 10px 0;
    position: static;
    bottom: auto;
}

/* Article Detail Page */
.article-detail {
    padding: 40px 0;
}

.article-header {
    margin-bottom: 30px;
}

.article-header h1 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
}

.article-meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.article-cover {
    width: 100%;
    max-height: 400px;
    object-fit: contain; /* لا تقص الصورة؛ اعرضها كاملة */
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 30px;
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--secondary-color);
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    max-width: 100%;
}

.article-body p {
    margin-bottom: 1.2rem;
    text-align: justify;
}

.article-body h1, 
.article-body h2, 
.article-body h3, 
.article-body h4, 
.article-body h5, 
.article-body h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    font-weight: 600;
}

.article-body ul, 
.article-body ol {
    padding-right: 1.5rem;
    margin-bottom: 1.2rem;
}

.article-body li {
    margin-bottom: 0.5rem;
}

.article-body img,
.article-body video,
.article-body iframe {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 15px auto;
    border-radius: 5px;
}

.article-container {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
}

.media-gallery {
    margin-top: 40px;
}

.media-item {
    margin-bottom: 20px;
}

.media-item img,
.media-item video {
    width: 100%;
    border-radius: 8px;
}

.media-caption {
    margin-top: 10px;
    color: #6c757d;
    font-style: italic;
}

/* Admin Styles */
.admin-section {
    padding: 40px 0;
}

.admin-content {
    padding: 20px;
    min-height: calc(100vh - 300px);
    margin-bottom: 80px;
}

.admin-dashboard .admin-card {
    background: white;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
}

.admin-dashboard .admin-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.admin-dashboard .admin-card-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.admin-dashboard .admin-card-content h3 {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

.admin-dashboard .admin-card-content p {
    color: #6c757d;
    margin-bottom: 20px;
}

.admin-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    border-radius: 4px;
    border: 1px solid var(--border-color);
    padding: 8px 12px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(184, 134, 11, 0.25);
}

.table {
    width: 100%;
    margin-bottom: 20px;
}

.table th {
    background-color: var(--light-color);
    color: var(--secondary-color);
    font-weight: 600;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 0.875rem;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: var(--dark-color);
}

.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
}

/* Responsive */
@media (max-width: 767.98px) {
    .hero {
        padding: 40px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .article-image {
        height: 150px;
    }
    
    .article-body {
        padding: 15px;
        font-size: 1rem;
    }
    
    .article-container {
        margin-bottom: 20px;
    }
    
    .article-body h1 {
        font-size: 1.5rem;
    }
    
    .article-body h2 {
        font-size: 1.3rem;
    }
    
    .article-body h3 {
        font-size: 1.2rem;
    }
    
    /* Footer responsive fixes */
    footer {
        padding: 20px 0;
        margin-top: 30px;
    }
    
    footer .container {
        padding: 0 15px;
    }
    
    footer .row {
        text-align: center;
    }
    
    footer .col-md-4 {
        margin-bottom: 15px;
    }
    
    footer .col-md-4:last-child {
        margin-bottom: 0;
    }
    
    /* Ensure main content has enough bottom padding on mobile */
    .container main,
    main.pb-5 {
        padding-bottom: 120px !important;
    }
}
/* صفحة اتصل بنا */
.contact-page {
    padding: 80px 15px;
    background-color: var(--light-color);
    color: var(--secondary-color);
}

    .contact-page .section-title {
        color: var(--primary-color);
        font-weight: 700;
        font-size: 2rem;
        margin-bottom: 15px;
        position: relative;
        display: inline-block;
    }

        .contact-page .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            right: 0;
            width: 50px;
            height: 3px;
            background-color: var(--primary-color);
        }

    .contact-page .lead {
        font-size: 1.1rem;
        color: #6c757d;
    }

    .contact-page .card {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background-color: white;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .contact-page .card-header {
        background-color: var(--primary-color);
        color: white;
        font-weight: 600;
        padding: 15px;
        border-radius: 8px 8px 0 0;
    }

    .contact-page .card-body h4,
    .contact-page .card-body h5 {
        color: var(--primary-color);
        font-weight: 500;
    }

    .contact-page .location-item,
    .contact-page .phone-item,
    .contact-page .email-item {
        margin-bottom: 15px;
    }

    .contact-page a {
        color: var(--primary-color);
        text-decoration: none;
    }

        .contact-page a:hover {
            text-decoration: underline;
        }

@media (max-width: 767.98px) {
    .contact-page {
        padding: 40px 15px;
    }

        .contact-page .section-title {
            font-size: 1.5rem;
        }
}
/* About Page Styles */
.about-page {
    padding: 60px 0;
    background-color: var(--light-color);
}

    .about-page .section-title {
        color: var(--primary-color);
        font-weight: 700;
        position: relative;
        display: inline-block;
    }

        .about-page .section-title::after {
            content: '';
            position: absolute;
            bottom: -10px;
            left: 50%;
            transform: translateX(-50%);
            width: 50px;
            height: 3px;
            background-color: var(--primary-color);
        }

    .about-page .about-logo {
        border-radius: 10px;
    }

    .about-page .card {
        border: 1px solid var(--border-color);
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    }

    .about-page .card-title {
        color: var(--primary-color);
        font-weight: 600;
    }

    .about-page .service-card {
        background-color: white;
        padding: 30px 20px;
        border-radius: 10px;
        text-align: center;
        box-shadow: 0 6px 15px rgba(0,0,0,0.05);
        transition: transform 0.3s, box-shadow 0.3s;
    }

        .about-page .service-card:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        }

    .about-page .service-icon {
        font-size: 40px;
        color: var(--primary-color);
        margin-bottom: 15px;
    }

    .about-page .service-card h4 {
        font-weight: 600;
        margin-bottom: 10px;
    }

    .about-page .service-card p {
        font-size: 0.95rem;
        color: var(--secondary-color);
    }

/* Responsive */
@media (max-width: 991.98px) {
    .about-page {
        padding: 40px 0;
    }

        .about-page .service-card {
            padding: 20px 15px;
        }

        .about-page .about-logo {
            max-height: 150px;
        }
}

@media (max-width: 575.98px) {
    .about-page .service-card {
        padding: 15px 10px;
    }

    .about-page .service-icon {
        font-size: 30px;
    }
}
/* ===== سيكشن حجز استشارة قانونية ===== */
.consultation-section {
    background-color: #f9f9f9;
    color: #333;
    font-family: "Cairo", sans-serif;
}

    .consultation-section .card {
        border-radius: 12px;
        border: 1px solid #e0e0e0;
    }

    .consultation-section .card-header {
        background-color: #d9f2d9; /* أخضر فاتح */
        font-weight: 600;
        font-size: 1.1rem;
        color: #2a7a2a;
    }

    .consultation-section h1.display-4 {
        color: #2a7a2a;
    }

    .consultation-section .lead {
        color: #555;
    }

    .consultation-section .btn-primary {
        background-color: #ffcc00; /* أصفر */
        border-color: #ffcc00;
        color: #333;
        font-weight: bold;
        transition: 0.3s;
    }

        .consultation-section .btn-primary:hover {
            background-color: #e6b800;
            border-color: #e6b800;
            color: #000;
        }

    .consultation-section .form-control,
    .consultation-section .form-select {
        border-radius: 8px;
        border: 1px solid #ccc;
    }

    .consultation-section .form-floating > label {
        color: #555;
    }

    .consultation-section .card-body h6 {
        color: #2a7a2a;
    }

    .consultation-section .card-body a {
        color: #2a7a2a;
        text-decoration: underline;
    }

        .consultation-section .card-body a:hover {
            color: #1f5c1f;
        }

@media (max-width: 768px) {
    .consultation-section h1.display-4 {
        font-size: 2rem;
    }
    
    /* Additional mobile fixes for consultation page */
    .consultation-section {
        padding-bottom: 120px;
    }
    
    .consultation-section .container {
        padding-bottom: 40px;
    }
}

@media (min-width: 769px) {
    /* Desktop consultation page fixes */
    .consultation-section {
        padding-bottom: 80px;
    }
    
    .consultation-section .container {
        padding-bottom: 20px;
    }
}