/* =============================================================================
   CE Theme — Main Stylesheet
   ========================================================================== */

/* ---- CSS Custom Properties ---- */
:root {
  --color-primary:     #5aba28;
  --color-primary-dk:  #3d8a18;
  --color-primary-lt:  #e8f5e0;
  --color-dark:        #1a1a1a;
  --color-dark-green:  #1e3a0f;
  --color-text:        #2d2d2d;
  --color-text-light:  #6b7280;
  --color-bg:          #ffffff;
  --color-bg-alt:      #f7f9f5;
  --color-border:      #e2e8f0;

  --font-base:    system-ui, -apple-system, 'Segoe UI', sans-serif;
  --container-max: 1200px;
  --container-pad: clamp(1rem, 4vw, 2rem);
  --radius:        6px;
  --shadow-sm:     0 1px 4px rgb(0 0 0 / .08);
  --shadow-md:     0 4px 20px rgb(0 0 0 / .12);
  --transition:    .2s ease;
}

/* ---- Reset / Base ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-base); font-size: 1rem; line-height: 1.7; color: var(--color-text); background: var(--color-bg); }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--color-primary); text-decoration: none; }
a:hover { color: var(--color-primary-dk); }
ul { list-style: none; }

/* ---- Container ---- */
.container { max-width: var(--container-max); margin-inline: auto; padding-inline: var(--container-pad); }

/* ---- Skip link ---- */
.skip-link { position: absolute; top: -100%; left: 1rem; padding: .5rem 1rem; background: var(--color-primary); color: #fff; border-radius: var(--radius); z-index: 9999; }
.skip-link:focus { top: 0; }

/* ---- Screen reader ---- */
.screen-reader-text { clip: rect(1px,1px,1px,1px); position: absolute; height: 1px; width: 1px; overflow: hidden; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .65rem 1.5rem; border-radius: var(--radius); font-size: .95rem; font-weight: 600; cursor: pointer; border: 2px solid transparent; transition: background var(--transition), color var(--transition); }
.btn--primary { background: var(--color-primary); color: #fff; }
.btn--primary:hover { background: var(--color-primary-dk); color: #fff; }
.btn--outline { border-color: var(--color-primary); color: var(--color-primary); background: transparent; }
.btn--outline:hover { background: var(--color-primary); color: #fff; }
.btn--white { background: #fff; color: var(--color-primary); }
.btn--white:hover { background: var(--color-primary-lt); }

/* Header styles moved to assets/css/header.css */

/* =============================================================================
   HERO
   ========================================================================== */
.hero {
  background: var(--color-dark) center/cover no-repeat;
  position: relative;
  color: #fff;
  padding-block: 0;
}
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero--has-video { background-image: none !important; }

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgb(0 0 0 / .78) 0%, rgb(0 0 0 / .38) 100%);
  pointer-events: none;
}
/* Плавний перехід від темного хедера до hero */
.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(to bottom, rgb(26 26 26 / .6) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}
.hero .container { position: relative; z-index: 2; }

.hero__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2rem;
  align-items: center;
  min-height: 92vh;
  padding-block: 5rem 4rem;
}

.hero__title {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero__list { display: flex; flex-direction: column; gap: .5rem; }
.hero__list li {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .95rem;
  opacity: .9;
}
.hero__list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-primary);
}

/* Hero form box */
.hero__form-box {
  background: rgb(255 255 255 / .12);
  backdrop-filter: blur(8px);
  border: 1px solid rgb(255 255 255 / .25);
  border-radius: var(--radius);
  padding: 2rem;
}
.hero__form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.25rem;
  text-align: center;
}

/* CF7 inside hero form */
.hero__form-box .wpcf7-form { display: flex; flex-direction: column; gap: .75rem; }
.hero__form-box .wpcf7-form-control-wrap { display: block; }
.hero__form-box input[type="text"],
.hero__form-box input[type="email"],
.hero__form-box input[type="tel"],
.hero__form-box textarea,
.hero__form-box select {
  width: 100%;
  padding: .65rem .9rem;
  border: 1px solid rgb(255 255 255 / .3);
  border-radius: var(--radius);
  background: rgb(255 255 255 / .15);
  color: #fff;
  font-size: .9rem;
}
.hero__form-box input::placeholder,
.hero__form-box textarea::placeholder { color: rgb(255 255 255 / .6); }
.hero__form-box .wpcf7-submit,
.hero__form-box input[type="submit"] {
  width: 100%;
  padding: .7rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.hero__form-box .wpcf7-submit:hover,
.hero__form-box input[type="submit"]:hover { background: var(--color-primary-dk); }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; min-height: auto; }
  .hero__form-box { max-width: 480px; }
}

