/* =====================================================
   SU WEB PROFESIONAL — Custom Styles
   ===================================================== */

/* ----- Variables ----- */
:root {
  --pink:         #e6007e;
  --yellow:       #ffed00;
  --green:        #37821c;
  --white:        #ffffff;
  --black:        #000000;
  --font:         'Poppins', sans-serif;
}

/* ----- Reset & Base ----- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
html::-webkit-scrollbar, body::-webkit-scrollbar { display: none; }
html, body { scrollbar-width: none; }
body { font-family: var(--font); color: var(--black); font-size: 16px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

/* ----- Tipografía global ----- */
h1 { font-weight: 400; }
h3 { font-weight: 400; }
h4 { font-weight: 400; }

/* =====================================================
   HEADER
   ===================================================== */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 99;
  padding: 10px 50px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--white);
}
.site-header .logo { width: 120px; flex-shrink: 0; }

.nav-list {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--white);
}
.nav-list a { font-size: 18px; transition: opacity 0.2s; }
.nav-list a:hover { opacity: 0.8; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
  color: var(--white);
}
.nav-toggle span {
  display: block;
  width: 25px; height: 2px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.3s;
}
.btn-nav-close {
  display: none;
  position: absolute;
  top: 0; right: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  padding: 20px;
  color: var(--white);
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  position: relative;
  display: block;
  line-height: 0;
}
.hero__img-full {
  width: 100%;
  height: auto;
  display: block;
}

/* Botones CTA superpuestos sobre la imagen */
.hero__cta {
  position: absolute;
  bottom: 27%;
  left: 3.5%;
  display: flex;
  gap: 1.2vw;
  z-index: 10;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  min-width: 14em; /* mismo ancho en ambos botones */
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 700;
  font-size: clamp(10px, 1.1vw, 15px);
  letter-spacing: 0.03em;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.25s, color 0.25s, border-color 0.25s, transform 0.15s;
}

/* Botón izquierdo: contorno blanco */
.btn-hero--outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}
.btn-hero--outline:hover {
  background: var(--white);
  color: var(--black);
  transform: translateY(-2px);
}
.btn-hero--outline:active { transform: translateY(0); }

/* Botón derecho: relleno blanco */
.btn-hero--solid {
  background: var(--white);
  color: var(--black);
  border: 2px solid var(--white);
}
.btn-hero--solid:hover {
  background: transparent;
  color: var(--white);
  transform: translateY(-2px);
}
.btn-hero--solid:active { transform: translateY(0); }

/* =====================================================
   BADGE (etiquetas de sección)
   ===================================================== */
.badge {
  display: inline-block;
  padding: 10px 20px;
  border-radius: 10px;
  margin-bottom: 50px;
  align-self: flex-start;
}
.badge--pink   { background: var(--pink);   color: var(--white); }
.badge--yellow { background: var(--pink); color: var(--white); }
.badge--green  { background: var(--pink);  color: var(--white); }

/* =====================================================
   SERVICIOS
   ===================================================== */
.servicios {
  padding: 100px 50px;
  background: radial-gradient(circle at center left, #edf2f7 60%, #ffffff 60%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}
.servicios__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
}
.servicio { display: flex; flex-direction: column; gap: 10px; }
.servicio .icon {
  font-size: 3em;
  height: 50px;
  line-height: 1;
  color: var(--pink);
}

/* =====================================================
   DIGITALIZAMOS
   ===================================================== */
.digitalizamos {
  padding: 100px 50px;
  background: radial-gradient(circle at center left, #edf2f7 60%, #ffffff 60%);
  background-attachment: fixed;
}
.digitalizamos .inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.digitalizamos__text { width: 60%; }
.digitalizamos__text span { display: block; margin-top: 15px; }
.digitalizamos__img {
  width: 400px;
  margin-top: -150px;
  margin-bottom: -150px;
  flex-shrink: 0;
}

/* =====================================================
   QUÉ PUEDE HACER UN SITIO WEB
   ===================================================== */
.que-hace {
  padding: 100px 50px;
  background: radial-gradient(circle at center left, #edf2f7 60%, #ffffff 60%);
  background-attachment: fixed;
  color: var(--black);
  display: flex;
  flex-direction: column;
  align-items: center;
}
.que-hace__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  width: 100%;
}
.que-hace__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--black);
}
.que-hace__item .icon {
  font-size: 25px;
  color: var(--pink);
  flex-shrink: 0;
  display: flex;
  align-self: flex-start;
  margin-top: -3px;
}
.que-hace__item h5 { font-weight: 400; margin-top: -5px; }

/* =====================================================
   PORTFOLIO / GALERÍA
   ===================================================== */
