/*
Theme Name: Blocksy Cumpăr Teren
Theme URI: https://cumparteren.com/
Description: Child theme pentru Blocksy — port al stilului vizual agroevolution.eu (paleta verde+gold, fonturi Inter + Instrument Serif, bento cards, animații fadeInUp) pentru Cumpăr Teren.
Author: Cumpăr Teren
Template: blocksy
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: blocksy-cumparteren
*/

/* ============================================================
   Fonturi Google — Inter (body) + Instrument Serif (display)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');

/* ============================================================
   Design Tokens (portate de pe agroevolution.eu)
   ============================================================ */
:root {
  --green-950: #052e16;
  --green-900: #0d3b1e;
  --green-800: #14532d;
  --green-700: #166534;
  --green-600: #15803d;
  --green-500: #16a34a;
  --green-400: #4ade80;
  --green-300: #86efac;
  --green-100: #dcfce7;
  --green-50: #f0fdf4;

  --warm-900: #292524;
  --warm-800: #44403c;
  --warm-600: #57534e;
  --warm-400: #a8a29e;
  --warm-200: #e7e5e4;
  --warm-100: #f5f5f4;
  --warm-50: #fafaf9;

  --gold-500: #d4a843;
  --gold-400: #e0b94f;

  --amber-500: #f59e0b;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans', sans-serif;
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,.08);
  --shadow-xl: 0 16px 48px rgba(0,0,0,.1);

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  /* Mapare peste variabilele Blocksy (implicit unde există) */
  --theme-palette-color-1: var(--green-500);
  --theme-palette-color-2: var(--green-700);
  --theme-palette-color-3: var(--green-900);
  --theme-palette-color-4: var(--warm-900);
  --theme-palette-color-5: var(--warm-200);
}

/* ============================================================
   Tipografie globală
   ============================================================ */
body,
body.ct-sidebar-right,
.ct-container,
.entry-content {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  color: var(--warm-800);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, .hero-title, .page-header h1, .section-title {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--green-900);
  letter-spacing: -.02em;
}

/* Titlurile din carduri rămân pe fontul body (ca pe agroevolution) */
.card h3, .feature-title, .stat-num, .footer h4 {
  font-family: var(--font-body);
}

a { color: var(--green-700); text-decoration: none; transition: color .15s; }
a:hover { color: var(--green-500); }
img { max-width: 100%; height: auto; }

/* Container consistent cu agroevolution.eu */
.ct-container,
.entry-content {
  --container-max-width: 1120px;
}

/* ============================================================
   Animații (fadeInUp / fadeIn / slideDown)
   ============================================================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-title  { animation: fadeInUp .8s cubic-bezier(.16,1,.3,1) both; }
.hero-sub    { animation: fadeInUp .8s .15s cubic-bezier(.16,1,.3,1) both; }
.hero-actions{ animation: fadeInUp .8s .3s cubic-bezier(.16,1,.3,1) both; }
.stats       { animation: fadeInUp .8s .4s cubic-bezier(.16,1,.3,1) both; }

.card:nth-child(1) { animation: fadeInUp .6s .1s cubic-bezier(.16,1,.3,1) both; }
.card:nth-child(2) { animation: fadeInUp .6s .2s cubic-bezier(.16,1,.3,1) both; }
.card:nth-child(3) { animation: fadeInUp .6s .3s cubic-bezier(.16,1,.3,1) both; }
.card:nth-child(4) { animation: fadeInUp .6s .4s cubic-bezier(.16,1,.3,1) both; }
.card:nth-child(5) { animation: fadeInUp .6s .5s cubic-bezier(.16,1,.3,1) both; }
.card:nth-child(6) { animation: fadeInUp .6s .6s cubic-bezier(.16,1,.3,1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
  }
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  background: linear-gradient(135deg, #0d3b1e 0%, #166534 50%, #15803d 100%);
  color: #fff;
  padding: 80px 0 72px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(45deg, rgba(255,255,255,.03) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255,255,255,.03) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255,255,255,.03) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255,255,255,.03) 75%);
  background-size: 40px 40px;
  background-position: 0 0, 0 20px, 20px -20px, -20px 0;
  z-index: 0;
  animation: fadeIn 1.2s ease;
}

.hero .ct-container { position: relative; z-index: 1; }

.hero-title {
  font-size: clamp(2rem, 1rem + 4vw, 3.2rem);
  font-weight: 600;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(135deg, #fff 0%, #86efac 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-wrap: balance;
}

.hero-sub {
  font-size: clamp(1rem, .75rem + .8vw, 1.15rem);
  max-width: 680px;
  margin: 0 auto 36px;
  opacity: .88;
  line-height: 1.65;
  text-wrap: balance;
  color: #fff;
}

.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero .btn {
  display: inline-flex;
  align-items: center;
  padding: 14px 32px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: .95rem;
  transition: all .2s cubic-bezier(.4,0,.2,1);
}
.hero .btn-primary {
  background: #fff;
  color: var(--green-800);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
}
.hero .btn-primary:hover {
  background: var(--green-50);
  color: var(--green-900);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.18);
}
.hero .btn-outline {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.35);
}
.hero .btn-outline:hover {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.08);
  color: #fff;
  transform: translateY(-2px);
}

/* ============================================================
   Stats
   ============================================================ */
