/* ==========================================================================
   Panamerica Insurance — hoja de estilos compartida
   ========================================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --primary: #0f2a4d;
  --primary-light: #164272;
  --accent: #14a98c;
  --accent-dark: #0e8a72;
  --gold: #d4af37;
  --text-dark: #1a1a2e;
  --text-light: #f8f9fa;
  --gray-bg: #f4f6f8;
  --border-light: #e2e8f0;
}
body { color: var(--text-dark); line-height: 1.6; }
a { color: inherit; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
  padding: 0 24px;
}
.header-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 108px;
  transition: height 0.25s ease;
}
.header.is-scrolled { box-shadow: 0 6px 24px rgba(15,42,77,0.08); }
.header.is-scrolled .header-inner { height: 74px; }
.header.is-scrolled .logo img { height: 52px; }
.logo { display: flex; align-items: center; text-decoration: none; }
.logo img { height: 78px; width: auto; transition: height 0.25s ease; }
.nav { display: flex; gap: 26px; align-items: center; }
.nav a {
  text-decoration: none; color: var(--text-dark);
  font-size: 14px; font-weight: 500;
  transition: color 0.2s;
  white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--accent-dark); }
.nav .has-dropdown { position: relative; }
.nav .dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  background: white; border: 1px solid var(--border-light);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(15,42,77,0.12);
  padding: 10px; margin-top: 14px; min-width: 240px;
  display: none; z-index: 50;
}
/* Puente invisible que cubre el espacio entre "Servicios" y el desplegable,
   para que el mouse pueda bajar hasta las opciones sin que el menú se cierre. */
.nav .dropdown::before {
  content: "";
  position: absolute;
  top: -14px; left: 0; right: 0; height: 14px;
}
.nav .has-dropdown:hover .dropdown,
.nav .dropdown:hover { display: block; }
.nav .dropdown a {
  display: block; padding: 9px 12px; border-radius: 6px; font-weight: 400;
}
.nav .dropdown a:hover { background: var(--gray-bg); color: var(--accent-dark); }

.btn {
  padding: 10px 22px; border-radius: 8px; font-size: 14px; font-weight: 500;
  cursor: pointer; border: none; transition: all 0.2s; text-decoration: none; display: inline-block;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20,169,140,0.32); }
