/*
Theme Name: DomStroy Child
Theme URI: https://ваш-домен.ru
Description: Дочерняя тема для сайта «Строительство и дизайн загородного дома». Родительская тема: Kadence.
Author: DomStroy
Template: kadence
Version: 1.0.0
Text Domain: domstroy-child
*/

@import url('../kadence/style.css');

:root {
  --domstroy-primary: #2D5016;
  --domstroy-accent: #C4A35A;
  --domstroy-bg: #F7F5F0;
  --domstroy-text: #2C2C2C;
  --domstroy-secondary: #5A7A4A;
  --domstroy-light: #E8E4DC;
  --domstroy-white: #FFFFFF;
  --domstroy-radius: 8px;
  --domstroy-shadow: 0 4px 20px rgba(45, 80, 22, 0.08);
}

body {
  background-color: var(--domstroy-bg);
  color: var(--domstroy-text);
}

/* Site-wide cream background (like homepage) */
.content-bg,
body.content-style-boxed .site {
  background: var(--domstroy-bg) !important;
}

/* Homepage: transparent inner wrapper */
.home .content-bg,
.home.content-style-boxed .site {
  background: var(--domstroy-bg) !important;
}

.home .entry.single-entry,
.home .entry-content-wrap {
  background: transparent;
  box-shadow: none;
}

/* Inner pages: white card on cream background */
body:not(.home) .entry.single-entry {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
}

body:not(.home) .entry-content-wrap {
  background: transparent;
}

.home .entry-hero.page-hero-section {
  display: none;
}

/* Inner pages: hide Kadence grey title band — title lives in domstroy-page-hero */
body:not(.home) .entry-hero.page-hero-section,
body.domstroy-has-hero .entry-hero.post-archive-hero-section,
body.domstroy-has-hero .entry-hero {
  display: none !important;
}

body:not(.home) .content-bg .entry-header,
body.domstroy-has-hero .entry-header {
  display: none;
}

/* Hero — локальное фото + лёгкий оверлей */
.domstroy-hero {
  background-color: var(--domstroy-primary);
  color: var(--domstroy-white);
  padding: 0;
  border-radius: var(--domstroy-radius);
  margin-bottom: 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.domstroy-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.domstroy-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(45, 80, 22, 0.72) 0%,
    rgba(45, 80, 22, 0.35) 55%,
    rgba(45, 80, 22, 0.65) 100%
  );
}

.domstroy-hero-inner {
  position: relative;
  z-index: 2;
  padding: 4rem 2rem;
  max-width: 820px;
}

.domstroy-hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  margin-bottom: 1rem;
  color: var(--domstroy-white);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

.domstroy-hero p {
  font-size: 1.125rem;
  max-width: 720px;
  margin: 0 auto 2rem;
  opacity: 0.95;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.25);
}

.domstroy-hero .domstroy-btn-primary {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Navigation cards on homepage */
.domstroy-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}

.domstroy-nav-card {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  padding: 0;
  box-shadow: var(--domstroy-shadow);
  text-decoration: none;
  color: var(--domstroy-text);
  transition: transform 0.2s, box-shadow 0.2s;
  border-top: 4px solid var(--domstroy-accent);
  overflow: hidden;
  display: block;
}

.domstroy-nav-card-bg {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}

.domstroy-nav-card-body {
  padding: 1.25rem 1.5rem 1.5rem;
}

.domstroy-nav-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(45, 80, 22, 0.15);
  color: var(--domstroy-primary);
}

.domstroy-nav-card h3 {
  color: var(--domstroy-primary);
  margin-bottom: 0.75rem;
}

/* Page hero with background image */
.domstroy-page-hero {
  border-radius: var(--domstroy-radius);
  margin: -2rem -2rem 2rem;
  width: calc(100% + 4rem);
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  position: relative;
  overflow: hidden;
  background-color: var(--domstroy-primary);
}

.domstroy-page-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.domstroy-page-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(45, 80, 22, 0.88) 0%, rgba(45, 80, 22, 0.35) 100%);
}

.domstroy-page-hero-inner {
  position: relative;
  z-index: 2;
  padding: 2rem 2.5rem;
  width: 100%;
}

.domstroy-page-hero h1 {
  color: var(--domstroy-white);
  margin: 0;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Interior style galleries */
.domstroy-style-block {
  margin: 2.5rem 0;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--domstroy-light);
}

