/* ===== RESET & BASE ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #0091d5;
  --primary-dark: #006fa0;
  --primary-light: #e8f4fd;
  --dark: #16213e;
  --dark-soft: #2c3e6b;
  --gray: #5a6577;
  --gray-light: #8892a4;
  --light-gray: #f7f8fa;
  --border: #e2e6ed;
  --white: #fff;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.1);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: 0.25s ease;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--dark);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { text-decoration: none; color: inherit; transition: color var(--transition); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== HEADER / NAV ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: box-shadow var(--transition), border-color var(--transition);
}

.header.scrolled {
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--border);
}

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

.header .logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.header .logo img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray);
  padding: 8px 16px;
  border-radius: 6px;
  transition: color var(--transition), background var(--transition);
  white-space: nowrap;
  letter-spacing: -0.01em;
}

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

.nav-links a.active {
  color: var(--primary);
  font-weight: 600;
}

.nav-links .btn-nav {
  background: var(--primary);
  color: var(--white);
  padding: 9px 22px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 8px;
  letter-spacing: 0;
}

.nav-links .btn-nav:hover {
  background: var(--primary-dark);
  color: var(--white);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px;
  border-radius: 6px;
  transition: background var(--transition);
}

.menu-toggle:hover {
  background: var(--light-gray);
}

.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--dark);
  margin: 5px 0;
  border-radius: 2px;
  transition: var(--transition);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  position: relative;
  background: linear-gradient(160deg, rgba(0,145,213,0.92) 0%, rgba(22,33,62,0.95) 100%),
              url('../img/hero-bg.jpg') center/cover no-repeat;
  padding: 100px 24px;
}

.hero-content {
  max-width: 760px;
  margin: 0 auto;
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  margin-bottom: 24px;
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.hero p {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  opacity: 0.9;
  margin-bottom: 40px;
  line-height: 1.7;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
}

.hero-buttons {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 32px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
  letter-spacing: -0.01em;
}

.btn-primary {
  background: var(--primary);
  color: var(--white);
}

.btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,145,213,0.35);
}

.btn-outline {
  border: 2px solid rgba(255,255,255,0.6);
  color: var(--white);
  background: transparent;
}

.btn-outline:hover {
  background: var(--white);
  color: var(--primary);
  border-color: var(--white);
}

/* ===== HERO INTERIOR ===== */
.hero-interior {
  padding: 140px 24px 70px;
  text-align: center;
  color: var(--white);
  background: linear-gradient(160deg, rgba(0,145,213,0.93) 0%, rgba(22,33,62,0.92) 100%);
}

.hero-interior h1 {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.03em;
}

.hero-interior p {
  font-size: 1.1rem;
  opacity: 0.85;
  max-width: 640px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ===== SECTIONS ===== */
.section {
  padding: 100px 0;
}

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

.section-title {
  text-align: center;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  margin-bottom: 56px;
  color: var(--dark);
  letter-spacing: -0.03em;
}

.section-title::after {
  content: '';
  display: block;
  width: 48px;
  height: 3px;
  background: var(--primary);
  margin: 20px auto 0;
  border-radius: 2px;
}

/* ===== DESCUBRE (3 pasos) ===== */
.steps {
  display: flex;
  flex-direction: column;
  gap: 80px;
}

.step {
  display: flex;
  align-items: center;
  gap: 60px;
}

.step:nth-child(even) {
  flex-direction: row-reverse;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.step-content p {
  color: var(--gray);
  margin-bottom: 12px;
  font-size: 0.95rem;
}

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

.step-img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.step-img img {
  max-width: 380px;
  width: 100%;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* ===== SERVICIOS GRID ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 24px 32px;
  text-align: center;
  border: 1px solid var(--border);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
}

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

.service-card img {
  width: 72px;
  height: 72px;
  margin-bottom: 24px;
  object-fit: contain;
}

.service-card h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
  letter-spacing: -0.01em;
}

.service-card p {
  font-size: 0.875rem;
  color: var(--gray);
  margin-bottom: 24px;
  line-height: 1.65;
  flex-grow: 1;
}

.service-card .btn {
  font-size: 0.85rem;
  padding: 10px 24px;
}

/* ===== TESTIMONIOS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 36px 28px 28px;
  border: 1px solid var(--border);
  position: relative;
  display: flex;
  flex-direction: column;
}

.testimonial::before {
  content: '\201C';
  font-size: 3.5rem;
  color: var(--primary);
  opacity: 0.15;
  position: absolute;
  top: 12px;
  left: 24px;
  line-height: 1;
  font-family: Georgia, serif;
}

.testimonial blockquote {
  font-style: italic;
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 0.9rem;
  line-height: 1.7;
  flex-grow: 1;
  padding-top: 8px;
}

.testimonial-author {
  font-weight: 700;
  color: var(--dark);
  font-size: 0.9rem;
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--gray-light);
  margin-top: 2px;
}

/* ===== CTA ===== */
.cta {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--white);
  text-align: center;
  padding: 80px 24px;
}