/* =============================================================================
   STATS
   ========================================================================== */
.stats { padding-block: 2.5rem; background: var(--color-bg); }
.stats__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.stats__item {
  background: var(--color-primary);
  border-radius: var(--radius);
  padding: 2rem 1.5rem;
  text-align: center;
  color: #fff;
}
.stats__number { display: block; font-size: clamp(2.5rem, 5vw, 4rem); font-weight: 900; line-height: 1; }
.stats__label  { display: block; font-size: .85rem; margin-top: .5rem; opacity: .9; }

@media (max-width: 600px) { .stats__grid { grid-template-columns: 1fr; } }

/* =============================================================================
   SERVICES DETAILED
   ========================================================================== */
.services-detailed { padding-block: 3rem; background: var(--color-bg); }

.service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  padding-block: 3rem;
  border-bottom: 1px solid var(--color-border);
}
.service-block:last-child { border-bottom: none; }

/* Image left — default */
.service-block__image { order: 1; }
.service-block__content { order: 2; }

/* Image right */
.service-block--img-right .service-block__image { order: 2; }
.service-block--img-right .service-block__content { order: 1; }

.service-block__image img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
}
.service-block__title {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1rem;
  line-height: 1.25;
}
.service-block__desc { color: var(--color-text-light); line-height: 1.8; font-size: .95rem; }
.service-block__desc p + p { margin-top: .75rem; }

@media (max-width: 768px) {
  .service-block { grid-template-columns: 1fr; gap: 1.5rem; }
  .service-block__image,
  .service-block--img-right .service-block__image { order: 1; }
  .service-block__content,
  .service-block--img-right .service-block__content { order: 2; }
}

/* =============================================================================
   SERVICE CARDS
   ========================================================================== */
.service-cards { background: var(--color-bg-alt); padding-block: 4rem; }

.section-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 2.5rem;
  text-align: center;
}

.service-cards__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.service-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}
.service-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.service-card__dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-bottom: .75rem;
}
.service-card__title { font-size: 1rem; font-weight: 700; color: var(--color-dark); margin-bottom: .5rem; line-height: 1.3; }
.service-card__desc  { font-size: .875rem; color: var(--color-text-light); line-height: 1.6; }

/* =============================================================================
   CONTACTS SECTION
   ========================================================================== */
.contacts-section { background: var(--color-bg); padding-block: 4rem; }

.contacts-section__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 2.5rem;
  align-items: center;
}
.contacts-section__image img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4/3;
  object-fit: cover;
}
.contacts-section__box {
  background: var(--color-primary);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  color: #fff;
}
.contacts-section__title {
  font-size: 1.6rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  color: #fff;
}
.contacts-section__list { display: flex; flex-direction: column; gap: 1rem; }
.contacts-section__item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .95rem;
  line-height: 1.4;
}
.contacts-section__item::before {
  content: '';
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: rgb(255 255 255 / .3) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='4'/%3E%3C/svg%3E") center/12px no-repeat;
  border-radius: 50%;
  margin-top: .1rem;
}
.contacts-section__item a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.contacts-section__item a:hover { opacity: .85; }

@media (max-width: 768px) {
  .contacts-section__grid { grid-template-columns: 1fr; }
  .contacts-section__image { display: none; }
}

/* =============================================================================
   FAQ
   ========================================================================== */
.faq { background: var(--color-bg-alt); padding-block: 4rem; }
.faq__list { max-width: 800px; margin-inline: auto; display: flex; flex-direction: column; gap: .5rem; }

.faq__item { border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: var(--color-bg); }

.faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.25rem;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 600;
  text-align: left;
  color: var(--color-text);
  transition: background var(--transition);
}
.faq__question:hover { background: var(--color-primary-lt); }
.faq__question[aria-expanded="true"] { background: var(--color-primary-lt); color: var(--color-primary-dk); }

.faq__icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid currentColor;
  position: relative;
  color: var(--color-primary);
}
.faq__icon::before,
.faq__icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
}
.faq__icon::before { width: 10px; height: 2px; top: 8px; left: 4px; }
.faq__icon::after  { width: 2px; height: 10px; top: 4px; left: 8px; }
.faq__question[aria-expanded="true"] .faq__icon::after { transform: rotate(90deg); opacity: 0; }

.faq__answer { padding: .75rem 1.25rem 1.25rem; color: var(--color-text-light); line-height: 1.75; font-size: .95rem; }

