/* Reset Básico y Variables */
:root {
  --primary-color: #003366;
  --accent-color: #00b0f0;
  --success-color: #28a745;
  --bg-light: #f9f9f9;
  --bg-white: #ffffff;
  --text-color: #333;
  --heading-color: #111;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  background-color: var(--bg-light);
  color: var(--text-color);
  overflow-x: hidden;
}

.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

h1, h2 {
    color: var(--accent-color);
}

h3 {
  color: var(--heading-color);
  margin-bottom: 10px;
}

/* --- Barra de Navegación --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background-color: var(--bg-white); 
  padding: 5px 0; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-bottom: 1px solid #eee;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    text-decoration: none;
}

.logo-img {
    max-height: 80px;
    width: auto;
    display: block;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 30px;
}

.nav-list a {
  text-decoration: none;
  color: var(--heading-color); 
  font-weight: bold;
  transition: color 0.3s ease;
}

.nav-list a:hover {
  color: var(--accent-color);
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('images/banner.jpg') no-repeat center center/cover;
  color: white;
  padding: 180px 0 80px; 
  text-align: center;
}
.hero h1 {
    font-size: 2.8rem;
    font-weight: bold;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero p {
    font-size: 1.2rem;
    margin-bottom: 20px;
}
.hero .btn {
  display: inline-block;
  background-color: var(--success-color);
  color: white;
  padding: 12px 25px;
  text-decoration: none;
  font-weight: bold;
  border-radius: 5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}
.hero .btn:hover {
  background-color: #218838;
  transform: scale(1.05);
}

/* --- Secciones Generales --- */
main section {
    padding: 60px 0;
    scroll-margin-top: 90px; 
}
main section:nth-child(even) {
    background-color: var(--bg-white);
}

main section .container {
    text-align: center;
}

main section h2 {
  margin-bottom: 40px;
  font-size: 2.2rem;
  border-bottom: 3px solid var(--accent-color);
  display: inline-block; 
  padding-bottom: 10px;
}

/* --- Estilos de secciones específicas --- */
.about p, .why-choose p, .services p, .brands p, .works p, .common-issues p, .faq p, .contact-form p, .location p, .google-reviews p, .blog-preview p {
    text-align: center;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 30px;
}
.tecnicos-list, .service-list, .works-list, .blog-posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  text-align: left;
}
.tecnicos-item, .service-item, .work-item, .post-card {
  background: var(--bg-white);
  border-radius: 8px;
  border: 1px solid #ddd;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}
.tecnicos-item {
  padding: 25px 20px;
  text-align: center;
}
.service-item, .work-item {
  text-align: center;
}
.tecnicos-item:hover, .service-item:hover, .work-item:hover, .post-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.tecnicos-item .icon {
    margin-bottom: 15px;
}
.service-item h3, .work-item p {
    padding: 20px;
}
.service-item img, .work-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}
.issue-item, .faq-item {
  background-color: #f5f5f5;
  padding: 20px;
  border-left: 5px solid var(--accent-color);
  margin-bottom: 15px;
  border-radius: 5px;
  text-align: left;
}
.issue-item h3, .faq-item h3 {
    text-align: center;
    color: var(--accent-color);
}

/* --- Carrusel de Marcas --- */
.carousel {
  overflow: hidden;
  position: relative;
  width: 100%;
  white-space: nowrap;
}
.carousel-track {
  display: inline-flex;
  animation: scroll 30s linear infinite;
}
.carousel-track img {
  height: 70px;
  margin: 0 40px;
  transition: transform 0.3s ease; /* Quitamos la transición de filtro y opacidad */
}
.carousel-track:hover {
  animation-play-state: paused;
}
.carousel-track img:hover {
  transform: scale(1.1);
  filter: grayscale(0%);
  opacity: 1;
}
@keyframes scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Sección de Reseñas de Google --- */
.google-reviews {
    background-color: var(--bg-light);
}
.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}
.review-card {
    border: 1px solid #e0e0e0;
    overflow: hidden;
    cursor: pointer;
    display: block;
}
.review-card:hover {
    transform: scale(1.03);
}
.review-card img {
    width: 100%;
    height: auto;
    display: block;
}
.btn-review {
    display: inline-block;
    background-color: #4285F4;
    color: white;
    padding: 12px 25px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
    margin-bottom: 15px;
}
.btn-review:hover {
    background-color: #357ae8;
    transform: scale(1.05);
}
.reviews-all-link {
    display: block;
    text-align: center;
    font-weight: bold;
    color: var(--accent-color);
    text-decoration: underline;
}

/* --- Formulario y Mapa --- */
.contact-form form {
  display: grid;
  gap: 15px;
  max-width: 600px;
  margin: auto;
}
.contact-form input, .contact-form textarea {
  padding: 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  width: 100%;
}
.contact-form button {
  padding: 12px;
  border: none;
  border-radius: 5px;
  width: 100%;
  background-color: var(--accent-color);
  color: white;
  cursor: pointer;
  font-weight: bold;
  transition: background-color 0.3s;
}
.contact-form button:hover {
    background-color: var(--heading-color);
}
.location iframe {
  border-radius: 8px;
  margin-top: 20px;
}

