/* =========================================================
   Juan Ramón Jiménez Morales — Electricista y Fontanero
   Costa del Sol · CSS principal compartido (mobile-first)
   ========================================================= */

:root {
  --color-primary: #E65100;
  --color-primary-dark: #B33D00;
  --color-primary-light: #FF8A3D;
  --color-white: #FFFFFF;
  --color-dark: #212121;
  --color-gray: #5A5A5A;
  --color-gray-light: #F5F5F5;
  --color-border: #E0E0E0;
  --color-whatsapp: #25D366;
  --color-star: #FFB300;

  --font-base: "Segoe UI", Roboto, Arial, sans-serif;
  --max-width: 1160px;
  --radius: 10px;
  --shadow: 0 4px 16px rgba(33, 33, 33, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-base);
  color: var(--color-dark);
  background: var(--color-white);
  line-height: 1.6;
  font-size: 16px;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { line-height: 1.25; font-weight: 800; }

h1 { font-size: 1.9rem; }
h2 { font-size: 1.6rem; margin-bottom: 12px; }
h3 { font-size: 1.15rem; margin-bottom: 8px; }

p { margin-bottom: 12px; color: var(--color-gray); }

section { padding: 56px 0; }

.section-alt { background: var(--color-gray-light); }

.section-header { text-align: center; max-width: 680px; margin: 0 auto 36px; }
.section-header p { margin-bottom: 0; }

.eyebrow {
  display: inline-block;
  color: var(--color-primary);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-size: 0.8rem;
  margin-bottom: 8px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(230, 81, 0, 0.35);
}
.btn-primary:hover { background: var(--color-primary-dark); }

.btn .emoji-phone {
  color: #000;
  filter: none;
  line-height: 1;
  font-style: normal;
}

.btn-whatsapp {
  background: var(--color-whatsapp);
  color: var(--color-white);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35);
}
.btn-whatsapp:hover { background: #1DA851; }

.btn-outline {
  background: transparent;
  border-color: var(--color-white);
  color: var(--color-white);
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-block { width: 100%; }

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-border);
}

.site-header .container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  padding-bottom: 12px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
}
.brand-logo {
  height: 72px;
  width: auto;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-link {
  display: none;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--color-dark);
  white-space: nowrap;
}

.lang-switch {
  display: flex;
  border: 1px solid var(--color-border);
  border-radius: 50px;
  overflow: hidden;
  font-size: 0.8rem;
  font-weight: 700;
}
.lang-switch a {
  padding: 6px 12px;
  color: var(--color-gray);
}
.lang-switch a.active {
  background: var(--color-primary);
  color: var(--color-white);
}

.main-nav {
  display: none;
  width: 100%;
  order: 5;
}
.main-nav.open { display: block; }
.main-nav ul {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border);
  margin-top: 12px;
  padding-top: 12px;
}
.main-nav a {
  display: block;
  padding: 10px 0;
  font-weight: 600;
  color: var(--color-dark);
}
.main-nav a:hover { color: var(--color-primary); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-white);
  font-size: 1.2rem;
  cursor: pointer;
}

@media (min-width: 640px) {
  .phone-link { display: inline-flex; }
}

@media (min-width: 900px) {
  .site-header .container { flex-wrap: nowrap; }
  .main-nav {
    display: block !important;
    order: 0;
    width: auto;
    margin-top: 0;
  }
  .main-nav ul {
    flex-direction: row;
    gap: 24px;
    border-top: none;
    margin-top: 0;
    padding-top: 0;
  }
  .main-nav a { padding: 6px 0; }
  .nav-toggle { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--color-dark) 0%, #3a2a1f 55%, var(--color-primary-dark) 100%);
  color: var(--color-white);
  padding: 52px 0 60px;
}

.hero .container {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 14px;
  border-radius: 50px;
  font-size: 0.82rem;
  font-weight: 700;
  width: fit-content;
  margin-bottom: 16px;
}

.hero h1 {
  font-size: 2.1rem;
  margin-bottom: 14px;
}

.hero .lead {
  color: rgba(255,255,255,0.88);
  font-size: 1.05rem;
  max-width: 560px;
}

.hero-phone {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--color-white);
  margin: 6px 0 18px;
  display: block;
}

/* ---------- Hero photo ---------- */
.hero-photo {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 75% center;
  display: block;
}

/* ---------- Image placeholders ---------- */
.img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  text-align: center;
  padding: 20px;
  background: rgba(255,255,255,0.06);
  border: 2px dashed rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7);
}
.img-placeholder .ph-icon { font-size: 2.2rem; line-height: 1; }
.img-placeholder .ph-label { font-size: 0.85rem; font-weight: 600; }

