/* ============================================
   Mi Servicio Técnico — Estilos Principales
   ============================================ */

/* ---------- Google Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800&display=swap');

/* ---------- CSS Custom Properties ---------- */
:root {
  /* Brand Colors */
  --color-primary: #1591A5;
  --color-primary-dark: #117a8b;
  --color-gradient-start: #FF6B00;
  --color-gradient-end: #FFC107;
  --color-cta: #5BC467;
  --color-cta-hover: #4aae56;
  --color-reserva: #FF0000;
  --color-reserva-hover: #cc0000;
  --color-footer: #205081;
  --color-footer-dark: #1a4069;

  /* Neutrals */
  --color-bg: #FFFFFF;
  --color-bg-alt: #F7F8FA;
  --color-bg-light-gray: #EEF0F3;
  --color-text: #333333;
  --color-text-light: #666666;
  --color-text-muted: #999999;
  --color-border: #E0E0E0;

  /* Typography */
  --font-heading: 'Montserrat', sans-serif;
  --font-body: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --section-padding: 80px 0;
  --container-width: 1200px;

  /* Effects */
  --shadow-card: 0 4px 20px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 8px 32px rgba(0, 0, 0, 0.14);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: all 0.3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

ul, ol {
  list-style: none;
}

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

button {
  border: none;
  cursor: pointer;
  font-family: var(--font-body);
}

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

/* ---------- HEADER ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--color-primary);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 72px;
}

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

.header__logo-icon {
  width: 56px;
  height: 56px;
  background: var(--color-bg);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.header__logo-icon img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.header__logo-text {
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  line-height: 1.2;
}

.header__logo-text span {
  display: block;
  font-style: italic;
  font-size: 1.4rem;
}

.header__nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__nav a {
  color: white;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  display: flex;
  align-items: center;
  gap: 6px;
}

.header__nav a:hover {
  background: rgba(255, 255, 255, 0.15);
}

.header__nav a .nav-emoji {
  font-size: 0.85rem;
}

.header__reserva {
  background: var(--color-reserva) !important;
  font-weight: 600 !important;
  padding: 10px 22px !important;
  border-radius: 25px !important;
  transition: var(--transition);
}

.header__reserva:hover {
  background: var(--color-reserva-hover) !important;
  transform: scale(1.05);
}

/* Hamburger Menu */
.header__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: transparent;
  padding: 8px;
}

.header__hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: white;
  border-radius: 3px;
  transition: var(--transition);
}

.header__hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.header__hamburger.active span:nth-child(2) {
  opacity: 0;
}

.header__hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* ---------- HERO SLIDER ---------- */
.hero {
  position: relative;
  overflow: hidden;
  min-height: 440px;
}

.hero__slides {
  display: flex;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero__slide {
  min-width: 100%;
  min-height: 440px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 20px;
  position: relative;
}

.hero__slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-gradient-start), var(--color-gradient-end));
  opacity: 0.92;
}

.hero__slide:nth-child(2)::before {
  background: linear-gradient(135deg, var(--color-primary), #1ab0c8);
}

.hero__slide:nth-child(3)::before {
  background: linear-gradient(135deg, #25d366, #128c7e);
}

.hero__slide:nth-child(4)::before {
  background: linear-gradient(135deg, var(--color-footer), #3a7bd5);
}

.hero__slide-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: brightness(0.3);
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 750px;
}

.hero__content h1 {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  color: white;
  margin-bottom: 16px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero__content p {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.92);
  font-weight: 500;
}

/* Hero Controls */
.hero__controls {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 10;
}

.hero__dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  transition: var(--transition);
}

.hero__dot.active {
  background: white;
  transform: scale(1.2);
}

.hero__arrows {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}

.hero__arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(4px);
  color: white;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: all;
  transition: var(--transition);
}

.hero__arrow:hover {
  background: rgba(255, 255, 255, 0.35);
  transform: translateY(-50%) scale(1.1);
}

/* ---------- BUSCADOR ---------- */
.search {
  background: var(--color-bg-alt);
  padding: 50px 0;
  position: relative;
}

.search::before {
  content: '';
  position: absolute;
  top: -40px;
  left: 0;
  right: 0;
  height: 40px;
  background: linear-gradient(to bottom, transparent, var(--color-bg-alt));
}

