/* ==========================================================================
   Ecologia Organizzativa — Premium Theme
   ========================================================================== */

@import url('https://api.fontshare.com/v2/css?f[]=clash-display@200,300,400,500,600,700&f[]=satoshi@300,400,500,700,900&display=swap');

/* ── Custom Properties ──────────────────────────────────────────────────── */
:root {
  /* Dark palette (hero, header, footer) */
  --eco-bg-primary:     #050508;
  --eco-bg-secondary:   #0a0a12;
  --eco-bg-tertiary:    #12121c;
  --eco-bg-card:        rgba(255, 255, 255, 0.025);
  --eco-blue:           #005198;
  --eco-blue-light:     #1a7ad4;
  --eco-pink:           #EA587D;
  --eco-pink-glow:      rgba(234, 88, 125, 0.25);
  --eco-yellow:         #FFC700;
  --eco-yellow-glow:    rgba(255, 199, 0, 0.2);
  --eco-violet:         #253B97;
  --eco-violet-deep:    #604199;
  --eco-magenta:        #98007F;

  /* Dark-context text (hero, header, footer) */
  --eco-text-primary:   #FFFFFF;
  --eco-text-secondary: rgba(255, 255, 255, 0.55);
  --eco-text-tertiary:  rgba(255, 255, 255, 0.25);
  --eco-text-muted:     rgba(255, 255, 255, 0.10);

  /* Content (light) */
  --eco-content-bg:             #ffffff;
  --eco-content-text:           #1a1a2e;
  --eco-content-text-secondary: rgba(26, 26, 46, 0.6);
  --eco-content-text-muted:     rgba(26, 26, 46, 0.3);
  --eco-content-border:         rgba(26, 26, 46, 0.08);

  /* Typography */
  --eco-font-display: 'Clash Display', system-ui, sans-serif;
  --eco-font-body:    'Satoshi', system-ui, sans-serif;

  /* Gradients */
  --eco-gradient-hero: linear-gradient(
    135deg,
    rgba(37, 59, 151, 1) 0%,
    rgba(37, 59, 151, 1) 40%,
    rgba(234, 80, 157, 1) 100%
  );
  --eco-gradient-section: linear-gradient(135deg, var(--eco-bg-secondary) 0%, var(--eco-bg-primary) 100%);
  --eco-gradient-accent: linear-gradient(135deg, #253B97 0%, #EA587D 100%);
  --eco-gradient-text: linear-gradient(90deg, #EA587D, #FFC700, #253B97);

  /* Borders & Glass (dark context) */
  --eco-border:        rgba(255, 255, 255, 0.06);
  --eco-border-hover:  rgba(255, 255, 255, 0.12);
  --eco-glass:         rgba(255, 255, 255, 0.03);
  --eco-glass-border:  rgba(255, 255, 255, 0.06);

  /* Spacing */
  --eco-space-xs:  0.5rem;
  --eco-space-sm:  1rem;
  --eco-space-md:  2rem;
  --eco-space-lg:  4rem;
  --eco-space-xl:  8rem;
  --eco-space-2xl: 12rem;

  /* Layout */
  --eco-max-width: 1200px;
  --eco-header-h:  90px;

  /* Easing */
  --eco-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --eco-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── Base ────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: var(--eco-font-body);
  font-size: 18px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: var(--eco-content-text);
  background-color: var(--eco-content-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--eco-font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 var(--eco-space-sm);
  color: var(--eco-content-text);
}

h1 {
  font-size: clamp(2.8rem, 6vw, 5.5rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 0.95;
}
h2 {
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  line-height: 1.1;
}

p {
  margin: 0 0 var(--eco-space-sm);
  color: var(--eco-content-text-secondary);
  line-height: 1.55;
}

strong, b {
  color: var(--eco-content-text);
  font-weight: 700;
}

/* Italic accent text */
.eco-caption,
.eco-italic {
  font-family: var(--eco-font-display);
  font-weight: 300;
  font-style: italic;
  color: var(--eco-content-text-secondary);
}

/* ── Elementor overrides ────────────────────────────────────────────────── */
body.elementor-page,
body.elementor-default,
body.elementor-template-canvas {
  background-color: var(--eco-content-bg);
  color: var(--eco-content-text);
}

.elementor-section,
.elementor-container,
.elementor-column,
.elementor-widget-wrap {
  background-color: transparent;
}

/* ── Force full-width layout (kill Elementor boxed container) ─────────── */
.elementor-section,
.elementor-section.elementor-section-boxed,
.elementor-section.elementor-section-full_width {
  width: 100% !important;
  max-width: 100% !important;
}
.elementor-section > .elementor-container,
.elementor-section.elementor-section-boxed > .elementor-container {
  max-width: 100% !important;
  width: 100% !important;
  padding: 0;
}
.elementor-column-gap-default > .elementor-column > .elementor-element-populated,
.elementor-column-gap-no > .elementor-column > .elementor-element-populated {
  padding: 0;
}
/* Section stretched override */
.elementor-section-stretched {
  width: 100% !important;
  left: 0 !important;
}

/* ── Links ───────────────────────────────────────────────────────────────── */
a {
  color: var(--eco-content-text-secondary);
  text-decoration: none;
  transition: color 0.3s var(--eco-ease);
}
a:hover {
  color: var(--eco-content-text);
}

/* ── CTA Button ──────────────────────────────────────────────────────────── */
.eco-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  color: #fff;
  font-family: var(--eco-font-body);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 100px;
  padding: 0.85rem 2.2rem;
  background: var(--eco-gradient-accent);
  text-decoration: none;
  transition: all 0.4s var(--eco-ease);
  border: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.eco-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.3s;
  border-radius: inherit;
}
.eco-btn:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(96, 65, 153, 0.45);
}
.eco-btn:hover::before {
  background: rgba(255,255,255,0.1);
}

/* ── Glass effect (dark context) ────────────────────────────────────────── */
.eco-glass {
  background: var(--eco-glass);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid var(--eco-glass-border);
}

/* ── Glow effects ────────────────────────────────────────────────────────── */
.eco-glow-pink { box-shadow: 0 0 80px var(--eco-pink-glow); }
.eco-glow-yellow { box-shadow: 0 0 80px var(--eco-yellow-glow); }

/* ── Divider line ────────────────────────────────────────────────────────── */
.eco-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--eco-content-border), transparent);
  border: none;
  margin: var(--eco-space-lg) 0;
}

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(26, 26, 46, 0.15);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(26, 26, 46, 0.3); }
html { scrollbar-width: thin; scrollbar-color: rgba(26, 26, 46, 0.15) transparent; }

