/* ============================================================
   Клима Стил ЕООД — main.css
   Mobile-first, no framework, CSS custom properties
   ============================================================ */

/* ---------- Variables ---------- */
:root {
  --c-primary:   #1a6891;
  --c-primary-d: #145070;
  --c-accent:    #0077b6;
  --c-cta:       #e05c00;
  --c-cta-d:     #c04f00;
  --c-text:      #2d2d2d;
  --c-muted:     #5a6370;
  --c-bg:        #ffffff;
  --c-bg-alt:    #f0f4f8;
  --c-border:    #dde3ea;
  --c-white:     #ffffff;

  --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 6px;
  --shadow: 0 2px 10px rgba(0,0,0,.10);
  --transition: .2s ease;

  --max-w: 1100px;
  --px: 1rem;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); color: var(--c-text); background: var(--c-bg); line-height: 1.6; font-size: 1rem; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }
h1,h2,h3,h4 { line-height: 1.25; font-weight: 700; }

/* ---------- Typography scale ---------- */
h1 { font-size: clamp(1.6rem, 5vw, 2.4rem); }
h2 { font-size: clamp(1.3rem, 4vw, 1.9rem); }
h3 { font-size: clamp(1.1rem, 3vw, 1.4rem); }
p  { margin-bottom: 1rem; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--px); }
.section    { padding: 3rem 0; }
.section--alt { background: var(--c-bg-alt); }
.text-center { text-align: center; }
.section-title { margin-bottom: 2rem; }
.section-title h2 { color: var(--c-primary); }
.section-title p  { color: var(--c-muted); margin-top: .4rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: .75rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .95rem;
  cursor: pointer;
  border: 2px solid transparent;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--c-cta);
  color: var(--c-white);
}
.btn-primary:hover { background: var(--c-cta-d); text-decoration: none; }
.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary); color: var(--c-white); text-decoration: none; }
.btn-ghost {
  background: transparent;
  color: var(--c-white);
  border-color: var(--c-white);
}
.btn-ghost:hover { background: var(--c-white); color: var(--c-primary); text-decoration: none; }
.btn-sm { padding: .5rem 1rem; font-size: .85rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: url('/assets/img/bg.jpg') center center / cover no-repeat fixed;
  position: relative;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(0,0,0,.35);
  color: var(--c-white);
}
.site-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 32, 55, 0.78);
}
.site-header > .container,
.site-header .header-inner { position: relative; z-index: 1; }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  height: 72px;
}
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.site-logo img {
  height: 58px;
  width: auto;
  display: block;
}
.site-logo:hover { text-decoration: none; opacity: .9; }

/* Nav */
.nav-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem;
  position: relative;
  z-index: 1;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-white);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.site-nav {
  display: none;
  position: absolute;
  top: 72px;
  left: 0;
  right: 0;
  background: rgba(12, 32, 55, 0.95);
  padding: 1rem 0;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  z-index: 1;
}
.site-nav.is-open { display: block; }
.site-nav a {
  display: block;
  padding: .6rem 1.5rem;
  color: var(--c-white);
  font-weight: 500;
}
.site-nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.site-nav .nav-sub { padding-left: 2.5rem; font-size: .9rem; opacity: .85; }
.nav-divider { border: none; border-top: 1px solid rgba(255,255,255,.1); margin: .5rem 1rem; }

/* ---------- Hero (начало) ---------- */
.hero {
  background: url('/assets/img/bg.jpg') center center / cover no-repeat fixed;
  position: relative;
  color: var(--c-white);
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 35, 60, 0.58);
}
.hero > .container { position: relative; z-index: 1; }
.hero h1 { margin-bottom: 1rem; text-shadow: 0 2px 8px rgba(0,0,0,.4); }
.hero p   { font-size: 1.1rem; opacity: .93; margin-bottom: 1.5rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }

/* ---------- Page hero (вътрешни страници) ---------- */
.page-hero {
  background: url('/assets/img/bg.jpg') center 30% / cover no-repeat fixed;
  position: relative;
  color: var(--c-white);
  padding: 2.5rem 0 2rem;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(15, 40, 65, 0.68);
}
.page-hero > .container { position: relative; z-index: 1; }
.page-hero h1 { margin-bottom: .5rem; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.page-hero p  { opacity: .88; font-size: 1.05rem; }

/* ---------- Service cards ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.card {
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--transition), transform var(--transition);
}
.card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.15); transform: translateY(-2px); }
.card-icon { font-size: 2rem; margin-bottom: .75rem; }
.card h3   { color: var(--c-primary); margin-bottom: .5rem; }
.card p    { color: var(--c-muted); font-size: .95rem; margin-bottom: 1rem; }
.card a    { font-weight: 600; color: var(--c-accent); }

/* ---------- Brand logos ---------- */
.brands-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: center;
}
.brand-item {
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  padding: 1rem .5rem;
  text-align: center;
  color: var(--c-primary);
  font-weight: 700;
  font-size: .9rem;
  transition: border-color var(--transition), background var(--transition);
  text-decoration: none;
  display: block;
}
.brand-item:hover { border-color: var(--c-accent); background: #eaf5fc; text-decoration: none; }

/* ---------- Why us ---------- */
.why-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}
.why-item { display: flex; gap: 1rem; align-items: flex-start; }
.why-icon { font-size: 1.8rem; flex-shrink: 0; margin-top: .1rem; }
.why-item h3 { color: var(--c-primary); margin-bottom: .25rem; font-size: 1.05rem; }
.why-item p  { color: var(--c-muted); font-size: .9rem; margin: 0; }

