:root{
  --bg: #ffffff;
  --surface: #f5f8ff;
  --text: #0b1220;
  --muted: #4b5563;
  --line: rgba(15, 60, 140, .14);

  --blue: #0B4AA2;
  --blue2:#0E63D7;

  --radius: 18px;
  --shadow: 0 18px 45px rgba(2, 10, 30, .10);
  --shadow2: 0 10px 30px rgba(2, 10, 30, .08);

  --container: 1120px;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--text);
}

a{ color: inherit; text-decoration: none; }
img{ max-width:100%; height:auto; display:block; }

.container{
  width: min(var(--container), calc(100% - 32px));
  margin: 0 auto;
}

/* Header / Nav */
.site-header{
  position: sticky;
  top:0;
  z-index: 50;
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.navbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 14px 0;
  gap: 14px;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width: 220px;
}

.brand img{
  height: 42px;
  width:auto;
}

.brand .brand-meta{
  display:flex;
  flex-direction:column;
  line-height:1.1;
}

.brand .brand-meta strong{
  color: var(--blue);
  font-size: 14px;
  letter-spacing: .2px;
}

.brand .brand-meta span{
  color: var(--muted);
  font-size: 12px;
}

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

.nav a{
  padding: 10px 12px;
  border-radius: 12px;
  font-weight: 650;
  color: var(--blue);
}

.nav a:hover{ background: rgba(14,99,215,.08); }
.nav a.active{ background: rgba(11,74,162,.12); }

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

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 750;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: var(--shadow2);
  will-change: transform;
}

.btn.primary{
  background: linear-gradient(135deg, var(--blue), var(--blue2));
  border-color: transparent;
  color: #fff;
}

.btn:hover{ transform: translateY(-1px); }

.menu-btn{
  display:none; /* shown only on mobile */
  border: 1px solid var(--line);
  background:#fff;
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 800;
  color: var(--blue);
}

/* Mobile panel: hidden by default everywhere, shown only when .open */
#mobileNav{ display:none; }
#mobileNav.open{ display:block; }

/* Mobile nav panel styles */
.nav-panel{
  padding: 10px 0 16px;
}

.nav-panel a{
  display:block;
  padding: 12px 10px;
  border-radius: 12px;
  color: var(--blue);
  font-weight: 750;
}

.nav-panel a:hover{ background: rgba(14,99,215,.08); }

.nav-panel .panel-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  padding: 10px 0 0;
}

/* Responsive: header behavior */
@media (max-width: 900px){
  .nav, .actions{ display:none; }
  .menu-btn{ display:inline-flex; }
}

/* Hero */
.hero{
  position: relative;
  padding: 70px 0 44px;
  overflow:hidden;
}

.hero::before{
  content:"";
  position:absolute;
  inset: -120px -120px auto -120px;
  height: 520px;
  background:
    radial-gradient(800px 240px at 20% 10%, rgba(14,99,215,.20), transparent 60%),
    radial-gradient(600px 240px at 80% 0%, rgba(11,74,162,.18), transparent 60%),
    radial-gradient(800px 360px at 40% 60%, rgba(14,99,215,.10), transparent 55%);
  pointer-events:none;
}

.hero-grid{
  position:relative;
  display:grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 26px;
  align-items:center;
}

@media (max-width: 900px){
  .hero{ padding: 44px 0 30px; }
  .hero-grid{ grid-template-columns: 1fr; }
}

.kicker{
  display:inline-flex;
  align-items:center;
  gap:10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(11,74,162,.10);
  color: var(--blue);
  font-weight: 800;
  width: fit-content;
}

