/* ==========================================================================
   KLIMAdesign – PROJECT OVERRIDES (Bootstrap 5 friendly)
   - clean HVAC vibe: cool blue + teal, airy surfaces, soft shadows
   - respects Bootstrap defaults; overrides are opt-in where possible
   ========================================================================== */

/* -------------------------
   0) Core tokens (project mood)
   ------------------------- */
:root{
  /* HVAC accent: cool/clean */
  --accent-cool: #22D3EE;      /* cyan-400-ish */
  --accent-cool-2: #38BDF8;    /* sky-400-ish */
  --accent-cool-3: #34D399;    /* emerald-400-ish (secondary) */

  /* surfaces */
  --surface: rgba(255,255,255,.92);
  --surface-strong: rgba(255,255,255,.98);

  /* shadows (softer than HAVAP) */
  --shadow: 0 14px 45px rgba(2, 6, 23, .10);
  --shadow-strong: 0 28px 70px rgba(2, 6, 23, .14);

  /* subtle section tint fallbacks */
  --section-tint: rgba(56,189,248,.07);
  --section-tint-2: rgba(34,211,238,.10);

  /* hero dark overlay for text readability (cool dark, not greenish) */
  --hero-ink: rgba(2, 6, 23, .70);
  --hero-ink-soft: rgba(2, 6, 23, .20);
}

/* Prefer color-mix if available */
@supports (color: color-mix(in srgb, white 50%, black)) {
  :root{
    --surface: color-mix(in srgb, var(--bg-body) 92%, white);
    --surface-strong: color-mix(in srgb, var(--bg-body) 84%, white);
    --section-tint: color-mix(in srgb, var(--project) 7%, white);
    --section-tint-2: color-mix(in srgb, var(--accent-cool) 12%, white);
  }
}

html, body{
  background: var(--bg-body);
  color: var(--text-body);
}

a{ color: inherit; }
a:hover{ color: var(--project); }

.text-muted{ color: var(--text-muted) !important; }
hr, .border-base{ border-color: var(--border-base) !important; }


/* -------------------------
   1) Header / Footer
   ------------------------- */
#site-header{
  background: var(--bg-header);
  color: var(--text-header);
  border-bottom: 1px solid var(--border-base);
}

#site-footer{
  background: var(--bg-footer);
  color: var(--text-footer);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 28px 0;
}

@supports (border-top-color: color-mix(in srgb, white 50%, transparent)) {
  #site-footer{
    border-top-color: color-mix(in srgb, var(--border-base) 65%, transparent);
  }
}

#site-footer a{ color: inherit; }

/* Nav */
.brand{
  font-weight: 850;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--text-header);
}

.nav-link{
  text-decoration: none;
  color: var(--text-header);
  opacity: .9;
}
.nav-link:hover{
  opacity: 1;
  text-decoration: underline;
}


/* -------------------------
   2) Project palette utilities
   ------------------------- */
.bg-project   { background-color: var(--project) !important;   color: var(--on-project) !important; }
.bg-project-1 { background-color: var(--project-1) !important; color: var(--on-project) !important; }
.bg-project-2 { background-color: var(--project-2) !important; color: var(--on-project) !important; }
.bg-project-3 { background-color: var(--project-3) !important; color: var(--on-project) !important; }
.bg-project-4 { background-color: var(--project-4) !important; color: var(--on-project) !important; }

.border-project   { border-color: var(--project) !important; }
.border-project-1 { border-color: var(--project-1) !important; }
.border-project-2 { border-color: var(--project-2) !important; }
.border-project-3 { border-color: var(--project-3) !important; }
.border-project-4 { border-color: var(--project-4) !important; }

.text-project   { color: var(--project) !important; }
.text-project-1 { color: var(--project-1) !important; }
.text-project-2 { color: var(--project-2) !important; }
.text-project-3 { color: var(--project-3) !important; }
.text-project-4 { color: var(--project-4) !important; }


/* -------------------------
   2b) Buttons – keep Bootstrap vibe, just align to project colors
   ------------------------- */
.btn.bg-project{
  background-color: var(--project) !important;
  color: var(--on-project) !important;
  border-color: var(--project) !important;
}

/* No hardcoded green. Hover is derived from project color. */
.btn.bg-project:hover{
  filter: brightness(.92) saturate(1.05);
  color: var(--on-project) !important;
}