/* ---------- CTA band ---------- */
.cta-band {
  background: url('/assets/img/bg.jpg') center center / cover no-repeat fixed;
  position: relative;
  color: var(--c-white);
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 0;
}
.cta-band::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 32, 55, 0.78);
}
.cta-band > .container { position: relative; z-index: 1; }
.cta-band h2 { margin-bottom: .75rem; }
.cta-band p  { opacity: .88; margin-bottom: 1.5rem; }
.cta-band .btn-ghost:hover { color: var(--c-primary); }

/* ---------- Contact info ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
.contact-detail { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: 1rem; }
.contact-detail .icon { font-size: 1.4rem; flex-shrink: 0; color: var(--c-accent); }
.contact-detail p { margin: 0; }
.contact-detail a { color: var(--c-text); font-weight: 600; }
.contact-detail a:hover { color: var(--c-accent); }

/* ---------- Form ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .9rem; color: var(--c-primary); }
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: .65rem .85rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--radius);
  font-family: var(--font);
  font-size: 1rem;
  color: var(--c-text);
  background: var(--c-bg);
  transition: border-color var(--transition);
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { outline: none; border-color: var(--c-accent); }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-notice { font-size: .82rem; color: var(--c-muted); margin-top: .35rem; }
.hp-field { display: none !important; }

/* ---------- Gallery ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .75rem;
}
.gallery-item {
  aspect-ratio: 4/3;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  color: var(--c-muted);
  text-align: center;
  padding: .5rem;
  overflow: hidden;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  background: url('/assets/img/bg.jpg') center center / cover no-repeat fixed;
  position: relative;
  padding: .6rem 0;
  font-size: .85rem;
  color: rgba(255,255,255,.7);
}
.breadcrumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 32, 55, 0.78);
}
.breadcrumb > .container { position: relative; z-index: 1; }
.breadcrumb a { color: rgba(255,255,255,.65); }
.breadcrumb a:hover { color: var(--c-white); text-decoration: none; }
.breadcrumb span { color: rgba(255,255,255,.9); }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; }
.breadcrumb li + li::before { content: "›"; margin-right: .3rem; }


/* ---------- Prose content ---------- */
.prose h2 { color: var(--c-primary); margin: 1.5rem 0 .75rem; }
.prose h3 { color: var(--c-primary); margin: 1.25rem 0 .5rem; }
.prose ul { list-style: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ul li { margin-bottom: .35rem; color: var(--c-muted); }
.prose p { color: var(--c-muted); }

/* ---------- Alert / notice boxes ---------- */
.alert { border-left: 4px solid var(--c-accent); background: #eaf5fc; padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0; margin-bottom: 1rem; font-size: .9rem; }
.alert-warn { border-color: #e8a000; background: #fdf5e0; }

/* ---------- Footer ---------- */
.site-footer {
  background: url('/assets/img/bg.jpg') center center / cover no-repeat fixed;
  position: relative;
  color: rgba(255,255,255,.85);
  padding: 2.5rem 0 1rem;
  font-size: .9rem;
}
.site-footer::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(12, 32, 55, 0.78);
}
.site-footer > .container { position: relative; z-index: 1; }
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-col h4 { color: var(--c-white); margin-bottom: .75rem; font-size: 1rem; }
.footer-col a { color: rgba(255,255,255,.7); display: block; margin-bottom: .35rem; }
.footer-col a:hover { color: var(--c-white); text-decoration: none; }
.footer-col p { color: rgba(255,255,255,.65); margin-bottom: .35rem; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-top: 1rem;
  text-align: center;
  font-size: .82rem;
  color: rgba(255,255,255,.45);
}

/* ---------- Sticky call button (mobile) ---------- */
.sticky-call {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 200;
  background: var(--c-cta);
  color: var(--c-white);
  border-radius: 50px;
  padding: .75rem 1.25rem;
  font-weight: 700;
  font-size: .95rem;
  box-shadow: 0 4px 16px rgba(224,92,0,.45);
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}
.sticky-call:hover { background: var(--c-cta-d); transform: scale(1.04); text-decoration: none; }

/* ---------- Responsive: tablet 640px ---------- */
@media (min-width: 640px) {
  :root { --px: 1.5rem; }

  .cards-grid    { grid-template-columns: repeat(2, 1fr); }
  .why-grid      { grid-template-columns: repeat(2, 1fr); }
  .brands-grid   { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid  { grid-template-columns: repeat(3, 1fr); }
  .contact-grid  { grid-template-columns: 1fr 1fr; }
  .footer-grid   { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Responsive: desktop 960px ---------- */
@media (min-width: 960px) {
  :root { --px: 2rem; }

  /* Nav becomes horizontal */
  .nav-toggle { display: none; }
  .site-nav {
    display: flex !important;
    position: static;
    background: none;
    padding: 0;
    box-shadow: none;
    align-items: center;
    gap: .25rem;
  }
  .site-nav a {
    padding: .4rem .75rem;
    border-radius: var(--radius);
    font-size: .9rem;
  }
  .site-nav a:hover { background: rgba(255,255,255,.12); }
  .site-nav .nav-sub { display: none; }
  .nav-divider { display: none; }

  .cards-grid  { grid-template-columns: repeat(3, 1fr); }
  .why-grid    { grid-template-columns: repeat(4, 1fr); }
  .brands-grid { grid-template-columns: repeat(6, 1fr); }
  .footer-grid { grid-template-columns: repeat(3, 1fr); }

  /* Hide sticky call on desktop */
  .sticky-call { display: none; }

  .contact-grid { grid-template-columns: 1fr 1.5fr; }
}
