/*
Theme Name: Mi Web Personalizada
Theme URI: https://lackcenter.es/
Author: LackCenter
Description: Tema personalizado convertido desde HTML/CSS/JS puro.
Version: 1.0
*/

:root {
  --font-sans: 'Jost', sans-serif;
  --font-serif: 'DM Serif Display', serif;

  --bg-color: #fdfbf7;
  --card-bg: #ffffff;
  --border-color: #f1e8e1;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  
  --red-primary: #dc2626;     
  --red-hover: #b91c1c;       
  --red-light: #fee2e2;       
  --red-text: #991b1b;        
  --transition: all 0.3s ease;
}

.dark {
  --bg-color: #0b0f19;
  --card-bg: #111827;
  --border-color: #1f2937;
  --text-main: #f9fafb;
  --text-muted: #9ca3af;
  
  --red-light: rgba(220, 38, 38, 0.15);
  --red-text: #fca5a5;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
}

*, *:before, *:after {
  box-sizing: inherit;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  background-color: var(--bg-color);
  color: var(--text-main);
  transition: background-color 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-serif);
  color: var(--text-main);
}

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

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 4rem 0;
  border-top: 1px solid var(--border-color);
}

.section-header {
  max-width: 48rem;
  margin-bottom: 2rem;
}

.section-header.center {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-header h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.section-header p {
  color: var(--text-muted);
}

.highlight {
  color: var(--red-primary);
}

/* --- NAVBAR --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(8px);
  background-color: var(--bg-color);
  border-bottom: 1px solid var(--border-color);
  opacity: 0.95;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}

.brand-logo {
  font-weight: 700;
  font-size: 1.25rem;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a:hover {
  color: var(--red-primary);
}

.btn-nav-contact {
  background-color: var(--red-light);
  color: var(--red-text) !important;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 600;
  border: 1px solid rgba(220, 38, 38, 0.2);
  transition: var(--transition);
}

.btn-nav-contact:hover {
  background-color: var(--red-primary);
  color: #ffffff !important;
  transform: translateY(-2px);
}

.btn-icon {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.5rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1rem;
}

.lang-selector {
  display: flex;
  gap: 0.25rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.2rem;
  border-radius: 0.5rem;
}

.lang-btn {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.4rem;
  cursor: pointer;
  border-radius: 0.3rem;
  color: var(--text-main);
  font-size: 0.75rem;
  font-weight: 600;
}

.lang-btn:hover {
  background-color: var(--red-light);
}

.flag-text {
  font-weight: 600;
}

@media (max-width: 640px) {
  .lang-text { display: none; }
}

/* --- HERO COVER --- */
.hero-cover {
  position: relative;
  height: 60vh;
  min-height: 400px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #ffffff;
  margin-bottom: 2rem;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
}

.hero-content {
  position: relative;
  z-index: 10;
  max-width: 800px;
}

.hero-title {
  font-size: 2.75rem;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: #ffffff !important;
}

.hero-subtitle {
  font-size: 2rem;
  font-weight: 300;
  color: #e5e7eb;
}

/* --- TRABAJOS --- */
.card {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  padding: 1.5rem;
  transition: var(--transition);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.work-card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--red-primary);
}

.card-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.before-after-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.ba-image {
  position: relative;
  border-radius: 0.5rem;
  overflow: hidden;
  height: 140px;
}

.ba-image img, .gallery-grid img, .local-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: transform 0.3s ease;
}

.zoomable:hover {
  transform: scale(1.05);
}

.ba-badge {
  position: absolute;
  bottom: 6px;
  left: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  text-transform: uppercase;
  pointer-events: none;
}

.ba-badge.antes {
  background-color: #374151;
  color: #ffffff;
}

.ba-badge.despues {
  background-color: var(--red-primary);
  color: #ffffff;
}

.gallery-title {
  font-size: 1rem;
  font-family: var(--font-sans);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.gallery-grid img {
  height: 90px;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.about-card {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--text-muted);
}

/* --- ESTILOS DEL CARRUSEL MULTI-IMAGEN --- */
.multi-carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  margin-top: 1rem;
}

.multi-carousel-track-wrapper {
  overflow: hidden;
  width: 100%;
  border-radius: 12px;
}

.multi-carousel-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  gap: 20px; /* Espacio entre las imágenes */
}

.multi-carousel-slide {
  min-width: calc(33.333% - 14px); /* Muestra 3 elementos en escritorio */
  box-sizing: border-box;
}

.multi-carousel-slide img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  display: block;
}

/* Botones de navegación laterales estilo tarjeta */
.multi-carousel-btn {
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  border: none;
  font-size: 1.2rem;
  padding: 0.8rem 1rem;
  cursor: pointer;
  border-radius: 50%;
  z-index: 10;
  transition: background-color 0.3s ease;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.multi-carousel-btn:hover {
  background-color: rgba(0, 0, 0, 0.9);
}

.multi-carousel-btn.prev {
  left: -20px;
}

.multi-carousel-btn.next {
  right: -20px;
}

/* Puntos indicadores (Dots) */
.multi-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 15px;
}