/* outline-secondary softer */
.btn-outline-secondary{
  border-color: rgba(0,0,0,0.14) !important;
}
@supports (border-color: color-mix(in srgb, white 50%, transparent)) {
  .btn-outline-secondary{
    border-color: color-mix(in srgb, var(--border-base) 70%, transparent) !important;
  }
}

/* outline-light for hero */
.btn-outline-light{
  border-color: rgba(255,255,255,.55);
  color: #fff;
}
.btn-outline-light:hover{
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Minimal custom button */
.btn-project{
  display: inline-block;
  background: var(--project);
  color: var(--on-project);
  border: 1px solid var(--project);
  padding: .55rem .9rem;
  border-radius: .75rem;
  text-decoration: none;
}
.btn-project:hover{ filter: brightness(.92); color: var(--on-project); }


/* -------------------------
   3) Typography polish
   ------------------------- */
h1, h2, h3{ letter-spacing: -0.02em; }
h2.h3{ font-weight: 900 !important; } /* slightly less brutal */


/* -------------------------
   4) Sections
   ------------------------- */
.section,
.home-section{
  position: relative;
  padding: 5rem 0;
}

.section.border-top,
.home-section.border-top{
  border-top: 1px solid rgba(0,0,0,0.08) !important;
}
@supports (border-top-color: color-mix(in srgb, white 50%, transparent)) {
  .section.border-top,
  .home-section.border-top{
    border-top-color: color-mix(in srgb, var(--border-base) 65%, transparent) !important;
  }
}

/* light tint */
.section--light,
.home-section--light{
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(56,189,248,.12), transparent 62%),
    radial-gradient(800px 360px at 85% 20%, rgba(34,211,238,.10), transparent 60%),
    transparent;
}

/* stronger tint */
.section--tint,
.home-section--tint{
  background:
    radial-gradient(900px 420px at 15% 0%, rgba(56,189,248,.14), transparent 62%),
    radial-gradient(700px 380px at 85% 15%, rgba(52,211,153,.10), transparent 60%),
    linear-gradient(180deg, var(--section-tint), #fff 60%);
  border-top: 1px solid rgba(0,0,0,0.06);
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

/* underline style */
.h2-underline{
  position: relative;
  display: inline-block;
}
.h2-underline::after{
  content:"";
  display:block;
  width: 84px;
  height: 6px;
  margin-top: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--project), var(--accent-cool));
}


/* -------------------------
   5) Hero
   ------------------------- */
.hero-stage{
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
@supports (border-bottom-color: color-mix(in srgb, white 50%, transparent)) {
  .hero-stage{
    border-bottom-color: color-mix(in srgb, var(--border-base) 65%, transparent);
  }
}

.hero-media{
  width: 100%;
  height: clamp(360px, 46vw, 640px);
  object-fit: cover;
  display: block;
}

/* Optional overlay when you put text over image */
.hero-overlay{
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--hero-ink), var(--hero-ink-soft)),
    radial-gradient(900px 520px at 20% 20%, rgba(255,255,255,.10), transparent 60%);
  pointer-events: none;
}

/* Gradient that starts only at the bottom part of hero (use with <div class="hero-grad"></div>) */
.hero-grad{
  position:absolute;
  left:0; right:0; bottom:0;
  height:48%;
  pointer-events:none;
  background:
    radial-gradient(900px 520px at 15% 15%, rgba(56,189,248,.22), transparent 62%),
    radial-gradient(820px 520px at 85% 20%, rgba(34,211,238,.18), transparent 60%),
    linear-gradient(180deg, rgba(56,189,248,.06), rgba(0,0,0,0));
}

.hero-panel{
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 18px 60px rgba(2, 6, 23, .22);
  backdrop-filter: blur(8px);
}

.hero-badge{
  background: rgba(2, 6, 23, .38);
  border: 1px solid rgba(255,255,255,.16);
  color: rgba(255,255,255,.92);
}

/* IMPORTANT: don't hijack ALL .badge inside hero */
.hero-content .hero-badge{
  backdrop-filter: blur(6px);
}

.hero-contact.card{
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--shadow);
}


/* -------------------------
   6) Cards (gentle)
   ------------------------- */
.card{ border-radius: 16px; }
.card.shadow-sm{ box-shadow: var(--shadow) !important; }

.card.card-stripe{
  position: relative;
  overflow: hidden;
}
.card.card-stripe::before{
  content:"";
  position:absolute;
  inset:0 auto 0 0;
  width: 4px;
  background: linear-gradient(180deg, var(--project), var(--accent-cool));
  opacity: .9;
}


