/* ===== Reset ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Lato", sans-serif;
  line-height: 1.6;
  background: #0a0f14;
  color: #f5f5f5;
}
img { max-width: 100%; height: auto; display: block; }

/* ===== Header ===== */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  border-bottom: 1px solid #eee;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
header img {
  max-height: 60px;
}
@media (min-width: 900px) {
  header img { max-height: 100px; }
}
header button {
  position: absolute;
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #FF6600;
  font-size: 2rem;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: color .2s ease;
}
header button:hover { color: #cc5200; }

/* ===== Drawer (Menú lateral) ===== */
.drawer {
  position: fixed;
  top: 0; right: 0;
  width: 280px;
  height: 100%;
  background: #FF6600;
  color: #fff;
  transform: translateX(100%);
  transition: transform .3s ease;
  z-index: 2000;
  padding: 2rem 1.5rem;
}
.drawer.open { transform: translateX(0); }
.drawer h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.3);
  padding-bottom: .5rem;
}
.drawer ul { list-style: none; padding: 0; margin: 0; }
.drawer li { margin: .8rem 0; }
.drawer a, .drawer span {
  color: #fff;
  text-decoration: none;
  font-size: 1.1rem;
  transition: color .2s ease;
}
.drawer a:hover, .drawer span:hover { color: #000; }
.drawer ul ul li {
  margin-left: 1rem;
  font-size: 1rem;
}

.overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  z-index: 1500;
}
.overlay.open { display: block; }

/* ===== Botón de cierre del menú ===== */
.drawer .close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 4rem;
  color: #fff;
  cursor: pointer;
  transition: color .2s ease;
}
.drawer .close-btn:hover { color: #000; }

/* ===== Portfolio ===== */
#portfolio {
  padding: 2rem 1rem;
  max-width: 100%;
  margin: 0 auto;
}
#portfolio h1 {
  font-size: 2.6rem;
  text-align: center;
  color: #FF6600;
  margin-bottom: 1.5rem;
}
#filters {
  display: flex; flex-wrap: wrap; justify-content: center;
  margin-bottom: 1.5rem; gap: .5rem;
}
#filters button {
  padding: .4rem 1rem;
  border: none;
  border-radius: 20px;
  background: rgba(0,102,204,0.2);
  color: #fff;
  cursor: pointer;
  transition: all .3s;
}
#filters button.active, #filters button:hover {
  background: #FF6600;
  color: #fff;
  border-color: #fff;
}

/* ===== Galería estilo Masonry ===== */
.gallery {
  column-count: 2;
  column-gap: .75rem;
}
@media (min-width: 900px) {
  .gallery { column-count: 4; }
}
.item {
  display: inline-block;
  width: 100%;
  margin-bottom: .75rem;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.item img.thumb {
  width: 100%;
  height: auto;
  border-radius: 6px;
  cursor: pointer;
  transition: transform .2s ease, opacity 0.6s ease;
  opacity: 0;
  transform: scale(0.98);
}
.item img.thumb.loaded {
  opacity: 1;
  transform: scale(1);
}
.item img.thumb:hover { transform: scale(1.02); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 3000;
}
.lightbox.open { display: flex; }
.lb-inner { max-width: 94vw; max-height: 94vh; }
#lb-img {
  max-width: min(94vw, 1400px);
  max-height: 94vh;
  border-radius: 6px;
  object-fit: contain;
}

/* Botón cerrar estilo menú lateral */
.lb-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: none;
  border: none;
  font-size: 3rem;
  color: #fff;
  cursor: pointer;
  transition: color .2s ease;
  opacity: 0.9;
}
.lb-close:hover {
  color: #FF6600;
  opacity: 1;
}

/* Flechas Unicode ❮ ❯ */
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 3rem;
  line-height: 1;
  cursor: pointer;
  color: #fff;
  opacity: 0.3;
  transition: opacity .2s ease, color .2s ease;
}
.lb-prev:hover, .lb-next:hover {
  opacity: 1;
  color: #fff;
}
.lb-prev { left: 1rem; }
.lb-next { right: 1rem; }

/* ===== Sección Sobre mí ===== */
#sobre-mi {
  text-align: center;
  padding: 2rem 1rem;
  background: #fff;
  color: #000;
}
#sobre-mi img {
  width: 220px; height: 220px;
  border-radius: 50%;
  margin: 0 auto 1rem;
  object-fit: cover;
}
#sobre-mi h2 { margin-bottom: 1rem; }

/* ===== Footer ===== */
footer {
  background: #0a0f14;
  color: #fff;
  text-align: center;
  padding: 1rem;
  font-size: 0.9rem;
}
footer img {
  max-width: 200px !important;
  height: auto !important;
  margin: 0 auto 1rem;
  display: block;
}
footer a {
  color: #FF6600;
  text-decoration: none;
}
footer a:hover { color: #fff; }

/* ===== Botón WhatsApp flotante ===== */
#whatsapp-btn {
  position: fixed !important;
  bottom: 20px;
  right: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem .8rem;
  border-radius: 30px;
  background: #25d366;
  color: #fff;
  font-size: 0.95rem;
  font-weight: bold;
  z-index: 4000;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: background .2s ease;
}
#whatsapp-btn:hover {
  background: #1ebe5d;
  color: #fff;
}
#whatsapp-btn img {
  width: 24px; height: 24px;
}

/* ===== Ajustes de scroll limpio con header fijo ===== */
#portfolio-top,
#sobre-mi {
  scroll-margin-top: 100px;
}

/* ===== Animaciones slideshow ===== */
.slide-content h1 {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  text-shadow: 0 3px 10px rgba(0,0,0,0.7);
  color: #fff;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1s ease forwards;
}
@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@media (max-width: 768px) {
  .slide-content h1 {
    font-size: 2rem;
  }
}

/* Botón CTA con pop-in */
.cta-btn {
  display: inline-block;
  padding: 1rem 2rem;
  background: #ff6600;
  color: #fff;
  font-size: 1.2rem;
  border-radius: 40px;
  transition: background 0.3s ease, transform 0.2s ease;
  animation: popIn 0.8s ease forwards;
}
.cta-btn:hover {
  background: #e65c00;
  transform: scale(1.05);
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

#sobre-mi .local-seo {
  margin-top: 1.5rem;
  font-size: 1.1rem;
  font-weight: 500;
  color: #333;
}
#sobre-mi .local-seo strong {
  color: #FF6600;
}

