/* Al Karama Law Firm - Professional CSS */
:root {
    --primary-color: #B69D64;
    --secondary-color: #1F2839;
    --light-color: #F5F5EF;
    --danger-color: #790000;
    --text-color: #333;
    --text-muted: #666;
    --border-color: rgba(0,0,0,0.1);
}

/* Base Styles */
* {
    font-family: 'Noto Naskh Arabic', serif;
}

body {
    background-color: var(--light-color);
    color: var(--secondary-color);
    line-height: 1.8;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Aref Ruqaa', serif !important;
}

/* Navigation */
.navbar {
    background: rgba(31, 40, 57, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    background: rgba(31, 40, 57, 0.98);
    box-shadow: 0 2px 20px rgba(0,0,0,0.1);
}

.navbar-brand img {
    height: 70px;
}

.navbar-nav {
    margin-right: 40px;
}

.nav-link {
    color: var(--light-color) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

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

.nav-link.active {
    background-color: white !important;
    color: var(--secondary-color) !important;
    border-radius: 8px;
    padding: 8px 16px !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-toggler {
    border: none !important;
}

.navbar-toggler:focus {
    box-shadow: none !important;
}

@media (max-width: 991px) {
    .navbar-nav.me-auto {
        margin-bottom: 1rem;
    }
}

/* Buttons */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
}

.btn-secondary {
    background: var(--secondary-color);
    border: none;
    padding: 12px 30px;
    font-weight: 600;
    border-radius: 50px;
    color: white;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

/* Hero Section */
.hero-slider {
    height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(31, 40, 57, 0.8), rgba(182, 157, 100, 0.6));
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
}

.hero-title {
    font-family: 'Aref Ruqaa', serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

/* Page Spacers */
.page-spacer {
    height: 100px;
}

.contact-page-spacer {
    height: 80px;
}

.contact-cards-spacer {
    height: 56px;
}

/* Sections */
.section-white {
    background: white;
}

.section-light {
    background: var(--light-color);
}

.section-primary {
    background: var(--primary-color);
}

/* Typography */
.page-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.section-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--text-muted);
}

.text-primary-color {
    color: var(--primary-color);
}

.text-secondary-color {
    color: var(--secondary-color);
}

.text-muted-color {
    color: var(--text-muted);
}

.content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border: 1px solid var(--border-color);
}

.service-card h4 {
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.service-card p {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 20px;
}

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

.service-image {
    height: 200px;
    object-fit: cover;
    width: 100%;
}

/* Services Scroll */
.services-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 20px;
}

.services-scroll-container {
    overflow: hidden;
    flex: 1;
}

.services-scroll {
    display: flex;
    gap: 30px;
    transition: transform 0.5s ease;
    padding: 20px 0;
}

.service-item {
    flex: 0 0 320px;
    min-width: 320px;
}

.scroll-arrow {
    background: none;
    border: none;
    color: var(--primary-color);
    font-size: 2.5rem;
    cursor: pointer;
    z-index: 10;
}

.scroll-arrow:hover {
    color: var(--secondary-color);
}

/* About Section */
.about-section-content {
    padding: 20px 0;
}

.about-section-content .rich-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.about-section-content .rich-content h1,
.about-section-content .rich-content h2,
.about-section-content .rich-content h3 {
    color: var(--secondary-color);
    margin-top: 20px;
    margin-bottom: 15px;
}

