/* 
=============================================
  Al-Mukhls Premium Corporate Website Styles
=============================================
*/

:root {
    /* Color Palette based on Al-Mukhls Logo */
    --primary-color: #ea5b2a; /* Logo Orange */
    --primary-light: #f47d54;
    --primary-dark: #c84419;
    --secondary-color: #1e293b; /* Dark Slate for contrast */
    --secondary-hover: #334155;
    
    /* Backgrounds & Surfaces */
    --bg-body: #f8fafc;
    --bg-surface: #ffffff;
    --bg-surface-alt: #fff5f2; /* Light orange tint */
    
    /* Text Colors */
    --text-main: #1e293b;
    --text-muted: #64748b;
    --text-inverse: #ffffff;
    
    /* Layout & Spacing */
    --container-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Effects & Transitions */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 10px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.12);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Base Reset & Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Cairo', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: var(--transition-normal);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

[x-cloak] {
    display: none !important;
}

/* Layout Utilities */
.web-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    gap: 0.5rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-inverse);
    box-shadow: 0 4px 10px rgba(26, 79, 186, 0.3);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(26, 79, 186, 0.4);
    color: var(--text-inverse);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-inverse);
    box-shadow: 0 4px 10px rgba(247, 148, 29, 0.3);
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(247, 148, 29, 0.4);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--text-inverse);
}

.btn-block {
    width: 100%;
}

/* Header & Navigation */
.web-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition-normal);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
    transition: var(--transition-normal);
}

.scrolled-header {
    height: 70px;
    box-shadow: var(--shadow-sm);
}

.logo {
    flex-shrink: 0; /* Prevents the logo from getting squished */
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.desktop-menu ul {
    display: flex;
    gap: 2rem;
}

.desktop-menu a {
    color: var(--text-main);
    font-weight: 600;
    font-size: 1.05rem;
    position: relative;
    padding: 0.5rem 0;
}

.desktop-menu a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 3px;
    background-color: var(--primary-color);
    transition: var(--transition-normal);
    border-radius: 3px;
}

.desktop-menu a:hover::after {
    width: 100%;
}

.desktop-menu a.active::after {
    width: 100%;
    background: linear-gradient(90deg, var(--primary-color), #ff8a65, var(--primary-color));
    background-size: 200% 100%;
    animation: active-line-shine 2s linear infinite;
    box-shadow: 0 2px 8px rgba(234, 91, 42, 0.4);
}

@keyframes active-line-shine {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.desktop-menu a:hover,
.desktop-menu a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.75rem;
    color: var(--text-main);
    cursor: pointer;
}

/* Mobile Menu */
.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 998;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    background-color: var(--bg-surface);
    z-index: 999;
    padding: var(--spacing-xl) var(--spacing-md) var(--spacing-md);
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
}

.mobile-menu ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-menu a {
    display: block;
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-main);
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--bg-surface-alt);
}

.slide-in {
    transform: translateX(0);
    transition: transform var(--transition-normal);
}

.slide-out {
    transform: translateX(100%);
    transition: transform var(--transition-normal);
}

/* Main Content Padding (for fixed header) */
.web-main {
    padding-top: 80px;
    min-height: calc(100vh - 350px);
}

.web-footer {
    background-color: var(--secondary-color);
    color: rgba(255, 255, 255, 0.7);
    padding: var(--spacing-xl) 0 var(--spacing-md);
    margin-top: var(--spacing-xl);
    border-top: 5px solid var(--primary-color);
    position: relative;
    overflow: hidden;
}

.web-footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(234, 91, 42, 0.08) 0%, transparent 60%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}

.web-footer::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

.footer-grid, .footer-bottom {
    position: relative;
    z-index: 1;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1.5fr 1fr;
    gap: 3rem;
    margin-bottom: var(--spacing-xl);
}

/* Footer CTA Banner */
.footer-cta {
    background: linear-gradient(135deg, rgba(234, 91, 42, 0.1) 0%, rgba(234, 91, 42, 0.02) 100%);
    border: 1px solid rgba(234, 91, 42, 0.2);
    border-radius: 20px;
    padding: 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 1;
}

.cta-content h2 {
    color: white;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.cta-content p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 1rem;
}

.footer-logo {
    max-width: 180px;
    height: auto;
    margin-bottom: 1.5rem;
    object-fit: contain;
}

.about-col p {
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    line-height: 1.8;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 1.35rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(234, 91, 42, 0.3);
    color: white;
}

.footer-col h3 {
    color: #fff;
    font-size: 1.3rem;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 0.8rem;
    font-weight: 800;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background-color: var(--primary-color);
    border-radius: 3px;
    box-shadow: 0 0 10px rgba(234, 91, 42, 0.4);
}

.links-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Ensure correct flex alignment for RTL text with LTR strings */
.contact-col li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
    justify-content: flex-start;
}

.contact-col i {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-top: 2px;
}

.footer-col ul a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.95rem;
    display: inline-block;
    transition: all 0.3s ease;
}

.footer-col ul a:hover {
    color: var(--primary-color);
    transform: translateX(-8px);
}