.porfolios {
  padding: 100px 50px;
  background: radial-gradient(circle at center left, #edf2f7 60%, #ffffff 60%);
  background-attachment: fixed;
  display: flex;
  flex-direction: column;
}

/* Isotope Masonry */
.gallery {
  position: relative;
  list-style: none;
}
.gallery-sizer  { width: 23.5%; }
.gallery-gutter { width: 2%; }
.gallery-item {
  width: 23.5%;
  margin-bottom: 20px;
  transition: transform 0.3s ease-in-out, box-shadow 0.3s ease-in-out;
}
.gallery-item:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}
.gallery-item figure { margin: 0; }
.gallery-item a { display: block; }
.gallery-item img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  object-position: top;
  display: block;
  box-shadow: 0 5px 5px rgba(0, 0, 0, 0.19);
  border-radius: 5px;
}

/* =====================================================
   MARKETING DIGITAL
   ===================================================== */
.marketing {
  padding: 100px 50px;
  background: radial-gradient(circle at center left, #edf2f7 60%, #ffffff 60%);
  background-attachment: fixed;
  color: var(--black);
}
.marketing .inner {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}
.marketing__text { width: 60%; }
.marketing__text span { display: block; margin-top: 15px; }
.marketing__img {
  width: 400px;
  margin-top: -150px;
  margin-bottom: -150px;
  flex-shrink: 0;
}

/* =====================================================
   PARA TI / BLOG
   ===================================================== */
.para-ti {
  padding: 100px 50px;
  background-color: #EBECEB;
  display: flex;
  flex-direction: column;
}
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.card {
  background: var(--white);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 0 5px 5px rgba(0, 0, 0, 0.04);
  font-weight: 400;
  display: flex;
  flex-direction: column;
}
.card__img {
  width: 100%;
  height: 300px;
  object-fit: cover;
}
.card__title {
  padding: 20px 10px;
  color: var(--black);
  font-size: 1em;
  font-weight: 400;
  position: relative;
}
.card__body {
  padding: 20px;
  background: var(--white);
  color: var(--black);
  flex: 1;
}

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer {
  padding: 100px 50px;
  background-image: radial-gradient(circle at center left, #171717 60%, #000000 60%);
  background-attachment: fixed;
  color: var(--white);
}
.footer__logo { width: 120px; margin-bottom: 20px; }
.footer__info { display: flex; flex-direction: column; gap: 12px; }
.footer__info li { display: flex; align-items: flex-start; gap: 8px; color: var(--white); }
.footer__info li a { color: var(--white); }
.footer__info .icon { flex-shrink: 0; margin-top: 2px; }

/* WhatsApp botón flotante */
.btn-whatsapp {
  position: fixed;
  bottom: 50px;
  right: 50px;
  z-index: 10;
  background: var(--white);
  border-radius: 10px;
  padding: 10px 15px;
  color: var(--green);
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.37);
  font-size: 40px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}
.btn-whatsapp:hover { transform: scale(1.08); color: var(--green); }

/* =====================================================
   POPUP / MODAL DE CONTACTO
   ===================================================== */
.popup {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  align-items: center;
  justify-content: center;
}
.popup.active { display: flex; }

.popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.popup__box {
  position: relative;
  background: var(--white);
  border-radius: 10px;
  padding: 30px;
  max-width: 600px;
  width: 90%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  z-index: 1;
  overflow: hidden;
}
.popup__body { flex: 1; min-width: 0; }
.popup__title { font-size: 40px; line-height: 1; font-weight: 400; }
.popup__subtitle { margin-top: 10px; margin-bottom: 20px; }
.popup__desc { margin-bottom: 20px; font-size: 0.9em; }
.popup__img {
  width: 200px;
  flex-shrink: 0;
  margin-top: -30px;
  margin-right: -30px;
  align-self: flex-start;
}
.popup__close {
  position: absolute;
  top: 8px; right: 8px;
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 6px;
  color: var(--black);
  z-index: 2;
}

/* Formulario */
.form { display: flex; flex-wrap: wrap; gap: 0; }
.form__group { width: 100%; margin-bottom: 10px; }
.form__group--half { width: 50%; padding-right: 20px; }
.form__group input,
.form__group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  font-family: var(--font);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}
.form__group input:focus,
.form__group textarea:focus { border-color: var(--green); }
.form__group textarea { min-height: 100px; resize: vertical; }
input::placeholder, textarea::placeholder { color: #666; }

.btn-submit {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 12px 28px;
  border-radius: 100px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 1em;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 5px;
}
.btn-submit:hover { background: var(--pink); }

.form__success {
  display: none;
  padding: 20px;
  text-align: center;
  color: var(--green);
  font-weight: 600;
  font-size: 1.1em;
}

/* =====================================================
   MODAL DEL PORTFOLIO
   ===================================================== */
.portfolio-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.portfolio-modal.active {
  display: flex;
}

.portfolio-modal__backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.portfolio-modal__content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: white;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 20px;
  z-index: 10001;
}