/* --- Footer --- */
footer {
  background-color: #222;
  color: #ccc;
  text-align: center;
  padding: 30px 20px;
  margin-top: 40px;
}
footer a {
  color: var(--accent-color);
  text-decoration: none;
}
footer a:hover {
    text-decoration: underline;
}

/* --- Botón WhatsApp --- */
.whatsapp-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  transition: transform 0.2s ease;
}
.whatsapp-button:hover {
  transform: scale(1.1);
}

/* --- Menú Hamburguesa y Responsividad --- */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.menu-toggle span {
  height: 3px;
  width: 25px;
  background-color: var(--heading-color); 
  border-radius: 2px;
  transition: all 0.3s ease;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

@media (max-width: 820px) {
  .hero { padding: 120px 0 60px; }
  .hero h1 { font-size: 2rem; }
  .menu-toggle { display: flex; }
  .nav-list {
    display: none;
    position: absolute;
    top: 90px;
    left: 0;
    width: 100%;
    background-color: var(--bg-white); 
    flex-direction: column;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  }
  .nav-list.active { display: flex; }
  .nav-list li { width: 100%; }
  .nav-list a {
    padding: 15px;
    display: block;
    border-top: 1px solid #f0f0f0;
  }
}

/* --- ESTILOS PARA EL BLOG (VERSIÓN CON CAJAS) --- */

/* --- ESTILOS PARA EL MINI-HERO DEL POST --- */

.post-hero {
  /* Espaciado y alineación */
  padding: 100px 20px 60px 20px;
  text-align: center;
  color: white;

  /* Imagen de fondo con superposición oscura */
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('/images/blog/blog-hero-background.jpg');
}

.post-hero h1 {
  color: white; /* Asegura que el título sea blanco y legible */
  font-size: 2.5rem;
  line-height: 1.3;
  max-width: 800px;
  margin: 0 auto;
}

.post-hero .post-meta {
    color: #ddd; /* Un color gris claro para la fecha */
    margin-top: 15px;
}

/* --- Página principal del Blog (blog.html) --- */
.blog-page-container {
    padding-top: 90px; /* Espacio para el navbar fijo */
}

/* ... los estilos de .blog-posts-list y .post-card se quedan como están ... */
.blog-posts-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}
.post-card a {
    text-decoration: none;
}
.post-card-image img {
  width: 100%;
  height: 360px;
  object-fit: cover;
}
.post-card-content {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}
.post-card-content .post-date {
  font-size: 0.85rem;
  color: #777;
  margin-bottom: 10px;
}
.post-card-content h3 {
  margin-bottom: 15px;
  font-size: 1.4rem;
  line-height: 1.3;
}
.post-card-content .post-excerpt {
  margin-bottom: 20px;
  flex-grow: 1;
  font-weight: normal; /* ¡ESTA ES LA LÍNEA QUE LO SOLUCIONA! */
  color: var(--text-color); /* Opcional: asegura que el color sea el del texto normal */
}
.post-card-content .read-more-btn {
  display: inline-block;
  background-color: var(--accent-color);
  color: white;
  padding: 10px 20px;
  border-radius: 5px; 
  font-weight: bold;
  transition: background-color 0.3s;
  align-self: flex-start;
}
.post-card-content .read-more-btn:hover {
  background-color: var(--heading-color);
}


/* --- Página del Artículo Individual --- */

/* El main ahora contiene las secciones, como en index.html */
.post-page-main {
  padding-top: 90px; /* Espacio para el navbar fijo */
}

/* Encabezado del post */
.post-header-section {
    padding: 60px 0;
    text-align: center;
}
.post-header-section h1 {
  font-size: 2.8rem;
  line-height: 1.2;
  max-width: 800px;
  margin: 0 auto 15px auto;
}
.post-header-section .post-meta {
  color: #777;
  font-size: 0.9rem;
}

/* Contenido del post */
.post-content-section {
    padding: 60px 0;
}
.post-content-section .container {
    max-width: 800px; /* Limita el ancho del texto para mejor legibilidad */
    text-align: center; /* Centra los títulos H2 */
}
.post-content-section h2 {
    margin-bottom: 40px;
    font-size: 2.2rem;
    border-bottom: 3px solid var(--accent-color);
    display: inline-block; 
    padding-bottom: 10px;
}
.post-content-section p,
.post-content-section ul,
.post-content-section ol,
.post-content-section blockquote {
    text-align: justify; /* Justifica los párrafos */
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5em;
}
.post-content-section ul, .post-content-section ol {
    padding-left: 40px; /* Añade más espacio para las listas */
    text-align: left; /* Las listas se ven mejor alineadas a la izquierda */
}
.post-content-section blockquote {
  border-left: 4px solid var(--accent-color);
  padding: 15px 25px;
  margin: 2em auto;
  font-style: italic;
  color: #555;
  background-color: #f9f9f9;
  border-radius: 0 5px 5px 0;
  text-align: left;
}
.post-featured-image {
  width: 100%;
  border-radius: 8px;
  margin-top: 40px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}