.contact-col li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.contact-col i {
    font-size: 1.35rem;
    color: var(--primary-color);
    margin-top: 2px;
}

.contact-col li a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
}

.contact-col li a:hover {
    color: white;
    transform: none;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.95rem;
}

.made-with-love {
    color: rgba(255,255,255,0.6);
}

/* Responsive Footer adjustments */
@media (max-width: 991px) {
    .footer-cta {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .links-grid-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.section-padding { padding: var(--spacing-xl) 0; }
.bg-light { background-color: var(--bg-surface-alt); }
.bg-white { background-color: var(--bg-surface); }

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 800;
}

.section-title p {
    color: var(--text-muted);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

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

.animate-fade-up {
    animation: fadeInUp 0.8s ease forwards;
}

/* Responsive Design */
@media (max-width: 991px) {
    .desktop-menu { display: none; }
    .header-actions .btn { display: none; }
    .mobile-menu-btn { display: block; }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    :root {
        --spacing-xl: 4rem;
        --spacing-lg: 3rem;
    }
}

/* Bootstrap Pagination Styles */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    padding-right: 0;
    list-style: none;
    flex-wrap: wrap;
}

.page-item .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid #e2e8f0;
    background-color: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.page-item .page-link:hover {
    background-color: #f8fafc;
    color: var(--primary-color);
    border-color: var(--primary-light);
}

.page-item.active .page-link {
    background-color: var(--primary-color);
    color: var(--text-inverse);
    border-color: var(--primary-color);
    z-index: 2;
}

.page-item.disabled .page-link {
    opacity: 0.5;
    pointer-events: none;
    background-color: #f1f5f9;
}

/* Hide Bootstrap Mobile Pagination and Results Text */
nav .d-sm-none {
    display: none !important;
}

nav .d-none {
    display: flex !important;
    width: 100%;
    justify-content: center;
}

nav .d-none > div:first-child {
    display: none !important;
}

/* ==========================================================================
   Agencies Gallery Section
   ========================================================================== */
.agencies-section {
    position: relative;
    padding-bottom: 6rem;
}

.marquee-wrapper {
    position: relative;
    display: flex;
    overflow: hidden;
    user-select: none;
    gap: 2rem;
    padding: 2rem 0;
    direction: ltr; /* Ensure math for translateX works perfectly in RTL site */
}

.marquee-wrapper::before,
.marquee-wrapper::after {
    content: "";
    position: absolute;
    top: 0;
    width: 200px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.marquee-wrapper::before {
    left: 0;
    background: linear-gradient(to right, var(--bg-surface-alt), transparent);
}

.marquee-wrapper::after {
    right: 0;
    background: linear-gradient(to left, var(--bg-surface-alt), transparent);
}

.marquee-content {
    flex-shrink: 0;
    display: flex;
    justify-content: flex-start;
    min-width: 100%;
    gap: 2rem;
    animation: scroll-marquee 150s linear infinite;
    will-change: transform; /* Performance boost */
}

.marquee-wrapper:hover .marquee-content {
    animation-play-state: paused;
}

@keyframes scroll-marquee {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100% - 2rem));
    }
}

.brand-card {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    height: 100px;
    transition: all 0.3s ease;
}

.brand-card:hover {
    transform: translateY(-5px);
    filter: drop-shadow(0 15px 15px rgba(234, 91, 42, 0.15));
}

/* Unified About Us Section */
.about-unified-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-title {
    color: var(--primary-dark);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
}

.about-desc {
    color: var(--text-muted);
    line-height: 1.9;
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.vision-mission-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.vm-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.vm-card::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: var(--primary-color);
    border-radius: 4px 0 0 4px;
}

.vm-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(234, 91, 42, 0.08);
}

.vm-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    background: rgba(234, 91, 42, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 1.5rem;
}

.vm-title {
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.vm-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

.about-logo-box {
    width: 100%;
    background: var(--primary-color);
    border-radius: 20px;
    padding: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(234, 91, 42, 0.2);
}

.about-big-logo {
    width: 100%;
    max-width: 400px;
    height: auto;
    object-fit: contain;
}

/* Unified Numbers Grid */
.unified-numbers-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-top: 4rem;
}

.unified-number-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    border: 1px solid rgba(0,0,0,0.04);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    transition: all 0.3s ease;
}

.unified-number-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(234, 91, 42, 0.08);
    border-color: rgba(234, 91, 42, 0.2);
}

.un-icon {
    font-size: 2.5rem;
    color: var(--primary-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.unified-number-card:hover .un-icon {
    color: var(--primary-color);
}

.un-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
}

@media (max-width: 992px) {
    .about-unified-grid {
        grid-template-columns: 1fr;
    }
    
    .unified-numbers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-logo-box {
        grid-row: 1; /* Move image above text on mobile */
    }
}

@media (max-width: 576px) {
    .vision-mission-cards {
        grid-template-columns: 1fr;
    }
    
    .unified-numbers-grid {
        grid-template-columns: 1fr;
    }
}
