/*PORTFOLIO VICTORIA CHESA - CSS FINAL LIMPIO*/

/*-----------------------------------------------------
1. General styles
-----------------------------------------------------*/

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

html {
  overflow-x: hidden;
  overflow-y: scroll;
  scroll-behavior: smooth;
}

body {
  font-family: 'Satoshi', sans-serif;
  font-size: 100%;
  line-height: 1.6;
  background: #fff;
}

/*-----------------------------------------------------
2. Tipografía
-----------------------------------------------------*/

h1, h2 {
  font-family: 'Satoshi', sans-serif;
}

h4, p {
 font-family: 'Poppins', sans-serif;
}

h1 {
  font-size: clamp(2.8rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h2 {
  /* ANTES: 1.25rem — sin peso visual suficiente en cards */
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1.3;
  color: #1b1b1b;
}

h4 {
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #666;
}

p {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 400;
  color: #1a1a1a;
}

a {
  text-decoration: none;
  transition: all 0.2s ease;
  color: #111;
}

/*-----------------------------------------------------
3. Utilidades
-----------------------------------------------------*/

.container {
  /* ANTES: max-width 1170px con padding 20px — demasiado estrecho */
  max-width: 1280px;
  margin: auto;
  padding: 0 48px;
}

.clearfix {
  clear: both;
}

.img-cover {
  display: block;
  object-fit: cover;
  height: 100%;
  width: 100%;
}

.img-responsive {
  display: block;
  max-width: 100%;
  height: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  padding: 20px 40px;
  background-color: #1a1a1a;
  color: #fff;
  font-family: 'Satoshi', sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  border-radius: 50px;
  transition: transform 0.3s ease, background-color 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #333;
  transform: translateY(-2px);
}

/*-----------------------------------------------------
4. Scroll Anchors
-----------------------------------------------------*/

#works {
  scroll-margin-top: 100px;
}

#contact {
  scroll-margin-top: 80px;
}

/*-----------------------------------------------------
5. Header
-----------------------------------------------------*/

.main-header {
  /* ANTES: padding 24px — un poco alto, se compacta */
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: #fff;
  z-index: 100;
  border-bottom: 1px solid #eee;
}

.main-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  height: 48px;
  width: auto;
}

.open-nav {
  display: none;
  cursor: pointer;
}

/*-----------------------------------------------------
6. Hero Section
-----------------------------------------------------*/

.hero {
  padding: 64px 0 48px;
  position: relative;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
}

.intro__title {
  font-family: 'Satoshi', sans-serif;
  font-weight: 800;
  font-size: clamp(2.8rem, 5vw, 4rem);
  line-height: 1.08;
  color: #1a1a1a;
  margin: 0 0 28px 0;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.hero-highlight {
  font-weight: 800;
  display: inline;
}

.hero-description {
  font-family: 'Poppins', sans-serif;
  /* ANTES: 1.25rem — parecía grande pero en ese mar de espacio se perdía */
  font-size: 1.1rem;
  line-height: 1.75;
  color: #444;
  text-align: left;
  margin: 0;
  /* ANTES: max-width 700px — demasiado ancho, difícil de leer y sin tensión */
  max-width: 540px;
}

/* Menú vertical DERECHA */
.hero .social-links {
  list-style: none;
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  padding: 0;
}

.hero .social-links li {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  /* ANTES: margin-bottom 32px — mucho espacio entre items del menú */
  margin-bottom: 20px;
  writing-mode: vertical-rl;
  text-transform: lowercase;
}

.hero .social-links a {
  color: #111;
  transition: color 0.2s ease;
}

.hero .social-links a:hover {
  color: #FB36A0;
}

/*-----------------------------------------------------
7. Portfolio Filters
-----------------------------------------------------*/

.portfolio-filters {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin: 40px 0 32px;
  padding: 0 48px;
}

.filter-btn {
  padding: 9px 22px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: transparent;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: #666;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active,
.filter-btn:hover {
  background: #111;
  color: #fff;
  border-color: #111;
}

/*-----------------------------------------------------
8. Portfolio Grid
-----------------------------------------------------*/

.portfolio-grid {
  display: grid;
  /* ANTES: repeat(2, 580px) fijas — las columnas flotaban centradas */
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  row-gap: 56px;
  /* ANTES: padding 80px 0 120px — enorme, creaba mucho vacío arriba y abajo */
  padding: 0 48px 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.portfolio-grid a {
  text-decoration: none;
  color: inherit;
  display: block;
}

.item {
  background: transparent;
  padding: 0;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  border-radius: 0;
  transition: none;
}

/* Wrapper relativo para el overlay de hover */
.item-img {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  border-radius: 12px;
  margin-bottom: 14px;
  background: #f0f0f0;
}

.item-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Overlay oscuro en hover */
.item-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.28);
  opacity: 0;
  transition: opacity 0.35s ease;
  border-radius: 12px;
}

/* Badge "Ver proyecto" en hover */
.item-img::before {
  content: 'Ver proyecto →';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 2;
  background: #fff;
  color: #111;
  font-family: 'Satoshi', sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 20px;
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
  white-space: nowrap;
}

.portfolio-grid a:hover .item-img img {
  transform: scale(1.04);
}

.portfolio-grid a:hover .item-img::after {
  opacity: 1;
}

.portfolio-grid a:hover .item-img::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* Texto debajo: título izquierda, categoría derecha */
.item-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.item-title {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.05rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  color: #1b1b1b;
}

.item h4 {
  font-family: 'Satoshi', sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #999;
  margin: 0;
  white-space: nowrap;
}

/*-----------------------------------------------------
9. Footer CTA
-----------------------------------------------------*/

.cta {
  text-align: center;
  /* ANTES: padding 120px 0 80px — demasiado espacio encima */
  padding: 72px 0 64px;
  width: 100%;
}

.cta h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 40px;
  color: #1a1a1a;
}