.hero h1{
  margin: 14px 0 10px;
  font-size: clamp(34px, 4vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.8px;
}

.hero p{
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
  max-width: 56ch;
}

.hero-ctas{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  margin-top: 14px;
}

.hero-card{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.hero-card .photo{
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid var(--line);
}

.hero-card .meta{
  margin-top: 14px;
  display:grid;
  gap: 10px;
}

.pills{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.pill{
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 750;
  color: var(--blue);
  font-size: 12px;
}

/* Sections */
.section{
  padding: 44px 0;
}

.section-title{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2{
  margin:0;
  font-size: 26px;
  letter-spacing: -0.3px;
}

.section-title p{
  margin:0;
  color: var(--muted);
  max-width: 56ch;
}

/* Features */
.grid3{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 900px){
  .grid3{ grid-template-columns: 1fr; }
}

.card{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:#fff;
  box-shadow: var(--shadow2);
  padding: 18px;
}

.card h3{ margin:0 0 8px; color: var(--blue); }
.card p{ margin:0; color: var(--muted); line-height:1.55; }

/* Brand strip */
.brand-strip{
  display:flex;
  gap: 14px;
  overflow:auto;
  padding: 14px 0 6px;
  scroll-snap-type:x mandatory;
}

.brand-logo{
  min-width: 160px;
  height: 80px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  display:flex;
  align-items:center;
  justify-content:center;
  padding: 12px;
  scroll-snap-align:start;
}

/* About page */
.about-grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 900px){
  .about-grid{ grid-template-columns: 1fr; }
}

.about-card h3{ margin:0 0 10px; color: var(--blue); }
.about-card p{ margin:0; color: var(--muted); line-height:1.6; }

.video-wrap{
  margin-top: 18px;
  border-radius: var(--radius);
  overflow:hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow2);
  background: #000;
}

.video-wrap video{ width:100%; height:auto; display:block; }

/* Portfolio */
.portfolio-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

@media (max-width: 1000px){
  .portfolio-grid{ grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px){
  .portfolio-grid{ grid-template-columns: 1fr; }
}

.brand-card{
  display:flex;
  flex-direction:column;
  gap: 12px;
}

.brand-card .logo{
  height: 80px;
  display:flex;
  align-items:center;
  justify-content:center;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}

.brand-card .logo img{ max-height: 60px; width:auto; }
.brand-card .desc{ color: var(--muted); line-height:1.55; margin:0; }
.brand-card .cta{ margin-top:auto; }

/* Footer */
.site-footer{
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 34px 0;
}

.footer-grid{
  display:grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 18px;
  align-items:start;
}

@media (max-width: 900px){
  .footer-grid{ grid-template-columns: 1fr; }
}

.footer-brand{
  display:flex;
  gap: 12px;
  align-items:flex-start;
}

.footer-brand img{ height: 44px; width:auto; }
.footer-brand strong{ color: var(--blue); display:block; margin-bottom: 6px; }
.footer-brand p{ margin:0; color: var(--muted); line-height:1.5; }

.footer-links{
  display:flex;
  gap: 12px;
  flex-wrap:wrap;
  align-items:center;
}

.footer-links a{
  font-weight: 750;
  color: var(--blue);
}

.social{
  display:flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap:wrap;
}

.social a{
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 8px 10px;
  font-weight: 800;
  color: var(--blue);
}

.small{
  margin-top: 16px;
  font-size: 12px;
  color: rgba(11,18,32,.65);
}

/* ===== Results bar ===== */
.results{
  padding: 0 0 34px;
}

.results-bar{
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: var(--shadow);
  background:
    linear-gradient(90deg, rgba(11,74,162,.92), rgba(14,99,215,.86)),
    url("./medi/bgposter.jpg");
  background-size: cover;
  background-position: center;
  padding: 20px 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.result{
  display:flex;
  align-items:center;
  gap: 14px;
  color: #fff;
  padding: 12px 10px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
}

.result-icon{
  font-size: 34px;
  line-height: 1;
  opacity: .95;
}

.result-num{
  font-size: clamp(30px, 3.6vw, 56px);
  font-weight: 900;
  letter-spacing: -1px;
}

.result-label{
  font-size: clamp(14px, 1.6vw, 20px);
  opacity: .92;
  font-weight: 700;
  margin-left: 8px;
}

@media (max-width: 900px){
  .results-bar{ grid-template-columns: 1fr; }
  .result-label{ margin-left: 0; }
  .result{ justify-content: flex-start; }
}

/* ===== Brands grid (big, readable logos) ===== */
.brands-grid{
  display:grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
}

@media (max-width: 1100px){
  .brands-grid{ grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 650px){
  .brands-grid{ grid-template-columns: repeat(2, 1fr); }
}

.brand-tile{
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow2);
  padding: 18px;
  min-height: 120px;
  display:flex;
  align-items:center;
  justify-content:center;
}

.brand-tile img{
  max-height: 72px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.brand-tile:hover{
  transform: translateY(-2px);
  border-color: rgba(14,99,215,.35);
}

/* ===== Google Map responsive embed ===== */
.map-embed{
  margin-top: 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #fff;
  aspect-ratio: 16 / 10;
}

.map-embed iframe{
  width: 100%;
  height: 100%;
  display: block;
}

/* ===== Centered Map Section ===== */
.section-map{
  padding-top: 0;
}

.map-center{
  max-width: 1000px;
  margin: 0 auto;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  aspect-ratio: 16 / 9;
  background: #fff;
}

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

/* ===== WhatsApp dropdown (header) ===== */
.wa-dropdown{ position: relative; }

.wa-menu{
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: none;
  z-index: 999;
}

.wa-menu.open{ display: block; }

.wa-item{
  display: block;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.wa-item:last-child{ border-bottom: 0; }

.wa-item:hover{ background: rgba(14,99,215,.06); }

.wa-title{
  display: block;
  font-weight: 850;
  color: var(--blue);
}

.wa-sub{
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

/* ===== Contact cards (Nosotros) – UPDATED ===== */
.contact-grid{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;                    /* more breathing room */
}

@media (max-width: 1000px){
  .contact-grid{ grid-template-columns: repeat(2, 1fr); }
}

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

.contact-card{
  text-decoration: none;
  color: inherit;
  display:flex;
  align-items:center;
  gap: 18px;
  padding: 20px;
  border-radius: var(--radius);
  transition: transform .2s ease, box-shadow .2s ease;
}

.contact-card:hover{
  transform: translateY(-2px);
  box-shadow: var(--shadow2);
}

/* 🔹 Bigger avatar */
.contact-avatar{
  width: 96px;                  /* increased */
  height: 96px;
  border-radius: 999px;
  overflow: hidden;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: #fff;
}

.contact-avatar img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display:block;
}

/* 🔹 Text scaled to match avatar */
.contact-meta strong{
  display:block;
  color: var(--blue);
  font-size: 17px;
  font-weight: 800;
}

.contact-meta span{
  display:block;
  color: var(--muted);
  font-weight: 650;
  font-size: 14px;
  margin-top: 2px;
}

.contact-meta em{
  display:block;
  font-style: normal;
  color: rgba(11,18,32,.65);
  font-size: 13px;
  margin-top: 4px;
}

/* Mobile sizing */
@media (max-width: 650px){
  .contact-avatar{
    width: 80px;
    height: 80px;
  }
}

/* WhatsApp dropdown – forced behavior */
.wa-dropdown{ position: relative !important; }

.wa-menu{
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 10px) !important;
  width: min(420px, calc(100vw - 24px)) !important;
  background: #fff !important;
  border: 1px solid var(--line) !important;
  border-radius: 16px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
  display: none !important;
  z-index: 9999 !important;
}

.wa-menu.open{ display: block !important; }

.wa-item{
  display: block !important;
  padding: 12px 14px !important;
  border-bottom: 1px solid var(--line) !important;
}

.wa-item:last-child{ border-bottom: 0 !important; }
.wa-item:hover{ background: rgba(14,99,215,.06) !important; }

.wa-title{
  display:block !important;
  font-weight: 850 !important;
  color: var(--blue) !important;
}

.wa-sub{
  display:block !important;
  margin-top: 2px !important;
  color: var(--muted) !important;
  font-size: 13px !important;
  font-weight: 650 !important;
}