.btn-outline {
  background: transparent; color: var(--primary);
  border: 1.5px solid var(--primary);
}
.btn-outline:hover { background: var(--primary); color: white; }
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: var(--gold); color: var(--primary); }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  max-width: 1200px; margin: 0 auto; padding: 18px 24px 0;
  font-size: 13px; color: #667;
}
.breadcrumb a { color: var(--accent-dark); text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb span { color: #99a; margin: 0 6px; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; min-height: 600px;
  display: flex; align-items: center;
  background: linear-gradient(135deg, #071627 0%, #0f2a4d 45%, #14a98c 100%);
  background-size: 200% 200%;
  animation: heroShift 14s ease infinite;
  overflow: hidden;
}
@keyframes heroShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.hero-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; opacity: 0.5;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(115deg, rgba(6,20,36,0.93) 0%, rgba(14,40,74,0.78) 42%, rgba(20,169,140,0.45) 100%);
}
.hero-img {
  position: absolute; right: 0; top: 0; width: 55%; height: 100%;
  object-fit: cover; opacity: 0.32;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
  mask-image: linear-gradient(to right, transparent 0%, black 40%);
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 1200px; margin: 0 auto; padding: 80px 24px;
  width: 100%;
}
.hero h1 {
  font-size: 42px; font-weight: 600; color: white;
  line-height: 1.15; max-width: 600px; margin-bottom: 16px;
}
.hero h1 em { font-style: italic; color: var(--gold); }
.hero p {
  font-size: 17px; color: rgba(255,255,255,0.85);
  max-width: 520px; margin-bottom: 28px;
}

/* ---------- Floating trust badges over hero ---------- */
.hero-badges {
  position: absolute; z-index: 3;
  right: 6%; bottom: 40px;
  display: flex; flex-direction: column; align-items: flex-end; gap: 14px;
}
.hero-badge {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  color: white; font-size: 13px; font-weight: 500;
  padding: 11px 18px; border-radius: 999px;
  box-shadow: 0 10px 28px rgba(0,0,0,0.22);
  white-space: nowrap;
}
.hero-badge.float-a { animation: floatY 4.5s ease-in-out infinite; }
.hero-badge.float-b { animation: floatY 4.5s ease-in-out infinite; animation-delay: 2.2s; }
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Service page hero (interior pages) ---------- */
.service-hero {
  background: linear-gradient(135deg, #071627 0%, #0f2a4d 55%, #14a98c 100%);
  padding: 56px 24px 64px;
  color: white;
}
.service-hero-inner { max-width: 1200px; margin: 0 auto; }
.service-hero-inner h1 { font-size: 36px; font-weight: 600; margin-bottom: 14px; max-width: 720px; }
.service-hero-inner h1 em { font-style: italic; color: var(--gold); }
.service-hero-inner p { font-size: 16px; color: rgba(255,255,255,0.88); max-width: 620px; margin-bottom: 24px; }
.service-hero-inner .btn-group { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-outline-white { background: transparent; color: white; border: 1.5px solid rgba(255,255,255,0.6); }
.btn-outline-white:hover { background: white; color: var(--primary); }

/* ---------- Generic sections ---------- */
.section { padding: 64px 24px; }
.section-inner { max-width: 1200px; margin: 0 auto; }
.section-inner.narrow { max-width: 860px; }
.section-title {
  font-size: 28px; font-weight: 600; color: var(--primary);
  text-align: center; margin-bottom: 8px;
}
.section-title.left { text-align: left; }
.section-subtitle {
  text-align: center; color: #666;
  font-size: 16px; margin-bottom: 40px;
}
.section-subtitle.left { text-align: left; margin-bottom: 28px; }
.eyebrow {
  display: inline-block; font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--accent-dark);
  background: rgba(20,169,140,0.1); padding: 6px 14px; border-radius: 999px;
  margin-bottom: 14px;
}

/* ---------- Services grid (home + listing page) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}
.service-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform 0.25s, box-shadow 0.25s;
  text-decoration: none;
  color: inherit;
  display: block;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,42,77,0.1);
}
.service-card img { width: 100%; height: 160px; object-fit: cover; }
.service-card-body { padding: 20px; }
.service-card h3 {
  font-size: 16px; font-weight: 600; color: var(--primary); margin-bottom: 8px;
}
.service-card p { font-size: 14px; color: #555; line-height: 1.5; margin-bottom: 10px; }
.service-card .link { font-size: 13px; font-weight: 600; color: var(--accent-dark); }

/* ---------- Services listing (servicios.html) ---------- */
.service-row {
  display: grid; grid-template-columns: 340px 1fr; gap: 32px;
  align-items: center; padding: 40px 0; border-bottom: 1px solid var(--border-light);
}
.service-row:last-child { border-bottom: none; }
.service-row img { width: 100%; height: 220px; object-fit: cover; border-radius: 12px; }
.service-row.reverse { grid-template-columns: 1fr 340px; }
.service-row.reverse img { order: 2; }
.service-row-text h3 { font-size: 22px; color: var(--primary); font-weight: 600; margin-bottom: 10px; }
.service-row-text p { font-size: 15px; color: #555; margin-bottom: 16px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tag-list span {
  font-size: 12.5px; background: var(--gray-bg); color: var(--primary);
  padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-light);
}

/* ---------- Coverage / parts grid ---------- */
.parts-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px; margin-top: 32px;
}
.part-card {
  background: white; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 24px;
}
.part-card .part-label {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 8px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: white; font-weight: 700; font-size: 14px; margin-bottom: 14px;
}
.part-card h4 { font-size: 16px; color: var(--primary); font-weight: 600; margin-bottom: 8px; }
.part-card p { font-size: 14px; color: #555; }

/* ---------- Benefit list (checkmarks) ---------- */
.check-list { list-style: none; margin-top: 16px; }
.check-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 14.5px; color: #444; padding: 7px 0;
}
.check-list li::before {
  content: "✓"; flex-shrink: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(20,169,140,0.14); color: var(--accent-dark);
  font-size: 12px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: 1px;
}