.domstroy-style-block:last-of-type {
  border-bottom: none;
}

.domstroy-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin: 1.25rem 0 0;
}

body[class*="domstroy-page-"] .entry-header .entry-title {
  display: none;
}

body[class*="domstroy-page-"] .entry-header {
  min-height: 0;
  margin-bottom: 0;
}

.domstroy-gallery img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
}

.domstroy-gallery--single img {
  width: 100%;
  height: auto;
  max-height: 420px;
  object-fit: cover;
}

@media (max-width: 768px) {
  .domstroy-gallery {
    grid-template-columns: 1fr;
  }

  .domstroy-gallery img {
    height: 200px;
  }

  .domstroy-page-hero-inner {
    padding: 1.5rem;
  }

  .domstroy-page-hero {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
    min-height: 200px;
  }
}

/* Section blocks */
.domstroy-section {
  margin-bottom: 3rem;
}

.domstroy-section h2 {
  color: var(--domstroy-primary);
  border-bottom: 2px solid var(--domstroy-accent);
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
}

/* Homepage: construction stages — list on photo with glass cards */
.domstroy-stages-hero {
  position: relative;
  border-radius: var(--domstroy-radius);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  align-items: stretch;
  background-color: var(--domstroy-primary);
}

.domstroy-stages-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.domstroy-stages-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(45, 80, 22, 0.55) 0%,
    rgba(45, 80, 22, 0.35) 50%,
    rgba(45, 80, 22, 0.6) 100%
  );
}

.domstroy-stages-hero-inner {
  position: relative;
  z-index: 2;
  padding: 2rem 2.25rem;
  width: 100%;
}

.domstroy-stages-lead {
  color: var(--domstroy-white);
  font-size: 1.05rem;
  margin: 0 0 1.5rem;
  max-width: 640px;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  line-height: 1.5;
}

.domstroy-stages-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.domstroy-stage-item {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: var(--domstroy-radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  border-left: 3px solid var(--domstroy-accent);
  transition: transform 0.2s, background 0.2s;
}

.domstroy-stage-item:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.96);
}

.domstroy-stage-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--domstroy-primary);
  color: var(--domstroy-white);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: 50%;
}

.domstroy-stage-body {
  min-width: 0;
}

.domstroy-stage-body strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.domstroy-stage-body strong a {
  color: var(--domstroy-primary);
  text-decoration: none;
}

.domstroy-stage-body strong a:hover {
  color: var(--domstroy-secondary);
  text-decoration: underline;
}

.domstroy-stage-body p {
  margin: 0;
  font-size: 0.875rem;
  color: #444;
  line-height: 1.45;
}

@media (max-width: 900px) {
  .domstroy-stages-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .domstroy-stages-hero {
    min-height: auto;
  }

  .domstroy-stages-hero-inner {
    padding: 1.5rem;
  }

  .domstroy-stages-grid {
    grid-template-columns: 1fr;
  }
}

/* Popular posts */
.domstroy-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.domstroy-post-card {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  overflow: hidden;
  box-shadow: var(--domstroy-shadow);
}

.domstroy-post-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.domstroy-post-card-body {
  padding: 1.25rem;
}

.domstroy-post-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.domstroy-post-card h3 a {
  color: var(--domstroy-primary);
  text-decoration: none;
}

.domstroy-post-card-author {
  margin: 0 0 0.5rem;
  font-size: 0.85rem;
  color: var(--domstroy-secondary);
  font-weight: 600;
}

/* Keywords / tags cloud */
.domstroy-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 2rem 0;
}

.domstroy-keyword {
  background: var(--domstroy-light);
  color: var(--domstroy-primary);
  padding: 0.35rem 0.85rem;
  border-radius: 20px;
  font-size: 0.875rem;
}

/* Services cards */
.domstroy-services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.domstroy-service-card {
  background: var(--domstroy-white);
  padding: 2rem;
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
  border-left: 4px solid var(--domstroy-accent);
}

.domstroy-service-card h3 {
  color: var(--domstroy-primary);
}

.domstroy-service-price {
  font-size: 1.25rem;
  color: var(--domstroy-accent);
  font-weight: 600;
  margin: 1rem 0 0.35rem;
}

.domstroy-service-price-note {
  font-size: 0.875rem;
  color: #666;
  margin: 0 0 1rem;
  line-height: 1.5;
}

.domstroy-service-card--info {
  border-left-color: var(--domstroy-primary);
}

