/* ==========================================================================
   JeuDérm Greece — Main Stylesheet
   ========================================================================== */

/* Font is loaded dynamically based on the Customizer selection
   (Εμφάνιση → Προσαρμογή → Τυπογραφία) — see functions.php,
   jd_enqueue_selected_font(). This file only consumes var(--jd-font). */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--jd-font);
  font-weight: var(--jd-weight-light);
  color: var(--jd-text-secondary);
  background: var(--jd-background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }

.jd-container {
  max-width: var(--jd-container-max);
  margin: 0 auto;
  padding: 0 32px;
}

.jd-section {
  padding: 96px 0;
}

.jd-section--white { background: var(--jd-white); }
.jd-section--tinted { background: var(--jd-background); }

.jd-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--jd-secondary);
  font-weight: var(--jd-weight-bold);
  margin-bottom: 16px;
}
.jd-eyebrow::before {
  content: '✳';
  font-size: 13px;
}

h1, h2, h3, h4, .jd-heading {
  font-weight: var(--jd-weight-black);
  color: var(--jd-text-primary);
  text-transform: lowercase;
  letter-spacing: -0.01em;
  margin: 0 0 20px;
}
h1:first-letter, h2:first-letter, h3:first-letter, h4:first-letter, .jd-heading:first-letter {
  text-transform: uppercase;
}

h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.08; }
h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.15; }
h3 { font-size: 22px; }

p { font-weight: var(--jd-weight-light); font-size: 17px; color: var(--jd-text-secondary); }

.jd-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: var(--jd-weight-bold);
  font-size: 15px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}
.jd-btn::after {
  content: '↗';
  font-size: 14px;
  line-height: 1;
}
.jd-btn--primary {
  background: var(--jd-text-primary);
  color: var(--jd-white);
}
.jd-btn--primary:hover { background: var(--jd-secondary); }
.jd-btn--outline {
  background: transparent;
  border-color: var(--jd-primary);
  color: var(--jd-text-primary);
}
.jd-btn--outline:hover { background: var(--jd-primary); color: var(--jd-white); }

/* ---------- Header ----------
   Full-bleed bar (edge to edge, no container): logo pinned far left,
   nav takes remaining space and spreads its items, CTA button pinned
   to the far right edge — mirrors the reference site's header layout. */
