/* ТОДСТРОЙ ТС ЕООД — style.css
   Класически изглед на местна строителна фирма: бяла страница върху
   светлосин фон, синя навигация, лента-слоган, странична колона с услуги.
   Mobile-first. */

:root {
  --blue: #2f7fc1;
  --blue-dark: #1f5e94;
  --blue-darker: #174a76;
  --blue-light: #eaf3fb;
  --text: #3a3f44;
  --heading: #2b5f8e;
  --gray-box: #f1f1f1;
  --gray-line: #d9dee3;
  --footer-bg: #e9ecef;
  --white: #ffffff;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  background: linear-gradient(180deg, #8fc0e8 0%, #b8d9f2 40%, #dceefb 100%) fixed;
  min-height: 100%;
}

body {
  margin: 0 auto;
  max-width: var(--maxw);
  background: var(--white);
  box-shadow: 0 0 30px rgba(23, 74, 118, 0.35);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.7;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue-dark); }
a:hover { color: var(--blue); }

.wrap { padding: 0 18px; }

/* ---------- Горна лента: лого + телефони ---------- */
.topbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  padding: 20px 18px 16px;
  text-align: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.logo svg { flex: none; }
.logo-name {
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: 0.5px;
  line-height: 1.15;
}
.logo-tagline {
  display: block;
  color: #7a8894;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 2.6px;
  text-transform: uppercase;
  margin-top: 4px;
}

.top-phones {
  border-top: 3px solid var(--blue);
  padding-top: 10px;
  font-weight: 700;
  color: var(--blue);
  font-size: 1.1rem;
}
.top-phones a {
  color: var(--blue);
  text-decoration: none;
  white-space: nowrap;
}
.top-phones a:hover { text-decoration: underline; }
.top-phones .ph-ico { margin-right: 6px; }

