@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap");

:root{
  --accent: #ffb742;
  --bg: #000;
  --card: #1c1c1c;
  --text: #fff;
  --muted: rgba(255,255,255,.78);
  --border: rgba(255,255,255,.12);

  /* Navbar height (se ajusta en responsive) */
  --nav-h: 90px;

  /* paddings fluidos */
  --pad-x: clamp(14px, 4vw, 50px);
  --pad-section-y: clamp(64px, 7vw, 110px);
}

*,
*::before,
*::after{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body{
  font-family: "Poppins", sans-serif;
}


html{
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
}

html, body{
  overflow-x: hidden;
  max-width: 100%;
}

body{
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  padding-top: 0;
}

/* Evita desbordes raros en mobile */
img{
  max-width: 100%;
  height: auto;
  display: block;
}

/* Fix Boxicons: no dejar que el reset pise la fuente de los íconos */
i.bx, .bx,
i.bx::before, .bx::before,
i.bx::after, .bx::after{
  font-family: "boxicons";
  font-style: normal;
  font-weight: normal;
  speak: none;
  line-height: 1;
}


/* =========================
   LINKS / CTAs (sin subrayado)
========================= */
a{
  color: inherit;
  text-decoration: none;
}

/* =========================
   NAVBAR
========================= */
.navbar{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;

  /* anti-overflow */
  max-width: 100vw;
  overflow-x: clip;

  display: flex;
  justify-content: space-between;
  align-items: center;

  min-height: var(--nav-h);
  padding: 22px var(--pad-x);
  z-index: 1000;
}

/* Links desktop */
.nav-links{
  display: flex;
  align-items: center;
  gap: 25px;
}
.nav-links li{ list-style: none; }

.nav-links li a{
  color: #fff;
  font-size: 16px;
  transition: color .25s ease;
  display: inline-block;
  position: relative;
  padding-bottom: 8px;
}
.nav-links li a:hover{ color: var(--accent); }

/* CTA + logo mobile */
.nav-cta{
  display: flex;
  align-items: center;
  gap: 12px;

  /* clave en flex: permite que el contenido NO empuje el ancho */
  min-width: 0;
}

.nav-logo{
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 0;
  min-width: 0;
}
.nav-logo img{
  width: 64px;
  height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(0,0,0,.6));
}

/* Botón común */
.hire-btn{
  display: inline-flex;
  align-items: center;
  text-align: center;
  justify-content: center;
  gap: 10px;

  background: rgba(255,255,255,.08);
  color: #fff;

  padding: 10px 14px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 10px;

  font-size: 16px;
  cursor: pointer;
  transition: background .25s ease, border-color .25s ease, transform .2s ease;
}
.hire-btn:hover{
  background: rgba(255,183,66,.16);
  border-color: rgba(255,183,66,.35);
  transform: translateY(-1px);
}

/* Menú mobile */
.menu-icon{
  display: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  background: transparent;
  border: none;

  /* no permitir que “crezca” en flex */
  flex: 0 0 auto;
}

/* =========================
   OVERLAY + SLIDEBAR
========================= */
.page-overlay{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
  z-index: 1200;
}
.page-overlay.active{
  opacity: 1;
  pointer-events: auto;
}

.slidebar{
  position: fixed;
  top: 0;
  left: 0;
  width: 70%;
  max-width: 340px;
  height: 100%;

  background: var(--card);
  padding: 18px 18px 26px;

  display: flex;
  flex-direction: column;
  align-items: center;

  z-index: 1300;

  transform: translateX(-110%);
  opacity: 0;

  transition: transform .6s cubic-bezier(0.25, 1, 0.5, 1), opacity .3s ease;

  box-shadow: 5px 0 20px rgba(0,0,0,.4);
  border-right: 1px solid rgba(255,255,255,.1);

  /* anti-overflow */
  max-width: min(340px, 80vw);
}

.slidebar.active{
  transform: translateX(0);
  opacity: 1;
}

.close-icon{
  align-self: flex-end;
  font-size: 2.2rem;
  color: var(--accent);
  cursor: pointer;
  margin-bottom: 6px;
  background: transparent;
  border: none;
}

.slidebar-logo{
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 8px;
}
.slidebar-logo img{
  width: 140px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 16px 35px rgba(0,0,0,.6));
}

.slidebar ul{
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  width: 100%;
}
.slidebar ul li{
  margin: 10px 0;
  text-align: center;
}
.slidebar ul li a{
  color: #fff;
  font-size: 1.15rem;
  transition: color .25s ease;
}
.slidebar ul li a:hover{ color: var(--accent); }

.hire-btn-sidebar{
  margin-top: auto;
  margin-bottom: 26px;
  width: 85%;
  justify-content: center;
}