.jd-header {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  background: rgba(244,244,244,0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
.jd-header__bar {
  display: flex;
  align-items: center;
  max-width: var(--jd-container-max);
  margin: 0 auto;
  padding: 0 32px;
  min-height: 84px;
  gap: 40px;
}
.jd-logo {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  font-weight: var(--jd-weight-black);
  font-size: 24px;
  color: var(--jd-primary);
  letter-spacing: -0.02em;
}

/* Image logo (uploaded via Εμφάνιση → Προσαρμογή → Λογότυπο).
   These rules constrain the logo no matter what native size the
   uploaded file has — WordPress may add width/height HTML attributes
   based on the original image, but CSS always wins over those. */
.jd-logo--image { max-height: 52px; overflow: hidden; }
.jd-logo--image .custom-logo-link { display: flex; align-items: center; line-height: 0; }
.jd-logo--image img,
.jd-logo--image img.custom-logo {
  display: block;
  max-height: 52px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.jd-logo--footer { max-height: 40px; }
.jd-logo--footer img,
.jd-logo--footer img.custom-logo {
  max-height: 40px;
}

.jd-logo span.jd-logo__accent { color: var(--jd-text-primary); }
.jd-logo small {
  display: block;
  font-size: 9px;
  letter-spacing: 0.18em;
  font-weight: var(--jd-weight-bold);
  color: var(--jd-primary);
  text-transform: uppercase;
}

.jd-nav { flex: 0 0 auto; display: flex; }
.jd-nav__list {
  display: flex;
  align-items: center;
  gap: 34px;
}
.jd-nav__list > li { position: relative; }
.jd-nav__list > li > a {
  display: block;
  padding: 30px 0;
  font-size: 14px;
  font-weight: var(--jd-weight-bold);
  color: var(--jd-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.jd-nav__list > li > a:hover,
.jd-nav__list > li:hover > a { color: var(--jd-secondary); }

.jd-nav__list .menu-item-has-children > a::after {
  content: '⌄';
  display: inline-block;
  margin-left: 5px;
  font-size: 13px;
  transform: translateY(1px);
}

/* Dropdown submenus — WordPress wraps children in <ul class="sub-menu">
   and marks the parent <li> with "menu-item-has-children" automatically,
   so these selectors work with zero custom menu markup. */
.jd-nav__list .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: var(--jd-white);
  border-radius: 0 0 8px 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.12);
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: all 0.18s ease;
  z-index: 20;
}
.menu-item-has-children:hover > .sub-menu,
.menu-item-has-children:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.jd-nav__list .sub-menu li { position: relative; }
.jd-nav__list .sub-menu li a {
  display: block;
  padding: 10px 22px;
  font-size: 13px;
  font-weight: var(--jd-weight-regular);
  text-transform: none;
  letter-spacing: 0;
  color: var(--jd-text-secondary);
  white-space: nowrap;
}
.jd-nav__list .sub-menu li a:hover { background: var(--jd-background); color: var(--jd-secondary); }

/* Second-level (e.g. the 14 Skin Care lines) flies out to the right
   instead of stacking below, so it stays readable. */
.jd-nav__list .sub-menu .sub-menu {
  top: -10px;
  left: 100%;
  border-radius: 8px;
}

.jd-header__cta {
  flex: 0 0 auto;
  margin-left: auto;
  white-space: nowrap;
}
.jd-menu-toggle { display: none; background: none; border: none; cursor: pointer; flex: 0 0 auto; }

@media (max-width: 1100px) {
  .jd-header__bar { padding: 0 24px; gap: 24px; }
  .jd-nav__list { gap: 22px; }
}

@media (max-width: 900px) {
  .jd-header__bar { min-height: 68px; }
  .jd-nav { display: none; }
  .jd-header__cta { display: none; }
  .jd-menu-toggle { display: block; margin-left: auto; }

  .jd-nav--open {
    display: block;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--jd-background);
    border-top: 1px solid rgba(0,0,0,0.06);
    padding: 12px 24px 24px;
    box-shadow: 0 16px 30px rgba(0,0,0,0.08);
  }
  .jd-nav--open .jd-nav__list { flex-direction: column; align-items: flex-start; gap: 4px; }
  .jd-nav--open .jd-nav__list > li { width: 100%; }
  .jd-nav--open .jd-nav__list > li > a { padding: 12px 0; }
  .jd-nav--open .sub-menu {
    position: static; box-shadow: none; opacity: 1; visibility: visible; transform: none;
    display: none; padding-left: 14px; min-width: 0; border-radius: 0;
  }
  .jd-nav--open .menu-item-has-children.jd-submenu-open > .sub-menu { display: block; }
}

/* ---------- Hero ----------
   Full-bleed background (video with graceful image fallback), dark
   overlay for text legibility, content pinned bottom-left — mirrors the
   reference site's hero instead of a split card layout. */
.jd-hero {
  position: relative;
  min-height: 680px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: var(--jd-primary);
}
.jd-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.jd-hero__bg video,
.jd-hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.jd-hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.15) 45%, rgba(0,0,0,0.05) 100%);
}

/* Foreground layer: an optional subject/model photo (ideally a
   transparent-background PNG) layered above the background video/image
   and below the text, like a professional composited hero shot. */
.jd-hero__foreground {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: flex;
  align-items: flex-end;
  pointer-events: none;
}
.jd-hero__foreground img {
  height: 92%;
  width: auto;
  max-width: 55%;
  object-fit: contain;
  margin-top: auto;
}
.jd-hero--fg-right .jd-hero__foreground { justify-content: flex-end; }
.jd-hero--fg-left .jd-hero__foreground { justify-content: flex-start; }
.jd-hero--fg-center .jd-hero__foreground { justify-content: center; }

/* When a foreground subject is on the right, keep the text column from
   fighting it for space on smaller desktop widths. */
.jd-hero--fg-right .jd-hero__content,
.jd-hero--fg-left .jd-hero__content { max-width: 560px; }

@media (max-width: 860px) {
  .jd-hero__foreground { display: none; }
}
.jd-hero__content {
  position: relative;
  z-index: 1;
  padding-bottom: 72px;
  padding-top: 140px;
  max-width: 640px;
  color: var(--jd-white);
}
.jd-hero__content h1 { color: var(--jd-white); }
.jd-hero__content p { color: rgba(255,255,255,0.85); font-size: 19px; margin-bottom: 32px; }
.jd-hero__content .jd-eyebrow { color: var(--jd-secondary); }
.jd-hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.jd-hero__actions .jd-btn--outline { border-color: rgba(255,255,255,0.6); color: var(--jd-white); }
.jd-hero__actions .jd-btn--outline:hover { background: var(--jd-white); color: var(--jd-text-primary); }

