/* ==========================================================================
   ESTILOS PARA LA PÁGINA DE CÓDIGO DE VESTIMENTA
   ========================================================================== */

/* --- Hero Section --- */
.vestimenta-hero {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 500px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-background, #Fdfbf7);
}

.hero-bg-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center top;
  z-index: 1;
}

/* Degradado para fundir con el color de fondo */
.hero-gradient {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(253, 251, 247, 0) 40%, rgba(253, 251, 247, 0.8) 80%, rgba(253, 251, 247, 1) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding-bottom: 2rem;
  width: 100%;
  max-width: 800px;
  padding-left: 20px;
  padding-right: 20px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-gold-dark);
  background: rgba(255, 255, 255, 0.85);
  border: 1.5px solid var(--color-gold);
  border-radius: 100px;
  padding: 10px 24px;
  text-decoration: none;
  margin-bottom: 1.5rem;
  transition: all var(--transition-fast);
  text-transform: uppercase;
  letter-spacing: 1px;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(119, 140, 67, 0.1);
}

.back-link:hover {
  background: #ffffff;
  color: var(--color-gold-dark);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 8px 25px rgba(119, 140, 67, 0.2);
}

.vestimenta-hero .hero-title {
  font-family: var(--font-title);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--color-text);
  margin: 0;
  line-height: 1.1;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

/* --- Layout & Intro --- */
.vestimenta-wrapper {
  padding-top: 2rem;
  padding-bottom: 6rem;
}

.vestimenta-intro {
  max-width: 800px;
  margin: 0 auto 3rem auto;
  text-align: center;
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.5);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

/* --- Navigation Pills --- */
.vestimenta-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 4rem;
}

.vestimenta-tab {
  display: inline-block;
  padding: 10px 20px;
  background: var(--color-cream);
  color: var(--color-text);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-radius: 30px;
  transition: all var(--transition-fast);
  border: 1px solid rgba(119, 140, 67, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
}

.vestimenta-tab:hover {
  background: var(--color-rose);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(206, 153, 144, 0.4);
}

/* --- Sections --- */
.vestimenta-section {
  max-width: 1000px;
  margin: 0 auto 5rem auto;
  padding-top: 4rem;
  /* For anchor scrolling offset */
  margin-top: -4rem;
}

/* --- Paleta de Colores --- */
.paleta-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 2rem;
}

.color-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 90px;
  transition: transform var(--transition-fast);
}

.color-item:hover {
  transform: translateY(-5px);
}

.color-circle {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  border: 2px solid white;
}

.color-name {
  font-family: var(--font-body);
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-align: center;
}

/* --- Recomendaciones --- */
.recomendaciones-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.rec-card {
  background: white;
  border-radius: 16px;
  padding: 2rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border-top: 4px solid var(--color-rose);
  transition: transform var(--transition-fast);
}

.rec-card:nth-child(2) {
  border-top-color: var(--color-secondary);
  /* olive */
}

.rec-card:nth-child(3) {
  border-top-color: #d4c4a8;
  /* champán */
}

.rec-card:hover {
  transform: translateY(-5px);
}

.rec-title {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.rec-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rec-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text);
}

.rec-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-secondary);
  font-weight: bold;
}

.rec-list li.warning::before {
  content: '⚠️';
}

.rec-list li.forbidden::before {
  content: '🚫';
}

/* --- Galerías de Vestimenta --- */
.style-category {
  margin-bottom: 5rem;
  padding: 3rem 2rem;
  background: var(--color-warm-white, #ffffff);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(32, 53, 0, 0.04);
  position: relative;
  border: 1px solid rgba(119, 140, 67, 0.15);
  transition: transform var(--transition-smooth, 0.3s ease), box-shadow var(--transition-smooth, 0.3s ease);
}

.style-category:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(32, 53, 0, 0.08);
}

.style-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--color-gold, #778c43);
  border-radius: 0 0 4px 4px;
}

.style-category-title {
  font-family: var(--font-script, 'Great Vibes', cursive);
  font-size: clamp(1.8rem, 8vw, 4.5rem);
  color: var(--color-deep, #203500);
  text-align: center;
  margin-bottom: 1rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(5px, 2vw, 15px);
  font-weight: 500;
  white-space: nowrap;
}

.style-category-title::before {
  content: '';
  display: block;
  flex: 1;
  height: 1.5px;
  max-width: 80px;
  background: linear-gradient(to left, rgba(119, 140, 67, 0.6), transparent);
}

.style-category-title::after {
  content: '';
  display: block;
  flex: 1;
  height: 1.5px;
  max-width: 80px;
  background: linear-gradient(to right, rgba(119, 140, 67, 0.6), transparent);
}

.style-category-desc {
  text-align: center;
  font-family: var(--font-body, sans-serif);
  color: var(--color-text-muted, #5e7631);
  margin-bottom: 3rem;
  font-style: italic;
  font-size: 1.1rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 3/4;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

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

/* Overlay sutil para las fotos */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.2) 0%, transparent 40%);
  pointer-events: none;
}

/* Responsive */
@media (max-width: 768px) {
  .vestimenta-hero {
    height: 60vh;
  }

  .vestimenta-intro {
    padding: 1.5rem;
    font-size: 1rem;
  }

  .vestimenta-nav {
    flex-direction: column;
    align-items: center;
  }

  .vestimenta-tab {
    width: 80%;
    text-align: center;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  /* --- Lightbox --- */
  .lightbox-overlay {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition-fast);
  }

  .lightbox-overlay.active {
    display: flex;
    opacity: 1;
  }

  .lightbox-img {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.95);
    transition: transform var(--transition-fast);
  }

  .lightbox-overlay.active .lightbox-img {
    transform: scale(1);
  }

  .lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    color: #333;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
    z-index: 10;
  }

  .lightbox-close:hover {
    transform: scale(1.1);
  }

  .gallery-item {
    cursor: pointer;
  }
}

/* --- Animación de Botones de Vestimenta --- */
.vestimenta-tab {
  position: relative;
  overflow: hidden;
}

.btn-image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 1;
  z-index: 1;
  transition: opacity 0.5s ease-in-out;
}

.btn-image-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  /* Fuerte degradado crema para que la imagen se vea opaca y se mezcle con el fondo */
  background: linear-gradient(to right, var(--color-cream) 20%, rgba(250, 248, 245, 0.5) 100%);
  transition: opacity 0.5s ease-in-out;
}

.vestimenta-tab::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
  pointer-events: none;
}

.vestimenta-tab.animating {
  color: white !important;
  transform: scale(1.05) !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2) !important;
  border-color: transparent !important;
}

.vestimenta-tab.animating .btn-image-overlay {
  opacity: 1;
}

.vestimenta-tab.animating .btn-image-overlay::before {
  opacity: 0;
}

.vestimenta-tab.animating::after {
  opacity: 1;
}

.vestimenta-tab .btn-text {
  position: relative;
  z-index: 3;
  transition: color 0.3s ease;
}