/* =======================
   RESETEO
======================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: "Instrument Sans", sans-serif;
  background-color: #F9F9F9;
  overflow-x: hidden;
}

/* =======================
   HEADER
======================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 40px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    background-color: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
}

.header-left {
    font-size: 12px;
    font-weight: 300;
    color: #000;
    text-decoration: none;
    white-space: nowrap;
}

.header-center {
    display: flex;
    gap: 8px;
}

.header-right {
    display: flex;
}

.nav-link {
    font-size: 12px;
    font-weight: 300;
    text-decoration: none;
    color: #000;
    transition: color 0.3s, font-weight 0.3s;
}

.nav-link:hover {
    color: #0024fc;
    font-weight: 400;
}

/* =======================
   HAMBURGUESA
======================= */
.hamburger {
    display: none; /* solo móvil */
    flex-direction: column;
    justify-content: space-around;
    width: 16px;
    height: 12px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1002;
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: #000;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger:hover span {
    background: #0024fc;
}

/* =======================
   MENÚ MÓVIL
======================= */
.mobile-menu {
    display: none; /* oculto por defecto */
    flex-direction: column;
    position: fixed;
    top: 48px; /* justo debajo del header en móvil */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 16px 0;
    gap: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    z-index: 1001;
    text-align: center;
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu .nav-link {
    font-size: 12px;
    font-weight: 300;
    color: #000;
}

.mobile-menu .nav-link:hover {
    color: #0024fc;
    font-weight: 400;
}

/* =======================
   VIEW OPTIONS
======================= */
.view-options {
  display: flex;
  gap: 20px;
  margin-top: 70px;
  margin-left: 20px;
  margin-bottom: 20px;
}

.view-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 10pt;
  color: #0024fc;
  background: none;
  border: none;
  cursor: pointer;
}

.view-btn .circle {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #0024fc;
}

.view-btn.active .circle {
  background: #0024fc;
}

/* =======================
   FILTROS
======================= */
.filters {
  display: flex;
  gap: 20px;
  margin: 20px 20px 40px 20px;
  flex-wrap: wrap;
}

.filter-btn {
  font-family: "Instrument Sans", sans-serif;
  font-size: 11px;
  font-weight: 300;
  color: #0024ce;
  background: transparent;
  border: 1px solid #0024ce;
  border-radius: 100px;
  padding: 4px 15px;
  cursor: pointer;
  transition: 0.2s ease;
}

.filter-btn.active {
  background: #0024fc;
  color: white;
}

.filter-btn:hover {
  background: #0024fc;
  color: #fff;
}

.filter-btn.active:hover {
  cursor: default;
}

/* =======================
   FEATURED SECTION
======================= */
.featured-section {
  /* ✅ FIX SAFARI */
  min-height: 600px;
  min-height: 60svh;

  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  margin-top: 30px;
  padding-bottom: 40px; /* espacio visual */
}

.featured-section::-webkit-scrollbar {
  display: none;
}

.featured-wrapper {
  padding-left: 20px;
  padding-right: 60px;
  display: flex;
  align-items: center;
  width: 100%;
}

.featured-carousel {
  display: flex;
  gap: 20px;
  scroll-behavior: smooth;
  align-items: center;
}

.featured-item {
  width: 850px;
  height: 554.35px;
  flex-shrink: 0;
  position: relative;
  border-radius: 30px;
  overflow: hidden;
  cursor: none; /* Oculta cursor estándar */
  scroll-snap-align: center;
  transition: width 0.6s ease, height 0.6s ease, border-radius 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.featured-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.featured-item:hover img {
  transform: scale(1.05);
}

.featured-item:hover {
  width: 920px;
  height: 600px;
  border-radius: 10px;
}

.spacer {
  flex: 0 0 60px;
}

/* =======================
   CURSOR PERSONALIZADO FEATURED
======================= */
.custom-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 400;
  color: #0024fc;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(2px);
  transform: translate(-50%, -50%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.1s ease;
}

/* =======================
   PROJECT GRID
======================= */
.projects-section {
  margin-top: 30px;
  /* ✅ FIX SAFARI */
  padding-bottom: 70px; /* reserva footer */
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 700px);
  gap: 50px 25px;
  justify-content: center;
}

.project-card {
  width: 705px;
}

.project-image {
  width: 705px;
  height: 445px;
  border-radius: 28px;
  overflow: hidden;
  position: relative;
  transition: border-radius 0.4s ease;
}

