/* serviciosalicante.es — Mobile-first CSS, no frameworks */

:root {
  --primary: #1a56db;
  --primary-dark: #1341b5;
  --cta: #dc2626;
  --cta-dark: #b91c1c;
  --accent: #059669;
  --accent-light: #d1fae5;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --bg-light: #f9fafb;
  --bg-card: #ffffff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --radius-lg: 12px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background: var(--bg-light);
  line-height: 1.6;
  font-size: 16px;
}

/* ── Layout ── */
.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ── Header ── */
.header {
  background: var(--primary);
  color: #fff;
  padding: 32px 0 24px;
  text-align: center;
}

.header h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 6px;
}

.header .subtitle {
  font-size: 1rem;
  opacity: 0.88;
  font-weight: 400;
}

.header .comarca-tag {
  display: inline-block;
  margin-top: 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 20px;
  padding: 2px 12px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

/* ── Sticky CTA Bar ── */
.cta-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--cta);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  box-shadow: var(--shadow-md);
}

.cta-bar a {
  color: #fff;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.cta-bar a:hover {
  opacity: 0.92;
}

.cta-bar .cta-label {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.9;
  display: block;
  margin-bottom: 1px;
}

/* ── Sections ── */
.section {
  padding: 28px 0;
}

.section + .section {
  border-top: 1px solid var(--border);
}

.section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
}

.section h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 10px;
}

/* ── NAP Block ── */
.nap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.nap-row {
  display: flex;
  align-items: flex-start;
  padding: 12px 16px;
  gap: 12px;
}

.nap-row:nth-child(even) {
  background: var(--bg-light);
}

.nap-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  min-width: 90px;
  padding-top: 2px;
}

.nap-value {
  font-size: 0.95rem;
  color: var(--text);
  flex: 1;
}

.nap-value a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.nap-value a:hover {
  text-decoration: underline;
}

.nap-value .horario-badge {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 20px;
}

/* ── Description ── */
.description p {
  font-size: 0.97rem;
  color: var(--text);
  margin-bottom: 12px;
  line-height: 1.7;
}

.description p:last-child {
  margin-bottom: 0;
}

/* ── Gallery ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  background: var(--border);
  aspect-ratio: 4/3;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.gallery-item img:hover {
  transform: scale(1.03);
}

/* ── Services Grid ── */
.servicios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.servicio-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 0.9rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

/* ── Hiperlocal block ── */
.hiperlocal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.hiperlocal p {
  font-size: 0.93rem;
  line-height: 1.7;
  color: var(--text);
}

/* ── Zones ── */
.zonas-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.zona-pill {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 4px 14px;
  font-size: 0.85rem;
  color: var(--text);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s;
}

.zona-pill:hover {
  border-color: var(--primary);
  background: #eff6ff;
}

/* ── Map ── */
.map-container {
  height: 300px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ── Footer ── */
.footer {
  background: #111827;
  color: #d1d5db;
  padding: 32px 0 24px;
  margin-top: 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 20px;
}

.footer-col h4 {
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.footer-col p,
.footer-col address {
  font-style: normal;
  font-size: 0.85rem;
  line-height: 1.8;
  color: #9ca3af;
}

.footer-col a {
  color: #93c5fd;
  text-decoration: none;
}

.footer-col a:hover {
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid #374151;
  padding-top: 16px;
  font-size: 0.78rem;
  color: #6b7280;
  text-align: center;
}

/* ── Index page cards ── */
.index-header {
  background: var(--primary);
  color: #fff;
  padding: 40px 0 32px;
  text-align: center;
}

.index-header h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 8px;
}

.index-header .subtitle {
  font-size: 1.05rem;
  opacity: 0.88;
}

.fichas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding: 32px 0;
}

.ficha-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
}

.ficha-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.ficha-card-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
  background: var(--border);
}

.ficha-card-body {
  padding: 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ficha-card-body h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.ficha-card-cat {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.ficha-card-phone {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--primary);
}

.ficha-card-link {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  border-top: 1px solid var(--border);
}

.ficha-card-link:hover {
  text-decoration: underline;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  .header h1 {
    font-size: 1.4rem;
  }

  .cta-bar a {
    font-size: 1.05rem;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
  }

  .servicios-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .fichas-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 20px 0;
  }

  .index-header h1 {
    font-size: 1.5rem;
  }

  .nap-label {
    min-width: 70px;
    font-size: 0.72rem;
  }
}

@media (min-width: 641px) and (max-width: 860px) {
  .fichas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
