/* DLUX Academy — mobile homepage layout (max-width: 767px) */

/* Carousel pagination dots (JS injects; visible only with mobile carousels) */
.dlux-carousel-dots {
  display: none;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.dlux-carousel-dots button {
  position: relative;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  flex: 0 0 auto;
}

.dlux-carousel-dots button::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dlux-beige);
  transform: translate(-50%, -50%);
  transition: width 0.2s ease, background-color 0.2s ease, border-radius 0.2s ease;
}

.dlux-carousel-dots button[aria-current="true"]::after {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--dlux-rose);
}

.dlux-carousel-dots button:focus-visible {
  outline: 2px solid var(--dlux-rose-deep);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .dlux-carousel-dots {
    display: flex;
  }
}

@media (max-width: 767px) {
  html { scroll-behavior: smooth; }

  body {
    overflow-x: hidden;
  }

  .dlux-container { padding-inline: var(--dlux-page-gutter); }
  .dlux-section { padding-block: var(--dlux-section-space); }
  .dlux-section-title {
    margin: 0 0 24px;
    font-size: var(--dlux-fs-h2);
    line-height: 1.12;
    font-weight: 700;
    color: var(--dlux-brown);
  }

  /* Shared horizontal carousels */
  .dlux-carousel {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: clamp(280px, 77vw, 300px);
    gap: 16px;
    overflow-x: auto;
    padding-inline: var(--dlux-page-gutter);
    scroll-padding-inline: var(--dlux-page-gutter);
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-inline: contain;
    -webkit-overflow-scrolling: touch;
  }
  .dlux-carousel::-webkit-scrollbar { display: none; }
  .dlux-carousel > * { scroll-snap-align: start; }

  /* —— Header mobile (mockup: MENIU sub icon · logo centru · iconuri dreapta) —— */
  .dlux-global-header-wrapper .util-bar {
    display: none;
  }

  .dlux-global-header-wrapper .ann,
  .dlux-global-header-wrapper a.ann {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 12px 20px;
    font-family: var(--dlux-font);
    font-size: 11px;
    font-weight: 500;
    line-height: 1.35;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-align: center;
    text-decoration: none;
    color: var(--dlux-white);
    background: var(--dlux-brown);
  }

  .dlux-global-header-wrapper nav {
    height: 80px !important;
    min-height: 80px !important;
    max-height: 80px !important;
    padding: 0 14px !important;
    display: grid !important;
    grid-template-columns: 1fr auto 1fr !important;
    grid-template-rows: 80px !important;
    align-items: center !important;
    gap: 0 !important;
    overflow: hidden;
    background: var(--dlux-white);
    border-bottom: 1px solid var(--dlux-beige);
    box-sizing: border-box;
  }

  .dlux-global-header-wrapper nav > .dlux-search-overlay,
  .dlux-global-header-wrapper nav > .nav-menu {
    /* keep out of the 3-column header row */
    grid-column: 1 / -1;
  }

  .dlux-global-header-wrapper nav > .nav-menu:not(.open) {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  .dlux-nav-left {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    justify-self: start;
    grid-column: 1;
    grid-row: 1;
  }

  .dlux-global-header-wrapper .nav-toggle {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: auto;
    min-width: 44px;
    min-height: 44px;
    padding: 4px 2px;
    background: none;
    border: none;
    cursor: pointer;
  }

  .dlux-global-header-wrapper .nav-toggle .dlux-burger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 22px;
  }

  .dlux-global-header-wrapper .nav-toggle .dlux-burger span {
    display: block;
    width: 22px;
    height: 1.5px;
    background: var(--dlux-brown);
  }

  .dlux-menu-label {
    display: block !important;
    font-family: var(--dlux-font);
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    font-weight: 600;
    color: var(--dlux-brown);
    text-align: center;
  }

  .dlux-global-header-wrapper nav > .logo {
    justify-self: center;
    align-self: center;
    grid-column: 2;
    grid-row: 1;
    text-align: center;
    font-size: 28px !important;
    line-height: 1;
    max-height: 64px;
  }

  .dlux-global-header-wrapper nav > .logo small {
    font-size: 10px !important;
    letter-spacing: 0.22em;
    margin-top: 2px;
  }

  .dlux-global-header-wrapper nav > .logo .dlux-header-logo-img {
    height: 56px !important;
    width: auto !important;
    max-height: 56px !important;
    max-width: min(148px, 40vw) !important;
    object-fit: contain !important;
    margin: 0 auto;
    display: block;
  }

  .dlux-header-actions {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0;
    justify-self: end;
    grid-column: 3;
    grid-row: 1;
  }

  .dlux-header-actions a,
  .dlux-header-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 44px;
    min-height: 44px;
    color: var(--dlux-brown);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
  }

  .dlux-header-actions svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.4;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  .dlux-header-actions a[aria-label="Coș"] {
    position: relative;
  }

  .dlux-global-header-wrapper .nav-menu {
    display: none;
    position: fixed;
    inset: 0;
    top: auto;
    background: var(--dlux-white);
    flex-direction: column;
    padding: 20px;
    border-top: 1px solid var(--dlux-beige);
    overflow-y: auto;
    z-index: 9998;
    max-height: calc(100vh - 140px);
  }

  .dlux-global-header-wrapper .nav-menu.open {
    display: flex;
  }

  /* Search overlay over logo */
  .dlux-search-overlay {
    display: none;
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    background: var(--dlux-white);
    border: 1px solid var(--dlux-beige);
    border-radius: 8px;
    padding: 4px 8px 4px 12px;
    align-items: center;
    gap: 8px;
  }

  .dlux-search-overlay.is-open {
    display: flex;
  }

  .dlux-search-overlay input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--dlux-font);
    font-size: 14px;
    color: var(--dlux-brown);
    background: transparent;
    min-width: 0;
    height: 44px;
  }

  .dlux-search-overlay .dlux-search-close {
    min-width: 44px;
    min-height: 44px;
    border: none;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    color: var(--dlux-brown);
    cursor: pointer;
  }

  .dlux-global-header-wrapper nav.is-search-open > .logo,
  .dlux-global-header-wrapper nav.is-search-open .dlux-nav-left,
  .dlux-global-header-wrapper nav.is-search-open .dlux-header-actions {
    visibility: hidden;
  }

  /* Hero mobile */
  .custom-hero-slider .swiper-slide img,
  .custom-hero-slider .hero-slide-img {
    aspect-ratio: 390 / 560;
    height: auto !important;
    min-height: 0;
    object-fit: cover;
  }

  /* Academy intro mobile typography */
  .academy-stats-wrap .academy-eyebrow {
    font-size: var(--dlux-fs-eyebrow);
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dlux-rose-deep);
    margin: 0 0 6px !important;
  }

  .academy-stats-wrap .academy-h1,
  .academy-stats-wrap h1,
  .academy-stats-wrap .dlux-hero-text h1 {
    font-size: var(--dlux-fs-h1);
    line-height: 1.12;
    font-weight: 700;
    margin-top: 0 !important;
  }

  .academy-stats-wrap .academy-body {
    font-size: var(--dlux-fs-body);
    line-height: var(--dlux-lh-body);
  }

  /* Course / why / reviews / blog → carousel on mobile */
  .dlux-why-grid,
  .dlux-rev-grid,
  .dlux-blog-grid {
    display: grid !important;
    grid-auto-flow: column !important;
    grid-auto-columns: clamp(280px, 77vw, 300px) !important;
    grid-template-columns: none !important;
    gap: 16px !important;
    overflow-x: auto !important;
    padding-inline: var(--dlux-page-gutter) !important;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    max-width: none !important;
  }
  .dlux-why-grid::-webkit-scrollbar,
  .dlux-rev-grid::-webkit-scrollbar,
  .dlux-blog-grid::-webkit-scrollbar { display: none; }
  .dlux-why-grid > *,
  .dlux-rev-grid > *,
  .dlux-blog-grid > * {
    scroll-snap-align: start;
  }

  /* Discover 2x2 */
  .discover-grid {
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
  }

  .discover-grid > a,
  .discover-grid > .discover-item {
    aspect-ratio: 165 / 230;
    border-radius: 16px;
    overflow: hidden;
  }

  /* Instagram: 3 images */
  .dlux-insta-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 10px !important;
  }

  .dlux-insta-grid > *:nth-child(n+4) {
    display: none !important;
  }

  .dlux-why-card,
  .dlux-review-card,
  .dlux-blog-card {
    border-radius: 24px !important;
    border: 1px solid var(--dlux-beige) !important;
  }

  .dlux-why-card {
    background: var(--dlux-blush) !important;
  }

  /* Footer accordion mobile */
  .dlux-footer .dlux-footer-acc-trigger {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: space-between;
    min-height: 44px;
    padding: 12px 0;
    background: none;
    border: none;
    border-bottom: 1px solid var(--dlux-beige);
    color: var(--dlux-white);
    font-family: var(--dlux-font);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    text-align: left;
  }

  .dlux-footer .dlux-footer-acc-panel {
    display: none;
    padding: 12px 0 16px;
  }

  .dlux-footer .dlux-footer-acc-panel.is-open {
    display: block;
  }

  .dlux-footer .dlux-footer-cols {
    display: block;
  }
}

@media (max-width: 359px) {
  :root {
    --dlux-page-gutter: 18px;
    --dlux-fs-body: 15px;
  }
}

@media (min-width: 768px) {
  .dlux-menu-label { display: none; }
  .dlux-header-actions { display: none; }
  .dlux-search-overlay { display: none !important; }
  .dlux-nav-left { display: contents; }
  .dlux-footer .dlux-footer-acc-trigger { display: none; }
  .dlux-footer .dlux-footer-acc-panel { display: block !important; }
}