.project-image:hover {
  border-radius: 8px;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.project-image:hover img {
  transform: scale(1.08);
}

.project-tags {
  position: absolute;
  bottom: 18px;
  right: 18px;
  display: flex;
  gap: 8px;
  opacity: 0;
}

.project-image:hover .project-tags {
  opacity: 1;
}

.tag {
  background: white;
  border-radius: 100px;
  padding: 6px 15px;
  font-size: 12px;
  color: #0038FF;
}

.project-title {
  margin-top: 12px;
  font-size: 12px;
  font-weight: 300;
  color: #272727;
}

.project-link {
  text-decoration: none;
  color: inherit;
}

/* ========================
   FOOTER
======================== */
.footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 33px;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
}

.footer-email {
  font-size: 9pt;
  color: #000000;
  white-space: nowrap;
  line-height: 40px;
}

.footer-email a {
  text-decoration: none;
  color: #000000;
}

.footer-email a:hover {
  color: #0024fc;
}

.footer-icons {
  display: flex;
  gap: 24px;
}

.footer-icons a {
  color: #0024fc;
  display: flex;
  align-items: center;
}

.footer-icons a[data-icon="instagram"] span,
.footer-icons a[data-icon="linkedin"] span { font-size: 18px !important; }
.footer-icons a[data-icon="behance"] span { font-size: 20px !important; }

/* =======================
   CONTACT OVERLAY
======================= */
.contact-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.15);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
}

.contact-overlay.active {
  display: flex;
}

.contact-card {
  width: 495px;
  height: 286px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 8px rgba(0,0,0,0.25);
  position: relative;
  transform: rotate(-5deg);
  padding: 24px;
}

.contact-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}

.contact-close:hover {
  color: #0024ce;
}

.contact-content {
  position: absolute;
  bottom: 24px;
  left: 24px;
}

.contact-intro,
.contact-follow {
  font-size: 17.5px;
  font-weight: 500;
  font-style: italic;
  color: #000;
  margin-bottom: 8px;
}

.highlight {
  color: #0024ce;
}

.contact-link,
.contact-socials a {
  font-size: 15px;
  font-weight: 500;
  color: #000;
  text-decoration: none;
}

.contact-link:hover,
.contact-socials a:hover {
  color: #0024ce;
}

/* =======================
   RESPONSIVE
======================= */
@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 24px;
  }
  .project-image {
    width: 100%;
    aspect-ratio: 16/10;
  }
  .featured-item {
    width: 600px;
    height: 400px;
  }
}

@media (max-width: 768px) {
          /* HEADER */
.header {
        height: 40px;
        padding: 0 16px;
    }

    /* Ocultamos menú original */
    .header-center,
    .header-right {
        display: none;
    }

    /* Mostramos hamburguesa */
    .hamburger {
        display: flex;
    }

    /* Mostramos menú móvil cuando está activo */
    .mobile-menu.active {
        display: flex;
    }

  /* QUITAMOS VIEW OPTIONS EN MÓVIL */
  .view-options {
    display: none !important;
  }

  /* FEATURED FUERA */
  .featured-section {
    display: none !important;
  }

  /* GRID SIEMPRE VISIBLE */
  .projects-section {
    display: block !important;
  }

  /* ===== FILTERS ===== */
  .filters {
    display: flex;             /* siempre visibles */
    flex-wrap: nowrap;         /* una sola fila */
    overflow-x: auto;          /* scroll horizontal */
    gap: 8px;                  /* espacio entre botones */
    padding: 12px;             /* margen interno */
    margin: 60px 0 24px 0;
    -webkit-overflow-scrolling: touch; /* smooth scroll en iOS */
  }

  .filters::-webkit-scrollbar {
    display: none;             /* oculta scroll en webkit */
  }

  .filter-btn {
    flex: 0 0 auto;            /* para que no se reduzcan */
    font-size: 10px;
    font-weight: 300;
    color: #0024fc;
    padding: 4px 12px;
    border: 1px solid #0024fc;
    border-radius: 100px;
    background: transparent;
    cursor: pointer;
    transition: 0.2s ease;
    white-space: nowrap;       /* que no se partan los textos */
  }

  .filter-btn.active {
    background: #0024fc;
    color: white;
    font-weight: 500;
  }

  .filter-btn:hover {
    background: #0024fc;
    color: #fff;
  }

  /* GRID */
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 25px 0;
    padding: 0 12px;
  }

  .project-card,
  .project-image {
    width: 100%;
    height: auto;
  }


    /* FOOTER móvil */
    .footer {
        padding: 0 12px;
    }
    .footer-email {
        font-size: 8.5pt;
        line-height: 33px;
    }
    .footer-icons {
        gap: 16px;
    }

  /* CONTACT */
  .contact-card {
    width: 90%;
    max-width: 360px;
    height: auto;
    padding: 20px;
    transform: rotate(-3deg);
  }

  .contact-content {
    position: relative;
    bottom: auto;
    left: auto;
    margin-top: 40px;
  }
}
