/*
 * cheffaisal.com: responsive and navigation improvements (loaded after style.css / dark.css).
 * Breakpoints follow Bootstrap 5: phones < 576, tablets 576-991, desktop >= 992.
 */

:root {
    --cf-gold: #8a6620;
    --cf-gold-hover: #75561a;
    --cf-gold-bright: #d4a74a;
    --cf-ink: #1f1d19;
}

/* ---------- Content pasted from the editor (posts, services, case studies) ----------
   Videos, embeds, images and tables from other sites must never be wider than the screen:
   one 720px embed made phones zoom the whole page out. */
.service-main-section .container,
.faq-content, .wwo-cntnt { overflow-wrap: anywhere; }
.service-main-section img,
.service-main-section video,
.service-main-section canvas,
.service-main-section embed,
.service-main-section object { max-width: 100% !important; height: auto !important; }
.service-main-section figure,
.service-main-section div,
.service-main-section span,
.service-main-section font,
.service-main-section p,
.service-main-section section { max-width: 100% !important; }
.service-main-section iframe {
    max-width: 100% !important;
    width: 100% !important;
    height: auto !important;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 12px;
}
/* Images pasted from news sites can carry absolute positioning and offsets */
.service-main-section .container img {
    position: static !important; inset: auto !important; transform: none !important;
    width: auto !important; display: block; margin-left: auto; margin-right: auto;
}
.service-main-section .container [style*="padding-bottom"][style*="%"] { padding-bottom: 0 !important; height: auto !important; }
.service-main-section table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
.service-main-section pre { white-space: pre-wrap; }
/* Keep pasted text in the site's own typography */
.service-main-section .container [style*="font-family"],
.service-main-section .container font[face] { font-family: inherit !important; }
.service-main-section .container font[size],
.service-main-section .container span[style*="font-size"] { font-size: inherit !important; }