/* =============================================================================
   CTA SECTION
   ========================================================================== */
.cta-section {
  background: var(--color-dark-green);
  padding-block: 4rem;
  color: #fff;
}
.cta-section__title {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  text-align: center;
  color: #fff;
  margin-bottom: 2.5rem;
}
.cta-section__form { max-width: 540px; margin-inline: auto; }

/* CF7 inside CTA */
.cta-section .wpcf7-form { display: flex; flex-direction: column; gap: .75rem; }
.cta-section input[type="text"],
.cta-section input[type="email"],
.cta-section input[type="tel"],
.cta-section textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: var(--radius);
  background: rgb(255 255 255 / .1);
  color: #fff;
  font-size: .95rem;
}
.cta-section input::placeholder,
.cta-section textarea::placeholder { color: rgb(255 255 255 / .5); }
.cta-section .wpcf7-submit,
.cta-section input[type="submit"] {
  width: 100%;
  padding: .8rem;
  background: var(--color-primary);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition);
}
.cta-section .wpcf7-submit:hover,
.cta-section input[type="submit"]:hover { background: var(--color-primary-dk); }

/* =============================================================================
   SITE FOOTER
   ========================================================================== */
.site-footer { background: var(--header-bg, #1a1a1a); color: rgb(255 255 255 / .65); }
.footer-widgets { padding-block: 3rem; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
.footer-widgets__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.widget__title { font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: .75rem; text-transform: uppercase; letter-spacing: .05em; }

.footer-bottom { padding-block: 1.25rem; font-size: .82rem; }
.footer-bottom__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1rem; }
.footer-bottom__copy a { color: rgb(255 255 255 / .7); }
.footer-menu { display: flex; flex-wrap: wrap; gap: .25rem .75rem; }
.footer-menu a { color: rgb(255 255 255 / .6); }
.footer-menu a:hover { color: #fff; }

/* =============================================================================
   SIDEBAR & WIDGET AREA
   ========================================================================== */
.widget-area { display: flex; flex-direction: column; gap: 2rem; }
.widget + .widget { padding-top: 1.5rem; border-top: 1px solid var(--color-border); }

/* =============================================================================
   PAGINATION
   ========================================================================== */
.pagination { display: flex; gap: .5rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding-inline: .5rem; border: 1px solid var(--color-border); border-radius: var(--radius); font-size: .9rem; color: var(--color-text); }
.page-numbers.current,
.page-numbers:hover { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }

/* =============================================================================
   BREADCRUMBS
   ========================================================================== */
.breadcrumbs { margin-bottom: 1.5rem; font-size: .85rem; color: var(--color-text-light); }
.breadcrumbs__list { display: flex; flex-wrap: wrap; gap: .25rem; }
.breadcrumbs__item + .breadcrumbs__item::before { content: '/'; margin-right: .25rem; }

/* =============================================================================
   POST CARDS (blog)
   ========================================================================== */
.posts-loop { display: grid; gap: 2rem; }
@media (min-width: 640px) { .posts-loop { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .posts-loop { grid-template-columns: repeat(3,1fr); } }

.post-card { display: flex; flex-direction: column; border: 1px solid var(--color-border); border-radius: var(--radius); overflow: hidden; background: var(--color-bg); box-shadow: var(--shadow-sm); transition: box-shadow var(--transition), transform var(--transition); }
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.post-card__thumbnail img { width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.post-card__body { display: flex; flex-direction: column; gap: .75rem; padding: 1.25rem; flex: 1; }
.post-card__title { font-size: 1.05rem; font-weight: 700; line-height: 1.3; }
.post-card__title a { color: var(--color-text); }
.post-card__title a:hover { color: var(--color-primary); }
.post-card__excerpt { color: var(--color-text-light); font-size: .875rem; flex: 1; }
.post-categories { font-size: .75rem; color: var(--color-primary); text-transform: uppercase; letter-spacing: .05em; }
.entry-meta { display: flex; flex-wrap: wrap; gap: .5rem 1rem; font-size: .8rem; color: var(--color-text-light); }

/* =============================================================================
   SITE MAIN
   ========================================================================== */
.site-main { /* padding-block: 3rem; */ }

/* =============================================================================
   ERROR 404 / NO RESULTS
   ========================================================================== */
.error-404, .no-results { text-align: center; padding-block: 4rem; }
.error-404 .page-title, .no-results .page-title { margin-bottom: 1rem; }

/* Mobile nav handled in header.css */
@media (max-width: 768px) {
}
