/*
Theme Name: ATGA Theme
Theme URI: https://example.com
Author: DenysYa
Author URI: https://example.com
Description: Custom WordPress theme for ATGA
Version: 1.0
Text Domain: atga
*/

/* =====================
   1. VARIABLES
===================== */
:root{
  --bp-sm: 576px;
  --bp-md: 768px;
  --bp-lg: 992px;
  --bp-xl: 1200px;
  --bp-xxl: 1400px;

  --container-max: 1400px;
  --container-header: 1320px;
  --container-content: 940px;

  --font-primary: 'Inter', system-ui, -apple-system, sans-serif;
  --font-heading: 'Russo One', sans-serif;
}

/* =====================
   2. BASE / RESET
===================== */
*,
*::before,
*::after{ box-sizing: border-box; }

body{
  margin: 0;
  font-family: var(--font-primary);
  color: #fff;
  background: #000;
}

/* =====================
   3. CONTAINERS
===================== */
.container{
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 20px;
}

.container--header{ max-width: var(--container-header); }
.container--content{ max-width: var(--container-content); }

/* =====================
   4. HERO WRAPPER + BG LAYER
===================== */

.hero-wrapper{
  position: relative;
  min-height: 100vh;
  overflow: visible;
}

/* фон обрізаємо окремо */
.hero-bg{
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-bg img{
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100vh;
  object-fit: contain;
}

/* =====================
   5. HEADER
===================== */

/* хедер завжди поверх hero-bg */
.site-header{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999; /* важливо для dropdown */
  background: transparent;
}

/* щоб z-index працював стабільно */
.header-nav,
.menu{
  position: relative;
  z-index: 9999;
}

.header-inner{
  display: flex;
  align-items: flex-start;
  padding-top: 40px;
}

.header-logo{
  width: 269px;
  height: 66px;
  flex-shrink: 0;
}

.header-logo svg{
  width: 100%;
  height: 100%;
  display: block;
}

.header-nav{
  display: flex;
  align-items: center;
  margin-left: 322px;
  gap: 18px;
}

/* MAIN MENU */
.menu{
  display: flex;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu a{
  font-family: var(--font-heading);
  font-size: 14px;
  color: #A4A4A4;
  text-decoration: none;
}

.menu .current-menu-item > a{ color: #FFFFFF; }

.btn-login{
  width: 104px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fff;
  background: linear-gradient(45deg, #4FC2EB, #7185C1);
  border-radius: 10px;
  text-decoration: none;
}

/* =====================
   6. HERO (HOME)
===================== */

/* hero контент поверх bg */
.hero{
  position: relative;
  z-index: 2;

  min-height: 100vh;
  padding-top: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-inner{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.hero-eyebrow{
  font-family: var(--font-heading);
  font-size: 60px;
  color: #FFFFFF;
  text-transform: uppercase;
}

.hero-title{
  font-family: var(--font-heading);
  font-size: 30px;
  line-height: 0;
  margin-bottom: 42px;
  color: #FFFFFF;
  text-transform: uppercase;
}

.hero-subtitle{
  font-family: var(--font-heading);
  font-size: 28px;
  margin-bottom: 42px;
}

.hero-description{
  max-width: 908px;
  font-size: 16px;
  line-height: 22px;
  color: #FFFFFF;
  font-weight: 400;
}

.hero-media{
  margin: 180px 0 140px;
}

.hero-media img{
  max-width: 402px;
  width: 100%;
  display: block;
  margin-inline: auto;
}

/* =====================
   7. FEATURES (HOME)
===================== */
.features{
  padding-bottom: 60px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.features-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 55px;
  row-gap: 67px;
}

.feature{
  display: flex;
  flex-direction: column;
}

.feature-head{
  display: flex;
  align-items: center;
  gap: 38px;
}

.feature-icon{
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  display: block;
}

.feature-title{
  font-family: var(--font-heading);
  font-size: 20px;
  line-height: 1.3;
  margin: 0;
  color: #FFFFFF;
}

.feature-text{
  margin-top: 34px;
  font-size: 16px;
  line-height: 22px;
  color: #FFFFFF;
  max-width: 420px;
}

/* =====================
   8. DROPDOWN MENU (FIXED)
===================== */

.menu li{
  position: relative;
}

/* sub-menu */
.menu .sub-menu{
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  left: auto;
  min-width: 180px;
  padding: 10px 0;
  margin: 0;
  background: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  list-style: none;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 10000;
}

.menu li.menu-item-has-children::after{
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  height: 12px;
}

.menu li:hover > .sub-menu,
.menu li:focus-within > .sub-menu{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

/* items */
.menu .sub-menu li{ padding: 0; }

.menu .sub-menu a{
  display: block;
  padding: 6px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #000000;
  text-decoration: none;
  white-space: nowrap;
  text-align: right;
}

.menu .sub-menu a:hover{
  background: #f2f2f2;
  border-radius: 10px;
}

.menu .sub-menu li.current-menu-item > a,
.menu .sub-menu li.current_page_item > a{
  background: rgba(0,0,0,0.08);
}


/* =====================
   MOBILE MENU
===================== */

.burger{
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  padding: 10px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.burger svg rect{
  fill: #fff;
  transform-origin: 10px 10px;
  transition: transform .25s ease, opacity .2s ease;
}

/* burger -> X */
body.menu-open .burger .line-1{ transform: translateY(6px) rotate(45deg); }
body.menu-open .burger .line-4{ transform: translateY(-6px) rotate(-45deg); }
body.menu-open .burger .line-2{ opacity: 0; }
body.menu-open .burger .line-3{ opacity: 0; }

.mobile-menu{
  position: fixed;
  inset: 0;
  z-index: 30000;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s ease;
}

body.menu-open .mobile-menu{
  pointer-events: auto;
  opacity: 1;
}

.mobile-menu__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.65);
  z-index: 30000;
}

.mobile-menu__panel{
  position: absolute;
  top: 0;
  right: 0;
  height: 100%;
  width: min(360px, 92vw);
  background: #0b0b0b;
  border-left: 1px solid rgba(255,255,255,0.08);
  transform: translateX(100%);
  transition: transform .25s ease;
  display: flex;
  flex-direction: column;
  z-index: 30001
}

body.menu-open .mobile-menu__panel{
  transform: translateX(0);
}

.mobile-menu__top{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 35px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.mobile-menu__title{
  font-family: var(--font-heading);
  font-size: 18px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.mobile-menu__close{
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.mobile-menu__content{
  padding: 10px 18px 24px;
  overflow: auto;
}

/* MOBILE NAV LIST */
.mobile-nav{
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav > li{
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding: 8px 0;
}

/* links */
.mobile-nav a{
  display: block;
  padding: 10px 6px;
  font-family: var(--font-heading);
  font-size: 14px;
  color: #fff;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.mobile-nav .current-menu-item > a{ color: #fff; }

/* SUBMENU */
.mobile-nav .sub-menu{
  list-style: none;
  margin: 0;
  padding: 0 0 8px 10px;
  display: none;
}

.mobile-nav li.is-open > .sub-menu{ display: block; }

.mobile-nav .sub-menu a{
  font-family: var(--font-primary);
  text-transform: none;
  letter-spacing: 0;
  font-size: 14px;
  color: #cfcfcf;
  padding: 8px 6px;
}

/* Login */
.btn-login--mobile{
  margin-top: 18px;
  width: 100%;
  height: 48px;
  border-radius: 10px;
}

@media (max-width: 1025px){
  .burger{ display: inline-flex; }

  .header-nav{
    display: none;
  }

  .header-inner{
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding-top: 24px;
  }

  .header-logo{
    width: 210px;
    height: auto;
  }
}

body.menu-open{
  overflow: hidden;
}


/* =====================
   9. RESPONSIVE Front Page
===================== */

/* ====== TABLET (<= 992) ====== */
@media (max-width: 1025px){

  /* header */
  .header-inner{ padding-top: 28px; }
  .header-nav{ margin-left: 60px; }

  /* hero layout */
  .hero{
    padding-top: 150px;
    min-height: 100vh;
  }

  .hero-eyebrow{ font-size: 46px; }

  .hero-title{
    font-size: 26px;
    line-height: 1.15;
    margin-bottom: 22px;
  }

  .hero-subtitle{
    font-size: 22px;
    margin-bottom: 0;
    display: block;
    margin-top: 10px;
  }

  .hero-description{
    font-size: 15px;
    line-height: 1.6;
    max-width: 720px;
  }

  .hero-media{
    margin: 140px 0 80px;
  }

  .hero-media img{
    max-width: 340px;
  }

  /* features */
  .features{ padding-bottom: 50px; }
  .features-grid{
    column-gap: 32px;
    row-gap: 44px;
  }

  .feature-title{ font-size: 18px; }
  .feature-text{
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.6;
    max-width: 100%;
  }
  
}

/* ====== MOBILE (<= 768) ====== */
@media (max-width: 768px){

  .hero{
    min-height: auto;
    padding-top: 120px;
    padding-bottom: 24px;
  }
  
  .hero-inner{
    gap: 50px;
    margin-top: 60px;
  }

  .hero-eyebrow{
    font-size: 34px;
    line-height: 1.1;
  }

  .hero-title{
    font-size: 22px;
    line-height: 1.15;
    margin-bottom: 14px;
  }

  .hero-subtitle{
    font-size: 18px;
    margin-top: 10px;
  }

  .hero-description{
    font-size: 14px;
    line-height: 1.65;
    max-width: 100%;
    padding-inline: 6px;
  }

  .hero-media{
    margin: 34px 0 18px;
  }

  .hero-media img{
    max-width: 280px;
  }

  .features{
    padding-top: 50px;
    padding-bottom: 40px;
  }

  .features-grid{
    grid-template-columns: 1fr;
    row-gap: 34px;
  }

  .feature-head{
    gap: 18px;
  }

  .feature-icon{
    width: 34px;
    height: 34px;
  }

  .feature-title{
    font-size: 17px;
  }

  .feature-text{
    margin-top: 14px;
    font-size: 14px;
    line-height: 1.65;
    max-width: 100%;
  }
}

/* ====== SMALL MOBILE (<= 420) ====== */
@media (max-width: 420px){
  .hero{ padding-top: 110px; }

  .hero-eyebrow{ font-size: 30px; }
  .hero-title{ font-size: 20px; }
  .hero-subtitle{ font-size: 16px; }

  .hero-media img{ max-width: 250px; }
}

/* =====================
   HERO BG FIX — MOBILE (HOME)
===================== */
@media (max-width: 768px){

  body:has(.hero) .hero-wrapper{
    min-height: 60svh !important;
  }

  body:has(.hero) .hero-bg{
    inset: 0;
  }

  body:has(.hero) .hero-bg img{
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    object-fit: cover !important;
    object-position: center top;
  }
}



/* =====================
   10. FOOTER
===================== */
.site-footer{
  background: #000000;
  height: 90px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.footer-divider{
  height: 1px;
  width: 100%;
  background: rgba(255, 255, 255, 0.15);
}

.footer-inner{
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.footer-left,
.footer-right{
  font-family: var(--font-primary);
  font-size: 16px;
  font-weight: 400;
  line-height: 16px;
  letter-spacing: 0.48px;
  color: #FFFFFF;
}

.footer-left a{
  color: #FFFFFF;
  text-decoration: none;
}

.footer-left a:hover{ text-decoration: underline; }


@media (max-width: 768px){
  .site-footer{
    height: auto;
    padding: 40px 0;
  }

  .footer-inner{
    flex-direction: column;
    gap: 30px;
    text-align: center;
    margin-top: 35px;
  }
}


/* =========================
   LOGIN DROPDOWN + MODAL
========================= */

/* dropdown */
.dealer-dd{
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
  z-index: 20000;
}

.dealer-dd.is-open{
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dealer-dd__item{
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: var(--font-heading);
  font-size: 14px;
  text-align: right;
  color: #000;
  background: #fff;
  border: 0;
  text-decoration: none;
  cursor: pointer;
  text-transform: uppercase;
}

.dealer-dd__item:hover{ background:#f2f2f2; }

/* modal */
.dealer-modal{
  position: fixed;
  inset: 0;
  z-index: 30000;

  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}

.dealer-modal.is-open{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.dealer-modal__backdrop{
  position: absolute;
  inset: 0;
  backdrop-filter: blur(2px);
}

.dealer-modal__dialog{
  position: relative;
  width: min(460px, calc(100% - 40px));
  margin: 0 auto;
  top: 50%;
  transform: translateY(-50%);
  background: #000000;
  border-radius: 10px;
  padding: 40px 44px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}

.dealer-modal__close{
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: rgba(255,255,255,.45);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}
.dealer-modal__close:hover{ color:#fff; }

.dealer-modal__title{
  margin: 0 0 26px;
  text-align: center;
  font-family: var(--font-heading);
  font-size: 30px;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: #fff;
}

.dealer-modal__form{
  display: grid;
  gap: 16px;
  justify-items: center;
}

.dealer-input{
  width: min(300px, 100%);
  background: #0f0f0f;
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  color: #a4a4a4;
  outline: none;
}

.dealer-input::placeholder{
  color: #777;
}

.dealer-input:not(:placeholder-shown){
  color: #fff;
}

.dealer-btn{
  width: min(300px, 100%);
  height: 48px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 16px;
  color: #fff;
  background: linear-gradient(90deg,#4FC2EB,#7185C1);
  margin-top: 6px;
}

.dealer-modal__hint{
  margin: 10px 0 0;
  font-size: 16px;
  color: #fff;
}
.dealer-modal__hint a{ color:#4FC2EB; text-decoration: underline; }

.dealer-modal__msg{
  min-height: 18px;
  font-size: 12px;
  color: rgba(255,255,255,.75);
  text-align: center;
}

@media (max-width: 768px){
  .dealer-modal__dialog{ padding: 34px 22px; }
  .dealer-modal__title{ font-size: 28px; }
}

