/**
 * التصميم المتجاوب
 * Responsive Design
 */

/* ===== Extra Large Devices (1200px and up) ===== */
@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* ===== Large Devices (992px to 1199px) ===== */
@media (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    h1 { font-size: 2.25rem; }
    h2 { font-size: 1.875rem; }
    h3 { font-size: 1.5rem; }
}

/* ===== Medium Devices (768px to 991px) ===== */
@media (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    /* Navigation */
    .main-nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    /* Language Switcher */
    .language-switcher {
        margin-left: 0.5rem;
    }
    
    .current-lang {
        padding: 0.4rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .language-dropdown {
        min-width: 140px;
    }
    
    /* Columns */
    .col-md-3,
    .col-md-4,
    .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Hero */
    .hero {
        padding: 6rem 0 4rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    /* Features */
    .feature-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
}

/* ===== Small Devices (576px to 767px) ===== */
@media (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.125rem; }
    
    /* Top Bar - إظهاره في الموبايل مع اللغات والسوشيال ميديا */
    .top-bar {
        display: block !important;
        padding: 0.5rem 0;
        background-color: var(--primary-color);
    }
    
    /* إخفاء الهاتف والبريد في الموبايل */
    .contact-info {
        display: none !important;
    }
    
    /* إخفاء السوشيال ميديا في الموبايل */
    .social-links {
        display: none !important;
    }
    
    /* اللغات على الطرف اليمين */
    .language-links-top {
        display: flex !important;
        gap: 0.5rem;
        margin-left: auto;
    }
    
    .top-bar-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        gap: 0.75rem;
    }
    
    .top-bar-right {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        order: 2;
        margin-left: auto;
    }
    
    .language-link-top {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        color: white;
        font-size: 0.875rem;
        font-weight: 600;
        text-decoration: none;
        transition: var(--transition-base);
        border: none;
        padding: 0;
        min-width: auto;
    }
    
    .language-link-top:hover {
        background-color: rgba(255, 255, 255, 0.25);
        transform: translateY(-2px);
    }
    
    .language-link-top.active {
        background-color: rgba(255, 255, 255, 0.3);
    }
    
    .language-link-top .lang-text {
        font-size: 0.875rem;
        font-family: auto;
    }
    
    /* تحسين التخطيط في الشاشات الصغيرة جداً */
    @media (max-width: 480px) {
        .top-bar-content {
            gap: 0.5rem;
        }
        
        .language-link-top {
            width: 30px;
            height: 30px;
            font-size: 0.8rem;
        }
        
        .language-link-top .lang-text {
            font-size: 0.8rem;
        }
        
        .social-links {
            gap: 0.4rem;
        }
        
        .social-links a {
            width: 30px;
            height: 30px;
            font-size: 0.8rem;
        }
    }
    
    /* Header */
    .main-header {
        padding: 0.75rem 0;
    }
    
    .logo img {
        height: 50px;
    }
    
    /* Language Switcher for Mobile */
    .language-switcher {
        margin-left: 0;
    }
    
    .current-lang {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
        border-radius: 15px;
    }
    
    .current-lang i {
        font-size: 0.85rem;
    }
    
    .language-dropdown {
        min-width: 130px;
        right: 0;
        left: auto;
    }
    
    .language-dropdown::before {
        right: 15px;
    }
    
    .language-option {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Columns - Full Width */
    .col,
    .col-md-2,
    .col-md-3,
    .col-md-4,
    .col-md-6,
    .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1.5rem;
    }
    
    /* Footer Columns */
    .footer-column {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin-bottom: 2rem !important;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    .footer-desc {
        text-align: center;
    }
    
    .widget-title {
        text-align: center;
    }
    
    .footer-links {
        text-align: center;
    }
    
    .contact-info {
        text-align: center;
    }
    
    /* Hero */
    .hero {
        padding: 4rem 0 3rem;
    }
    
    .hero h1 {
        font-size: 1.75rem;
        line-height: 1.4;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    /* Search Form */
    .search-form-row {
        flex-direction: column;
    }
    
    .search-form-row .form-group {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.875rem 1.5rem;
        font-size: 0.9375rem;
    }
    
    .btn-lg {
        padding: 1rem 1.75rem;
        font-size: 1rem;
    }
    
    /* Cards */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Package Cards */
    .package-image {
        height: 200px;
    }
    
    .package-badge {
        top: 10px;
        right: 10px;
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }
    
    .package-content {
        padding: 1.5rem;
    }
    
    .package-content h3 {
        font-size: 1.25rem;
    }
    
    .price-amount {
        font-size: 1.5rem;
    }
    
    /* Features */
    .feature-card {
        margin-bottom: 2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        margin-bottom: 1.5rem;
    }
    
    .testimonial-text {
        font-size: 1rem;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 3rem 0;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
    }
    
    .cta-content p {
        font-size: 1rem;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cta-buttons .btn {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    /* Footer */
    .footer-column {
        margin-bottom: 2.5rem;
    }
    
    .footer-widget h4 {
        font-size: 1.125rem;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        margin-top: 1rem;
    }
    
    /* Back to Top & WhatsApp */
    .back-to-top,
    .whatsapp-button {
        right: 15px;
        bottom: 20px;
        width: 45px;
        height: 45px;
        font-size: 1.25rem;
    }
    
    .whatsapp-button {
        bottom: 75px;
    }
    
    [dir="rtl"] .back-to-top,
    [dir="rtl"] .whatsapp-button {
        right: auto;
        left: 15px;
    }
}

/* ===== Extra Small Devices (below 576px) ===== */
@media (max-width: 575px) {
    .container {
        padding: 0 1rem;
    }
    
    /* Typography */
    body {
        font-size: 0.9375rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }
    h3 { font-size: 1.125rem; }
    
    /* Header */
    .logo img {
        height: 40px;
    }
    
    /* Section Padding */
    .features-section,
    .packages-section,
    .testimonials-section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9375rem;
    }
    
    /* Form Elements */
    .form-control {
        font-size: 0.9375rem;
        padding: 0.625rem 0.875rem;
    }
    
    /* Mobile Menu */
    .mobile-menu {
        width: 85%;
    }
    
    /* Package Features */
    .package-features {
        font-size: 0.875rem;
    }
    
    .package-features li {
        padding: 0.375rem 0;
    }
    
    /* Spacing Helpers */
    .mt-4, .my-4 { margin-top: 2rem !important; }
    .mb-4, .my-4 { margin-bottom: 2rem !important; }
    .pt-4, .py-4 { padding-top: 2rem !important; }
    .pb-4, .py-4 { padding-bottom: 2rem !important; }
}

/* ===== Landscape Mode Adjustments ===== */
@media (orientation: landscape) and (max-height: 600px) {
    .hero {
        padding: 3rem 0 2rem;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero-subtitle {
        margin-bottom: 1.5rem;
    }
    
    .quick-search {
        padding: 1.5rem;
    }
}

/* ===== Print Styles ===== */
@media print {
    /* Hide non-essential elements */
    .top-bar,
    .main-header,
    .main-footer,
    .back-to-top,
    .whatsapp-button,
    .mobile-menu-toggle,
    .language-switcher,
    .social-links {
        display: none !important;
    }
    
    /* Adjust layout */
    .container {
        max-width: 100%;
    }
    
    /* Remove backgrounds and shadows */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    /* Links */
    a {
        text-decoration: underline;
    }
    
    a[href]:after {
        content: " (" attr(href) ")";
    }
    
    /* Page breaks */
    .page-break {
        page-break-after: always;
    }
}