/* =========================
   HERO (background full + overlay)
========================= */
#inicio .hero{
  position: relative;
  overflow: hidden;
  background-image: url("images/hero.jpg");
  background-size: cover;
  background-position: 50% 50%;
  background-repeat: no-repeat;

  min-height: 100vh;
  display: flex;
  align-items: center;

  /* importante: depende de --nav-h */
  padding: calc(var(--nav-h) + 34px) var(--pad-x) 24px;

  /* anti-overflow */
  max-width: 100vw;
}

#inicio .hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(0deg, rgba(0,0,0,.62), rgba(0,0,0,.62)),
    linear-gradient(90deg, rgba(0,0,0,.30) 0%, rgba(0,0,0,.10) 60%, rgba(0,0,0,.30) 100%);
  pointer-events:none;
}

.hero-inner{
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;

  display: grid;
  grid-template-columns: 1fr;
  align-items: center;

  position: relative;
  z-index: 1;
  justify-items: center;

  min-width: 0;
}

.hero-left{
  max-width: 900px;
  text-align: center;
  min-width: 0;
}

.hero-title{
  font-size: clamp(40px, 4.8vw, 64px);
  line-height: 1.05;
  max-width: 24ch;
  margin: 0 auto;
  text-shadow: 0 14px 30px rgba(0,0,0,.55);

  /* evita que una palabra larga rompa el layout */
  overflow-wrap: anywhere;
  word-break: break-word;
}

.hero-subtitle{
  margin-top: 14px;
  font-size: clamp(16px, 1.25vw, 20px);
  color: rgba(255,255,255,.82);
  line-height: 1.75;
  max-width: 62ch;
  margin-left: auto;
  margin-right: auto;
  text-shadow: 0 14px 30px rgba(0,0,0,.55);

  overflow-wrap: anywhere;
}

/* =========================
   SECCIONES BASE
========================= */
.about,
.clients{
  background: var(--bg);
  color: var(--text);
  padding: var(--pad-section-y) var(--pad-x);
  max-width: 100vw;
  overflow-x: clip;
}

.about-content,
.clients-content{
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* =========================
   ABOUT
========================= */
.section-title{
  font-size: clamp(24px, 2.2vw, 34px);
  color: var(--accent);
  margin-bottom: 18px;
  text-align: left;
  letter-spacing: -0.01em;
}

.about-grid{
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(18px, 3.2vw, 38px);
  align-items: center;
  margin-top: 10px;
  margin-bottom: 46px;
  min-width: 0;
}

.about-media img,
.about-media-mobile img{
  width: 100%;
  height: clamp(260px, 40vw, 520px);
  object-fit: contain;
}

.about-text{
  text-align: left;
  min-width: 0;
}

.about-text p{
  font-size: clamp(16px, 1.6vw, 20px);
  color: var(--text);
  line-height: 1.85;
  margin-bottom: 20px;

  text-align: justify;
  text-justify: inter-word;
  text-wrap: pretty;
}

.about-content .highlight{
  font-size: clamp(20px, 2.1vw, 25px);
  color: var(--accent);
  font-weight: 700;
  margin-top: 10px;
  margin-bottom: 25px;
  text-align: center;
}

/* =========================
   SERVICIOS
========================= */
.services-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  padding: 25px 0;
}

.service-card{
  background: var(--card);
  border-radius: 12px;
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
}
.service-card:hover{
  transform: translateY(-8px);
  box-shadow: 0 10px 25px rgba(255,183,66,.25);
}

.image-wrapper{
  position: relative;
  overflow: hidden;
  height: 180px;
}
.image-wrapper img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .45s ease;
}

.img-overlay{
  position: absolute;
  inset: 0;
  background: rgba(255,183,66,.14);
  opacity: 0;
  transition: opacity .35s ease;
}

.service-card:hover .image-wrapper img{ transform: scale(1.12); }
.service-card:hover .img-overlay{ opacity: 1; }

.service-card h3{
  color: var(--accent);
  font-size: 20px;
  margin: 20px 20px 10px;
  text-align: center;
}
.service-card p{
  color: #ccc;
  font-size: 15px;
  line-height: 1.6;
  padding: 0 20px 26px;
  text-align: center;
}

/* =========================
   CLIENTES
========================= */
.clients .section-title{ text-align: center; }

.clients-subtitle{
  margin: 8px auto 26px;
  max-width: 70ch;
  text-align: center;
  color: var(--muted);
  line-height: 1.75;
  font-size: 16px;
}

.clients-grid{
  display: grid;
  grid-template-columns: 1fr;
  place-items: center;
  gap: 16px;
}

.client-card{
  width: 200px;
  max-width: 80vw;
  aspect-ratio: 1 / 1;

  border-radius: 50%;
  overflow: hidden;

  display: grid;
  place-items: center;

  background: var(--text);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 18px 40px rgba(0,0,0,.35);

  justify-self: center;
  align-self: center;

  transition: transform .25s ease, border-color .25s ease;
}

.client-card img{
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0%;
  transition: transform .25s ease;
}

.client-card:hover{
  transform: translateY(-2px);
  border-color: rgba(255,183,66,.28);
}
.client-card:hover img{ transform: scale(1.02); }