.multi-carousel-dot {
  width: 10px;
  height: 10px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.multi-carousel-dot.active {
  background-color: #0073aa; /* Color corporativo */
}

/* Adaptabilidad a dispositivos móviles y tablets */
@media (max-width: 900px) {
  .multi-carousel-slide {
    min-width: calc(50% - 10px); /* Muestra 2 elementos en tablets */
  }
}

@media (max-width: 600px) {
  .multi-carousel-slide {
    min-width: 100%; /* Muestra 1 elemento en móviles */
  }
  .multi-carousel-btn.prev {
    left: 5px;
  }
  .multi-carousel-btn.next {
    right: 5px;
  }
}

/* --- RESEÑAS DE GOOGLE --- */
.google-badge-header {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.8rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.google-icon {
  width: 1rem;
  height: 1rem;
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.review-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.reviewer-name {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-sans);
  margin: 0;
}

.review-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.stars {
  color: #fbbf24;
  letter-spacing: 2px;
  font-size: 0.9rem;
}

.review-text {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-style: italic;
  margin: 0;
  line-height: 1.5;
}

/* --- ACORDEÓN --- */
.accordion-container {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.accordion-item {
  background-color: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 0.75rem;
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  text-align: left;
  font-family: var(--font-sans);
}

.accordion-icon {
  font-size: 1.5rem;
  color: var(--red-primary);
  transition: transform 0.3s ease;
}

.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.3s ease, padding 0.3s ease;
  padding: 0 1.25rem;
  color: var(--text-muted);
}

.accordion-inner {
  overflow: hidden;
}

.accordion-item.active .accordion-content {
  grid-template-rows: 1fr;
  padding-bottom: 1.25rem;
}

.accordion-item.active .accordion-icon {
  transform: rotate(45deg);
}

.accordion-item.active {
  border-color: var(--red-primary);
}

/* --- CONTACTO Y MAPA --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: stretch; /* Asegura que ambas tarjetas midan lo mismo en pantallas grandes */
}

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

.contact-info-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Distribuye el contenido para igualar la altura */
  height: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
  background-color: var(--card-bg);
}

.icon-box {
  padding: 0.5rem;
  border-radius: 0.375rem;
  background-color: var(--red-light);
  font-size: 1.1rem;
}

.label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  margin: 0;
}

.value {
  font-size: 0.95rem;
  font-weight: 500;
  margin: 0;
}

.local-photo {
  height: 160px;
  border-radius: 0.5rem;
  border: 1px solid var(--border-color);
}

.map-responsive {
  width: 100%;
  height: 100%;
  min-height: 320px;
  border-radius: 0.5rem;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

/* --- MODAL / LIGHTBOX --- */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.85);
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.modal-content {
  max-width: 90%;
  max-height: 85vh;
  border-radius: 0.5rem;
  object-fit: contain;
}

.modal-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  color: #ffffff;
  font-size: 2.5rem;
  font-weight: bold;
  cursor: pointer;
}

.footer {
  border-top: 1px solid var(--border-color);
  padding: 3rem 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Estilo exacto para las banderas de assets/ */
.flag-icon {
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  display: inline-block;
  vertical-align: middle;
}

.modal-prev, .modal-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: none;
  font-size: 2rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s;
  z-index: 1010;
}

.modal-prev:hover, .modal-next:hover {
  background: var(--red-primary);
}

.modal-prev { left: 2rem; }
.modal-next { right: 2rem; }

.contact-item-content {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-item .sub-value {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Contenedor del Mapa (Iframe) --- */
/* --- Tarjeta del Mapa de lado a lado --- */
.card.map-card {
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  background: var(--card-bg) !important; /* Respeta el color de fondo en modo noche */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05) !important;
  margin-bottom: 0 !important; /* Eliminamos margen inferior para que cuadre con la otra */
  padding: 0 !important;
  overflow: hidden !important;
  display: flex !important;
  flex-direction: column !important;
  height: 100% !important; /* Forzamos a que ocupe toda la altura del grid */
  box-sizing: border-box !important;
}

/* El texto sí lleva su propio espacio interior */
.map-card-content {
  padding: 1.5rem !important; /* Ajustado para alinear mejor el espaciado interior */
}

.map-card-content .label {
  font-weight: bold;
  margin-bottom: 0.5rem;
}

.map-card-content p {
  color: var(--text-muted); /* Usa la variable de texto para adaptarse al modo noche */
  margin: 0 0 0.5rem 0;
}

/* --- Contenedor del Mapa --- */
.map-wrapper {
  width: 100% !important;
  flex-grow: 1 !important; /* Hace que el mapa ocupe el espacio restante de la tarjeta */
  min-height: 250px !important;
  margin: 0 !important;
  padding: 0 !important;
  line-height: 0 !important;
}

.map-wrapper iframe {
  width: 100% !important;
  height: 100% !important;
  border: 0 !important;
  display: block !important;
  transition: filter 0.3s ease;
}

/* --- MODO NOCHE PARA EL MAPA DE GOOGLE --- */
.dark .map-wrapper iframe {
  /* Filtro para oscurecer el mapa estándar de Google en modo oscuro */
  filter: invert(90%) hue-rotate(180deg) brightness(95%) contrast(90%);
}