.img-placeholder--light {
  background: var(--color-gray-light);
  border-color: var(--color-border);
  color: var(--color-gray);
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.gallery-grid .img-placeholder { aspect-ratio: 1 / 1; }
@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-photo {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--color-border);
}
.gallery-photo img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.gallery-photo figcaption {
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--color-dark);
  background: var(--color-white);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 30px;
}

.hero-stat {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}
.hero-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--color-primary-light);
}
.hero-stat span {
  font-size: 0.78rem;
  color: rgba(255,255,255,0.75);
}

@media (min-width: 860px) {
  .hero .container { flex-direction: row; align-items: center; }
  .hero-content { flex: 1.1; }
  .hero-panel { flex: 0.9; }
  .hero h1 { font-size: 2.6rem; }
}

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 700px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
}

.service-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: rgba(230, 81, 0, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 14px;
}

.service-card ul { margin-top: 10px; }
.service-card li {
  padding: 6px 0 6px 24px;
  position: relative;
  color: var(--color-gray);
  font-size: 0.95rem;
}
.service-card li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--color-primary);
  font-weight: 800;
}

/* ---------- Value points ("Por qué elegirme") ---------- */
.value-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

@media (min-width: 640px) {
  .value-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 960px) {
  .value-grid { grid-template-columns: repeat(3, 1fr); }
}

.value-card {
  padding: 22px;
  border-radius: var(--radius);
  background: var(--color-white);
  border: 1px solid var(--color-border);
}
.value-card .service-icon { margin-bottom: 12px; }

/* ---------- Coverage zone ---------- */
.zone-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}
.zone-chip {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  padding: 10px 18px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-dark);
}
.zone-chip strong { color: var(--color-primary); }

/* ---------- Reviews ---------- */
.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 700px) {
  .reviews-grid { grid-template-columns: repeat(3, 1fr); }
}
.review-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.stars { color: var(--color-star); font-size: 1.1rem; margin-bottom: 10px; letter-spacing: 2px; }
.review-name { font-weight: 700; margin-top: 12px; color: var(--color-dark); }
.review-loc { font-size: 0.82rem; color: var(--color-gray); }

/* ---------- Contact ---------- */
.contact-info-card {
  background: var(--color-dark);
  color: var(--color-white);
  border-radius: var(--radius);
  padding: 30px;
}
.contact-info-card h3 { color: var(--color-white); }
.contact-info-card p { color: rgba(255,255,255,0.75); }
.contact-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
  font-weight: 600;
}
.contact-row:last-of-type { border-bottom: none; }

.contact-info-card--solo {
  max-width: 480px;
  margin: 0 auto;
}
.contact-cta-row {
  border-top: 1px solid rgba(255,255,255,0.12);
  margin-top: 8px;
  padding-top: 22px;
  flex-direction: column;
}
.contact-cta-row .btn { width: 100%; }
@media (min-width: 480px) {
  .contact-cta-row { flex-direction: row; }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
  padding: 48px 0;
}
.cta-band h2 { color: var(--color-white); }
.cta-band p { color: rgba(255,255,255,0.9); }
.cta-band .btn-row { justify-content: center; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-size: 0.82rem;
  color: var(--color-gray);
  padding: 14px 0;
}
.breadcrumb a { color: var(--color-primary); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid var(--color-border);
  padding: 18px 0;
}
.faq-item h3 { margin-bottom: 8px; font-size: 1.02rem; }
.faq-item p { margin-bottom: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--color-dark);
  color: rgba(255,255,255,0.7);
  padding: 44px 0 24px;
  font-size: 0.9rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  margin-bottom: 28px;
}
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: repeat(3, 1fr); }
}
.site-footer h4 {
  color: var(--color-white);
  font-size: 0.95rem;
  margin-bottom: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.site-footer ul li { margin-bottom: 8px; }
.site-footer a:hover { color: var(--color-primary-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: 20px;
  text-align: center;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.5);
}

/* ---------- Floating WhatsApp button ---------- */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-decoration: none;
  color: var(--color-white);
}
.whatsapp-float-label {
  background: var(--color-whatsapp);
  color: var(--color-white);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 8px 14px;
  border-radius: 999px;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}
.whatsapp-float-icon {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--color-whatsapp);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.7rem;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
  animation: pulse-wa 2.4s infinite;
}
.whatsapp-float:hover .whatsapp-float-label,
.whatsapp-float:hover .whatsapp-float-icon {
  background: #1DA851;
}

@keyframes pulse-wa {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.55); }
  70% { box-shadow: 0 0 0 14px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }
.small-note { font-size: 0.82rem; color: var(--color-gray); }

@media (min-width: 860px) {
  h1 { font-size: 2.4rem; }
  h2 { font-size: 2rem; }
  section { padding: 76px 0; }
}