.search__title {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--color-text);
  margin-bottom: 30px;
}

.search__form {
  display: flex;
  align-items: center;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto;
  background: white;
  padding: 12px 16px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.search__select-wrapper {
  flex: 1;
  position: relative;
}

.search__select-wrapper select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text);
  background: var(--color-bg);
  appearance: none;
  cursor: pointer;
  transition: var(--transition);
}

.search__select-wrapper select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(21, 145, 165, 0.15);
}

.search__select-wrapper::after {
  content: '▼';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.65rem;
  color: var(--color-text-muted);
  pointer-events: none;
}

.search__btn {
  background: var(--color-reserva);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: var(--transition);
  white-space: nowrap;
}

.search__btn:hover {
  background: var(--color-reserva-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(255, 0, 0, 0.3);
}

/* ---------- RESULTADOS TÉCNICOS ---------- */
.results {
  padding: 50px 0;
  display: none;
}

.results.active {
  display: block;
  animation: fadeInUp 0.5s ease;
}

.results__title {
  text-align: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 12px;
}

.results__subtitle {
  text-align: center;
  color: var(--color-text-light);
  margin-bottom: 40px;
}

.results__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.results__empty {
  text-align: center;
  padding: 60px;
  color: var(--color-text-muted);
  font-size: 1.1rem;
}

.results__empty .empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  display: block;
}

/* Tarjeta de Técnico */
.tech-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  transition: var(--transition);
  border: 1px solid var(--color-border);
}

.tech-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.tech-card__body {
  display: flex;
  gap: 20px;
  padding: 24px;
}

.tech-card__photo {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--color-primary);
  flex-shrink: 0;
}

.tech-card__info {
  flex: 1;
}

.tech-card__name {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.tech-card__rating {
  color: #FFC107;
  font-size: 0.9rem;
  margin-bottom: 6px;
}

.tech-card__rating span {
  color: var(--color-text-muted);
  font-size: 0.85rem;
  margin-left: 4px;
}

.tech-card__specialty {
  font-size: 0.88rem;
  color: var(--color-primary);
  font-weight: 600;
  margin-bottom: 4px;
}

.tech-card__comunas {
  font-size: 0.82rem;
  color: var(--color-text-light);
  margin-bottom: 8px;
}

.tech-card__desc {
  font-size: 0.85rem;
  color: var(--color-text-light);
  line-height: 1.5;
}

.tech-card__footer {
  padding: 0 24px 24px;
}

.tech-card__whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: var(--color-cta);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 12px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.tech-card__whatsapp:hover {
  background: var(--color-cta-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(91, 196, 103, 0.35);
}

.tech-card__whatsapp svg {
  width: 20px;
  height: 20px;
  fill: white;
}

/* ---------- SERVICIOS ---------- */
.services {
  padding: var(--section-padding);
  background: var(--color-bg);
}

.section-header {
  text-align: center;
  margin-bottom: 50px;
}

.section-header h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  color: var(--color-text);
  margin-bottom: 12px;
}

.section-header p {
  color: var(--color-text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.service-card {
  background: white;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 36px 28px;
  text-align: center;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--color-primary);
}

.service-card__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  background: rgba(21, 145, 165, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  color: var(--color-primary);
  transition: var(--transition);
}

.service-card:hover .service-card__icon {
  background: var(--color-primary);
  color: white;
  transform: scale(1.1);
}

.service-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-text);
}

.service-card__desc {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin-bottom: 18px;
  line-height: 1.5;
}

.service-card__problems {
  text-align: left;
  margin-bottom: 22px;
}

.service-card__problems li {
  font-size: 0.88rem;
  padding: 4px 0;
  color: var(--color-text);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.service-card__problems li::before {
  content: '✓';
  color: var(--color-cta);
  font-weight: 700;
  font-size: 1rem;
}

.service-card__btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-cta);
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  padding: 10px 24px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.service-card__btn:hover {
  background: var(--color-cta-hover);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(91, 196, 103, 0.35);
}

/* ---------- FAQ ---------- */
.faq {
  padding: var(--section-padding);
  background: var(--color-bg-alt);
}

.faq__list {
  max-width: 820px;
  margin: 0 auto;
}