@media (max-width: 860px) {
  .jd-hero { min-height: 560px; }
  .jd-hero__content { padding-top: 100px; max-width: 100%; }
}

/* ---------- About / Feature split ---------- */
.jd-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.jd-split__media { border-radius: 12px; overflow: hidden; }
.jd-split__media img { width: 100%; }
.jd-stat-row { display: flex; gap: 40px; margin-top: 32px; }
.jd-stat { }
.jd-stat strong { display: block; font-size: 32px; font-weight: var(--jd-weight-black); color: var(--jd-secondary); }
.jd-stat span { font-size: 14px; color: var(--jd-text-secondary); }

@media (max-width: 860px) {
  .jd-split { grid-template-columns: 1fr; }
}

/* ---------- Feature grid ---------- */
.jd-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}
.jd-card {
  background: var(--jd-white);
  border-radius: 10px;
  padding: 32px 28px;
  border: 1px solid rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.jd-card:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(0,0,0,0.06); }
.jd-card__icon {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--jd-secondary);
  margin-bottom: 18px;
}
.jd-card h3 { font-size: 18px; margin-bottom: 10px; }
.jd-card p { font-size: 15px; margin: 0; }

@media (max-width: 900px) { .jd-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .jd-grid { grid-template-columns: 1fr; } }

/* ---------- Products ---------- */
.jd-products {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
  margin-top: 56px;
}
.jd-product-card {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  aspect-ratio: 3/4;
  background: var(--jd-primary);
}
.jd-product-card img { width: 100%; height: 100%; object-fit: cover; opacity: 0.85; }
.jd-product-card__label {
  position: absolute; inset: auto 0 0 0;
  padding: 20px;
  background: linear-gradient(0deg, rgba(0,0,0,0.65), transparent);
  color: var(--jd-white);
}
.jd-product-card__label h3 { color: var(--jd-white); font-size: 16px; margin: 0 0 4px; }
.jd-product-card__label span { font-size: 13px; opacity: 0.85; }

@media (max-width: 1000px) { .jd-products { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .jd-products { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Blog / News ---------- */
.jd-posts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 56px;
}
.jd-post-card { background: var(--jd-white); border-radius: 10px; overflow: hidden; border: 1px solid rgba(0,0,0,0.05); }
.jd-post-card__img { aspect-ratio: 16/10; overflow: hidden; }
.jd-post-card__img img { width: 100%; height: 100%; object-fit: cover; }
.jd-post-card__body { padding: 22px; }
.jd-post-card time { font-size: 13px; color: var(--jd-primary); }
.jd-post-card h3 { font-size: 17px; margin: 8px 0; text-transform: none; }

@media (max-width: 860px) { .jd-posts { grid-template-columns: 1fr; } }

/* ---------- CTA band ---------- */
.jd-cta {
  background: var(--jd-text-primary);
  color: var(--jd-white);
  text-align: center;
  padding: 80px 0;
}
.jd-cta h2 { color: var(--jd-white); }
.jd-cta p { color: #d4d4d4; max-width: 600px; margin: 0 auto 32px; }

/* ---------- Footer ---------- */
.jd-footer {
  background: #1c1c1c;
  color: #b8b8b8;
  padding: 72px 0 28px;
}
.jd-footer__grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.jd-footer h4 { color: var(--jd-white); font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 18px; }
.jd-footer ul li { margin-bottom: 10px; font-size: 14px; }
.jd-footer a:hover { color: var(--jd-secondary); }
.jd-footer__bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 24px; font-size: 13px; flex-wrap: wrap; gap: 12px;
}

@media (max-width: 860px) { .jd-footer__grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Page / Single ---------- */
.jd-page-header { padding: 64px 0 40px; text-align: center; }
.jd-content { padding: 32px 0 96px; }
.jd-content .jd-container { max-width: 820px; }
.jd-content img { border-radius: 10px; margin: 24px 0; }

/* ---------- Utility ---------- */
.jd-text-center { text-align: center; }
.jd-mb-0 { margin-bottom: 0; }
.jd-max-560 { max-width: 560px; margin-left: auto; margin-right: auto; }