.portfolio-modal__close {
  position: absolute;
  top: -15px;
  right: -15px;
  width: 40px;
  height: 40px;
  background: var(--pink);
  color: white;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  z-index: 10002;
}

.portfolio-modal__close:hover {
  background: #d1006a;
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.portfolio-modal__image {
  max-width: 100%;
  max-height: 80vh;
  display: block;
  border-radius: 5px;
}

/* =====================================================
   ANIMACIONES
   ===================================================== */
.anim-fade    { opacity: 0; transition: opacity 1.5s ease; }
.anim-fade-up { opacity: 0; transform: translateY(25px); transition: opacity 0.9s ease, transform 0.9s ease; }
.anim-fade.visible,
.anim-fade-up.visible { opacity: 1; transform: translateY(0); }

/* =====================================================
   RESPONSIVE — Tablet (≤ 767px)
   ===================================================== */
@media (max-width: 767px) {
  .digitalizamos__img,
  .marketing__img { width: 40%; margin-top: 0; margin-bottom: 0; }
}

/* =====================================================
   RESPONSIVE — Mobile (≤ 478px)
   ===================================================== */
@media (max-width: 478px) {
  body { font-size: 12px; }
  h1   { font-size: 28px; }
  h3   { font-size: 20px; line-height: 1.4; }
  h4   { font-size: 16px; }
  h5   { font-size: 14px; }

  /* Header */
  .site-header  { padding: 10px 20px; }

  /* Hero — botones apilados verticalmente, alineados a la izquierda */
  .hero__cta {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    top: 48%;
    bottom: auto;
    left: 5%;
    transform: none;
    gap: 2.5vw;
  }
  .btn-hero {
    font-size: clamp(9px, 2.8vw, 13px);
    padding: 2.2vw 4.5vw;
    width: max-content;
  }

  /* Servicios */
  .servicios { padding: 50px 20px; }
  .servicios__grid { grid-template-columns: 1fr 1fr; gap: 10px; }

  /* Digitalizamos */
  .digitalizamos       { padding: 50px 20px; }
  .digitalizamos .inner { flex-wrap: wrap; }
  .digitalizamos__text { width: 60%; }
  .digitalizamos__img  { width: 40%; margin: 0; }

  /* Qué puede hacer */
  .que-hace { padding: 50px 20px; }

  /* Portfolio */
  .porfolios { padding: 50px 20px; }
  .gallery-sizer  { width: 48%; }
  .gallery-gutter { width: 4%; }
  .gallery-item   { width: 48%; margin-bottom: 10px; }
  .gallery-item img { height: 300px; object-position: top; }

  /* Marketing */
  .marketing       { padding: 50px 20px; }
  .marketing .inner { flex-direction: column; }
  .marketing__text { width: 100%; }
  .marketing__img  { display: none; }

  /* Para ti */
  .para-ti    { padding: 50px 20px; }
  .cards-grid { grid-template-columns: 1fr 1fr; }
  .card__img  { height: 150px; }

  /* Footer */
  .site-footer { padding: 50px 20px; }

  /* WhatsApp */
  .btn-whatsapp { right: 20px; bottom: 100px; }

  /* Popup */
  .popup__box { flex-direction: column; }
  .popup__img { width: 100%; margin: 0 0 10px; }

  /* Formulario */
  .form__group--half { width: 100%; padding-right: 0; }

  /* Backgrounds en mobile */
  .hero,
  .servicios,
  .digitalizamos,
  .que-hace,
  .porfolios,
  .marketing,
  .para-ti,
  .site-footer { background-attachment: scroll; }
}

/* =====================================================
   RESPONSIVE — Hamburger Menu (≤ 500px)
   ===================================================== */
@media (max-width: 500px) {
  .nav-toggle { display: flex; }
  .nav-list {
    position: fixed;
    inset: 0;
    z-index: 1001;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding-top: 0;
    gap: 20px;
    background: #e6007e;
    opacity: 0;
    visibility: hidden;
    height: 100vh;
    overflow: hidden;
    transition: opacity 0.3s, visibility 0.3s;
  }
  .nav-list.open { opacity: 1; visibility: visible; }
  .btn-nav-close {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 1002;
    color: var(--white);
    font-size: 28px;
    padding: 10px;
    width: 44px;
    height: 44px;
    border: 1px solid #fff;
    border-radius: 4px;
  }
}
