/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Segoe UI', Arial, sans-serif; font-size: 16px; color: #222; background: #fff; line-height: 1.6; }
img  { max-width: 100%; height: auto; display: block; }
a    { color: #cc0000; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Variables ───────────────────────────────────────────────────────────────── */
:root {
  --red:       #cc0000;
  --red-dark:  #aa0000;
  --red-light: #f5e6e6;
  --white:     #ffffff;
  --bg-alt:    #f7f7f7;
  --text:      #1a1a1a;
  --text-muted:#777777;
  --border:    #e0e0e0;
  --radius:    14px;
  --radius-sm: 8px;
  --shadow:    0 2px 12px rgba(0,0,0,.07);
  --shadow-hover: 0 8px 28px rgba(0,0,0,.13);
}

/* ── Container ───────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ── Header ──────────────────────────────────────────────────────────────────── */
.site-header { background: var(--red); color: #fff; position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 16px rgba(0,0,0,.18); }
.site-header .container { display: flex; align-items: center; gap: 24px; height: 68px; }

.logo { font-size: 1.6rem; font-weight: 800; letter-spacing: 1px; text-decoration: none; }
.logo-tilt { color: #fff; }
.logo-bg   { color: rgba(255,255,255,.75); }

.main-nav { display: flex; gap: 4px; flex: 1; }
.main-nav a { padding: 6px 14px; border-radius: var(--radius-sm); color: rgba(255,255,255,.85); font-weight: 500; font-size: .95rem; transition: background .2s, color .2s; }
.main-nav a:hover, .main-nav a.active { background: rgba(255,255,255,.2); color: #fff; text-decoration: none; }

.header-right { display: flex; align-items: center; gap: 12px; }

.lang-switch { display: flex; gap: 4px; }
.lang-switch a { padding: 3px 8px; border-radius: 6px; font-size: .8rem; font-weight: 600; color: rgba(255,255,255,.7); border: 1px solid rgba(255,255,255,.35); }
.lang-switch a.active, .lang-switch a:hover { background: rgba(255,255,255,.25); color: #fff; border-color: rgba(255,255,255,.6); text-decoration: none; }

.btn-request { background: #fff; color: var(--red); padding: 8px 20px; border-radius: 20px; font-weight: 700; font-size: .9rem; transition: background .2s, transform .15s; }
.btn-request:hover { background: #f0f0f0; text-decoration: none; transform: translateY(-1px); }

.burger {
  display: none; background: none; border: none; cursor: pointer;
  padding: 6px; flex-direction: column; gap: 5px; align-items: center; justify-content: center;
  width: 42px; height: 42px;
}
.burger span {
  display: block; width: 24px; height: 2px; background: #fff;
  border-radius: 2px; transition: transform .3s, opacity .2s;
  transform-origin: center;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.search-toggle { background: rgba(255,255,255,.22); border: 2px solid rgba(255,255,255,.4); color: #fff; font-size: 1.25rem; cursor: pointer; padding: 7px 14px; border-radius: 22px; transition: background .2s, border-color .2s; font-weight: 600; letter-spacing: .5px; }
.search-toggle:hover { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.7); }

/* ── Hero ────────────────────────────────────────────────────────────────────── */
.hero { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; padding: 80px 0; text-align: center; }
.hero h1 { font-size: 2.8rem; font-weight: 800; margin-bottom: 16px; }
.hero p  { font-size: 1.2rem; opacity: .9; max-width: 600px; margin: 0 auto 32px; }
.hero .btn-white { background: #fff; color: var(--red); padding: 14px 36px; border-radius: 24px; font-weight: 700; font-size: 1.05rem; display: inline-block; transition: background .2s, transform .15s; box-shadow: 0 4px 16px rgba(0,0,0,.15); }
.hero .btn-white:hover { background: #f0f0f0; text-decoration: none; transform: translateY(-2px); }

/* ── Section ─────────────────────────────────────────────────────────────────── */
.section       { padding: 64px 0; }
.section-alt   { padding: 64px 0; background: var(--bg-alt); }
.section-title { font-size: 2rem; font-weight: 700; margin-bottom: 8px; }
.section-sub   { color: var(--text-muted); margin-bottom: 40px; }
.section-header{ text-align: center; margin-bottom: 40px; }

/* ── Бутони ──────────────────────────────────────────────────────────────────── */
.btn        { display: inline-block; padding: 10px 24px; border-radius: 20px; font-weight: 600; cursor: pointer; border: none; font-size: .95rem; transition: background .2s, color .2s, transform .15s; }
.btn-red    { background: var(--red); color: #fff; }
.btn-red:hover { background: var(--red-dark); text-decoration: none; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn-outline:hover { background: var(--red); color: #fff; text-decoration: none; }

/* ── Grid за обекти ──────────────────────────────────────────────────────────── */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.project-card  {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  transition: transform .25s, box-shadow .25s;
  border: 1px solid var(--border);
}
.project-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-hover);
}

.project-card-img  { position: relative; aspect-ratio: 4/3; overflow: hidden; background: var(--bg-alt); }
.project-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.project-card:hover .project-card-img img { transform: scale(1.06); }

.project-card-overlay {
  position: absolute; inset: 0;
  background: rgba(180,0,0,.72);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 1rem; letter-spacing: .5px;
  opacity: 0; transition: opacity .25s;
}
.project-card:hover .project-card-overlay { opacity: 1; }

.project-card-body { padding: 18px 18px 16px; }
.project-card-title    { font-size: 1rem; font-weight: 700; margin-bottom: 6px; color: var(--text); line-height: 1.35; }
.project-card-location {
  font-size: .82rem; color: var(--text-muted); margin-bottom: 10px;
  display: flex; align-items: center; gap: 4px;
}
.project-card-location::before { content: '📍'; font-size: .75rem; }

/* Тагове вътре в картата */
.project-card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.card-tag {
  font-size: .75rem; padding: 3px 10px;
  border-radius: 12px;
  background: var(--red-light);
  color: var(--red);
  font-weight: 600;
}

/* ── Тагове за филтриране ────────────────────────────────────────────────────── */
.filter-tags { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 36px; justify-content: center; }
.filter-tag  {
  padding: 8px 22px; border-radius: 24px;
  border: 2px solid var(--border);
  font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
  background: #fff; color: var(--text);
}
.filter-tag:hover { border-color: var(--red); color: var(--red); }
.filter-tag.active { background: var(--red); color: #fff; border-color: var(--red); font-weight: 600; }

/* ── Page hero ───────────────────────────────────────────────────────────────── */
.page-hero { background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%); color: #fff; padding: 48px 0; }
.page-hero h1 { font-size: 2.2rem; font-weight: 700; }
.breadcrumb { font-size: .85rem; opacity: .8; margin-bottom: 12px; }
.breadcrumb a { color: #fff; opacity: .8; }
.breadcrumb .sep { margin: 0 6px; }

/* ── Project detail ──────────────────────────────────────────────────────────── */
.project-detail { padding: 48px 0; }
.project-detail-layout { display: grid; grid-template-columns: 1fr 340px; gap: 40px; align-items: start; }

/* Hero снимка — по-голяма */
.project-hero-img {
  width: 100%; border-radius: var(--radius);
  overflow: hidden; margin-bottom: 24px;
  aspect-ratio: 16/9;
  box-shadow: var(--shadow-hover);
}
.project-hero-img img { width: 100%; height: 100%; object-fit: cover; }

/* Галерия */
.project-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 10px; }
.project-gallery-item {
  border-radius: var(--radius-sm); overflow: hidden;
  aspect-ratio: 4/3; cursor: pointer;
  transition: transform .2s, box-shadow .2s;
}
.project-gallery-item:hover { transform: scale(1.03); box-shadow: var(--shadow-hover); }
.project-gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Метаданни чипове */
.project-meta-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0; }
.meta-chip {
  padding: 6px 16px; border-radius: 20px;
  background: var(--red-light); color: var(--red);
  font-size: .85rem; font-weight: 600; border: 1px solid rgba(204,0,0,.15);
}

/* Странична лента */
.project-sidebar { position: sticky; top: 88px; }
.sidebar-card {
  background: var(--bg-alt); border-radius: var(--radius);
  padding: 24px; border: 1px solid var(--border);
  margin-bottom: 20px;
}
.sidebar-card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 16px; color: var(--text); }

/* Фирмен блок */
.company-block {
  background: linear-gradient(135deg, var(--red) 0%, var(--red-dark) 100%);
  color: #fff; border-radius: var(--radius); padding: 28px;
  margin-top: 40px;
}
.company-block h3 { font-size: 1.2rem; font-weight: 700; margin-bottom: 16px; }
.company-block .contact-item { display: flex; gap: 10px; margin-bottom: 10px; font-size: .9rem; }
.company-block a { color: rgba(255,255,255,.9); }
.company-block a:hover { color: #fff; text-decoration: underline; }

/* Контактна форма */
.inquiry-form { background: #fff; border-radius: var(--radius); padding: 28px; border: 2px solid var(--red-light); margin-top: 24px; }
.inquiry-form h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 20px; color: var(--text); }

/* ── Цени таблица ────────────────────────────────────────────────────────────── */
.price-table { width:100%; border-collapse:collapse; margin:16px 0 32px; font-size:.95rem; }
.price-table th { background:var(--red); color:#fff; padding:10px 14px; text-align:left; font-weight:600; }
.price-table td { padding:10px 14px; border-bottom:1px solid #e8e8e8; }
.price-table tbody tr:nth-child(even) { background:#f8f8f8; }
.price-table tbody tr:hover { background:#fff3f0; }

.price-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; margin:24px 0 32px; }
.price-gallery figure { margin:0; }
.price-gallery figure a { display:block; }
.price-gallery img { width:100%; height:220px; object-fit:cover; border-radius:4px; display:block; transition:opacity .2s; }
.price-gallery figure a:hover img { opacity:.88; }
.price-gallery figcaption { font-size:.8rem; color:#666; margin-top:6px; text-align:center; }

/* ── Footer ──────────────────────────────────────────────────────────────────── */
.site-footer { background: #1a1a1a; color: #ccc; padding: 56px 0 0; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-bottom: 40px; }
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.footer-col p  { font-size: .9rem; line-height: 1.8; }
.footer-col nav { display: flex; flex-direction: column; gap: 8px; }
.footer-col nav a { color: #aaa; font-size: .9rem; transition: color .2s; }
.footer-col nav a:hover { color: var(--red); text-decoration: none; }
.footer-col a { color: #aaa; }
.footer-col a:hover { color: var(--red); }
.footer-logo .logo-tilt { color: #fff; }
.footer-logo .logo-bg   { color: var(--red); }
.footer-logo { margin-bottom: 12px; }
.footer-bottom { border-top: 1px solid #333; padding: 20px 0; text-align: center; font-size: .85rem; color: #666; }

/* ── Бисквитки (cookie banner) ──────────────────────────────────────────────── */
.cookie-banner { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9999; background: #1a1a1a; color: #fff; padding: 16px 20px; box-shadow: 0 -2px 16px rgba(0,0,0,.25); }
.cookie-banner-inner { max-width: 1200px; margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-banner p { margin: 0; font-size: .88rem; line-height: 1.5; color: #ccc; flex: 1 1 320px; }
.cookie-banner-actions { display: flex; gap: 10px; flex-shrink: 0; }
.cookie-banner-actions button { padding: 9px 20px; border-radius: 20px; font-weight: 700; font-size: .85rem; cursor: pointer; transition: background .2s, transform .15s; }
.btn-cookie-accept { background: var(--red); color: #fff; border: none; }
.btn-cookie-accept:hover { background: var(--red-dark); }
.btn-cookie-decline { background: transparent; color: #ccc; border: 1px solid #444; }
.btn-cookie-decline:hover { color: #fff; border-color: #666; }
@media (max-width: 600px) {
  .cookie-banner-inner { flex-direction: column; align-items: stretch; }
  .cookie-banner-actions { justify-content: flex-end; }
}

/* ── Форма ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 11px 16px;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 1rem; transition: border-color .2s;
  font-family: inherit; background: #fff;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--red); }
.form-group textarea { min-height: 120px; resize: vertical; }

/* ── 404 ─────────────────────────────────────────────────────────────────────── */
.not-found { text-align: center; padding: 80px 20px; }
.not-found h1 { font-size: 6rem; color: var(--red); font-weight: 800; line-height: 1; }
.not-found h2 { font-size: 1.5rem; margin: 16px 0 24px; }

/* ── Пагинация ───────────────────────────────────────────────────────────────── */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 48px; }
.pagination a, .pagination span {
  padding: 8px 16px; border-radius: var(--radius-sm);
  border: 2px solid var(--border); font-weight: 600; font-size: .95rem;
  color: var(--text); transition: all .2s;
}
.pagination a:hover { border-color: var(--red); color: var(--red); text-decoration: none; }
.pagination .current { background: var(--red); color: #fff; border-color: var(--red); }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid   { grid-template-columns: 1fr 1fr; }
  .project-detail-layout { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
}

@media (max-width: 768px) {
  .home-grid { grid-template-columns: repeat(2,1fr) !important; }
  .home-grid-featured { grid-column: span 2 !important; aspect-ratio: 16/9 !important; }

  .main-nav { display: none; }
  .burger   { display: flex; }
  .btn-request { display: none; }
  .search-toggle { padding: 6px 10px; font-size: 1rem; }

  body.nav-open .main-nav {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--red);
    padding: 12px 0 20px;
    box-shadow: 0 8px 24px rgba(0,0,0,.25);
    z-index: 99;
    animation: slideDown .25s ease;
  }
  body.nav-open .main-nav a {
    padding: 13px 24px;
    border-radius: 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(255,255,255,.12);
  }
  body.nav-open .main-nav a:last-child { border-bottom: none; }

  @keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .projects-grid { grid-template-columns: 1fr; }
  .footer-grid   { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
  .project-gallery { grid-template-columns: repeat(2, 1fr); }
}