/* -------------------------
   7) Services – service-card component
   ------------------------- */
.service-card{
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(2, 6, 23, .10);
  border: 1px solid rgba(2, 6, 23, .07);
  transition: transform .18s ease, box-shadow .18s ease;
  background: var(--surface-strong);
}
.service-card:hover{
  transform: translateY(-4px);
  box-shadow: 0 28px 70px rgba(2, 6, 23, .14);
}

.service-card__cover{
  height: 140px;
  position: relative;
  background:
    radial-gradient(520px 240px at 20% 20%, rgba(56,189,248,.25), transparent 60%),
    radial-gradient(520px 240px at 80% 35%, rgba(34,211,238,.20), transparent 60%),
    linear-gradient(135deg, rgba(2, 6, 23, .10), rgba(255,255,255,.72));
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.service-card__cover::after{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.70));
}

.service-card__cover img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

.service-card__icon{
  position: absolute;
  left: 18px;
  bottom: -20px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: #fff;
  border: 1px solid rgba(2, 6, 23, .10);
  box-shadow: 0 14px 40px rgba(2, 6, 23, .12);
  color: rgba(2, 6, 23, .82);
}

.service-card__body{
  padding: 2.25rem 1.25rem 1.25rem;
}
.service-card__title{
  font-weight: 900;
  letter-spacing: -0.02em;
  margin: 0 0 .35rem;
}
.service-card__text{
  color: var(--text-muted);
  margin: 0;
}


/* -------------------------
   8) Feature tiles
   ------------------------- */
.feature-tile{
  border-radius: 16px;
  border: 1px solid rgba(2, 6, 23, .08);
  background: linear-gradient(180deg, #fff, rgba(56,189,248,.10));
  box-shadow: 0 12px 40px rgba(2, 6, 23, .08);
  padding: 1.1rem 1.1rem;
}
.feature-tile .title{
  font-weight: 850;
  letter-spacing: -0.01em;
}
.feature-tile .title::before{
  content:"";
  display:inline-block;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent-cool);
  margin-right: 10px;
  box-shadow: 0 0 0 5px rgba(34,211,238,.18);
}


/* -------------------------
   9) CTA band
   ------------------------- */