.faq__item {
  background: white;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  border: 1px solid var(--color-border);
  transition: var(--transition);
}

.faq__item:hover {
  border-color: var(--color-primary);
}

.faq__question {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 20px 24px;
  background: transparent;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  text-align: left;
  transition: var(--transition);
}

.faq__question:hover {
  color: var(--color-primary);
}

.faq__question .faq-icon {
  font-size: 1.3rem;
  color: var(--color-primary);
  transition: transform 0.3s ease;
  flex-shrink: 0;
  margin-left: 16px;
}

.faq__item.active .faq__question .faq-icon {
  transform: rotate(45deg);
}

.faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq__answer-inner {
  padding: 0 24px 20px;
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.7;
}

/* ---------- BLOG ---------- */
.blog {
  padding: var(--section-padding);
  background: var(--color-bg);
}

.blog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.blog-card {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  background: white;
  border: 1px solid var(--color-border);
}

.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card-hover);
}

.blog-card__image {
  height: 200px;
  overflow: hidden;
}

.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.blog-card:hover .blog-card__image img {
  transform: scale(1.05);
}

.blog-card__body {
  padding: 24px;
}

.blog-card__tag {
  display: inline-block;
  background: rgba(21, 145, 165, 0.1);
  color: var(--color-primary);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.blog-card__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: var(--color-text);
  line-height: 1.4;
}

.blog-card__excerpt {
  font-size: 0.88rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin-bottom: 16px;
}

.blog-card__link {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: var(--transition);
}

.blog-card__link:hover {
  gap: 10px;
  color: var(--color-primary-dark);
}

/* ---------- CTA BANNER ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--color-primary), var(--color-footer));
  padding: 70px 0;
  text-align: center;
  color: white;
}

.cta-banner h2 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 14px;
}

.cta-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  margin-bottom: 32px;
}

.cta-banner__buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-banner__btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 32px;
  border-radius: 30px;
  font-weight: 600;
  font-size: 1rem;
  transition: var(--transition);
}

.cta-banner__btn--call {
  background: var(--color-cta);
  color: white;
}

.cta-banner__btn--call:hover {
  background: var(--color-cta-hover);
  transform: translateY(-2px);
}

.cta-banner__btn--whatsapp {
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.4);
}

.cta-banner__btn--whatsapp:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--color-footer);
  color: white;
  padding: 50px 0 0;
}

.footer .container {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}

.footer__brand {
  max-width: 280px;
}

.footer__logo-icon {
  width: 80px;
  height: 80px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
}

.footer__logo-icon img {
  width: 74px;
  height: 74px;
  object-fit: contain;
}

.footer__brand p {
  font-size: 0.9rem;
  opacity: 0.8;
  line-height: 1.6;
}

.footer__col h4 {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 18px;
  color: var(--color-gradient-end);
}

.footer__col a {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  opacity: 0.8;
  padding: 5px 0;
  transition: var(--transition);
}

.footer__col a:hover {
  opacity: 1;
  transform: translateX(4px);
}

.footer__social {
  display: flex;
  gap: 12px;
  margin-top: 12px;
}

.footer__social a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition);
  padding: 0;
}

.footer__social a:hover {
  background: var(--color-gradient-end);
  transform: translateY(-3px);
}

.footer__bottom {
  margin-top: 40px;
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  text-align: center;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* ---------- ANIMATIONS ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .blog__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .header__nav {
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--color-primary);
    flex-direction: column;
    padding: 20px;
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  }

  .header__nav.active {
    transform: translateY(0);
    opacity: 1;
  }

  .header__nav a {
    padding: 12px 20px;
    font-size: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    width: 100%;
  }

  .header__hamburger {
    display: flex;
  }

  .hero__slide {
    min-height: 320px;
    padding: 40px 20px;
  }

  .hero__content h1 {
    font-size: 1.8rem;
  }

  .search__form {
    flex-direction: column;
  }

  .search__select-wrapper {
    width: 100%;
  }

  .search__btn {
    width: 100%;
    justify-content: center;
  }

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

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

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

  .footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .footer__brand {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .cta-banner h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero__content h1 {
    font-size: 1.5rem;
  }

  .section-header h2 {
    font-size: 1.6rem;
  }

  .tech-card__body {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
}
