/* ===============================================
   2MOROCCO - PERFORMANCE & SEO IMPROVEMENTS
   =============================================== */

/* Critical CSS for above-the-fold content */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive Images */
.img-responsive {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Lazy Loading Placeholder */
.lazy-loading {
    background-color: #f0f0f0;
    background-image: 
        linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.5) 50%, transparent 60%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Focus Accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 10000;
}

.skip-link:focus {
    top: 6px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .btn {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .auto-dark {
        background-color: #1a1a1a;
        color: #f0f0f0;
    }
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-only {
        display: block !important;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
}

/* Mobile-First Responsive Design */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

@media (min-width: 576px) {
    .container {
        padding: 0 20px;
    }
}

@media (min-width: 768px) {
    .container {
        padding: 0 30px;
    }
}

@media (min-width: 992px) {
    .container {
        padding: 0 40px;
    }
}

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col {
    flex: 1;
    padding: 0 15px;
}

.col-12 { width: 100%; }
.col-6 { width: 50%; }
.col-4 { width: 33.333%; }
.col-3 { width: 25%; }

@media (max-width: 767px) {
    .col-6,
    .col-4,
    .col-3 {
        width: 100%;
    }
}

/* Typography Improvements */
body {
    font-feature-settings: "liga" 1, "kern" 1;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Image Optimization */
.hero-image {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    will-change: transform;
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* SEO-Friendly Hidden Content */
.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;
}

/* Tour Cards Enhancement */
.tour-card {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

.tour-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.tour-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.tour-card-content {
    padding: 20px;
}

.tour-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.tour-card-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.tour-card-price {
    font-size: 1.5rem;
    font-weight: bold;
    color: #BBA680;
}

/* CTA Buttons */
.btn-cta {
    background: linear-gradient(45deg, #BBA680, #8B7355);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    display: inline-block;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.btn-cta:hover::before {
    left: 100%;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(187, 166, 128, 0.4);
}

/* Social Proof Section */
.reviews-section {
    background: #f8f9fa;
    padding: 60px 0;
}

.review-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.review-stars {
    color: #ffc107;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

/* WhatsApp Float Button Enhancement */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
}

@keyframes pulse {
    0% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
    50% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.8); }
    100% { box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4); }
}

/* Breadcrumb Enhancement */
.breadcrumb-nav1 {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    padding: 10px 0;
    margin-bottom: 20px;
    position: relative; /* تأكد من أن الموضع نسبي وليس ثابت */
    z-index: 1; /* تأكد من عدم تداخل مع عناصر أخرى */
}

.breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0; /* إزالة الهامش الافتراضي */
    font-size: 14px;
}

.breadcrumb-item {
    display: inline-block;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    margin: 0 8px;
    color: #BBA680;
}

.breadcrumb-item a {
    color: #6c757d;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #BBA680;
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #BBA680;
    font-weight: 500;
}

/* تأكد من أن الـ Breadcrumb لا يظهر في مكان خاطئ على الشاشات الصغيرة */
@media (max-width: 768px) {
    .breadcrumb-nav1 {
        padding: 8px 0;
        font-size: 13px;
    }
    
    .breadcrumb-item + .breadcrumb-item::before {
        margin: 0 6px;
    }
}

/* FAQ Section */
.faq-item {
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.faq-question {
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    padding: 15px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    padding: 0 0 20px 0;
    color: #666;
    line-height: 1.6;
    display: none;
}

.faq-answer.active {
    display: block;
}

.faq-icon {
    transition: transform 0.3s ease;
}

.faq-icon.rotated {
    transform: rotate(180deg);
}

/* Form Enhancements */
.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #BBA680;
    box-shadow: 0 0 0 3px rgba(187, 166, 128, 0.1);
}

.form-label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #333;
}

/* Utility Classes */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }

.d-none { display: none; }
.d-block { display: block; }
.d-inline { display: inline; }
.d-inline-block { display: inline-block; }
.d-flex { display: flex; }

@media (max-width: 767px) {
    .d-md-none { display: none; }
    .d-md-block { display: block; }
}

/* Performance Critical CSS End */