.stats-row { padding: 32px 0 8px; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.stat {
  text-align: center;
  padding: 28px 16px;
  background: #fff;
  border: 1px solid var(--warm-200);
  border-radius: var(--radius-lg);
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-400), var(--green-600));
  opacity: 0;
  transition: opacity .2s;
}
.stat:hover::before { opacity: 1; }
.stat:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.stat-icon { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.stat-num  { font-size: 2rem; font-weight: 800; color: var(--green-600); display: block; font-family: var(--font-body); }
.stat-label{ font-size: .82rem; color: var(--warm-600); display: block; margin-top: 2px; }

/* ============================================================
   Page Header (banner pagini interne / județe)
   ============================================================ */
.page-header {
  position: relative;
  background: linear-gradient(135deg, #14532d, #15803d);
  color: #fff;
  padding: 56px 0 48px;
  text-align: center;
  overflow: hidden;
  isolation: isolate;
}
.page-header-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 80%, rgba(74,222,128,.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(212,168,67,.08) 0%, transparent 50%);
  z-index: 0;
}
.page-header .ct-container { position: relative; z-index: 1; }
.page-header h1 { font-size: clamp(1.6rem, 1rem + 2vw, 2.2rem); font-weight: 600; color: #fff; }
.page-header p  { font-size: 1rem; opacity: .88; margin-top: 10px; max-width: 600px; margin-left: auto; margin-right: auto; text-wrap: balance; }

/* ============================================================
   Bento Cards
   ============================================================ */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  padding: 32px 0;
}

.card {
  background: #fff;
  border: 1px solid var(--warm-200);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  position: relative;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(22,101,52,.03), transparent);
  opacity: 0;
  transition: opacity .25s;
  z-index: 0;
}
.card:hover::before { opacity: 1; }
.card:hover {
  box-shadow: 0 12px 40px rgba(0,0,0,.07);
  border-color: var(--green-300);
  transform: translateY(-3px);
}
.card > * { position: relative; z-index: 1; }

.card-icon-wrap {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  background: var(--green-50);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  transition: all .25s;
}
.card:hover .card-icon-wrap { background: var(--green-100); transform: scale(1.05); }
.card-icon { font-size: 1.4rem; line-height: 1; }

.card h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--green-800);
}
.card p {
  font-size: .88rem;
  color: var(--warm-600);
  margin-bottom: 20px;
  line-height: 1.6;
  flex: 1;
}
.card .btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 10px 22px;
  background: var(--green-600);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 600;
  transition: all .2s;
}
.card .btn:hover {
  background: var(--green-700);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(22,101,52,.25);
}

/* ============================================================
   Secțiuni
   ============================================================ */
.section { padding: 48px 0; }

.section-title {
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -.02em;
  text-wrap: balance;
}
.section-sub {
  font-size: .95rem;
  color: var(--warm-600);
  margin-bottom: 32px;
  max-width: 600px;
  text-wrap: balance;
}
.section-alt { background: var(--warm-100); padding: 8px 0; }

/* ============================================================
   Features grid
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-card {
  background: #fff;
  border: 1px solid var(--warm-200);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.feature-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green-400), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.feature-card:hover::after { opacity: 1; }
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--green-700);
  display: block;
  margin-bottom: 8px;
}
.feature-card p { color: var(--warm-600); font-size: .88rem; line-height: 1.6; }

/* ============================================================
   Integrare cu Blocksy — butoane, header, footer, linkuri
   ============================================================ */

/* Butoane Blocksy aliniate la paletă */
.ct-button, .wp-block-button__link, button.ct-button,
.ct-button-ghost {
  font-family: var(--font-body);
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all .2s;
}
.ct-button:not(.ct-button-ghost),
.wp-block-button__link:not(.is-style-outline) {
  background: var(--green-600) !important;
  color: #fff !important;
}
.ct-button:not(.ct-button-ghost):hover,
.wp-block-button__link:not(.is-style-outline):hover {
  background: var(--green-700) !important;
  transform: translateY(-1px);
}

/* Banner titlu pagină Blocksy (page-title) — paletă verde */
.ct-page-title, .hero-section[data-type="type-1"] {
  background: linear-gradient(135deg, #14532d, #15803d);
  color: #fff;
}
.ct-page-title .ct-title, .ct-page-title h1 { color: #fff; font-family: var(--font-display); }

/* Linkuri în conținutul paginilor de terenuri */
.entry-content a:not(.btn):not(.wp-block-button__link) {
  color: var(--green-700);
  text-decoration: underline;
  text-decoration-color: var(--green-300);
  text-underline-offset: 2px;
}
.entry-content a:not(.btn):hover { color: var(--green-500); }

/* Liste din conținut */
.entry-content ul li::marker { color: var(--green-500); }

/* Titluri de secțiune în editorul de blocuri */
.entry-content h2 { margin-top: 1.5em; }
.entry-content h3 { margin-top: 1.2em; }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 768px) {
  .hero { padding: 48px 0 40px; }
  .hero-title { font-size: 1.6rem; }
  .hero-sub { font-size: .92rem; }
  .cards { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 20px 12px; }
  .stat-num { font-size: 1.6rem; }
  .features-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .features-grid { grid-template-columns: 1fr; }
  .hero-actions { gap: 10px; flex-direction: column; align-items: center; }
}

/* ============================================================
   Fix: ascunde titlul paginii pe homepage (era dublat cu hero-ul)
   Adaugat 2026-10-09
   ============================================================ */
body.home .ct-page-title,
body.home .page-title,
body.home .hero-section + .ct-container .ct-page-title,
body.home article > header.entry-header,
body.home .entry-header .entry-title {
  display: none !important;
}

/* Ascunde si breadcrumb-ul pe homepage */
body.home .ct-breadcrumbs {
  display: none !important;
}
