/* =========================================================
   Jolie Village - Responsive System
   Mobile-first breakpoint structure
   ========================================================= */

/*
Breakpoints de lucru:

0 - 479px        Mobile mic
480px - 767px    Mobile normal / large mobile
768px - 1023px   Tableta
1024px - 1279px  Laptop / desktop mic
1280px - 1439px  Desktop standard
1440px - 1679px  Desktop mare
1680px+          Wide screen
*/

/* =========================================================
   1. Base responsive defaults
   ========================================================= */

:root {
  --container-max: 1200px;

  --space-xs: 8px;
  --space-sm: 12px;
  --space-md: 20px;
  --space-lg: 32px;
  --space-xl: 48px;
  --space-2xl: 72px;
  --space-3xl: 96px;

  --header-height: 104px;

  --section-padding-y: 56px;

  --hero-min-height: 620px;

  --font-hero: clamp(40px, 10vw, 64px);
  --font-h1: clamp(36px, 8vw, 56px);
  --font-h2: clamp(30px, 6vw, 44px);
  --font-h3: clamp(24px, 4vw, 32px);
  --font-body: 16px;
  --font-small: 14px;
}

/* =========================================================
   1.1 Global box sizing + overflow guard
   ========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  min-width: 0;
  padding-top: var(--header-height) !important;
}

.site-wrapper {
  max-width: 100%;
}

.site-header {
  max-width: 100%;
}

.site-main,
.site-footer {
  max-width: 100%;
  overflow-x: clip;
}

.container,
.container--wide {
  max-width: 100%;
}

.container {
  width: min(100% - 32px, var(--container-max));
  margin-inline: auto;
}

.section {
  padding-block: var(--section-padding-y);
}

.section--large {
  padding-block: calc(var(--section-padding-y) + 24px);
}

.site-main {
  max-width: 100%;
  padding-top: 0 !important;
  overflow-x: clip;
}

.site-main > *:first-child {
  margin-top: 0;
}

img,
video,
iframe {
  max-width: 100%;
  height: auto;
  display: block;
}

iframe {
  border: 0;
}

.hide-mobile {
  display: none !important;
}

.hide-desktop {
  display: block !important;
}

/* =========================================================
   1.2 Grid / layout overflow protection
   ========================================================= */

.grid,
.cards-grid,
.two-col,
.three-col,
.four-col,
.layout-70-30,
.layout-60-40,
.layout-50-50,
.mobile-stack,
.desktop-grid,
.desktop-flex {
  min-width: 0;
}

.grid > *,
.cards-grid > *,
.two-col > *,
.three-col > *,
.four-col > *,
.layout-70-30 > *,
.layout-60-40 > *,
.layout-50-50 > *,
.mobile-stack > *,
.desktop-grid > *,
.desktop-flex > * {
  min-width: 0;
}

/* =========================================================
   2. Mobile mic: sub 480px
   ========================================================= */

@media (max-width: 479px) {
  :root {
    --header-height: 96px;
    --section-padding-y: 48px;
    --hero-min-height: 560px;

    --font-hero: 38px;
    --font-h1: 34px;
    --font-h2: 28px;
    --font-h3: 22px;
    --font-body: 16px;
  }

  .container {
    width: min(100% - 28px, var(--container-max));
  }

  .section {
    padding-block: var(--section-padding-y);
  }

  .section--large {
    padding-block: 64px;
  }

  .grid,
  .cards-grid,
  .two-col,
  .three-col,
  .four-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .front-hero {
    min-height: var(--hero-min-height);
  }

  .front-hero h1 {
    font-size: var(--font-hero);
    line-height: 0.95;
  }
}

/* =========================================================
   3. Mobile normal: 480px+
   ========================================================= */

@media (min-width: 480px) {
  :root {
    --header-height: 104px;
    --section-padding-y: 56px;
    --hero-min-height: 620px;

    --font-hero: clamp(44px, 9vw, 68px);
    --font-h1: clamp(38px, 7vw, 58px);
    --font-h2: clamp(32px, 5vw, 46px);
  }

  .grid,
  .cards-grid,
  .two-col,
  .three-col,
  .four-col {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
}

/* =========================================================
   4. Tableta: 768px+
   ========================================================= */

@media (min-width: 768px) {
  :root {
    --container-max: 1200px;
    --header-height: 128px;
    --section-padding-y: 72px;
    --hero-min-height: 680px;

    --font-hero: clamp(58px, 7vw, 82px);
    --font-h1: clamp(46px, 6vw, 68px);
    --font-h2: clamp(36px, 4vw, 52px);
    --font-h3: clamp(26px, 3vw, 36px);
    --font-body: 17px;
  }

  .container {
    width: min(100% - 48px, var(--container-max));
  }

  .section--large {
    padding-block: calc(var(--section-padding-y) + 32px);
  }

  .two-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 40px;
  }

  .three-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .four-col {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .cards-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 32px;
  }

  .hide-mobile {
    display: block !important;
  }

  .hide-desktop {
    display: none !important;
  }
}

/* =========================================================
   5. Laptop / desktop mic: 1024px+
   ========================================================= */