/* ---------- Header ---------- */
.header-top .language_theme_change { gap: 6px; }
.header-top .language_theme_change .theme { display: flex; align-items: center; gap: 2px; margin-right: 6px !important; padding-right: 0 !important; }
.body-rtl .header-top .language_theme_change .theme { margin-left: 6px !important; margin-right: 0 !important; }
.cf-icon-btn {
    width: 42px; height: 42px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%;
    color: inherit;
    transition: background-color .15s ease;
}
.cf-icon-btn.d-none { display: none !important; }
.cf-icon-btn:hover, .cf-icon-btn:focus-visible { background: rgba(0, 0, 0, .06); }
.dark-theme .cf-icon-btn:hover { background: rgba(255, 255, 255, .1); }
.cf-lang-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 46px; height: 36px; padding: 0 12px;
    border: 1px solid rgba(0, 0, 0, .18);
    border-radius: 999px;
    font-size: 14px; font-weight: 600; line-height: 1;
    color: inherit; text-decoration: none;
    transition: border-color .15s ease, color .15s ease;
}
.cf-lang-toggle:hover, .cf-lang-toggle:focus-visible { border-color: var(--cf-gold-bright); color: var(--cf-gold); }
.dark-theme .cf-lang-toggle { border-color: rgba(255, 255, 255, .3); }
.cf-header-cta {
    align-items: center;
    margin-inline-start: 10px;
    padding: 10px 20px;
    border: 0; border-radius: 999px;
    background: linear-gradient(90deg, #d59e0f, #8a6620);
    color: #fff;
    font-size: 15px; font-weight: 600; white-space: nowrap;
    box-shadow: 0 6px 18px rgba(138, 102, 32, .25);
    transition: transform .15s ease, box-shadow .15s ease;
}
.cf-header-cta:hover, .cf-header-cta:focus-visible { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(138, 102, 32, .35); }
.header-top .mobile-menu-icon {
    width: 44px; height: 44px;
    align-items: center; justify-content: center;
    margin: 0 !important; padding: 0 !important;
    border: 0; background: transparent; color: inherit;
    font-size: 24px;
}
/* Desktop menu: a clear hover/focus state and visible keyboard focus */
@media (min-width: 992px) {
    .navbar-nav .nav-link { position: relative; }
    .navbar-nav .nav-link::after {
        content: ""; position: absolute; left: 50%; right: 50%; bottom: -6px; height: 2px;
        background: var(--cf-gold-bright); transition: left .2s ease, right .2s ease;
    }
    .navbar-nav .nav-item:hover > .nav-link::after,
    .navbar-nav .nav-item:focus-within > .nav-link::after { left: 0; right: 0; }
    .navbar-nav .nav-item:focus-within .megamenu { opacity: 1; visibility: visible; }
}
@media (min-width: 992px) {
    /* Menu items must never be cut off or wrap now that the header also holds the booking button */
    .header-top .navbar { flex: 1 1 auto; min-width: 0; margin-left: 2rem !important; margin-right: 1rem !important; padding: 0 !important; }
    .body-rtl .header-top .navbar { margin-right: 2rem !important; margin-left: 1rem !important; }
    .header-top .navbar .navbar-nav { gap: clamp(14px, 2.2vw, 40px) !important; flex-wrap: nowrap; }
    .header-top .navbar-nav .nav-item { flex-shrink: 0; }
    .header-top .navbar .nav-link { white-space: nowrap; padding-left: 0; padding-right: 0; }
    .header-top .language_theme_change { flex-shrink: 0; margin-left: auto !important; }
    .body-rtl .header-top .language_theme_change { margin-right: auto !important; margin-left: 0 !important; }
}
@media (min-width: 992px) and (max-width: 1199.98px) {
    .header-top .navbar .nav-link { font-size: 15px; }
    .header-top .logo { width: 5.5rem; }
    .cf-header-cta { padding: 9px 14px; font-size: 14px; }
    .header-top .language_theme_change .theme .dark-theme-btn,
    .header-top .language_theme_change .theme .light-theme-btn { display: none !important; }
}

/* ---------- Mobile / tablet menu (below 992px) ---------- */
/* Tablets used the squeezed desktop menu; give them the same slide-down menu as phones */
@media (min-width: 576px) and (max-width: 991.98px) {
    html.responsive { overflow: hidden; }
    .responsive-menu .navbar-nav .nav-item { position: relative !important; display: block !important; padding: 0; }
    .responsive-menu .navbar-nav .nav-item > a { font-size: 2.5rem; font-family: 'SemplicitaProMedium'; display: inline-block; padding-left: 0; transition: all 300ms ease-in-out 0s; }
    .responsive-menu .navbar-nav .nav-item > i { position: absolute; top: 4px; right: 0; display: flex; align-items: center; font-size: 1rem; padding: 1.5rem; color: var(--bs-primary); transition: all 300ms ease-in-out 0s; }
    .body-rtl .responsive-menu .navbar-nav .nav-item > i { right: auto; left: 0; }
    .responsive-menu .megamenu { position: relative !important; opacity: 1; visibility: visible; display: none; padding: 1.5rem 0; background-color: transparent; border-color: transparent; }
    .responsive-menu .megamenu .container { width: 100%; padding: 0; }
    .responsive-menu .mega-submenu figure { display: none !important; }
    .responsive-menu .mega-submenu ul { display: flex; justify-content: space-between; gap: 5px; flex-wrap: wrap; }
    .responsive-menu .mega-submenu ul li { width: 48%; }
    .responsive-menu .navbar-nav .nav-item.menu-show > a { color: var(--bs-primary); }
    .responsive-menu .navbar-nav .nav-item.menu-show > i { transform: rotate(45deg); }
}
@media (max-width: 991.98px) {
    .responsive-menu .navbar { display: block !important; margin: 0 !important; padding: 0 !important; }
    .responsive-menu .navbar-nav { flex-direction: column; gap: 0 !important; }
    .responsive-menu .navbar-nav .nav-item { border-bottom: 1px solid rgba(0, 0, 0, .08); padding: 6px 0 !important; }
    .dark-theme .responsive-menu .navbar-nav .nav-item { border-color: rgba(255, 255, 255, .1); }
    .responsive-menu .navbar-nav .nav-item > a { font-size: 22px !important; padding: 10px 0 !important; }
    .responsive-menu .navbar-nav .nav-item.menu-show > a { font-size: 22px !important; padding-left: 0 !important; }
    .responsive-menu .navbar-nav .nav-item > a::after { display: none; }
    .responsive-menu .navbar-nav .nav-item.menu-show { background: transparent !important; padding: 6px 0 !important; }
    .responsive-menu .navbar-nav .nav-item::before, .responsive-menu .navbar-nav .nav-item::after { display: none !important; }
    /* Big, easy-to-tap expand toggles */
    .responsive-menu .navbar-nav .nav-item > i {
        top: 8px !important; width: 44px; height: 44px; padding: 0 !important;
        justify-content: center; font-size: 16px !important; border-radius: 50%;
        background: rgba(212, 167, 74, .12); cursor: pointer;
    }
    .responsive-menu .navbar-nav .nav-item.menu-show > i { top: 8px !important; }
    /* Submenu text was 9-10px: make it readable */
    .responsive-menu .megamenu { padding: 4px 0 12px !important; }
    .responsive-menu .mega-submenu { margin: 0 !important; }
    .responsive-menu .mega-submenu > li { width: 100% !important; padding: 0 !important; }
    .responsive-menu .mega-submenu ul li { width: 100% !important; }
    .responsive-menu .mega-submenu a { margin-bottom: 4px !important; padding: 8px 0; }
    .responsive-menu .menu-head { font-size: 16px !important; color: var(--cf-ink) !important; margin-bottom: 2px !important; }
    .dark-theme .responsive-menu .menu-head { color: #fff !important; }
    .responsive-menu .menu-txt { font-size: 13px !important; color: #6b6760 !important; }
    .responsive-menu span.menu-close { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }

    .cf-mm-extras { padding: 22px 0 40px; display: flex; flex-direction: column; gap: 14px; }
    .cf-mm-cta {
        display: flex; align-items: center; justify-content: center; gap: 10px;
        width: 100%; min-height: 52px; border: 0; border-radius: 14px;
        background: linear-gradient(90deg, #d59e0f, #8a6620); color: #fff;
        font-size: 17px; font-weight: 600;
    }
    .cf-mm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
    .cf-mm-quick a {
        display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
        min-height: 72px; border-radius: 14px; border: 1px solid rgba(0, 0, 0, .1);
        color: inherit; text-decoration: none; font-size: 13px; font-weight: 600;
    }
    .cf-mm-quick a i { font-size: 20px; color: var(--cf-gold); }
    .cf-mm-quick a:first-child i { color: #25d366; }
    .dark-theme .cf-mm-quick a { border-color: rgba(255, 255, 255, .15); }
    .cf-mm-lang { display: inline-flex; align-items: center; gap: 8px; align-self: center; padding: 10px 16px; font-size: 15px; font-weight: 600; color: inherit; text-decoration: none; }

}
@media (min-width: 992px) {
    .cf-mm-extras { display: none; }
}

/* ---------- Phones ---------- */
@media (max-width: 575.98px) {
    .header-top .logo { width: 6rem; }
    .header-top .language_theme_change { padding-top: 10px !important; padding-bottom: 10px !important; }
    .cf-icon-btn { width: 40px; height: 40px; }
    .cf-lang-toggle { min-width: 42px; height: 34px; padding: 0 10px; }

    /* Floating buttons: two compact buttons instead of a tall column of three
       (calling is one tap away in the menu) */
    .cf-float { gap: 10px !important; }
    .cf-float .cf-call { display: none !important; }
    .cf-float-btn { width: 50px !important; height: 50px !important; font-size: 24px !important; }

    /* Readable footer and small labels (several were 9-11px) */
    footer a, footer .f-contact, footer p, footer .mt-3 { font-size: 14px !important; line-height: 1.6; }
    footer .f-contact a { display: inline-block; padding: 4px 0; }
    .read-more { font-size: 13px !important; }
    p.small, .small, .xsmall { font-size: max(12.5px, 1em) ; }

    /* Footer social icons were 11px wide tap targets */
    .social { gap: 6px !important; }
    .social a.icon { width: 42px; height: 42px; display: inline-flex !important; align-items: center; justify-content: center; }

    /* Service pages: the proposal box and FAQ */
    .cf-proposal-box { padding: 20px !important; }
    .cf-proposal-actions { width: 100%; }
    .cf-proposal-actions .btn { width: 100%; justify-content: center; }
}

/* Footer social icons on all screens: comfortable tap targets */
.social a.icon { min-width: 36px; min-height: 36px; display: inline-flex; align-items: center; justify-content: center; }

/* Visible keyboard focus everywhere */
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible {
    outline: 2px solid var(--cf-gold-bright);
    outline-offset: 2px;
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
