/* ============================================
   Responsive Media Queries (Mobile-First)
   ============================================ */

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

/* Desktop (992px to 1199px) */
@media (max-width: 1199px) {
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
}

/* Tablet (768px to 991px) */
@media (max-width: 991px) {
    /* Typography */
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    h3 {
        font-size: 1.5rem;
    }
    
    /* Hero Section */
    .hero-section {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-content {
        padding: 0 30px;
        max-width: 100%;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-content .btn {
        display: block;
        width: 100%;
        max-width: 250px;
        margin: 10px auto;
    }
    
    .scroll-indicator {
        bottom: 20px;
    }
    
    /* ── Navbar ── */
    .navbar {
        padding: 8px 0;
    }

    .navbar.transparent {
        background: linear-gradient(180deg, rgba(0,0,0,0.45) 0%, transparent 100%) !important;
        backdrop-filter: none;
        border-bottom: none !important;
        box-shadow: none !important;
        padding: 10px 0;
    }

    .navbar.scrolled {
        left: 3% !important;
        right: 3% !important;
        width: 94% !important;
        top: 10px !important;
        margin: 0 !important;
        transform: none !important;
        border-radius: 12px !important;
        padding: 6px 0 !important;
    }

    .navbar-logo img {
        height: 46px;
    }

    /* ── Hamburger ── */
    .menu-toggle {
        display: flex;
        z-index: 1100;
        position: relative;
    }

    /* ── Slide-in Menu ── */
    .navbar-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 270px;
        height: 100vh;
        background: #F9F6F0;
        flex-direction: column;
        padding: 90px 24px 30px;
        box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
        transition: right 0.38s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        gap: 0;
        z-index: 1000;
    }

    .navbar-menu.active {
        right: 0;
    }

    /* ── Menu Items ── */
    .navbar-menu li {
        width: 100%;
        border-bottom: 1px solid #E8DECF;
    }

    .navbar-menu li:last-child {
        border-bottom: none;
        padding-top: 16px;
    }

    .navbar-menu li a {
        display: block;
        padding: 14px 12px;
        font-size: 1.05rem;
        font-weight: 500;
        color: #524A3E !important;
        border-radius: 0;
        background: transparent !important;
        transition: padding 0.2s ease, color 0.2s ease;
    }

    .navbar-menu li a:hover {
        color: #8A7D6B !important;
        padding-right: 18px;
        background: transparent !important;
    }

    /* ── Dim overlay ── */
    .navbar-menu.active::before {
        content: '';
        position: fixed;
        inset: 0;
        background: rgba(42, 36, 30, 0.5);
        z-index: -1;
    }
    
    /* Grid Layouts */
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Timeline */
    .timeline::before {
        left: 30px;
    }
    
    [dir="rtl"] .timeline::before {
        right: 30px;
        left: auto;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 80px;
        padding-right: 0;
        text-align: left;
        margin-left: 0;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: 80px;
        padding-left: 0;
        text-align: right;
    }
    
    .timeline-item:nth-child(odd),
    .timeline-item:nth-child(even) {
        width: 100%;
        padding-left: 80px;
        padding-right: 0;
        text-align: left;
        margin-left: 0;
    }
    
    [dir="rtl"] .timeline-item:nth-child(odd),
    [dir="rtl"] .timeline-item:nth-child(even) {
        padding-right: 80px;
        padding-left: 0;
        text-align: right;
        margin-right: 0;
    }
    
    .timeline-dot {
        left: 20px;
    }
    
    [dir="rtl"] .timeline-dot {
        right: 20px;
        left: auto;
    }
    
    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 20px;
        right: auto;
    }
    
    [dir="rtl"] .timeline-item:nth-child(odd) .timeline-dot,
    [dir="rtl"] .timeline-item:nth-child(even) .timeline-dot {
        right: 20px;
        left: auto;
    }
    
    /* Slider Arrows */
    .slider-arrow {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .slider-arrow.prev {
        left: 15px;
    }
    
    .slider-arrow.next {
        right: 15px;
    }
    
    [dir="rtl"] .slider-arrow.prev {
        right: 15px;
        left: auto;
    }
    
    [dir="rtl"] .slider-arrow.next {
        left: 15px;
        right: auto;
    }
}

/* Mobile (320px to 767px) */
@media (max-width: 767px) {
    /* Typography */
    h1 {
        font-size: 1.75rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
    
    h3 {
        font-size: 1.25rem;
    }
    
    /* Section Padding */
    section {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 30px;
    }
    
    /* Hero Section */
    .hero-section {
        height: 100vh;
        min-height: 500px;
        margin-top: 0;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    /* Navigation */
    .navbar {
        padding: 10px 0;
    }
    
    .navbar-logo {
        font-size: 1.3rem;
    }
    
    .logo-icon {
        font-size: 1.5rem;
    }
    
    .navbar-menu {
        width: 250px;
        padding: 20px;
    }
    
    /* Language Switcher on mobile */
    .language-switcher {
        border-top: 2px solid #E8DECF;
        padding-top: 16px;
        margin-top: 8px;
        width: 100%;
    }

    .language-switcher a {
        display: block;
        width: 100%;
        text-align: center;
        padding: 12px !important;
        background: #F2EBE0;
        border-radius: 10px;
        color: #524A3E !important;
        font-weight: 600;
    }

    .lang-icon {
        font-size: 1rem;
    }
    
    .lang-btn {
        width: 100%;
    }
    
    /* Grid Layouts */
    .grid-4,
    .grid-3,
    .grid-2 {
        grid-template-columns: 1fr;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    [dir="rtl"] .footer-section {
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Cards */
    .card-body {
        padding: 20px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    /* Back to Top */
    .back-to-top {
        width: 45px;
        height: 45px;
        bottom: 20px;
        right: 20px;
        font-size: 1.2rem;
    }
    
    [dir="rtl"] .back-to-top {
        left: 20px;
        right: auto;
    }
    
    /* WhatsApp Float */
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 80px;
        right: 20px;
        font-size: 1.5rem;
    }
    
    [dir="rtl"] .whatsapp-float {
        left: 20px;
        right: auto;
    }
    
    /* Timeline */
    .timeline {
        padding: 30px 0;
    }
    
    .timeline::before {
        left: 20px;
    }
    
    [dir="rtl"] .timeline::before {
        right: 20px;
        left: auto;
    }
    
    .timeline-item {
        padding-left: 60px;
    }
    
    [dir="rtl"] .timeline-item {
        padding-right: 60px;
        padding-left: 0;
    }
    
    .timeline-dot {
        left: 10px;
    }
    
    [dir="rtl"] .timeline-dot {
        right: 10px;
        left: auto;
    }
    
    /* Team Members */
    .team-img {
        width: 150px;
        height: 150px;
    }
    
    /* Filter Buttons */
    .filter-buttons {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    /* Portfolio Items */
    .portfolio-img {
        height: 250px;
    }
    
    /* Blog Cards */
    .blog-img {
        height: 200px;
    }
    
    .blog-content {
        padding: 20px;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 50px 20px;
    }
    
    .cta-section h2 {
        font-size: 1.5rem;
    }
    
    .cta-section p {
        font-size: 1rem;
    }
    
    /* Map Container */
    .map-container {
        height: 300px;
    }
    
    /* Contact Info Cards */
    .contact-info-card {
        padding: 20px;
    }
    
    .contact-info-card i {
        font-size: 2rem;
    }
    
    /* Form */
    .form-group {
        margin-bottom: 15px;
    }
    
    /* Newsletter Form */
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        width: 100%;
    }
    
    /* Values Card */
    .value-card {
        padding: 20px;
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }
    
    /* Slider Controls */
    .slider-controls {
        bottom: 15px;
    }
    
    .slider-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .slider-arrow.prev {
        left: 10px;
    }
    
    .slider-arrow.next {
        right: 10px;
    }
    
    [dir="rtl"] .slider-arrow.prev {
        right: 10px;
        left: auto;
    }
    
    [dir="rtl"] .slider-arrow.next {
        left: 10px;
        right: auto;
    }
    
    /* Pagination */
    .pagination {
        gap: 5px;
        flex-wrap: wrap;
    }
    
    .page-btn {
        padding: 8px 12px;
        font-size: 0.9rem;
    }
    
    /* Testimonial */
    .testimonial-card {
        padding: 20px;
    }
    
    .testimonial-img {
        width: 60px;
        height: 60px;
    }
}

/* Extra Small Mobile (320px to 479px) */
@media (max-width: 479px) {
    /* Typography */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    /* Hero Section */
    .hero-section {
        height: 100vh;
        min-height: 450px;
    }
    
    .hero-content {
        padding: 0 20px;
    }
    
    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 15px;
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .hero-content .btn {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
    
    /* Navbar */
    .navbar-logo img {
        height: 45px !important;
    }
    
    .navbar-menu {
        width: 250px;
        padding: 20px 15px;
    }
    
    /* Navbar on small phones */
    .navbar.scrolled {
        left: 2.5% !important;
        right: 2.5% !important;
        width: 95% !important;
        top: 8px !important;
        margin: 0 !important;
        transform: none !important;
        border-radius: 10px !important;
        padding: 5px 0 !important;
    }

    .navbar {
        padding: 6px 0 !important;
    }

    .navbar-logo img {
        height: 40px !important;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
    
    /* Section Title */
    .section-title h2::after {
        width: 60px;
    }
    
    /* Team Member */
    .team-img {
        width: 120px;
        height: 120px;
    }
}

/* Landscape Mobile Devices */
@media (max-width: 991px) {
    .page-hero {
        margin-top: 68px;
        height: 220px;
    }
    .service-hero {
        height: 180px;
    }
    .page-hero-content h1 {
        font-size: 1.6rem;
    }
}

@media (max-width: 767px) {
    .page-hero {
        margin-top: 62px;
        height: 190px;
    }
    .service-hero {
        height: 160px;
    }
    .page-hero-content h1 {
        font-size: 1.4rem;
    }
    .page-hero-content p {
        font-size: 0.95rem;
    }
}

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        height: 350px;
    }
    
    .navbar-menu {
        height: calc(100vh - 60px);
        top: 60px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .back-to-top,
    .whatsapp-float,
    .menu-toggle,
    .slider-controls,
    .slider-arrow,
    footer {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
    
    .hero-section {
        page-break-after: always;
    }
    
    section {
        page-break-inside: avoid;
    }
    
    a {
        text-decoration: underline;
    }
}