/* =========================
   FOOTER
========================= */
.footer{
  background-color: var(--card);
  color: #fff;
  padding: 50px var(--pad-x) 20px;
  text-align: center;
  max-width: 100vw;
  overflow-x: clip;
}

.footer-container{
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: flex-start;
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.footer-column h3{
  color: var(--accent);
  margin-bottom: 15px;
  font-size: 1.3rem;
}

.footer-column p,
.footer-column ul li a{
  color: #ccc;
  font-size: 0.95rem;
  transition: color .25s ease;
}

.footer-column p i{
  color: var(--accent);
  margin-right: 8px;
}

.footer-column ul{
  list-style: none;
  padding: 0;
}
.footer-column ul li{ margin-bottom: 10px; }
.footer-column ul li a:hover{ color: var(--accent); }

.social-links{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 15px;
}
.social-links a{
  color: #fff;
  font-size: 1.8rem;
  transition: transform .25s ease, color .25s ease;
}
.social-links a:hover{
  color: #ffd480;
  transform: scale(1.1);
}

.footer-bottom{
  border-top: 1px solid #333;
  margin-top: 10px;
  padding-top: 15px;
  font-size: 0.85rem;
  color: #999;
  text-align: center;
}

/* =========================
   RESPONSIVE
========================= */

/* <= 980px */
@media screen and (max-width: 980px){
  .about-grid{
    grid-template-columns: 1fr;
  }

  .about-media{ display: none; }
  .about-media-mobile{ display: block; }

  #sobre-mi .about-text{
    display: flex;
    flex-direction: column;
    gap: 14px;
  }
  #sobre-mi .about-text .section-title{ order: -3; text-align: center; }
  #sobre-mi .about-media-mobile{ order: -2; }

  #sobre-mi .about-media-mobile{
    width: min(520px, 100%);
    margin: 10px auto 10px;
  }
  #sobre-mi .about-media-mobile img{
    width: 100%;
    height: auto;
    max-height: 320px;
    object-fit: contain;
  }

  .section-title{ text-align: center; }
}

/* >= 981px */
@media screen and (min-width: 981px){
  .about-media-mobile{ display: none; }
}

/* <= 780px */
@media screen and (max-width: 780px){
  /* Ajuste realista del alto del navbar en mobile */
  :root{ --nav-h: 92px; }

  .navbar{
    justify-content: space-between;
    gap: 10px;
    padding: 10px var(--pad-x);
  }

  .nav-links{ display: none; }
  .navbar nav{ display: none; }

  .menu-icon{
    display: block;
    margin: 0; /* ✅ evita que flex “estire” cosas */
  }

  .nav-cta{
    margin: 0;          /* ✅ fuera auto-margins */
    justify-content: flex-start;
    flex: 1;            /* ✅ el logo ocupa lo que haya */
  }

  .nav-cta .hire-btn{ display: none; }
  .nav-logo{
    display: inline-flex;
    justify-content: flex-start;
    flex: 1;
  }

  /* ✅ LOGO MOBILE FLUIDO: nunca rompe el ancho */
  .nav-logo img{
    height: 72px;
    width: auto;
    max-width: min(200px, 62vw);
  }

  /* ✅ HERO: mantiene el padding superior acorde al navbar */
  #inicio .hero{
    padding: calc(var(--nav-h) + 22px) var(--pad-x) 16px;
    background-position: 50% 70%;
  }

  .client-card{
    width: 180px;
    max-width: 72vw;
  }

  .footer-container{
    flex-direction: column;
    text-align: center;
  }
  .footer-column{ width: 100%; }
}

/* <= 420px */
@media screen and (max-width: 420px){
  :root{ --nav-h: 86px; }

  .nav-logo img{
    height: 64px;
    max-width: min(180px, 60vw);
  }

  #inicio .hero{ background-position: 50% 75%; }

  .about-media-mobile img{
    max-height: 340px;
  }
}

/* =========================
   WHATSAPP FLOAT
========================= */
.wa-float{
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 2000;

  width: 56px;
  height: 56px;
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #25D366;
  color: #fff;

  box-shadow: 0 12px 30px rgba(0,0,0,.35);
  transition: transform .2s ease, filter .2s ease;
}

.wa-float i{
  font-size: 1.9rem;
}

.wa-float:hover{
  transform: translateY(-2px);
  filter: brightness(1.05);
}

@media (max-width: 780px){
  .wa-float{
    right: 14px;
    bottom: 14px;
    width: 54px;
    height: 54px;
  }
  .wa-float.is-hidden{
    opacity: 0;
    transform: scale(.92);
    pointer-events: none;
  }
}

/* El hero NUNCA debe quedar invisible aunque AOS no inicialice */
#inicio .hero .hero-title[data-aos],
#inicio .hero .hero-subtitle[data-aos]{
  opacity: 1 !important;
  transform: none !important;
}