.domstroy-service-ref {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.7;
}

.domstroy-service-ref a {
  color: var(--domstroy-primary);
  text-decoration: none;
  border-bottom: 1px solid var(--domstroy-light);
}

.domstroy-service-ref a:hover {
  color: var(--domstroy-secondary);
  border-bottom-color: var(--domstroy-accent);
}

.domstroy-price-disclaimer {
  background: var(--domstroy-light);
  border-left: 4px solid var(--domstroy-accent);
  border-radius: var(--domstroy-radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.domstroy-price-disclaimer p {
  margin: 0;
}

.domstroy-soon-badge {
  display: inline-block;
  background: var(--domstroy-primary);
  color: var(--domstroy-white);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-right: 0.35rem;
}

.domstroy-contact-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}

.domstroy-contact-list li {
  margin-bottom: 0.5rem;
}

.domstroy-contact-list a {
  color: var(--domstroy-primary);
}

.domstroy-contact-note {
  font-size: 0.875rem;
  color: #666;
  margin-top: 1.5rem;
}

/* Buttons */
.domstroy-btn {
  display: inline-block;
  background: var(--domstroy-accent);
  color: var(--domstroy-text);
  padding: 0.75rem 1.5rem;
  border-radius: var(--domstroy-radius);
  text-decoration: none;
  font-weight: 600;
  transition: background 0.2s;
  border: none;
  cursor: pointer;
}

.domstroy-btn:hover {
  background: #b8934a;
  color: var(--domstroy-text);
}

.domstroy-btn-primary {
  background: var(--domstroy-primary);
  color: var(--domstroy-white);
}

.domstroy-btn-primary:hover {
  background: var(--domstroy-secondary);
  color: var(--domstroy-white);
}

/* Subsection list */
.domstroy-subsections {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.domstroy-subsections li a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  color: var(--domstroy-primary);
  text-decoration: none;
  box-shadow: var(--domstroy-shadow);
  transition: background 0.2s;
}

.domstroy-subsections li a:hover {
  background: var(--domstroy-light);
}

/* Breadcrumbs */
.domstroy-breadcrumb {
  font-size: 0.875rem;
  color: var(--domstroy-secondary);
  margin-bottom: 1.5rem;
}

.domstroy-breadcrumb a {
  color: var(--domstroy-primary);
}

/* Contact form wrapper */
.domstroy-contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

@media (max-width: 768px) {
  .domstroy-hero-inner {
    padding: 2.5rem 1.25rem;
  }

  .domstroy-hero {
    min-height: 280px;
  }

  .domstroy-contact-grid {
    grid-template-columns: 1fr;
  }

  .domstroy-hero {
    padding: 2.5rem 1.25rem;
  }
}

.domstroy-section table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  overflow: hidden;
  box-shadow: var(--domstroy-shadow);
}

.domstroy-section table th,
.domstroy-section table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--domstroy-light);
  text-align: left;
}

.domstroy-section table th {
  background: var(--domstroy-primary);
  color: var(--domstroy-white);
}

.domstroy-calculator {
  background: var(--domstroy-white);
  padding: 2rem;
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
  max-width: 600px;
}

.domstroy-calculator label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 600;
  color: var(--domstroy-primary);
}

.domstroy-calculator input,
.domstroy-calculator select {
  width: 100%;
  padding: 0.65rem;
  margin-bottom: 1rem;
  border: 1px solid var(--domstroy-light);
  border-radius: var(--domstroy-radius);
  font-size: 1rem;
}

.domstroy-calculator-result {
  background: var(--domstroy-light);
  padding: 1.25rem;
  border-radius: var(--domstroy-radius);
  margin-top: 1rem;
  font-size: 1.1rem;
}

/* Footer accent */
.site-footer {
  border-top: 3px solid var(--domstroy-accent);
}

/* ── Blog archive ── */
body.domstroy-page-blog .entry.loop-entry,
body.blog .entry.loop-entry {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
  border-top: 3px solid var(--domstroy-accent);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

body.domstroy-page-blog .entry.loop-entry:hover,
body.blog .entry.loop-entry:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(45, 80, 22, 0.12);
}

body.domstroy-page-blog .content-area,
body.blog .content-area {
  background: transparent;
}

.domstroy-blog-intro {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
  padding: 1.5rem 2rem;
  margin-bottom: 2rem;
  border-left: 4px solid var(--domstroy-primary);
}