.cta-band{
  border-radius: 20px;
  padding: 26px;
  background:
    radial-gradient(600px 260px at 20% 10%, rgba(56,189,248,.20), transparent 60%),
    radial-gradient(620px 260px at 80% 20%, rgba(34,211,238,.16), transparent 60%),
    linear-gradient(135deg, rgba(56,189,248,.10), #fff);
  border: 1px solid rgba(2, 6, 23, .08);
  box-shadow: 0 18px 55px rgba(2, 6, 23, .10);
}


/* -------------------------
   10) Accordion (FAQ preview)
   ------------------------- */
.accordion-item{
  border: 1px solid rgba(2, 6, 23, .08) !important;
  border-radius: 14px !important;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(2, 6, 23, .06);
}

.accordion-item + .accordion-item{ margin-top: 12px; }

.accordion-button{
  font-weight: 700;
  letter-spacing: -0.01em;
}

.accordion-button:not(.collapsed){
  background: rgba(56,189,248,.10) !important;
  color: var(--text-body) !important;
  box-shadow: none !important;
}

.accordion-button:focus{
  box-shadow: 0 0 0 .2rem rgba(56,189,248,.25) !important;
}


/* -------------------------
   11) Breadcrumbs (if used)
   ------------------------- */
.breadcrumbs{
  font-size: .92rem;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
}

.breadcrumbs ol{
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: 0;
  margin: 0;
}

.breadcrumbs li::after{
  content: "›";
  margin: 0 .4rem;
  color: rgba(2, 6, 23, .35);
}
.breadcrumbs li:last-child::after{ content:""; }

.breadcrumbs a{
  text-decoration: none;
  color: color-mix(in srgb, var(--project) 70%, black);
}
.breadcrumbs a:hover{ text-decoration: underline; }


/* -------------------------
   12) CMS content baseline
   ------------------------- */
.cms-content{
  max-width: 760px;
  line-height: 1.65;
  font-size: 1rem;
}

.cms-content > * + *{ margin-top: 1.2em; }

.cms-content h1,
.cms-content h2,
.cms-content h3,
.cms-content h4,
.cms-content h5{
  line-height: 1.25;
  margin-top: 1.8em;
  margin-bottom: .6em;
  font-weight: 750;
}

.cms-content h1{ font-size: 2rem; }
.cms-content h2{ font-size: 1.6rem; }
.cms-content h3{ font-size: 1.3rem; }
.cms-content h4{ font-size: 1.1rem; }

.cms-content p{ margin: 0; }

.cms-content ul,
.cms-content ol{ padding-left: 1.4em; }
.cms-content li + li{ margin-top: .4em; }

.cms-content a{ text-decoration: underline; }

.cms-content img{
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(2, 6, 23, .12);
}

.cms-content table{
  width: 100%;
  border-collapse: collapse;
  font-size: .95rem;
}

.cms-content th,
.cms-content td{
  padding: .5em .6em;
  border-bottom: 1px solid rgba(2, 6, 23, .10);
  text-align: left;
}

.cms-content blockquote{
  border-left: 4px solid rgba(56,189,248,.40);
  background: rgba(56,189,248,.06);
  border-radius: 10px;
  padding: 10px 12px 10px 14px;
  margin: 0;
  color: rgba(2, 6, 23, .72);
  font-style: italic;
}

.cms-content hr{
  border: none;
  border-top: 1px solid rgba(2, 6, 23, .10);
  margin: 2em 0;
}


/* -------------------------
   13) Gallery / Articles (optional)
   ------------------------- */
.articles-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.article-card{
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.article-card img{
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px;
}

.article-card h3{
  font-size: 1.1rem;
  line-height: 1.3;
  margin: .5rem 0 0;
}

.article-card .muted{
  color: var(--text-muted);
  font-size: .95rem;
}

.article-card a{
  text-decoration: none;
  color: inherit;
}
.article-card a:hover h3{ text-decoration: underline; }

.gallery-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.gallery-card{
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.gallery-card img{
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
}

.gallery-card h3{
  font-size: 1rem;
  margin: .4rem 0 0;
}

.gallery-card .muted{
  font-size: .85rem;
  color: var(--text-muted);
}

.gallery-card a{
  text-decoration: none;
  color: inherit;
}
.gallery-card a:hover h3{ text-decoration: underline; }

.gallery-cats{
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 1rem;
}

.gallery-cats .tag{
  font-size: .85rem;
  padding: .25rem .6rem;
  border: 1px solid rgba(2, 6, 23, .10);
  border-radius: 999px;
  background: rgba(56,189,248,.08);
  color: rgba(2, 6, 23, .78);
}


/* -------------------------
   14) Responsive + motion
   ------------------------- */
@media (max-width: 991.98px){
  .section, .home-section{ padding: 3.2rem 0; }
  .hero-media{ height: clamp(320px, 62vw, 520px); }
}

@media (prefers-reduced-motion: reduce){
  .service-card{ transition: none; }
  .service-card:hover{ transform: none; }
}


/* ==========================================================================
   HERO vs NAVBAR (mobile fix)
   - burger must stay clickable
   ========================================================================== */
#site-header,
#site-header .navbar{
  position: relative;
  z-index: 1100;
}

.hero-stage{ position: relative; z-index: 0; }
.hero-overlay{ z-index: 0; }

.hero-stage .hero-media{ position: relative; z-index: 0; }
.hero-stage .hero-content{ z-index: 1; }
.hero-stage .hero-contact{ position: relative; z-index: 1; }

@media (max-width: 991.98px){
  .hero-stage{ padding-top: 74px; }

  .hero-stage .hero-content{
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin-top: 0.75rem;
  }

  .hero-stage > .position-absolute.bottom-0{
    position: relative !important;
  }

  .hero-stage .hero-contact{
    margin-top: 0.75rem;
  }
}

/* Cookie/preferences button */
#open_preferences_center{
  background: #38BDF8;
  bottom: 75px;
  color: #fff;
  right: 0;
  cursor: pointer;
  height: 62px;
  line-height: 20px;
  position: fixed;
  text-align: center;
  -webkit-transition: all 140ms linear 0s;
  transition: all 140ms linear 0s;
  width: 70px;
  z-index: 1001;
  font-size: 12px;
  border-radius: 30px 0 0 30px;
  padding-top: 2px;
  box-shadow: 0 10px 30px rgba(31,95,175,.22);
}

#open_preferences_center:hover{
  background-color: #34D399;
  color: #fff;
}