.cta h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.cta p {
  opacity: 0.9;
  margin-bottom: 32px;
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  font-size: 1.05rem;
}

.cta .btn {
  background: var(--white);
  color: var(--primary);
  font-weight: 700;
}

.cta .btn:hover {
  background: var(--light-gray);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ===== CONTENT PAGE ===== */
.content-section {
  padding: 72px 0;
}

.content-section .container {
  max-width: 760px;
}

.content-section p {
  color: var(--gray);
  margin-bottom: 24px;
  font-size: 1.05rem;
  line-height: 1.8;
}

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

/* ===== FOOTER ===== */
.footer {
  background: var(--dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.footer p,
.footer a {
  font-size: 0.9rem;
  line-height: 1.7;
}

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

.footer-links li {
  margin-bottom: 10px;
}

.footer-links a {
  display: inline-block;
  padding: 2px 0;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 24px;
  text-align: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.4);
}

.footer .logo-footer {
  height: 36px;
  margin-bottom: 16px;
  opacity: 0.85;
}

.footer-about p {
  margin-top: 0;
}

/* ===== CONTACTO ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  color: var(--dark);
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 24px;
  letter-spacing: -0.02em;
}

.contact-info p {
  color: var(--gray);
  margin-bottom: 16px;
  font-size: 0.95rem;
  line-height: 1.7;
}

.contact-info a {
  color: var(--primary);
  font-weight: 500;
}

.contact-info a:hover {
  color: var(--primary-dark);
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border);
}

.contact-map iframe {
  width: 100%;
  height: 380px;
  border: 0;
  display: block;
}

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

@media (max-width: 768px) {
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--white);
    padding: 16px 24px 24px;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 0;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    font-size: 0.95rem;
    border-radius: var(--radius);
    width: 100%;
  }

  .nav-links .btn-nav {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
    width: 100%;
  }

  .menu-toggle {
    display: block;
  }

  .hero {
    min-height: 85vh;
    padding: 100px 20px 60px;
  }

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

  .section {
    padding: 64px 0;
  }

  .section-title {
    margin-bottom: 40px;
  }

  .step,
  .step:nth-child(even) {
    flex-direction: column;
    text-align: center;
    gap: 32px;
  }

  .step-img img {
    max-width: 280px;
  }

  .services-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

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

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

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

  .hero-interior {
    padding: 120px 20px 50px;
  }
}

@media (max-width: 480px) {
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }

  .hero-buttons .btn {
    width: 100%;
    max-width: 280px;
  }

  .cta {
    padding: 56px 20px;
  }
}

/* ===== LOGIN BUTTON ===== */
.nav-links .btn-login {
  background: transparent;
  color: var(--dark);
  padding: 9px 20px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.85rem;
  margin-left: 4px;
  border: 1.5px solid var(--border);
  transition: all var(--transition);
}

.nav-links .btn-login:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ===== SERVICE DETAIL (página unificada) ===== */
.service-detail {
  display: flex;
  align-items: center;
  gap: 64px;
}

.service-detail.reverse {
  flex-direction: row-reverse;
}

.service-detail-content {
  flex: 1.1;
}

.service-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--primary);
  background: var(--primary-light);
  padding: 4px 12px;
  border-radius: 4px;
  margin-bottom: 16px;
}

.service-detail-content h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 20px;
  letter-spacing: -0.03em;
  line-height: 1.2;
}

.service-detail-content p {
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.75;
  margin-bottom: 16px;
}

.service-detail-content .btn {
  margin-top: 12px;
}

.service-detail-img {
  flex: 0.9;
  display: flex;
  justify-content: center;
  align-items: center;
}

.service-detail-img img {
  width: 100%;
  max-width: 460px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}

/* Responsive service detail */
@media (max-width: 768px) {
  .service-detail,
  .service-detail.reverse {
    flex-direction: column;
    gap: 36px;
    text-align: center;
  }

  .service-detail-img img {
    max-width: 320px;
  }

  .service-detail-content .btn {
    margin-top: 8px;
  }
}