/* ---------- Главна навигация ---------- */
.mainnav {
  background: linear-gradient(180deg, #4d94cf, var(--blue) 55%, var(--blue-dark));
  border-top: 3px solid #9b9b9b;
  border-bottom: 3px solid #9b9b9b;
}
.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.mainnav li { flex: 1 1 auto; }
.mainnav a {
  display: block;
  padding: 13px 10px;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  text-align: center;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.6px;
  border-right: 1px solid rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.mainnav li:last-child a { border-right: 0; }
.mainnav a:hover,
.mainnav a.active { background: var(--blue-darker); color: var(--white); }

/* ---------- Банер снимка ---------- */
.banner { border-bottom: 3px solid #9b9b9b; }
.banner img { width: 100%; max-height: 440px; object-fit: cover; }

/* ---------- Заглавия и ленти ---------- */
h1 {
  color: var(--heading);
  text-align: center;
  text-transform: uppercase;
  font-size: 1.35rem;
  letter-spacing: 0.5px;
  line-height: 1.35;
  margin: 34px 14px 20px;
}

h2 { color: var(--heading); font-size: 1.25rem; margin: 30px 0 12px; }
h3 { color: var(--heading); font-size: 1.05rem; margin: 22px 0 8px; }

/* Лента-слоган със сгънати краища */
.ribbon-zone { margin: 26px 0 30px; }
.ribbon {
  position: relative;
  width: min(760px, 88%);
  margin: 0 auto;
  color: var(--white);
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.8px;
  padding: 13px 26px;
  font-size: 0.98rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ribbon-blue { background: linear-gradient(180deg, #4d94cf, var(--blue-dark)); }
.ribbon-gray { background: linear-gradient(180deg, #6d747b, #4d5359); width: min(820px, 92%); margin-top: 8px; }
.ribbon::before,
.ribbon::after {
  content: "";
  position: absolute;
  top: 100%;
  border-style: solid;
}
.ribbon-blue::before { left: 0; border-width: 0 12px 10px 0; border-color: transparent var(--blue-darker) transparent transparent; }
.ribbon-blue::after { right: 0; border-width: 0 0 10px 12px; border-color: transparent transparent transparent var(--blue-darker); }
.ribbon-gray::before { left: 0; border-width: 0 12px 10px 0; border-color: transparent #33383d transparent transparent; }
.ribbon-gray::after { right: 0; border-width: 0 0 10px 12px; border-color: transparent transparent transparent #33383d; }

/* Сив блок с районите */
.areas-box {
  background: var(--gray-box);
  border: 1px solid var(--gray-line);
  width: min(860px, 92%);
  margin: 0 auto 8px;
  padding: 18px 22px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 600;
  color: #565d64;
  letter-spacing: 0.4px;
  font-size: 0.95rem;
}

/* Обаждане CTA */
.call-cta {
  text-align: center;
  margin: 30px auto 34px;
  padding: 0 16px;
}
.call-cta .call-title {
  text-transform: uppercase;
  font-weight: 800;
  color: #444a50;
  font-size: 1.05rem;
  letter-spacing: 0.5px;
}
.call-cta .call-phone {
  display: inline-block;
  margin-top: 6px;
  color: var(--blue);
  font-weight: 800;
  font-size: 1.5rem;
  text-decoration: none;
}
.call-cta .call-phone:hover { text-decoration: underline; }
.call-cta .call-note { font-size: 0.9rem; color: #6b7278; margin-top: 6px; }

/* ---------- Основна зона: странична колона + съдържание ---------- */
.layout {
  display: grid;
  gap: 30px;
  padding: 8px 18px 40px;
}

.side-nav { order: 2; }
.side-nav .side-title {
  background: linear-gradient(180deg, #6d747b, #4d5359);
  color: var(--white);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.8px;
  padding: 11px 16px;
}
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav li + li { margin-top: 3px; }
.side-nav a {
  display: block;
  background: linear-gradient(180deg, #4d94cf, var(--blue-dark));
  color: var(--white);
  text-decoration: none;
  padding: 11px 16px;
  font-size: 0.92rem;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.side-nav a:hover { background: var(--blue-darker); }

.side-contact {
  margin-top: 22px;
  border: 1px solid var(--gray-line);
  background: var(--blue-light);
  padding: 16px 18px;
  font-size: 0.93rem;
}
.side-contact strong { color: var(--heading); }
.side-contact a { font-weight: 700; margin: 10px 0; word-break: break-all; }

.content { order: 1; min-width: 0; }
.content p { margin: 0 0 16px; }
.content ul { margin: 0 0 18px; padding-left: 22px; }
.content li { margin-bottom: 7px; }

.content img.inline-photo {
  border: 3px solid var(--blue);
  margin: 6px auto 20px;
}

/* ---------- Галерия ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
  margin: 10px 0 24px;
}
.gallery-grid img {
  border: 3px solid var(--blue);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

/* ---------- Форма ---------- */
form { display: grid; gap: 14px; max-width: 560px; }
.field { display: grid; gap: 5px; }
.field label { font-weight: 600; color: var(--heading); font-size: 0.92rem; }
.field input,
.field textarea {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid #b9c2ca;
  font: inherit;
  color: var(--text);
  background: var(--white);
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 127, 193, 0.2);
}
.field textarea { min-height: 130px; resize: vertical; }
.form-note { font-size: 0.84rem; color: #6b7278; margin: 0; }

.btn {
  display: inline-block;
  background: linear-gradient(180deg, #4d94cf, var(--blue-dark));
  color: var(--white);
  border: 0;
  padding: 12px 30px;
  font: inherit;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}
.btn:hover { background: var(--blue-darker); color: var(--white); }

/* ---------- Блог ---------- */
.container { max-width: 900px; margin: 0 auto; }
.section { padding: 6px 18px 34px; }
.article { padding: 6px 18px 34px; }

.section-head { text-align: center; margin-bottom: 24px; }
.section-head p { color: #5c646b; }
.eyebrow {
  display: block;
  color: var(--blue);
  text-transform: uppercase;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 2px;
  margin-bottom: 2px;
}

.cta-band {
  background: var(--gray-box);
  border-top: 1px solid var(--gray-line);
  border-bottom: 1px solid var(--gray-line);
  text-align: center;
  padding: 28px 18px 34px;
  margin: 8px 0 0;
}
.cta-band h2 { margin-top: 0; }
.cta-band p { margin: 0 0 18px; }

.breadcrumb { font-size: 0.88rem; color: #6b7278; margin: 20px 0 6px; }
.breadcrumb a { color: var(--blue-dark); }

.post-grid {
  display: grid;
  gap: 20px;
  margin: 16px 0 30px;
}
.post-card {
  border: 1px solid var(--gray-line);
  background: var(--white);
}
.post-card img { border-bottom: 3px solid var(--blue); aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.post-card .body { padding: 16px 18px 20px; }
.post-card .meta { font-size: 0.8rem; color: #6b7278; margin-bottom: 6px; }
.post-card h3 { margin: 0 0 8px; }
.post-card h3 a { text-decoration: none; color: var(--heading); }
.post-card h3 a:hover { text-decoration: underline; }
.post-card p { margin: 0 0 12px; font-size: 0.94rem; }
.read-more { font-weight: 700; }

.article-wrap { max-width: 800px; margin: 0 auto; }
.article-wrap .meta { color: #6b7278; font-size: 0.88rem; }
.article-wrap h1 { text-align: left; text-transform: none; margin: 8px 0 18px; font-size: 1.6rem; }
img.hero-img { border: 3px solid var(--blue); margin-bottom: 22px; }
.back-link { font-weight: 700; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  border-top: 4px solid var(--blue);
  padding: 28px 18px 20px;
  font-size: 0.92rem;
  color: #4d5359;
}
.footer-grid { display: grid; gap: 22px; margin-bottom: 20px; }
.site-footer h4 {
  color: var(--heading);
  margin: 0 0 10px;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 7px; }
.footer-bottom {
  border-top: 1px solid var(--gray-line);
  padding-top: 14px;
  text-align: center;
  font-size: 0.85rem;
  color: #6b7278;
}
.footer-bottom span { display: inline-block; margin: 0 12px; }

/* ---------- Достъпност ---------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (min-width: 700px) {
  .topbar {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
  }
  .top-phones { text-align: right; }
  h1 { font-size: 1.6rem; }
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
  .content img.inline-photo.float-right {
    float: right;
    margin: 4px 0 16px 22px;
    max-width: 46%;
  }
}

@media (min-width: 920px) {
  .layout { grid-template-columns: 265px minmax(0, 1fr); }
  .side-nav { order: 1; }
  .content { order: 2; }
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}
