/* Reset y base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

html { 
  scroll-behavior: smooth; 
  /* Tipografía fluida */
  font-size: clamp(14px, 0.9vw + 10px, 16px);
}

body {
  background: linear-gradient(90deg, #27c3dd, #0a48b4);
  color: #fff;
  overflow-x: hidden;
}

/* Contenedor global opcional para centrar contenido ancho */
.container {
  width: min(1200px, 100% - 32px);
  margin-inline: auto;
}

/* HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  position: fixed;
  inset-inline: 0;
  top: 0;
  width: 100%;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(8px);
  z-index: 1000;
  transition: all 0.3s ease;
}

header img {
  height: clamp(32px, 3.2vw, 45px);
}

nav {
  display: flex;
  gap: clamp(12px, 2vw, 20px);
}

nav a {
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

nav a:hover {
  text-decoration: underline;
  color: #27c3dd;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.menu-toggle span {
  width: 25px;
  height: 3px;
  background: #fff;
  transition: all 0.3s ease;
}

/* Menú móvil accesible y animable */
.mobile-menu {
  position: fixed;
  top: calc(56px + 8px);
  left: 0;
  width: 100%;
  background: rgba(0,0,0,0.9);
  backdrop-filter: blur(10px);
  padding: 20px;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity .2s ease, transform .2s ease, visibility 0s .2s;
}

.mobile-menu.active {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  transition: opacity .2s ease, transform .2s ease;
}

.mobile-menu a {
  display: block;
  color: #fff;
  text-decoration: none;
  padding: 15px 0;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  font-weight: 500;
}

/* Secciones */
section {
  min-height: 89.5dvh;
  padding: clamp(72px, 12vw, 120px) clamp(16px, 4vw, 80px);
  /* compensar header fijo en anclas */
  scroll-margin-top: 76px;
}

/* === Ajustes solicitados === */
/* Altura del header para compensar en el primer bloque */
:root{
  --header-h: 64px; /* ajústalo según tu header */
}
@media (max-width: 768px){
  :root{ --header-h: 56px; }
}
/* Empujar hero inicial para que el círculo no quede bajo el header */
.hero2{
  padding-top: calc(var(--header-h) + 24px);
  scroll-margin-top: calc(var(--header-h) + 8px);
}
/* Microajuste del círculo (opcional) */
.circle-container2{
  margin-top: 8px;
}
/* Reducir espacio antes del video */
.video-section{
  padding-top: clamp(8px, 2vw, 16px) !important;
  padding-bottom: clamp(12px, 3vw, 24px) !important;
  margin-top: 0 !important;
}
.hero,
.hero2,
.section,
.redes{
  padding-bottom: clamp(12px, 3vw, 28px);
}
.hero-right2 p,
.content p{
  margin-bottom: clamp(12px, 2.5vw, 18px);
}
.video-container{
  margin-top: 8px;
  margin-bottom: 8px;
}
/* === Fin ajustes solicitados === */

/* HOME HERO */
.hero2 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: clamp(24px, 5vw, 60px) clamp(16px, 4vw, 40px);
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 40px);
}

.hero-left2 {
  flex: 1 1 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  min-width: 280px;
}

.circle-container2 { position: relative; display: inline-block; }