@media (min-width: 1024px) {
  :root {
    --header-height: 156px;
    --section-padding-y: 88px;
    --hero-min-height: 720px;

    --font-hero: clamp(64px, 6vw, 90px);
    --font-h1: clamp(52px, 5vw, 72px);
    --font-h2: clamp(40px, 3.5vw, 56px);
  }

  .container {
    width: min(100% - 64px, var(--container-max));
  }

  .section--large {
    padding-block: calc(var(--section-padding-y) + 40px);
  }

  .three-col {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
  }

  .four-col {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }

  .cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 36px;
  }

  .layout-70-30 {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(280px, 3fr);
    gap: 56px;
  }

  .layout-60-40 {
    display: grid;
    grid-template-columns: minmax(0, 6fr) minmax(0, 4fr);
    gap: 56px;
  }

  .layout-50-50 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 56px;
  }
}

/* =========================================================
   6. Desktop standard: 1280px+
   ========================================================= */

@media (min-width: 1280px) {
  :root {
    --container-max: 1240px;
    --header-height: 156px;
    --section-padding-y: 96px;
    --hero-min-height: 760px;

    --font-hero: clamp(72px, 5.5vw, 96px);
    --font-h1: clamp(58px, 4.5vw, 78px);
    --font-h2: clamp(44px, 3vw, 60px);
    --font-body: 18px;
  }

  .container {
    width: min(100% - 72px, var(--container-max));
  }

  .cards-grid {
    gap: 40px;
  }

  .layout-70-30,
  .layout-60-40,
  .layout-50-50 {
    gap: 72px;
  }
}

/* =========================================================
   7. Desktop mare: 1440px+
   ========================================================= */

@media (min-width: 1440px) {
  :root {
    --container-max: 1280px;
    --header-height: 156px;
    --section-padding-y: 112px;
    --hero-min-height: 820px;

    --font-hero: clamp(78px, 5vw, 108px);
    --font-h1: clamp(64px, 4vw, 86px);
    --font-h2: clamp(48px, 3vw, 64px);
  }

  .container {
    width: min(100% - 80px, var(--container-max));
  }

  .section--large {
    padding-block: calc(var(--section-padding-y) + 48px);
  }
}

/* =========================================================
   8. Wide screen: 1680px+
   ========================================================= */

@media (min-width: 1680px) {
  :root {
    --container-max: 1360px;
    --hero-min-height: 860px;
  }

  .container {
    width: min(100% - 96px, var(--container-max));
  }

  .container--wide {
    width: min(100% - 96px, 1520px);
    margin-inline: auto;
  }
}

/* =========================================================
   9. Utility responsive classes
   ========================================================= */

@media (max-width: 767px) {
  .mobile-stack {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .mobile-center {
    text-align: center;
  }

  .mobile-hidden {
    display: none !important;
  }

  .mobile-full {
    width: 100%;
    max-width: 100%;
  }
}

@media (min-width: 768px) {
  .desktop-hidden {
    display: none !important;
  }

  .desktop-flex {
    display: flex;
  }

  .desktop-grid {
    display: grid;
  }
}
/* =========================================================
   10. Fixed header final sync
   ========================================================= */

.site-header,
.site-header#site-header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  z-index: 999999 !important;
  width: 100% !important;
  overflow: visible !important;
}

body {
  padding-top: var(--header-height) !important;
}

.site-main {
  padding-top: 0 !important;
}

.mobile-menu {
  inset: var(--header-height) 0 auto 0 !important;
  height: calc(100dvh - var(--header-height)) !important;
}

@media (max-width: 767px) and (orientation: portrait) {
  :root {
    --header-height: 124px;
  }

  body {
    padding-top: 124px !important;
  }

  .site-header.is-scrolled ~ .site-main {
    padding-top: 0 !important;
  }
}

@media (max-width: 479px) and (orientation: portrait) {
  :root {
    --header-height: 116px;
  }

  body {
    padding-top: 116px !important;
  }
}

@media (min-width: 768px) {
  :root {
    --header-height: 128px;
  }

  body {
    padding-top: 128px !important;
  }
}

@media (min-width: 1024px) {
  :root {
    --header-height: 156px;
  }

  body {
    padding-top: 156px !important;
  }
}

@media (max-width: 932px) and (orientation: landscape) {
  :root {
    --header-height: 76px;
  }

  body {
    padding-top: 76px !important;
  }

  .mobile-menu {
    inset: 76px 0 auto 0 !important;
    height: calc(100dvh - 76px) !important;
  }
}

/* WordPress admin bar offset */

body.admin-bar {
  padding-top: calc(var(--header-height) + 32px) !important;
}

body.admin-bar .site-header,
body.admin-bar .site-header#site-header {
  top: 32px !important;
}

body.admin-bar .mobile-menu {
  inset: calc(var(--header-height) + 32px) 0 auto 0 !important;
  height: calc(100dvh - var(--header-height) - 32px) !important;
}

@media (max-width: 782px) {
  body.admin-bar {
    padding-top: calc(var(--header-height) + 46px) !important;
  }

  body.admin-bar .site-header,
  body.admin-bar .site-header#site-header {
    top: 46px !important;
  }

  body.admin-bar .mobile-menu {
    inset: calc(var(--header-height) + 46px) 0 auto 0 !important;
    height: calc(100dvh - var(--header-height) - 46px) !important;
  }
}