.domstroy-blog-intro p {
  margin: 0 0 1rem;
}

.domstroy-blog-intro p:last-child {
  margin-bottom: 0;
}

/* ── Single post ── */
body.single-post .entry-hero,
body.single-post .entry-header {
  display: none !important;
}

body.single-post .entry.single-entry {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
  overflow: hidden;
}

.domstroy-post-hero {
  position: relative;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  margin: -2rem -2rem 2rem;
  width: calc(100% + 4rem);
  background-color: var(--domstroy-primary);
}

.domstroy-post-hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.domstroy-post-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(45, 80, 22, 0.92) 0%, rgba(45, 80, 22, 0.4) 100%);
}

.domstroy-post-hero-inner {
  position: relative;
  z-index: 2;
  padding: 2rem 2.5rem;
  width: 100%;
}

.domstroy-post-hero h1 {
  color: var(--domstroy-white);
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

.domstroy-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.9rem;
}

.domstroy-post-author {
  font-weight: 600;
}

.domstroy-post-meta a {
  color: var(--domstroy-accent);
  text-decoration: none;
}

.domstroy-post-category {
  display: inline-block;
  background: var(--domstroy-accent);
  color: var(--domstroy-text);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  margin-bottom: 0.75rem;
}

.single-post .entry-content {
  font-size: 1.05rem;
  line-height: 1.75;
  max-width: 760px;
}

.single-post .entry-content p {
  margin-bottom: 1.25rem;
}

.single-post .entry-content h2,
.single-post .entry-content h3 {
  color: var(--domstroy-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.single-post .entry-content a {
  color: var(--domstroy-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-post .entry-content a:hover {
  color: var(--domstroy-secondary);
}

.single-post .entry-content ul,
.single-post .entry-content ol {
  margin: 0 0 1.25rem 1.25rem;
}

.single-post .entry-content blockquote {
  border-left: 4px solid var(--domstroy-accent);
  margin: 1.5rem 0;
  padding: 0.75rem 1.25rem;
  background: var(--domstroy-light);
  border-radius: 0 var(--domstroy-radius) var(--domstroy-radius) 0;
}

.domstroy-post-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--domstroy-light);
}

.domstroy-post-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--domstroy-primary);
  text-decoration: none;
  font-weight: 600;
}

.domstroy-post-back:hover {
  color: var(--domstroy-secondary);
}

/* ── Submit article form ── */
.domstroy-submit-post {
  background: var(--domstroy-white);
  border-radius: var(--domstroy-radius);
  box-shadow: var(--domstroy-shadow);
  padding: 2rem;
  margin: 2rem 0 3rem;
  border-top: 4px solid var(--domstroy-primary);
}

.domstroy-submit-post h2 {
  color: var(--domstroy-primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.domstroy-submit-post .domstroy-submit-note {
  color: #666;
  font-size: 0.925rem;
  margin-bottom: 1.5rem;
}

.domstroy-submit-post label {
  display: block;
  font-weight: 600;
  color: var(--domstroy-primary);
  margin-bottom: 0.35rem;
}

.domstroy-submit-post input[type="text"],
.domstroy-submit-post textarea {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid var(--domstroy-light);
  border-radius: var(--domstroy-radius);
  font-size: 1rem;
  font-family: inherit;
  box-sizing: border-box;
  margin-bottom: 1.25rem;
}

.domstroy-submit-post textarea {
  min-height: 220px;
  resize: vertical;
  line-height: 1.6;
}

.domstroy-submit-post .domstroy-field-hint {
  font-size: 0.85rem;
  color: #777;
  margin: -0.75rem 0 1.25rem;
}

.domstroy-submit-success {
  background: #e8f5e9;
  border: 1px solid #a5d6a7;
  color: #2e7d32;
  padding: 1rem 1.25rem;
  border-radius: var(--domstroy-radius);
  margin-bottom: 1.5rem;
}

.domstroy-submit-error {
  background: #ffebee;
  border: 1px solid #ef9a9a;
  color: #c62828;
  padding: 1rem 1.25rem;
  border-radius: var(--domstroy-radius);
  margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
  .domstroy-post-hero {
    margin-left: -1.5rem;
    margin-right: -1.5rem;
    width: calc(100% + 3rem);
    min-height: 220px;
  }

  .domstroy-post-hero-inner {
    padding: 1.5rem;
  }
}
