/* ============================================
   Sky Deals — Mobile Fixes & Responsive Polish
   Overrides and supplements main.css
   ============================================ */

/* ── Global: prevent horizontal scroll (avoid 100vw — it breaks fixed right UI) ── */
html, body {
    overflow-x: hidden !important;
    max-width: 100%;
    width: 100%;
}

/*
 * 100vw is often wider than the *visible* width when scrollbars / mobile UI
 * exist, which pushes `position:fixed; right:…` elements off-screen.
 * Do NOT `overflow-x: clip` the header: it cuts off the hamburger when the
 * nav row is a few px wider than the viewport.
 */
.site-header {
    max-width: 100%;
    overflow-x: visible;
}

.site-main,
.site-footer {
    max-width: 100%;
    overflow-x: clip;
}

/* Container: tight side padding on small phones */
@media (max-width: 480px) {
    .container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
}

/* Sections: reduce section padding on mobile */
@media (max-width: 768px) {
    .section { padding: 60px 0; }
}
@media (max-width: 480px) {
    .section { padding: 44px 0; }
}

/* ============================================
   HEADER — MOBILE
   ============================================ */

/* Adjust body padding based on header visible height */
@media (max-width: 768px) {
    body {
        padding-top: 72px; /* only nav height, topbar hidden */
    }
}

/* Make topbar usable on small devices (show compact version) */
@media (max-width: 768px) {
    .header-topbar {
        display: block;
        padding: 0;
        position: relative;
    }

    .header-topbar__inner {
        flex-direction: column;
        gap: 0;
    }

    .topbar-info {
        display: none; /* hidden — only quick-access bar below */
    }

    .topbar-actions {
        width: 100%;
    }

    .topbar-whatsapp {
        width: 100%;
        border-radius: 0;
        justify-content: center;
        padding: 10px 16px;
        font-size: 0.85rem;
    }

    body {
        padding-top: 106px; /* topbar (38px) + nav (72px) - adjust */
    }
}

/* Very small screens — hide topbar completely, show WAP float */
@media (max-width: 360px) {
    .header-topbar { display: none; }
    body { padding-top: 72px; }
}

/* Nav inner */
@media (max-width: 768px) {
    .header-nav__inner {
        height: 64px;
        padding: 0;
        min-width: 0;          /* let flex children shrink (prevents hamburger off-screen) */
        gap: 8px;
    }

    .site-logo,
    .site-logo--has-custom {
        min-width: 0;
        flex: 1 1 auto;       /* take space but allow shrink */
        max-width: min(200px, 42vw);
    }

    .site-logo__img,
    .site-logo--has-custom .custom-logo {
        max-height: 46px;
        max-width: 100%;
    }

    .logo-primary { font-size: 1rem; }
    .logo-secondary { font-size: 0.65rem; }
    .logo-icon { font-size: 1.4rem; }
}