/* ---------- Two-column feature (media + text) ---------- */
.split {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center;
  max-width: 1200px; margin: 0 auto; padding: 64px 24px;
}
.split.reverse > *:first-child { order: 2; }
.split img { width: 100%; border-radius: 12px; object-fit: cover; height: 380px; }
.split-text h2 { font-size: 27px; font-weight: 600; color: var(--primary); margin-bottom: 16px; }
.split-text h2 em { font-style: italic; color: var(--accent-dark); }
.split-text p { font-size: 15px; color: #555; margin-bottom: 12px; line-height: 1.7; }

/* ---------- Steps (proceso de compra) ---------- */
.steps {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px; margin-top: 40px;
}
.step {
  background: white; border: 1px solid var(--border-light); border-radius: 12px;
  padding: 28px 22px; position: relative;
}
.step-number {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--primary); color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; margin-bottom: 14px;
}
.step h4 { font-size: 15.5px; color: var(--primary); font-weight: 600; margin-bottom: 6px; }
.step p { font-size: 13.5px; color: #666; }

/* ---------- Features (home) ---------- */
.features { background: var(--gray-bg); }
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-top: 40px;
}
.feature-item {
  text-align: center; padding: 28px 20px;
  background: white; border-radius: 12px;
  border: 1px solid var(--border-light);
}
.feature-icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  color: white;
}
.feature-item h4 { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.feature-item p { font-size: 13px; color: #666; }

/* ---------- FAQ (accordion via details/summary) ---------- */
.faq { background: var(--gray-bg); }
.faq-list { max-width: 800px; margin: 32px auto 0; }
.faq-item {
  background: white; border: 1px solid var(--border-light); border-radius: 10px;
  margin-bottom: 12px; overflow: hidden;
}
.faq-item summary {
  cursor: pointer; list-style: none; padding: 18px 20px;
  font-size: 15px; font-weight: 600; color: var(--primary);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 20px; font-weight: 400; color: var(--accent-dark); flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item .faq-answer { padding: 0 20px 18px; font-size: 14px; color: #555; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(135deg, var(--accent), var(--primary-light));
  padding: 48px 24px; text-align: center;
}
.cta-banner h2 { font-size: 26px; font-weight: 600; color: white; margin-bottom: 8px; }
.cta-banner p { font-size: 16px; color: rgba(255,255,255,0.9); margin-bottom: 20px; }
.cta-banner .btn { font-size: 15px; padding: 12px 32px; }

/* ---------- Testimonial ---------- */
.testimonial { background: var(--gray-bg); padding: 64px 24px; text-align: center; }
.testimonial-inner { max-width: 700px; margin: 0 auto; }
.testimonial-avatar {
  width: 80px; height: 80px; border-radius: 50%;
  object-fit: cover; margin: 0 auto 16px;
  border: 3px solid white; box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.testimonial blockquote { font-size: 18px; font-style: italic; color: var(--primary); line-height: 1.6; margin-bottom: 12px; }
.testimonial cite { font-size: 14px; color: #666; font-style: normal; font-weight: 500; }

/* ---------- Aseguradoras aliadas (partner strip) ---------- */
.partners { background: var(--gray-bg); padding: 40px 24px 32px; text-align: center; }
.partners h3 { font-size: 15px; font-weight: 600; color: var(--primary); margin-bottom: 24px; }
.partners-badges {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 14px;
  max-width: 900px; margin: 0 auto;
}
.partners-badges span {
  font-size: 13.5px; font-weight: 500; color: var(--primary);
  background: white; border: 1px solid var(--border-light);
  padding: 10px 20px; border-radius: 999px;
}
.scroll-indicator {
  display: flex; justify-content: center; margin-top: 26px; color: var(--accent-dark);
  animation: bounce 1.8s infinite;
}
@keyframes bounce { 0%,100%{transform:translateY(0);} 50%{transform:translateY(6px);} }

/* ---------- Únete al equipo (careers) ---------- */
.join-team { background: linear-gradient(135deg, #08182b, var(--primary)); color: white; padding: 64px 24px; }
.join-team-inner { max-width: 1200px; margin: 0 auto; }
.join-team-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; margin-top: 40px;
}
.join-team-points { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.join-team-points .point h4 { font-size: 15px; font-weight: 600; margin-bottom: 6px; color: var(--gold); }
.join-team-points .point p { font-size: 13.5px; color: rgba(255,255,255,0.8); }
.join-team img { width: 100%; height: 340px; object-fit: cover; border-radius: 12px; }

/* ---------- Newsletter ---------- */
.newsletter { background: white; padding: 56px 24px; text-align: center; border-top: 1px solid var(--border-light); }
.newsletter-inner { max-width: 560px; margin: 0 auto; }
.newsletter h2 { font-size: 24px; font-weight: 600; color: var(--primary); margin-bottom: 6px; }
.newsletter p { font-size: 14.5px; color: #666; margin-bottom: 22px; }
.newsletter-form { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.newsletter-form input {
  flex: 1; min-width: 220px; padding: 12px 16px; border-radius: 8px;
  border: 1.5px solid var(--border-light); font-family: inherit; font-size: 14px;
}
.newsletter-form input:focus { outline: none; border-color: var(--accent); }

/* ---------- Related services strip ---------- */
.related { background: white; border-top: 1px solid var(--border-light); }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 24px; }
.related-links a {
  font-size: 13.5px; padding: 9px 16px; border-radius: 999px;
  border: 1px solid var(--border-light); text-decoration: none; color: var(--primary);
  transition: all 0.2s;
}
.related-links a:hover, .related-links a.active { background: var(--primary); color: white; border-color: var(--primary); }

/* ---------- Contact form ---------- */
.contact-wrap {
  max-width: 1200px; margin: 0 auto; padding: 56px 24px 72px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 48px;
}
.contact-info h2 { font-size: 26px; color: var(--primary); font-weight: 600; margin-bottom: 14px; }
.contact-info p { font-size: 15px; color: #555; margin-bottom: 22px; }
.contact-detail { display: flex; gap: 14px; margin-bottom: 20px; align-items: flex-start; }
.contact-detail .icon {
  width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
  background: rgba(20,169,140,0.1); color: var(--accent-dark);
  display: flex; align-items: center; justify-content: center;
}
.contact-detail h5 { font-size: 14px; color: var(--primary); font-weight: 600; margin-bottom: 2px; }
.contact-detail p { font-size: 13.5px; color: #666; margin: 0; }
.license-badge {
  margin-top: 24px; padding: 16px 18px; border-radius: 10px;
  background: var(--gray-bg); border: 1px solid var(--border-light);
  font-size: 12.5px; color: #667;
}
.form-card {
  background: white; border: 1px solid var(--border-light); border-radius: 14px;
  padding: 32px; box-shadow: 0 12px 32px rgba(15,42,77,0.06);
}
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 13px; font-weight: 500; color: var(--primary); margin-bottom: 6px; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 11px 14px; border-radius: 8px;
  border: 1.5px solid var(--border-light); font-family: inherit; font-size: 14px;
  color: var(--text-dark);
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-row textarea { resize: vertical; min-height: 100px; }
.form-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ---------- Footer ---------- */
.footer { background: var(--primary); color: rgba(255,255,255,0.7); padding: 0 0 24px; }
.footer-top { background: #08182b; padding: 28px 24px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.footer-top-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px;
}
.footer-top-inner h3 { color: white; font-size: 19px; font-weight: 600; }
.social-links { display: flex; gap: 12px; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,0.08); color: white;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s;
}
.social-links a:hover { background: var(--accent); }
.footer-inner { max-width: 1200px; margin: 0 auto; padding: 48px 24px 0; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; }
.footer-brand .logo img { height: 52px; filter: brightness(0) invert(1); margin-bottom: 14px; }
.footer-brand p { font-size: 13px; line-height: 1.6; }
.footer-col h4 { color: white; font-size: 14px; font-weight: 600; margin-bottom: 14px; }
.footer-col a {
  display: block; color: rgba(255,255,255,0.6);
  text-decoration: none; font-size: 13px; margin-bottom: 8px;
  transition: color 0.2s;
}
.footer-col a:hover { color: white; }
.footer-bottom {
  max-width: 1200px; margin: 32px auto 0; padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px;
  text-align: left; font-size: 12px; color: rgba(255,255,255,0.4);
}
.footer-bottom .license { display: block; margin-top: 4px; }
.footer-legal-links { display: flex; gap: 18px; white-space: nowrap; }
.footer-legal-links a { color: rgba(255,255,255,0.55); text-decoration: none; }
.footer-legal-links a:hover { color: white; }
@media (max-width: 640px) { .footer-bottom { text-align: center; justify-content: center; } }

/* ---------- Reveal on scroll ---------- */
.reveal-on-scroll {
  opacity: 0; transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal-on-scroll { opacity: 1; transform: none; transition: none; }
  .hero { animation: none; }
  .hero-badge.float-a, .hero-badge.float-b { animation: none; }
  .scroll-indicator { animation: none; }
  .hero-video { display: none; }
}

@media (max-width: 900px) {
  .service-row, .service-row.reverse { grid-template-columns: 1fr; }
  .service-row img, .service-row.reverse img { order: 0; height: 200px; }
  .contact-wrap { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .header-inner { height: 76px; }
  .logo img { height: 52px; }
  .nav { display: none; }
  .hero-video, .hero-badges { display: none; }
  .hero h1 { font-size: 28px; }
  .service-hero-inner h1 { font-size: 27px; }
  .split, .split.reverse { grid-template-columns: 1fr; }
  .split.reverse > *:first-child { order: 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; }
  .hero-img { width: 100%; opacity: 0.15; }
  .form-two { grid-template-columns: 1fr; }
  .join-team-grid { grid-template-columns: 1fr; }
  .join-team-points { grid-template-columns: 1fr; }
}