.circle-img2 {
  width: min(450px, 80vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 8px solid #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

.circle-img2 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.logo-badge2 {
  position: absolute;
  bottom: 10px;
  left: 10px;
  background: #fff;
  border-radius: 50%;
  padding: 8px;
  box-shadow: 0px 4px 12px rgba(0,0,0,0.3);
  width: clamp(60px, 12vw, 96px);
  height: clamp(60px, 12vw, 96px);
  display: grid;
  place-items: center;
  overflow: hidden;
}

.logo-badge2 img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.hero-right2 {
  flex: 1 1 320px;
  padding-left: clamp(0px, 2vw, 40px);
  text-align: left;
  min-width: 280px;
}

.hero-right2 .tag2 {
  display: inline-block;
  background: #fff;
  color: #0a48b4;
  font-weight: 700;
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  padding: 8px 24px;
  border-radius: 12px;
  margin-bottom: 20px;
  text-align: center;
}

.hero-right2 h1 {
  font-size: clamp(2rem, 4.2vw, 3.5rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 20px;
}

.hero-right2 p {
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  margin-bottom: 30px;
  line-height: 1.5;
}

.btn2 {
  background: #a64000;
  color: #fff;
  font-weight: 600;
  padding: 14px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  display: inline-block;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.btn2:hover { background: #7a2e00; transform: translateY(-2px); }

/* CONOZCAMOS SECTION */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: clamp(24px, 4vw, 50px);
  padding: clamp(24px, 5vw, 60px) clamp(16px, 4vw, 40px);
}
.hero-left {
  flex: 1 1 320px;
  display: flex; flex-direction: column; align-items: center; position: relative; min-width: 280px;
}
.hero-left h1 {
  font-size: clamp(2rem, 4.6vw, 3.8rem);
  font-weight: 700;
  margin-bottom: 15px;
  line-height: 1.2;
  text-shadow: 0 2px 6px rgba(0,0,0,0.2);
  text-align: center;
}
.hero-left p {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
  margin-bottom: 20px;
  color: #e9f7ff;
  max-width: 600px;
  text-align: justify;
}
.hero-right { flex: 1 1 320px; display: grid; place-items: center; min-width: 280px; }

.circle-img {
  width: min(550px, 80vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  background: #fff;
  padding: 8px;
  overflow: hidden;
  display: grid;
  place-items: center;
  box-shadow: 0px 6px 20px rgba(0,0,0,0.25);
}
.circle-img img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 0%; border-radius: 50%;
}

/* VIDEO SECTION */
.video-section {
  min-height: auto !important;
  height: auto !important;
  text-align: center;
  padding: clamp(16px, 4vw, 40px) 20px;
}
.video-container {
  position: relative;
  width: min(900px, 100%);
  margin: 0 auto;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}
.video-container::before {
  content: "";
  display: block;
  padding-top: 56.25%;
}
.video-el {
  position:absolute; inset:0; width:100%; height:100%;
  object-fit: cover; background:#000; display:block; border:0;
}

/* PROYECTOS SECTION */
.section {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 5vw, 60px) clamp(16px, 4vw, 40px);
  gap: clamp(24px, 5vw, 60px);
  flex-wrap: wrap;
  max-width: 1200px;
  margin: 0 auto;
}
.content { flex: 1 1 320px; max-width: 560px; min-width: 280px; }
.content h2 { font-size: clamp(1.8rem, 3.2vw, 2.5rem); font-weight: 700; margin-bottom: 20px; line-height: 1.2; }
.content p { font-size: 1rem; line-height: 1.6; margin: 20px 0; text-align: justify; font-size: 20px;}


/* REDES SOCIALES */
.redes { text-align: center; padding: clamp(40px, 7vw, 80px) 20px; }
.redes h1 { font-size: clamp(1.8rem, 4vw, 2.8rem); font-weight: 700; margin-bottom: 20px; }
.redes h3 {
  font-size: clamp(1rem, 1.4vw, 1.1rem);
  margin-bottom: 40px; max-width: 800px; margin-inline: auto; line-height: 1.5;
}
.packages {
  display: flex; justify-content: center; gap: clamp(16px, 3vw, 30px); flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
}
.card {
  background: rgba(255, 255, 255, 0.1);
  padding: 30px 20px;
  border-radius: 15px;
  width: min(300px, 88vw);
  text-align: center;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(10px);
}
.card:hover { transform: translateY(-10px); box-shadow: 0 10px 25px rgba(0,0,0,0.3); }
.card h2 {
  background: #fff; color: #0a48b4; font-size: 1.3rem; font-weight: 700; padding: 10px 15px;
  border-radius: 10px; display: inline-block; margin-bottom: 25px;
}
.card:nth-child(2) h2 { color: #0277bd; }
.card:nth-child(3) h2 { background: linear-gradient(90deg, #0dd1d1, #0071eb); color: #fff; }
.card p {
  margin: 15px 0; font-weight: 500; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,0.4); padding-bottom: 10px;
}
.price { font-size: 1.5rem; font-weight: 700; margin: 20px 0; }
.card .desc {
  font-size: 0.9rem; color: rgba(255,255,255,0.9); line-height: 1.4rem; margin-top: 20px; text-align: left;
}

/* CONSULTORÍAS */
.consultorias {
  position: relative;
  padding: clamp(24px, 5vw, 60px) clamp(16px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  max-width: 1400px;
  margin: 0 auto;
  min-height: 90vh;
}
.consultorias .left-visual {
  position: relative;
  min-height: clamp(360px, 40vw, 520px);
  display: grid; place-items: center;
  padding: clamp(4px, 1.5vw, 12px);
}
.consultorias .circle {
  position: absolute;
  display: grid; place-items: center;
  border-radius: 50%;
  padding: 8px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
  width: clamp(160px, 22vw, 260px);
  height: clamp(160px, 22vw, 260px);
}
.consultorias .circle.one { top: 0; right: 0; }
.consultorias .circle.two { bottom: 0; left: 0; }
.consultorias .circle::before {
  content: ""; position: absolute; inset: -12px; border-radius: 50%; border: 6px solid rgba(255, 255, 255, 0.9);
}
.consultorias .circle-inner {
  position: relative; width: 100%; height: 100%;
  border-radius: 50%; border: 8px solid #fff; overflow: hidden; background: #0b1f2a;
}
.consultorias .circle-inner img {
  position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%;
  opacity: 0; transition: opacity .6s ease;
}
#circle1 img { object-fit: contain; background: #fff; }
#circle2 img { object-fit: contain; background: #fff; }
.consultorias .circle-inner img.show { opacity: 1; }

.consultorias .stat-block {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  text-align: center; background: rgba(0,0,0,0.8); padding: clamp(12px, 2vw, 20px);
  border-radius: 15px; backdrop-filter: blur(10px);
}
.consultorias .stat-block .num { font-size: clamp(1.4rem, 2.8vw, 2rem); font-weight: 800; }
.consultorias .stat-block .label { font-weight: 600; line-height: 1.25; font-size: clamp(.8rem, 1.4vw, .95rem); }

.consultorias .right-copy { padding: 0; }
.consultorias .headline {
  font-size: clamp(1.8rem, 3.8vw, 3.2rem);
  font-weight: 800; line-height: 1.1; margin-bottom: 20px;
}
.consultorias .lead {
  color: #d8f2ff; font-size: clamp(.95rem, 1.5vw, 1.05rem);
  line-height: 1.6; margin-bottom: 30px; text-align: justify;
}
.consultorias .cta {
  display: inline-block; background: #a64000; color: #fff; padding: 14px 24px; font-weight: 700; border-radius: 12px;
  cursor: pointer; text-decoration: none; box-shadow: 0 6px 14px rgba(0,0,0,.18); transition: all .25s ease; font-size: 1.1rem;
}
.consultorias .cta:hover { background: #7a2e00; transform: translateY(-2px); }

.list {
  margin: 0.75rem 0 0; 
  padding-left: 1.25rem;  /* sangría para bullets */
  font-size: 1rem;
  line-height: 2.8;
  color: #e8f3ff;         /* ajusta al color de tu texto */
}
.list li {
  margin-bottom: 0.25rem;
}

/* CONTACTO */
.contact-section {
  display: flex; align-items: center; justify-content: space-between;
  padding: clamp(32px, 6vw, 80px) clamp(16px, 4vw, 40px);
  flex-wrap: wrap; gap: 40px; max-width: 1200px; margin: 0 auto; min-height: 70dvh;
}
.contact-left { flex: 1 1 320px; min-width: 280px; }
.contact-left h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); font-weight: 700; margin-bottom: 20px; line-height: 1.2; }
.contact-left p { font-size: clamp(1rem, 1.5vw, 1.1rem); margin-top: 20px; opacity: 0.9; line-height: 1.6; text-align: justify; }
.contact-left .btn {
  background: #0a48b4; color: #fff; font-weight: 600; padding: 14px 28px; border-radius: 8px; border: none; cursor: pointer;
  text-decoration: none; font-size: 1.1rem; transition: all 0.3s ease; display: inline-block; margin-top: 20px; margin-bottom: 20px;
}
.contact-left .btn:hover {
  background: #fff; color: #0a48b4; transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}
.contact-right { flex: 1 1 320px; display: grid; place-items: center; min-width: 280px; }
.contact-right .circle-img {
  width: min(360px, 70vw);
  aspect-ratio: 1/1;
  border-radius: 50%;
  border: 8px solid #fff;
  overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.contact-right .circle-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }

/* Carrusel continuo de logos */
.logos-strip {
  max-width: 100%; width: min(1200px, 100%); margin: 16px auto;
  padding: 10px 0 !important; border-radius: 10px; box-shadow: 0 6px 14px rgba(0,0,0,.12);
  overflow: hidden; background: #fff; min-height: auto !important; height: auto !important;
}
.logos-track {
  display: flex; width: max-content;
  animation: logos-scroll 30s linear infinite;
}
.logos-group {
  display: flex; gap: 24px !important; align-items: center; padding: 0 16px !important;
}
.logos-group img {
  height: clamp(34px, 6vw, 66px);
  width: auto; display: block; filter: none; opacity: .95;
  transition: transform .2s ease, opacity .2s ease, filter .2s ease;
}
.logos-group img:hover { transform: translateY(-2px) scale(1.04); opacity: 1; }

/* TEAM */
section.team {
  min-height: unset;
  height: auto;
  padding-bottom: clamp(16px, 4vw, 36px);
}
.team { padding: clamp(24px, 5vw, 48px) 20px; }
.team-wrap { width: min(1200px, 100% - 32px); margin: 0 auto; }

.team-avatars {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: clamp(16px, 3vw, 32px);
  justify-items: center;
}
@media (max-width: 980px) {
  .team-avatars { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .team-avatars { grid-template-columns: 1fr; gap: 14px; }
}

.t-avatar{ appearance:none; background:transparent; border:0; cursor:pointer; text-align:center; }
.t-frame{
  position: relative; width: min(340px, 60vw); aspect-ratio: 3/4; border-radius: 18px; padding: 8px;
  background: linear-gradient(135deg,#2fd0e0,#0b5bc9); box-shadow: 0 14px 28px rgba(0,0,0,.18); display:block;
}
.t-frame::after{ content:""; position:absolute; inset:2px; border-radius:14px;
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(255,255,255,.9)); }
.t-frame img{
  position:relative; z-index:1; width:100%; height:100%; border-radius:12px; object-fit:cover;
  transition: transform .25s ease, filter .25s ease, opacity .25s ease;
}
.t-name{ display:block; margin-top:10px; color:#eaf4ff; font-weight:700; text-shadow:0 1px 2px rgba(0,0,0,.25); font-size: 17px;}
.t-avatar:not(.is-active) img{ filter: grayscale(100%) contrast(.9); opacity:.6; }
.t-avatar.is-active img{ filter:none; opacity:1; transform: translateY(-1px) scale(1.01); }

.t-panel{
  position: relative; margin-top: clamp(14px, 3vw, 24px); display: grid; place-items: center;
  min-height: 0; overflow: clip; max-height: 0; transition: max-height .3s ease;
}
.t-panel-inner{
  max-width: min(980px, 92%); background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.86));
  backdrop-filter: blur(6px); color:#0a2c5f; border-radius: 16px; padding: clamp(16px, 3vw, 24px);
  box-shadow: 0 16px 36px rgba(0,0,0,.18);
  opacity: 0; transform: translateY(8px) scale(.98); transition: opacity .28s, transform .28s;
}
.t-panel.show { max-height: 1000px; }
.t-panel.show .t-panel-inner{ opacity:1; transform: translateY(0) scale(1); }

.t-pointer{
  position: absolute; top: -10px; width: 18px; height: 18px; background: rgba(255,255,255,.92);
  transform: rotate(45deg); border-radius: 3px; box-shadow: 0 8px 18px rgba(0,0,0,.15);
  opacity: 0; transition: opacity .28s ease, left .28s ease;
}
.t-panel.show .t-pointer{ opacity:1; }

.t-role{ color:#0b5bc9; font-weight:700; margin-bottom: 8px; }
.t-points{
  display: grid; gap: 8px; margin-top: 10px;
  grid-template-columns: repeat(2, minmax(200px,1fr));
}
@media (max-width: 980px){ .t-points{ grid-template-columns: 1fr; } }
.t-points li{ position:relative; padding-left: 18px; }
.t-points li::before{ content:"•"; position:absolute; left:0; color:#0b5bc9; font-weight:900; }
.t-body p{ margin: 10px 0; color: #113a72; }
.t-body p + p{ margin-top: 12px; }

/* Título/subtítulo Team */
.team-title-ref, .team-subtitle-ref{ display: block; margin-inline: auto; text-align: center; }
.team-title-ref{ font-size: clamp(32px, 6vw, 80px); max-width: min(900px, 92%); }
.team-subtitle-ref{ font-size: clamp(16px, 2.4vw, 20px); max-width: min(900px, 92%); margin-bottom: clamp(16px, 3vw, 28px); }

/* Servicios */
.services-stack{ display: flex; flex-direction: column; gap: clamp(18px, 2.6vw, 28px); }
.service-card{
  position: relative; display: block; width: min(560px, 100%); height: clamp(72px, 12vw, 155px); border-radius: 18px; overflow: hidden;
  text-decoration: none; box-shadow: 0 10px 24px rgba(0,0,0,.22); background: #0e5f83; transition: transform .16s ease, box-shadow .16s ease;
}
.service-bg{
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: grayscale(.1) saturate(.9) brightness(.9); transform: scale(1.02); transition: transform .25s ease, filter .25s ease;
}
.service-card::after{ content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.42)); }
.service-label{
  position: relative; z-index: 1; color: #eaf4ff; font-weight: 700; letter-spacing: .3px;
  font-size: clamp(14px, 1.2vw + 10px, 18px); line-height: 1; padding: 18px 24px; display: inline-block; text-transform: uppercase; text-shadow: 0 2px 8px rgba(0,0,0,.35);
}
.service-card:hover .service-bg{ transform: scale(1.06); filter: brightness(.95); }
.service-card:hover{ box-shadow: 0 14px 30px rgba(0,0,0,.28); }

/* Footer full-width */
.site-footer{
  margin-top: 80px; width: 100%;
  background: linear-gradient(90deg, #0e99b5 0%, #0b5bc9 100%);
  color: #fff;
}
.site-footer .footer-inner{
  max-width: 1200px; margin: 0 auto; padding: 18px 16px;
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 24px;
}
.footer-nav{
  display: flex; flex-wrap: wrap; align-items: center; gap: 22px 30px;
}
.footer-nav a{
  color: rgba(255,255,255,.95); text-decoration: none; font-weight: 600; letter-spacing: .04em; font-size: 13px; transition: opacity .2s ease;
}
.footer-nav a:hover{ opacity: 1; }
.footer-social{ display: flex; gap: 12px; }
.footer-social .social{
  width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; text-decoration: none; background: rgba(255,255,255,.12); backdrop-filter: blur(2px);
  transition: transform .15s ease, background .2s ease, box-shadow .15s ease; box-shadow: 0 6px 16px rgba(0,0,0,.18);
}
.footer-social .social svg{ width: 20px; height: 20px; }
.footer-social .social:hover{ transform: translateY(-2px); background: rgba(255,255,255,.2); }
.footer-bottom{
  width: 100%; border-top: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85);
}
.footer-bottom .inner{
  max-width: 1200px; margin: 0 auto; padding: 12px 16px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.footer-bottom .brand{ height: 26px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); opacity: .95; }

@media (max-width: 760px){
  .site-footer .footer-inner{ grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 14px; }
  .footer-nav{ justify-content: center; gap: 14px 18px; }
  .footer-bottom .inner{ flex-direction: column; }
}

/* Animación logos */
@keyframes logos-scroll{
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}
.logos-strip:hover .logos-track{ animation-play-state: paused; }
@media (max-width: 600px){
  .logos-strip{ border-radius: 10px; padding: 10px 0; }
  .logos-group{ gap: clamp(20px, 8vw, 40px); padding: 6px 16px; }
}

/* BREAKPOINTS Y TWEAKS RESPONSIVE */

/* <= 980px */
@media (max-width: 980px){
  nav { display: none; }
  .menu-toggle { display: flex; }
}

/* <= 768px */
@media (max-width: 768px) {
  header { padding: 10px 16px; }
  .mobile-menu { top: calc(52px + 8px); }

  /* Hero home */
  .hero2 { flex-direction: column; text-align: center; padding: 30px 20px; gap: 30px; }
  .hero-right2 { padding-left: 0; text-align: center; }
  .hero-right2 .tag2 { font-size: 1.5rem; padding: 6px 20px; }
  .circle-img2 { width: min(360px, 82vw); }

  /* Conozcamos */
  .hero { flex-direction: column; text-align: center; padding: 40px 20px; gap: 30px; }

  /* Proyectos */
  .section { flex-direction: column; text-align: center; padding: 40px 20px; gap: 40px; }

  /* Redes */
  .packages { gap: 20px; }
  .card { width: min(300px, 88vw); padding: 25px 15px; }

  /* Consultorías */
  .consultorias { grid-template-columns: 1fr; padding: 40px 20px; gap: 40px; }
  .consultorias .right-copy { text-align: center; }
  .consultorias .left-visual { min-height: clamp(320px, 50vw, 420px); }

  /* Contacto */
  .contact-section { flex-direction: column; text-align: center; padding: 40px 20px; gap: 30px; }
}

/* <= 480px */
@media (max-width: 480px) {
  header { padding: 10px 12px; }
  header img { height: 30px; }
  .mobile-menu { top: calc(48px + 8px); padding: 15px; }
  .mobile-menu a { padding: 12px 0; font-size: 0.95rem; }

  section { padding: clamp(56px, 12vw, 60px) 15px; }

  .hero2 { padding: 20px 15px; }
  .hero-right2 .tag2 { font-size: 1.3rem; padding: 5px 16px; }
  .hero-right2 h1 { font-size: 2.2rem; }
  .hero-right2 p { font-size: 1rem; }
  .circle-img2 { width: min(280px, 80vw); border-width: 6px; }
  .btn2 { font-size: 1rem; padding: 12px 24px; }

  .hero { padding: 30px 15px; }
  .hero-left h1 { font-size: 2.2rem; }
  .hero-left p { font-size: 1rem; }
  .circle-img { width: min(280px, 80vw); }

  .video-section { padding: 40px 15px; }
  .video-container iframe { height: 200px; }

  .section { padding: 30px 15px; }
  .content h2 { font-size: 1.8rem; }
  .content p { font-size: 0.95rem; }

  .redes { padding: 60px 15px; }
  .redes h1 { font-size: 1.9rem; }
  .redes h3 { font-size: 0.95rem; }
  .card { width: min(280px, 90vw); padding: 20px 15px; }
  .card h2 { font-size: 1.2rem; padding: 8px 12px; }
  .card p { font-size: 0.9rem; }
  .price { font-size: 1.3rem; }
  .card .desc { font-size: 0.85rem; }

  .consultorias { padding: 30px 15px; }
  .consultorias .headline { font-size: 2rem; }
  .consultorias .lead { font-size: 0.95rem; }
  .consultorias .left-visual { min-height: 300px; }
  .consultorias .circle { width: 150px; height: 150px; }
  .consultorias .stat-block { padding: 12px; }
  .consultorias .stat-block .num { font-size: 1.5rem; }
  .consultorias .stat-block .label { font-size: 0.8rem; }
  .consultorias .cta { font-size: 1rem; padding: 12px 20px; }

  .contact-section { padding: 30px 15px; }
  .contact-left h2 { font-size: 1.9rem; }
  .contact-left p { font-size: 1rem; }
  .contact-left .btn { font-size: 1rem; padding: 12px 24px; }
  .contact-right .circle-img { width: min(240px, 80vw); border-width: 6px; }
}

/* <= 360px extra small */
@media (max-width: 360px) {
  .hero-right2 h1 { font-size: 1.9rem; }
  .circle-img2 { width: min(200px, 82vw); }
  .hero-left h1 { font-size: 1.8rem; }
  .circle-img { width: min(200px, 82vw); }
  .content h2 { font-size: 1.6rem; }
  .redes h1 { font-size: 1.7rem; }
  .card { width: min(240px, 92vw); }
  .consultorias .headline { font-size: 1.8rem; }
  .contact-left h2 { font-size: 1.7rem; }
  .contact-right .circle-img { width: min(180px, 82vw); }
}

/* 0) Variable de altura real del header (ajusta si cambia) */
:root{ --header-h: 72px; }          /* móvil */
@media (min-width: 768px){
  :root{ --header-h: 80px; }        /* tablet/desktop */
}

/* 1) Reserva un spacer inmediatamente después del header fijo
   Añade este div justo después de <header> en tu HTML:
   <div class="header-spacer" aria-hidden="true"></div>
*/
.header-spacer{
  height: var(--header-h);
}

/* 2) Asegura que el primer bloque (donde está el círculo) empieza
      por debajo del header, aunque no puedas añadir el spacer */
main > section:first-child,
section#home,
.hero2{
  margin-top: max(var(--header-h), 56px) !important;
}

/* 3) Si el círculo está absolutamente posicionado dentro del hero, 
      forzamos un offset adicional en móvil para despegarlo */
@media (max-width: 768px){
  .circle-container2{
    margin-top: clamp(8px, 2.5vw, 16px) !important;
  }
}

/* 4) Reduce aún más el espacio antes del video */
.video-section{
  padding-top: clamp(4px, 1.5vw, 10px) !important;
  padding-bottom: clamp(10px, 2.5vw, 18px) !important;
  margin-top: 0 !important;
}


/* 5) El bloque inmediatamente anterior al video suele ser .section o .hero:
      recorta su padding-bottom y el margin-bottom de su último párrafo */
.section:last-of-type,
.hero:last-of-type,
.hero2:last-of-type{
  padding-bottom: clamp(8px, 2vw, 16px) !important;
}
.section p:last-child,
.hero p:last-child,
.hero-right2 p:last-child{
  margin-bottom: clamp(8px, 1.8vw, 14px) !important;
}

/* 6) Evita que el header cubra anclas al navegar */
section, [id]{
  scroll-margin-top: calc(var(--header-h) + 8px);
}

/* Video: tamaños consistentes y más grandes */

/* Contenedor responsivo con máximos cómodos */


/* El elemento de video/iframe rellena el contenedor */
.video-el,
.video-container iframe,
.video-container video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  border:0;
  background:#000;
  object-fit: cover; /* usa contain si no quieres recorte */
}

/* Aumentar el tamaño en móvil: casi ancho completo */
@media (max-width: 480px){
  .video-section{ padding-left: 0; padding-right: 0; }
  .video-container{
    width: min(100%, 440px);       /* más ancho en pantallas chicas */
    border-radius: 16px;
  }
}

/* Tablets */
@media (min-width: 481px) and (max-width: 768px){
  .video-container{
    width: min(680px, 92vw);       /* ensancha en tablet */
  }
}

/* Desktop amplio */
@media (min-width: 769px){
  .video-container{
    width: min(980px, 94vw);       /* más grande en desktop */
  }
}

/* Opcional: si el player es muy bajito por controles nativos iOS,
   fuerza un mínimo de altura visual agradable sin romper 16:9 */
@supports not (aspect-ratio: 16/9){
  /* ya usamos el ::before, así que no es necesario */
}

/* Si prefieres que no recorte el video, cambia a contain: */
/*
.video-el,
.video-container iframe,
.video-container video{ object-fit: contain; background:#000; }
*/

/* Desktop: control fino del tamaño del video cuando está junto al texto */
@media (min-width: 1024px){
  /* Si el bloque es una fila 2 columnas (texto + video) */
  .video-row,             /* usa esta clase si tienes un wrapper para la fila */
  .section, 
  .video-section{
    display: grid;
    grid-template-columns: 1fr 1.1fr; /* texto | video (ajusta 1fr 1fr si quieres igual) */
    align-items: start;
    gap: clamp(24px, 3vw, 40px);
  }

  /* Caja del video: limita ancho y centra */
  .video-container{
    width: 100%;
    max-width: 820px;     /* límite cómodo en desktop */
    justify-self: center; /* centra en su columna */
    border-radius: 18px;
  }

  /* Si el video crece fuera del viewport, evita overflow */
  .video-section{
    overflow: visible;
  }
}

/* Desktop amplio: afina límites para pantallas grandes */
@media (min-width: 1366px){
  .video-container{
    max-width: 900px;     /* sube el límite en 1440p si deseas */
  }
}

/* Tablet y menores: el video ocupa casi todo el ancho (ya te iba bien) */
@media (max-width: 1023px){
  .video-section{
    display: block;       /* vuelve al flujo normal en mobile/tablet */
  }
  .video-container{
    width: min(92vw, 680px);
    max-width: 100%;
  }
}

/* Si prefieres controlar por clase específica de columna de video, usa esta opción:
   Añade .video-col al contenedor directo del video y limita su ancho solo ahí. */
/*
@media (min-width: 1024px){
  .video-col .video-container{
    width: 100%;
    max-width: 820px;
  }
}
*/

@media (max-width: 768px){
  .team-avatars{
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
  }
  /* Cuando el panel se inserta debajo del avatar, dale margen */
  .t-avatar + .t-panel{
    margin-top: 10px;
  }
  /* La punta no se usa en mobile; si prefieres, escóndela del todo */
  .t-panel .t-pointer{ display: none; }
}

/* Escritorio: recuadros a la izquierda y texto a la derecha (como ya lo tienes) */
/* ... tu CSS actual ... */

/* Móvil: texto primero, recuadros después */
@media (max-width: 768px) {
  #proyectos.section,
  #proyectos {
    display: flex;
    flex-direction: column;
  }

  /* fuerza el orden: texto arriba (1), recuadros abajo (2) */
  #proyectos .content {
    order: 1;
    margin-bottom: 1.25rem; /* espacio opcional */
  }
  #proyectos .services-stack {
    order: 2;
  }

  /* Si los recuadros desbordan, que ocupen 100% */
  #proyectos .services-stack .service-card {
    width: 100%;
  }
}