/*-----------------------------------------------------
10. Footer Simple
-----------------------------------------------------*/

.footer-default {
  height: 80px;
  line-height: 80px;
  border-top: 1px solid #eee;
}

.footer-default .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-default .copyright {
  float: left;
  font-weight: 500;
  letter-spacing: 0.4px;
}

.footer-default .follow-us-links {
  list-style: none;
  display: flex;
  gap: 24px;
  margin: 0;
  padding: 0;
  float: right;
}

.footer-default .follow-us-links li {
  margin: 0;
}

.footer-default .follow-us-links a {
  color: #111;
  font-size: 1rem;
  transition: color 0.2s ease;
  line-height: 1;
}

.footer-default .follow-us-links a:hover {
  color: #FB36A0;
}

/*-----------------------------------------------------
11. Single Project Page
-----------------------------------------------------*/
.single-project .intro {
  margin: 72px 0 88px 0;
}

.single-project .intro h1 {
  font-size: 3.75rem;
  font-weight: 400;
  margin: 0 0 25px -3px;
  text-transform: none;
}

.single-project .intro ul {
  float: left;
  list-style: none;
  margin-top: 48px;
  width: 50%;
}

.single-project .intro ul li {
  font-size: 1rem;
  font-weight: 300;
  letter-spacing: .1px;
  margin-bottom: 8px;
  text-transform: capitalize;
}

.single-project .intro p {
  float: right;
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.9;
  margin-top: 48px;
  width: 50%;
}

.single-project .info {
  font-size: 1.125rem;
  font-weight: 300;
  line-height: 1.9;
  margin: 110px 0;
  width: 60%;
}

.img-full {
  height: 100%;
  width: 100%;
}

.img-halved .item {
  float: left;
  height: 670px;
  width: 48.75%;
}

.single-project img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/*-----------------------------------------------------
14. Project Navigation
-----------------------------------------------------*/

.project-navigation-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 100px;
  padding: 48px 0;
  border-top: 1px solid #eee;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 48px;
  padding-right: 48px;
}

.nav-btn {
  font-family: 'Satoshi', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111;
  text-decoration: none;
  transition: color 0.2s ease;
}

.nav-btn:hover {
  color: #FB36A0;
}

/*-----------------------------------------------------
15. Ocultar menú móvil en desktop
-----------------------------------------------------*/

.aside-navigation-overlay {
  display: none;
}

/*-----------------------------------------------------
16. Responsive
-----------------------------------------------------*/

@media (max-width: 1280px) {
  .container {
    padding: 0 32px;
  }

  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 0 80px;
  }

  .item-img {
    height: 360px;
  }
}

@media (max-width: 1024px) {
  .container {
    padding: 0 24px;
  }

  .item-img {
    height: 320px;
  }

  .gallery-item {
    width: 500px;
    height: 350px;
  }
}

@media (max-width: 768px) {
  .open-nav {
    display: block;
  }

  .container {
    padding: 0 20px;
  }

  .hero {
    padding: 48px 0 40px;
  }

  .intro__title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 16px;
  }

  .hero-description {
    font-size: 1rem;
    text-align: center;
  }

  .hero .social-links {
    position: static;
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 16px;
    margin-top: 32px;
  }

  .hero .social-links li {
    writing-mode: horizontal-tb;
    margin-bottom: 0;
    font-size: 0.9rem;
  }

  .portfolio-filters {
    gap: 8px;
    margin: 20px 0 20px;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0 0 60px;
  }

  .item {
    width: 100%;
    padding: 16px 16px 20px;
  }

  .item-img {
    height: 260px;
  }

  .cta {
    padding: 60px 20px 48px;
  }

  .cta h1 {
    font-size: 2rem;
  }

  .footer-default .container {
    flex-direction: column;
    gap: 24px;
    text-align: center;
  }

  .intro-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .single-project .intro h1 {
    font-size: 2rem;
    margin-bottom: 24px;
  }

  .gallery-scroll {
    padding: 20px;
  }

  .gallery-item {
    width: 85vw;
    height: 300px;
  }

  .single-project .info {
    margin: 60px 0;
  }

  .img-halved {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-navigation-simple {
    margin-top: 60px;
    padding: 32px 20px;
  }

  .nav-btn {
    font-size: 1.2rem;
  }
}

@media (min-width: 769px) {
  .open-nav {
    display: none;
  }
}

/* Fix imágenes en páginas de proyecto */
.single-project .item {
  background: none;
  border-radius: 0;
}

* { cursor: none; }

.cursor {
  width: 12px;
  height: 12px;
  background: #FB36A0;
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, width 0.2s ease, height 0.2s ease;
}

.cursor.hover {
  width: 28px;
  height: 28px;
  background: #FB36A0;
  opacity: 0.5;
}