/*
Theme Name: vuokrakontti-hello-elementor
Author: Advante
Description: vuokrakontti functionality in theme files
Version: 1.0
Template: hello-elementor

This is the child theme for Hello Elementor theme, generated with Generate Child Theme plugin by catchthemes.

(optional values you can add: Theme URI, Author URI, License, License URI, Tags, Text Domain)
*/

:root { --header-h: 80px; }
body.no-scroll { overflow: hidden; }
html, body { overflow-x: hidden; }


/* ===== MOBILE/TABLET ≤1024px: full-viewport dropdown ===== */
@media (max-width:1024px){
  /* Your submenu UL already has .elementor-nav-menu--dropdown.
     Make it fill the viewport when the mobile menu is open. */
  .elementor-location-header .elementor-nav-menu--dropdown {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: #061f27 !important;
    z-index: 10000 !important;
    overflow-y: auto !important;
    padding: 28px !important;
    margin: 0 !important;
    max-width: none !important;
    left: 0 !important;
    right: 0 !important;
  }

  /* Spacing & tap targets */
  .elementor-location-header .elementor-nav-menu--dropdown > li {
    margin: 0 0 18px 0;
  }
  .elementor-location-header .elementor-nav-menu--dropdown a.elementor-sub-item,
  .elementor-location-header .elementor-nav-menu--dropdown a.elementor-item {
    font-size: 22px;
    line-height: 1.3;
    padding: 8px 0;
  }
}

/* ===== Desktop Palvelut: links + live preview panel ===== */
@media (min-width:1025px){
  /* outer bar already styled by our previous JS/CSS */

  /* .vk-mega-inner becomes a 2-column layout:
     left = links, right = preview text */
  .elementor-location-header .vk-mega-inner{
    display: grid !important;
    grid-template-columns: 2fr 1fr;       /* left big, right smaller */
    gap: 24px 56px !important;
    width: min(1280px, 92vw) !important;
    margin: 0 auto !important;
    padding: 0 12px !important;
  }

  /* links area holds the 3 link columns */
  .elementor-location-header .vk-mega-links{
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0,1fr));
    gap: 24px 56px !important;
  }

  .elementor-location-header .vk-mega-links > li > a{
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 10px 0 !important;
    font-size: 18px !important;
    line-height: 1.35 !important;
    text-decoration: none !important;
  }

  /* preview panel on the right */
  .elementor-location-header .vk-mega-preview{
    align-self: start;
    padding-top: 4px;
  }
  .elementor-location-header .vk-mega-preview h4{
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
  }
  .elementor-location-header .vk-mega-preview p{
    margin: 0;
    font-size: 16px;
    opacity: .9;
  }

  /* optional: show "→" arrow on hover like your design */
  .elementor-location-header .vk-mega-links a::after{
    content: "→";
    opacity: 0;
    transform: translateX(-4px);
    transition: transform .15s ease, opacity .15s ease;
  }
  .elementor-location-header .vk-mega-links a:hover::after,
  .elementor-location-header .vk-mega-links a:focus-visible::after{
    opacity: 1;
    transform: translateX(0);
  }
}

