/* ============================================================
   AC Installer Barcelona — Main Stylesheet
   Color scheme: Warm orange / terracotta
   ============================================================ */

:root {
  --accent:        #d4541a;
  --accent-light:  #f07040;
  --accent-dark:   #a83d10;
  --accent-bg:     #fff4ef;
  --muted:         #7a6358;
  --bg:            #fdf7f4;
  --card:          #ffffff;
  --border:        #eaddd7;
  --text:          #1e1410;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial,
               "Noto Sans", sans-serif;
  margin: 0;
  background: var(--bg);
  color: var(--text);
}

/* ── Header ── */
header {
  background: linear-gradient(90deg, rgba(212,84,26,.07), rgba(0,0,0,.02));
  border-bottom: 1px solid var(--border);
  padding: 20px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(6px);
}

/* ── Logo ── */
.brand { display: flex; align-items: center; gap: 12px; }

.logo {
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  border-radius: 15px;
  /* shadow split: warm left, cool right */
  box-shadow:
    -3px 4px 14px rgba(212, 84, 26, .30),
     3px 4px 14px rgba(8, 120, 160, .22);
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo svg { display: block; border-radius: 15px; }

.name-block { display: flex; flex-direction: column; gap: 2px; }
.name-block .brand-title { font-weight: 700; font-size: 15px; }
.name-block .brand-sub   { font-size: 12px; color: var(--muted); }

/* ── Language nav ── */
nav { display: flex; gap: 6px; }

button.lang {
  background: none;
  border: 1px solid transparent;
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: background .15s, color .15s;
}
button.lang:hover { background: var(--accent-bg); color: var(--accent); }
button.lang.active { background: var(--accent); color: #fff; border-color: rgba(0,0,0,.06); }

/* ── Layout ── */
.container { max-width: 1100px; margin: 32px auto; padding: 0 18px; }

/* ── Hero ── */
.hero { display: grid; grid-template-columns: 1fr; gap: 18px; align-items: center; }
.hero-inner { display: flex; flex-direction: column; gap: 14px; }

h1 { font-size: clamp(22px,4vw,34px); margin: 0; line-height: 1.25; }
p.lead { color: var(--muted); margin: 0; font-size: 16px; line-height: 1.6; }

.cta-row { display: flex; gap: 10px; flex-wrap: wrap; }

a.cta, button.cta {
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition: background .15s, transform .1s;
}
a.cta:hover, button.cta:hover { background: var(--accent-dark); transform: translateY(-1px); }

a.secondary {
  background: transparent;
  border: 1px solid var(--border);
  padding: 12px 18px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  transition: border-color .15s, background .15s;
}
a.secondary:hover { border-color: var(--accent); background: var(--accent-bg); }

/* ── Cards & Grid ── */
.grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-top: 22px; }

.card {
  background: var(--card);
  padding: 20px;
  border-radius: 14px;
  box-shadow: 0 4px 18px rgba(80,30,10,.06);
  border: 1px solid var(--border);
}

.service { font-weight: 700; margin-bottom: 8px; }

/* ── Contact form ── */
form { display: grid; gap: 10px; }

input, textarea {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg);
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  transition: border-color .15s;
}
input:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; }

/* ── FAQ accordion ── */
#faq { margin-top: 32px; }
#faq h2 { font-size: 20px; margin: 0 0 14px; }

.faq-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  overflow: hidden;
  background: var(--card);
}

.faq-question {
  width: 100%;
  background: none;
  border: none;
  text-align: left;
  padding: 16px 18px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--text);
  transition: background .15s;
}
.faq-question:hover { background: var(--accent-bg); }

.faq-chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: var(--accent);
  transition: transform .25s;
}
.faq-item.open .faq-chevron { transform: rotate(180deg); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease, padding .3s ease;
  padding: 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}
.faq-item.open .faq-answer { max-height: 300px; padding: 0 18px 16px; }

/* ── Leaflet map container ── */
#service-map {
  width: 100%;
  height: 320px;
  border-radius: 10px;
  overflow: hidden;
}
/* Override Leaflet popup z-index to stay inside card stacking context */
.leaflet-popup { z-index: 800; }
@media (max-width: 799px) {
  #service-map { height: 260px; }
}

/* ── WhatsApp floating button ── */
.whatsapp-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #25d366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
  text-decoration: none;
  transition: transform .2s, box-shadow .2s;
}
.whatsapp-btn:hover { transform: scale(1.08); box-shadow: 0 8px 28px rgba(37,211,102,.55); }
.whatsapp-btn svg { display: block; }

/* ── Cookie consent banner ── */
#cookie-banner {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: #1e1410;
  color: #f5e8e2;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  z-index: 1000;
  font-size: 14px;
  box-shadow: 0 -4px 20px rgba(0,0,0,.18);
}
#cookie-banner p { margin: 0; flex: 1; min-width: 200px; }
#cookie-banner a { color: var(--accent-light); }
.cookie-actions { display: flex; gap: 8px; flex-shrink: 0; }

.btn-cookie-accept {
  background: var(--accent); color: #fff;
  border: none; padding: 9px 18px; border-radius: 8px;
  cursor: pointer; font-size: 14px; font-weight: 600;
  transition: background .15s;
}
.btn-cookie-accept:hover { background: var(--accent-dark); }

.btn-cookie-decline {
  background: transparent; color: #f5e8e2;
  border: 1px solid rgba(255,255,255,.25);
  padding: 9px 14px; border-radius: 8px;
  cursor: pointer; font-size: 14px;
  transition: border-color .15s;
}
.btn-cookie-decline:hover { border-color: rgba(255,255,255,.5); }

/* ── Footer ── */
footer {
  margin-top: 36px;
  padding: 20px 18px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 13px;
}

/* ── Responsive ── */
@media (min-width: 800px) {
  .hero { grid-template-columns: 1fr 420px; }
  .grid { grid-template-columns: repeat(3,1fr); }
  #contact-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 799px) {
  .grid { grid-template-columns: 1fr; }
  .name-block { display: none; }
  .whatsapp-btn { bottom: 18px; right: 18px; width: 50px; height: 50px; }
}

/* ── Pricing & Trust section ── */
#pricing .grid {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 799px) {
  #pricing .grid {
    grid-template-columns: 1fr;
  }
}

/* ── About / SEO body text ── */
#about .card p + p {
  margin-top: 10px;
}

/* ── FAQ h2 ── */
#faq h2 {
  font-size: 20px;
  margin: 0 0 14px;
  color: var(--text);
}