/* Mobile hamburger — improved visibility */
@media (max-width: 768px) {
    .hamburger {
        display: flex !important;
        flex: 0 0 auto;
        padding: 10px 8px;     /* no negative margin — that pulled the icon off-screen */
        margin-right: 0;
        /* must be above the overlay (z-index: 10040) when menu is open */
        z-index: 10060 !important;
    }

    .hamburger span {
        width: 22px;
        background: var(--color-dark, #1a1a2e);
    }
}

/* mobile-menu-close, mobile-overlay — defined in main.css */

/* ============================================
   HERO — MOBILE
   ============================================ */
@media (max-width: 768px) {
    .hero-section {
        min-height: auto;
        padding-bottom: 0;
    }

    .hero-content {
        padding: 40px 0 36px;
    }

    .hero-badge {
        font-size: 0.78rem;
        padding: 8px 16px;
        gap: 6px;
        flex-wrap: wrap;          /* allow two-line wrap on small screens */
        max-width: 100%;
        margin-bottom: 20px;
        align-items: center;
    }
    /* Keep dot and second line neat */
    .hero-badge__dot { opacity: 0.4; }
    .hero-badge__star { flex-shrink: 0; }

    .hero-title {
        font-size: clamp(1.9rem, 8vw, 2.8rem);
        margin-bottom: 18px;
    }

    .hero-desc {
        font-size: 0.95rem;
        margin-bottom: 28px;
    }

    .hero-btns {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 28px;
    }

    .hero-btns .btn {
        width: 100%;
        justify-content: center;
        padding: 15px 24px;
        font-size: 0.95rem;
    }

    .hero-trust {
        gap: 14px;
    }

    .hero-trust-item {
        font-size: 0.82rem;
    }
}

@media (max-width: 480px) {
    .hero-content { padding: 32px 0 28px; }

    .hero-title { font-size: clamp(1.7rem, 7vw, 2.2rem); }

    .hero-trust {
        flex-direction: column;
        gap: 10px;
    }
}

/* Hero stats bar */
@media (max-width: 768px) {
    .hero-stats-bar { padding: 20px 0; }

    .hero-stats-inner {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1px;
        background: rgba(255,255,255,0.08);
    }

    .hero-stat {
        padding: 16px 12px;
        background: rgba(0,0,0,0.3);
    }

    .hero-stat-divider { display: none; }

    .hero-stat__number { font-size: 1.75rem; }
    .hero-stat__suffix { font-size: 1.2rem; }
    .hero-stat__label { font-size: 0.72rem; }
}

@media (max-width: 360px) {
    .hero-stats-inner { grid-template-columns: 1fr 1fr; }
    .hero-stat { padding: 14px 8px; }
}

/* ============================================
   SERVICES — MOBILE
   ============================================ */
@media (max-width: 1100px) {
    .services-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .service-card {
        padding: 20px 18px;
    }

    .service-card__icon-wrap {
        width: 48px;
        height: 48px;
        font-size: 1.4rem;
    }

    .service-card__title { font-size: 0.95rem; }
    .service-card__desc { font-size: 0.82rem; }

    .services-cta {
        flex-direction: column;
        gap: 14px;
        text-align: center;
    }

    .services-cta .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .services-grid { grid-template-columns: 1fr; }
}

/* ============================================
   WHY CHOOSE — MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .why-choose-layout {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .why-choose-features {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .why-choose-highlights {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }

    .why-highlight__num { font-size: 1.4rem; }
    .why-highlight__text { font-size: 0.72rem; }
}

@media (max-width: 480px) {
    .why-choose-features { grid-template-columns: 1fr; }
    .why-choose-highlights { grid-template-columns: 1fr 1fr; }
}

/* ============================================
   VISA CHANGE — MOBILE
   ============================================ */
@media (max-width: 900px) {
    .visa-change-grid { grid-template-columns: 1fr; }

    .visa-type-card {
        padding: 28px 22px;
    }

    .visa-type-card__features {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .visa-type-card__header {
        flex-wrap: wrap;
        gap: 12px;
    }

    .visa-type-card__price {
        margin-left: 0;
        text-align: left;
    }

    .visa-payment-grid { grid-template-columns: 1fr 1fr; }

    .visa-process-steps {
        flex-direction: column;
        align-items: center;
    }

    .process-step {
        width: 100%;
        max-width: 100%;
    }

    .process-step-arrow {
        transform: rotate(90deg);
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .visa-type-card__features { grid-template-columns: 1fr; }
    .visa-payment-grid { grid-template-columns: 1fr 1fr; }
    .visa-change-cta .btn-group {
        flex-direction: column;
    }
    .visa-change-cta .btn-group .btn {
        justify-content: center;
    }
}

/* ============================================
   UMRAH — MOBILE
   ============================================ */
@media (max-width: 1200px) {
    .umrah-layout {
        grid-template-columns: 1fr;
    }

    .umrah-package-card {
        position: static;
        max-width: 480px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .umrah-inclusions-grid { grid-template-columns: 1fr; }

    .umrah-inclusion-item { padding: 12px; }

    .umrah-quote {
        padding: 24px 20px;
    }

    .umrah-quote blockquote p { font-size: 1.1rem; }
}

@media (max-width: 480px) {
    .umrah-package-card { padding: 24px 20px; }
}

/* ============================================
   TESTIMONIALS — MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .testimonials-grid { grid-template-columns: 1fr; }

    .testimonial-stats {
        padding: 20px 16px;
        gap: 24px;
    }

    .testimonial-stat__num { font-size: 1.6rem; }
}

/* ============================================
   BOOKING FORM — MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-info { position: static; }
}

@media (max-width: 768px) {
    .booking-form-wrap { padding: 24px 20px; }

    .form-grid { grid-template-columns: 1fr; }

    .booking-form-actions {
        flex-direction: column;
    }

    .booking-form-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .booking-benefits li {
        padding: 12px 0;
    }
}

@media (max-width: 480px) {
    .booking-form-wrap { padding: 20px 16px; }
}

/* ============================================
   FAQ — MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .faq-layout {
        grid-template-columns: 1fr;
    }

    .faq-sidebar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        align-items: start;
    }
}

@media (max-width: 600px) {
    .faq-sidebar { grid-template-columns: 1fr; }
    .faq-quick-stats { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .accordion-header { padding: 16px 18px; }
    .accordion-title { font-size: 0.92rem; }
}

/* ============================================
   CONTACT — MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .contact-form-wrap { padding: 24px 18px; }

    .contact-info-card {
        padding: 18px 16px;
    }
}

/* ============================================
   FOOTER — MOBILE
   ============================================ */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 600px) {
    .footer-main { padding: 48px 0 32px; }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-col--brand { order: 1; }

    .footer-payments__inner {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .footer-bottom__inner {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    .footer-bottom-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

/* mobile-menu-brand, mobile-menu-lang, mobile-menu-info — defined in main.css */

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */
.lang-switcher {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.lang-switcher__btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: var(--color-light);
    border: 1.5px solid var(--color-border);
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-text);
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
}

.lang-switcher__btn:hover {
    background: var(--color-primary);
    color: white;
    border-color: var(--color-primary);
}

.lang-switcher__flag { font-size: 1rem; }

.lang-switcher__dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--color-border);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.25s ease;
    z-index: 200;
}

.lang-switcher.open .lang-switcher__dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.lang-option:hover, .lang-option.active {
    background: var(--color-light);
    color: var(--color-primary);
}

.lang-option.active::after {
    content: '✓';
    margin-left: auto;
    color: var(--color-success);
    font-weight: 800;
}

/* Mobile lang switcher */
@media (max-width: 768px) {
    .lang-switcher {
        margin-bottom: 16px;
    }

    .lang-switcher__dropdown {
        right: auto;
        left: 0;
    }
}

/* ============================================
   RTL (Arabic) — Base overrides
   Inline, quick fixes to avoid loading separate file
   ============================================ */
[dir="rtl"] body {
    font-family: 'Noto Sans Arabic', 'Poppins', 'Segoe UI', sans-serif;
}

[dir="rtl"] .container {
    direction: rtl;
}

[dir="rtl"] .header-nav__inner {
    direction: rtl;
}

[dir="rtl"] .logo-brand {
    align-items: flex-end;
}

[dir="rtl"] .header-menu {
    direction: rtl;
}

[dir="rtl"] .nav-menu .sub-menu {
    left: auto;
    right: 0;
}

[dir="rtl"] .header-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-content {
    text-align: right;
}

[dir="rtl"] .hero-btns,
[dir="rtl"] .hero-trust {
    justify-content: flex-end;
}

[dir="rtl"] .section-header {
    direction: rtl;
}

[dir="rtl"] .section-title span {
    direction: rtl;
}

[dir="rtl"] .service-card__link {
    flex-direction: row-reverse;
}

[dir="rtl"] .service-card__arrow {
    transform: scaleX(-1);
}

[dir="rtl"] .why-choose-layout {
    direction: rtl;
}

[dir="rtl"] .why-choose-content {
    text-align: right;
}

[dir="rtl"] .why-feature-card {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .footer-col__title::after {
    left: auto;
    right: 0;
}

[dir="rtl"] .footer-links li a {
    text-align: right;
}

[dir="rtl"] .footer-links li a:hover {
    padding-left: 0;
    padding-right: 6px;
}

[dir="rtl"] .footer-contact-item {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .accordion-header {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .accordion-icon {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .form-grid,
[dir="rtl"] .booking-layout,
[dir="rtl"] .contact-layout,
[dir="rtl"] .faq-layout,
[dir="rtl"] .why-choose-layout,
[dir="rtl"] .visa-change-grid,
[dir="rtl"] .umrah-layout {
    direction: rtl;
}

[dir="rtl"] .form-label,
[dir="rtl"] .form-control {
    text-align: right;
}

[dir="rtl"] select.form-control {
    background-position: left 14px center;
    padding-left: 44px;
    padding-right: 18px;
}

[dir="rtl"] .topbar-info,
[dir="rtl"] .topbar-actions {
    direction: rtl;
}

/* RTL mobile-menu rules — defined in main.css */

[dir="rtl"] .visa-type-card__price {
    margin-left: 0;
    margin-right: auto;
    text-align: right;
}

[dir="rtl"] .contact-info-card {
    direction: rtl;
    text-align: right;
}

[dir="rtl"] .contact-info-card:hover {
    transform: translateX(-4px);
}

[dir="rtl"] .booking-benefits li {
    direction: rtl;
}

[dir="rtl"] .whatsapp-float {
    right: auto;
    left: max(12px, env(safe-area-inset-left, 12px));
}

[dir="rtl"] .scroll-top {
    left: auto;
    right: max(12px, env(safe-area-inset-right, 12px));
}

/* ============================================
   TOUCH & INTERACTION IMPROVEMENTS
   ============================================ */

/* Larger tap targets on mobile */
@media (max-width: 768px) {
    .btn {
        min-height: 48px;
    }

    .form-control {
        min-height: 52px;
        font-size: 16px; /* prevent iOS zoom */
    }

    textarea.form-control {
        min-height: 100px;
        font-size: 16px;
    }

    select.form-control {
        min-height: 52px;
        font-size: 16px;
    }

    .nav-menu li a,
    .mobile-nav-menu li a {
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .whatsapp-float {
        width: 54px;
        height: 54px;
        left: auto;
        right: max(10px, env(safe-area-inset-right, 10px));
        bottom: max(20px, env(safe-area-inset-bottom, 20px));
    }

    .scroll-top {
        width: 42px;
        height: 42px;
        right: auto;
        left: max(10px, env(safe-area-inset-left, 10px));
        /* stay above WhatsApp button */
        bottom: max(82px, calc(env(safe-area-inset-bottom, 0px) + 82px));
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    .site-header,
    .whatsapp-float,
    .scroll-top,
    .hamburger,
    .mobile-menu,
    .mobile-overlay,
    .hero-particles,
    .hero-scroll-hint { display: none !important; }

    body { padding-top: 0 !important; }

    .hero-section { min-height: auto; padding: 40px 0; }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8rem;
        color: #666;
    }
}