/* ── Selection ───────────────────────────────────────────────────────────── */
::selection {
  background: var(--eco-violet);
  color: #fff;
}

/* ── Smooth scroll ───────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

/* ── Reduced motion ─────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Embedded media in WYSIWYG content ──────────────────────────────────── */

/* Responsive wrapper for iframes / embeds (16:9) */
[class*="eco-"] iframe,
[class*="eco-"] embed,
[class*="eco-"] object {
  display: block;
  max-width: 100%;
  border: none;
  border-radius: 6px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.08);
}

/* Video / audio */
[class*="eco-"] video {
  display: block;
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.5rem 0;
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.08);
  background: #000;
}
[class*="eco-"] audio {
  display: block;
  width: 100%;
  max-width: 560px;
  margin: 1.5rem 0;
}

/* Images inside WYSIWYG */
[class*="eco-"] .eco-cg__card-text img,
[class*="eco-"] .eco-ms__step-body img,
[class*="eco-"] .eco-uc__item-problem img,
[class*="eco-"] .eco-uc__item-right img,
[class*="eco-"] .eco-cta__subtitle img,
[class*="eco-"] .eco-sb__body img,
[class*="eco-"] .eco-sb__result img,
[class*="eco-"] .eco-ph__subtitle img,
[class*="eco-"] .eco-ph__body img,
[class*="eco-"] .eco-ms__intro-body img,
[class*="eco-"] .eco-ms__result-text img,
[class*="eco-"] .eco-uc__intro img,
[class*="eco-"] .eco-cg__intro img,
.eco-cs__section-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1rem 0;
  box-shadow: 0 4px 24px rgba(26, 26, 46, 0.08);
}

/* WP alignment classes */
[class*="eco-"] .alignleft {
  float: left;
  margin: 0.5rem 1.5rem 1rem 0;
  max-width: 50%;
}
[class*="eco-"] .alignright {
  float: right;
  margin: 0.5rem 0 1rem 1.5rem;
  max-width: 50%;
}
[class*="eco-"] .aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
[class*="eco-"] .alignnone {
  display: block;
  margin: 1rem 0;
}

/* WP captions */
[class*="eco-"] .wp-caption {
  max-width: 100%;
  margin: 1.5rem 0;
}
[class*="eco-"] .wp-caption img {
  margin-bottom: 0;
}
[class*="eco-"] .wp-caption-text {
  font-family: var(--eco-font-body);
  font-size: 0.8rem;
  color: var(--eco-content-text-muted);
  text-align: center;
  padding: 0.5rem 0;
  line-height: 1.4;
}

/* Clearfix for floated media */
[class*="eco-"] .eco-cg__card-text::after,
[class*="eco-"] .eco-ms__step-body::after,
[class*="eco-"] .eco-sb__body::after,
[class*="eco-"] .eco-uc__item-problem > div::after,
[class*="eco-"] .eco-uc__item-right > div::after,
.eco-cs__section-body::after {
  content: '';
  display: table;
  clear: both;
}

@media (max-width: 768px) {
  [class*="eco-"] .alignleft,
  [class*="eco-"] .alignright {
    float: none;
    max-width: 100%;
    margin: 1rem 0;
  }
}

/* ── Responsive base ─────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body { font-size: 16px; }
}