.about-section-title {
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* Team Cards */
.team-card {
    background: white;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-placeholder {
    width: 100%;
    height: 100%;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 3rem;
}

.team-content {
    padding: 25px;
    text-align: center;
}

.team-content h5 {
    color: var(--secondary-color);
    margin-bottom: 8px;
    font-size: 1.2rem;
}

.team-content h6 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-weight: 500;
}

.team-content p {
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.team-contact {
    display: flex;
    justify-content: center;
    gap: 15px;
}

.team-contact a {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.team-contact a:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Contact Page */
.contact-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.contact-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
}

.contact-form-title {
    color: var(--secondary-color);
    font-weight: 700;
}

.contact-info-card {
    background: white;
    border-radius: 20px;
    padding: 40px 20px;
    border: 1px solid var(--border-color);
    height: auto;
}

.contact-card {
    padding: 10px;
}

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

.contact-card-title {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.contact-card-text {
    margin: 0;
}

.contact-card-link {
    color: var(--text-muted);
    text-decoration: none;
}

.contact-card-address {
    color: var(--text-muted);
    margin: 0;
}

.contact-form-wrapper {
    background: white;
    border-radius: 25px;
    padding: 50px;
    border: 1px solid var(--border-color);
}

.contact-form-wrapper .form-control {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    font-size: 1rem;
}

.contact-form-wrapper .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(182, 157, 100, 0.25);
}

.contact-form-wrapper .form-label {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 8px;
}

/* Map */
.map-title {
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 20px;
}

.map-placeholder {
    height: 400px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-placeholder-text {
    color: var(--text-muted);
    margin: 0;
    font-size: 1.2rem;
}

/* Call Now Section */
.call-now-section {
    background: var(--primary-color);
}

.call-now-icon {
    color: white;
    font-size: 4rem;
}

.call-now-title {
    color: white;
    margin-bottom: 10px;
}

.call-now-text {
    color: white;
    opacity: 0.9;
    margin: 0;
    font-size: 1.1rem;
}

.call-now-btn {
    background: white;
    color: var(--primary-color);
    padding: 15px 30px;
    font-weight: 600;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.1rem;
}

.call-now-btn:hover {
    background: var(--secondary-color) !important;
    color: white !important;
    transition: all 0.3s ease;
}

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

.footer-title {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.footer-text {
    line-height: 1.6;
    margin-bottom: 20px;
}

.footer-link {
    color: var(--light-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: var(--primary-color);
}

.footer-contact p {
    color: var(--light-color);
    font-size: 0.95rem;
}

.footer-icon {
    color: var(--primary-color);
}

.footer-divider {
    border-color: rgba(182, 157, 100, 0.3);
    margin: 40px 0 20px;
}

.footer-copyright {
    margin: 0;
    opacity: 0.8;
}

.footer-logo {
    height: 60px;
    max-width: 200px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Performance Optimizations */
.img-fluid {
    height: auto;
    max-width: 100%;
}

.lazy-load {
    opacity: 0;
    transition: opacity 0.3s;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Form Validation */
.form-control.is-invalid {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 0.2rem rgba(121, 0, 0, 0.25);
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Service Detail Page */
.service-hero {
    background: var(--light-color);
    padding: 60px 0;
}

.service-hero-content .service-icon {
    font-size: 4rem;
    color: var(--primary-color);
}

.service-title {
    color: var(--secondary-color);
    font-weight: 700;
    margin-bottom: 20px;
}

.service-description {
    font-size: 1.2rem;
    color: var(--text-muted);
    line-height: 1.8;
}

.service-content-section {
    background: white;
}

.service-content-wrapper {
    padding: 40px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.service-content-wrapper .rich-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}

.service-content-wrapper .rich-content h1,
.service-content-wrapper .rich-content h2,
.service-content-wrapper .rich-content h3 {
    color: var(--secondary-color);
    margin-top: 30px;
    margin-bottom: 20px;
}

.service-cta {
    background: var(--light-color);
    padding: 60px 0;
}

.cta-wrapper {
    background: white;
    padding: 50px;
    border-radius: 25px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.cta-wrapper h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.cta-wrapper p {
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus States */
.btn:focus,
.nav-link:focus,
.form-control:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Clients Grid */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 250px));
    gap: 20px;
    padding: 20px 0;
    justify-content: center;
}

.client-item {
    display: flex;
}

.client-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    width: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

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

.client-logo-container {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.client-logo {
    max-height: 80px;
    max-width: 80px;
    object-fit: contain;
}

.client-logo-placeholder {
    width: 80px;
    height: 80px;
    background: var(--light-color);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
    border-radius: 10px;
    margin-bottom: 15px;
}

.client-info {
    text-align: center;
}

.client-name {
    color: var(--secondary-color);
    font-size: 1rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.client-name:lang(en) {
    font-family: 'Merriweather', serif;
}

/* English text styling */
[lang="en"],
input[type="email"],
input[type="tel"],
a[href^="tel:"],
a[href^="mailto:"],
.contact-method-link,
.footer-contact a,
.quick-contact-item a {
    font-family: 'Merriweather', serif !important;
}



.client-card.clickable {
    cursor: pointer;
}

.client-card.clickable:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.client-description {
    color: var(--text-muted);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}



/* Contact Form */
.contact-form-wrapper {
    background: white;
    border-radius: 25px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
    border: 1px solid var(--border-color);
}

.form-floating > label {
    color: var(--text-muted);
    font-weight: 500;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select ~ label {
    color: var(--primary-color);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(182, 157, 100, 0.25);
}

/* Captcha */
.captcha-wrapper {
    background: var(--light-color);
    padding: 20px;
    border-radius: 15px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.captcha-question {
    display: flex;
    align-items: center;
    color: var(--secondary-color);
    font-weight: 500;
    flex: 1;
    min-width: 200px;
}

.captcha-input {
    width: 100px !important;
    text-align: center;
    font-weight: 600;
    font-size: 1.1rem;
}

/* Contact Methods */
.contact-method-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    text-align: center;
    height: 100%;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

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

.contact-method-icon {
    width: 80px;
    height: 80px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 1.8rem;
}

.contact-method-card h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

.contact-method-card p {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.contact-method-info {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-method-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.contact-method-link:hover {
    color: var(--secondary-color);
}

.contact-method-info small {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.contact-method-info span {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Map */
.map-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.map-placeholder {
    height: 400px;
    background: var(--light-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
}

.map-placeholder i {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.map-placeholder p {
    font-size: 1.2rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .service-item {
        flex: 0 0 280px;
        min-width: 280px;
    }
    
    .scroll-arrow {
        font-size: 2rem;
    }
    
    .services-container {
        gap: 10px;
    }
    
    .contact-form-wrapper {
        padding: 30px 20px;
    }
    
    .contact-info-card {
        padding: 30px 15px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .navbar-nav {
        margin-right: 0;
    }
    
    .service-content-wrapper {
        padding: 25px 15px;
    }
    
    .cta-wrapper {
        padding: 30px 20px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .service-hero-content .service-icon {
        font-size: 3rem;
    }
}