/**
 * Theme Name:     Snap Visibility
 * Author:         Oslo Advertising
 * Template:       astra
 * Text Domain:	   Snap Visibility
 * Description:    Custom Astra child theme for the Snap Visibility website, built with Elementor.
 * Author URI:     https://localizego.com/abhifolio/
 * Version:        1.0.0
 * License:        GNU General Public License v2 or later
 * License URI:    http://www.gnu.org/licenses/gpl-2.0.html
 * Tags:           custom-colors, custom-logo, full-width-template, elementor
 */
/* =========================================================
   Snap Visibility — Header menu (dropdown + Services mega menu)
   Desktop ≥1280 · Laptop 1025–1279 · Tablet/Mobile ≤1024
   Services parent menu item needs CSS class: sv-mega
   Optional "View all services" sub-item class: sv-mega-all
   ========================================================= */

/* ---------- DESKTOP & LAPTOP (≥1025px) ---------- */
@media (min-width: 1025px) {

  /* Normal dropdowns (e.g. About) */
  .hfe-nav-menu .sub-menu {
    min-width: 280px !important;
    padding: 8px !important;
    background: #0F1B2D !important;
    border: 1px solid #22314A;
    border-radius: 10px;
    box-shadow: 0 20px 45px rgba(0,0,0,.35);
  }
  .hfe-nav-menu .sub-menu .menu-item { border: 0 !important; }
  .hfe-nav-menu .sub-menu a.hfe-sub-menu-item {
    white-space: nowrap;
    padding: 11px 16px !important;
    border: 0 !important;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    color: #FFFFFF !important;
    transition: background-color .2s, color .2s, padding-left .2s, border-color .2s;
  }
  .hfe-nav-menu .sub-menu a.hfe-sub-menu-item:hover,
  .hfe-nav-menu .sub-menu .current-menu-item > a.hfe-sub-menu-item {
    background: #F7931E !important;
    color: #0F1B2D !important;
    padding-left: 22px !important;
  }

  /* Services mega menu */
  .hfe-nav-menu .sv-mega { position: relative; }
  .hfe-nav-menu .sv-mega > .sub-menu {
    width: 780px !important;
    min-width: 0 !important;
    left: 50% !important;
    right: auto !important;
    margin-left: -390px !important;
    padding: 14px !important;
    gap: 8px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hfe-nav-menu .sv-mega:hover > .sub-menu,
  .hfe-nav-menu .sv-mega:focus-within > .sub-menu { display: grid !important; }
  .hfe-nav-menu .sv-mega > .sub-menu > .menu-item { width: auto !important; }

  .hfe-nav-menu .sv-mega > .sub-menu a.hfe-sub-menu-item {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    white-space: normal;
    min-height: 56px;
    padding: 12px 16px !important;
    background: #15243A;
    border: 1px solid #22314A !important;
    border-radius: 8px;
  }
  .hfe-nav-menu .sv-mega > .sub-menu a.hfe-sub-menu-item::after {
    content: "→";
    color: #F7931E;
    font-weight: 700;
    transition: transform .2s, color .2s;
  }
  .hfe-nav-menu .sv-mega > .sub-menu a.hfe-sub-menu-item:hover {
    padding-left: 16px !important;
    border-color: #F7931E !important;
  }
  .hfe-nav-menu .sv-mega > .sub-menu a.hfe-sub-menu-item:hover::after {
    color: #0F1B2D;
    transform: translateX(4px);
  }

  /* "View all services" full-width bar */
  .hfe-nav-menu .sv-mega > .sub-menu > .sv-mega-all { grid-column: 1 / -1; }
  .hfe-nav-menu .sv-mega > .sub-menu > .sv-mega-all > a.hfe-sub-menu-item {
    justify-content: center;
    min-height: 48px;
    background: transparent;
    border-style: dashed !important;
    color: #F7931E !important;
  }
  .hfe-nav-menu .sv-mega > .sub-menu > .sv-mega-all > a.hfe-sub-menu-item::after { content: ""; }
}

/* ---------- LAPTOP (1025–1279px): narrower panel, 2 columns ---------- */
@media (min-width: 1025px) and (max-width: 1279px) {
  .hfe-nav-menu .sv-mega > .sub-menu {
    width: 560px !important;
    margin-left: -280px !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hfe-nav-menu > li > a.hfe-menu-item { padding-left: 10px !important; padding-right: 10px !important; }
}

/* ---------- TABLET & MOBILE (≤1024px): hamburger menu ---------- */
@media (max-width: 1024px) {

  /* Hamburger icon */
  .hfe-nav-menu__toggle .hfe-nav-menu-icon,
  .hfe-nav-menu__toggle .hfe-nav-menu-icon svg { color: #FFFFFF !important; fill: #FFFFFF !important; }
  .hfe-nav-menu__toggle { cursor: pointer; }

  /* Dropdown panel */
  .hfe-dropdown,
  .hfe-dropdown .hfe-nav-menu {
    background: #0F1B2D !important;
  }
  .hfe-dropdown {
    border-top: 1px solid #22314A;
    box-shadow: 0 24px 40px rgba(0,0,0,.35);
    max-height: calc(100vh - 90px);
    overflow-y: auto;
  }

  /* Top-level items */
  .hfe-dropdown .menu-item { border-bottom: 1px solid #1C2B44 !important; }
  .hfe-dropdown a.hfe-menu-item {
    padding: 15px 20px !important;
    font-size: 17px;
    font-weight: 600;
    color: #FFFFFF !important;
    background: transparent !important;
  }
  .hfe-dropdown .current-menu-item > a.hfe-menu-item,
  .hfe-dropdown a.hfe-menu-item:hover { color: #F7931E !important; }

  /* Sub-menu (Services list etc.) */
  .hfe-dropdown .sub-menu {
    background: #15243A !important;
    border: 0 !important;
    box-shadow: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    display: block;
  }
  .hfe-dropdown .sub-menu .menu-item { border-bottom: 0 !important; }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item {
    padding: 12px 20px 12px 36px !important;
    font-size: 16px;
    font-weight: 500;
    color: #C9D2E0 !important;
    background: transparent !important;
    white-space: normal;
    border: 0 !important;
  }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item::before {
    content: "";
    display: inline-block;
    width: 6px; height: 6px;
    margin-right: 10px;
    border-radius: 50%;
    background: #F7931E;
    vertical-align: middle;
  }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item:hover,
  .hfe-dropdown .sub-menu .current-menu-item > a.hfe-sub-menu-item { color: #F7931E !important; }

  /* "View all services" on mobile */
  .hfe-dropdown .sv-mega-all > a.hfe-sub-menu-item { color: #F7931E !important; font-weight: 700; }
  .hfe-dropdown .sv-mega-all > a.hfe-sub-menu-item::before { display: none; }

  /* Sub-menu arrow toggles */
  .hfe-dropdown .hfe-menu-toggle { color: #FFFFFF !important; }
  .hfe-dropdown .hfe-menu-toggle:hover { color: #F7931E !important; }
}

/* ---------- SMALL PHONES (≤480px) ---------- */
@media (max-width: 480px) {
  .hfe-dropdown a.hfe-menu-item { padding: 14px 16px !important; font-size: 16px; }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item { padding: 11px 16px 11px 28px !important; font-size: 15px; }
}

/* ---------- Accessibility ---------- */
.hfe-nav-menu a:focus-visible { outline: 2px solid #F7931E; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
  .hfe-nav-menu a, .hfe-nav-menu a::after { transition: none !important; }
}
/* ===== Mobile header fixes ===== */
@media (max-width: 1024px) {

  /* 1. Keep the logo visible: never let the menu squeeze it */
  .sv-header .sv-logo {
    flex: 0 0 auto !important;
    min-width: 150px;
  }
  .sv-header .sv-logo img {
    width: 150px !important;
    max-width: none !important;
    height: auto;
  }
  .sv-header .elementor-widget-navigation-menu {
    flex: 0 0 auto !important;
    width: auto !important;
    margin-left: auto;
  }

  /* 2. Sub-menu dots: sit to the left of the text, no overlap */
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item {
    position: relative;
    padding-left: 44px !important;
  }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item::before {
    position: absolute;
    left: 24px;
    top: 50%;
    margin: 0 !important;
    transform: translateY(-50%);
  }
}

@media (max-width: 480px) {
  .sv-header .sv-logo,
  .sv-header .sv-logo img { min-width: 0; width: 130px !important; }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item { padding-left: 38px !important; }
  .hfe-dropdown .sub-menu a.hfe-sub-menu-item::before { left: 18px; }
}
/* "View all services" — current page state */
@media (min-width: 1025px) {
  .hfe-nav-menu .sv-mega > .sub-menu > .sv-mega-all.current-menu-item > a.hfe-sub-menu-item,
  .hfe-nav-menu .sv-mega > .sub-menu > .sv-mega-all > a.hfe-sub-menu-item[aria-current="page"] {
    background: #F7931E !important;
    color: #0F1B2D !important;
    border-style: solid !important;
    border-color: #F7931E !important;
  }
}
/* Mega menu arrow: undo the plugin's ::after underline styles */
@media (min-width: 1025px) {
  .hfe-nav-menu .sv-mega > .sub-menu a.hfe-sub-menu-item::after {
    position: static !important;
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    bottom: auto !important;
    margin: 0 0 0 auto !important;
    padding: 0 !important;
    background: none !important;
    border: 0 !important;
    opacity: 1 !important;
    transform: none;
    font-size: 16px;
    line-height: 1;
    color: #F7931E;
    flex: none;
  }
  .hfe-nav-menu .sv-mega > .sub-menu a.hfe-sub-menu-item:hover::after {
    color: #0F1B2D !important;
    transform: translateX(4px);
  }
  /* no arrow on the "View all services" bar */
  .hfe-nav-menu .sv-mega > .sub-menu > .sv-mega-all > a.hfe-sub-menu-item::after {
    content: none !important;
    display: none !important;
  }
}
/* ===== Stop sideways scrolling on mobile ===== */
html,
body {
  overflow-x: clip;        /* cuts off anything wider than the screen, keeps the sticky header working */
  max-width: 100%;
}
@supports not (overflow-x: clip) {
  body { overflow-x: hidden; }   /* fallback for older browsers */
}

/* Keep animated / floating elements inside their sections */
.elementor-section,
.e-con.e-parent {
  overflow-x: clip;
}

@media (max-width: 767px) {
  /* Slide-in-from-right becomes a gentle fade on phones */
  .elementor-invisible.animated.fadeInRight,
  .animated.fadeInRight { animation-name: fadeIn !important; }

  /* Floating labels on hero graphics stay on screen */
  .sv-chip.c1, .sv-visual .c1 { left: 8px !important; }
  .sv-chip.c2, .sv-visual .c2 { right: 8px !important; }
}

/* ===== Sticky header ===== */
.ehf-header #masthead { position: sticky; top: 0; z-index: 999; }
.admin-bar.ehf-header #masthead { top: 32px; }
@media (max-width: 782px) { .admin-bar.ehf-header #masthead { top: 46px; } }
@media (max-width: 600px) { .admin-bar.ehf-header #masthead { top: 0; } }

.sv-header { transition: padding .25s ease, box-shadow .25s ease; }
body.sv-scrolled .sv-header {
  --padding-top: 10px !important;
  --padding-bottom: 10px !important;
  box-shadow: 0 8px 24px rgba(11, 20, 32, .28);
}
.sv-header .sv-logo img { transition: width .25s ease; }
body.sv-scrolled .sv-header .sv-logo img { width: 160px !important; }

/* Phones: smaller logo when scrolled, so it never grows */
@media (max-width: 1024px) {
  body.sv-scrolled .sv-header .sv-logo img { width: 130px !important; }
}
@media (max-width: 480px) {
  body.sv-scrolled .sv-header .sv-logo img { width: 115px !important; }
}