/* Solo estilos personalizados */
html {
  overflow-y: scroll; /* Prevenir layout shift por scrollbar */
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

a:hover {
  transition: color 0.3s ease;
}

hr {
  border: none;
  height: 1px;
  background: #5D2291;
  width: 100%;
  margin: 4rem 0;
}

/* Animación del trazo */
@keyframes draw-text {
  to {
    stroke-dashoffset: 0;
  }
}

/* Animación del relleno (aparece después del trazo) */
@keyframes fill-text {
  to {
    opacity: 1;
  }
}

/* Aplica animaciones */
#animated-text text:nth-child(1) {
  animation: draw-text 5s ease-in-out forwards;
}

#animated-text text:nth-child(2) {
  animation: fill-text 0.5s ease-in 1s forwards;
}

/*animaciones de las card*/

.card_cami{
  transition: 0.5s ease;
  cursor: pointer;
}

.container_cami:hover > :not(:hover){
  opacity: 0.3;
}

.card_cami:hover{
  transform: scale(1.1);
}

/* Carrusel */
#carousel {
  scroll-behavior: smooth;
  display: flex;
  align-items: center;
}

/* Ajuste de ancho de tarjetas según viewport */
@media (min-width: 1024px) {
  #carousel .card_cami { width: calc((100% - 8px*4) / 5); } /* 5 visibles */
}
@media (min-width: 768px) and (max-width: 1023px) {
  #carousel .card_cami { width: calc((100% - 8px*3) / 4); } /* 4 visibles */
}
@media (max-width: 767px) {
  #carousel .card_cami { width: calc((100% - 8px*1) / 2); } /* 2 visibles */
}

/* fondo morado */
.scrolled-bg {
  background-color: #5D2291;
}

/* textos y SVG blancos */
.scrolled-text {
  color: white !important;
  fill: white; /* para íconos SVG */
}

/* reducir tamaño de texto */
.scrolled-sm {
  font-size: 0.875rem; /* equivalente a text-sm */
}

/* Cuando scrolleamos, queremos que el trazo quede blanco */
.scrolled-stroke {
  stroke: white !important;
}

/* Y que el relleno también pase a blanco */
.scrolled-fill {
  fill: white !important;
  opacity: 1 !important; /* Si tenías animación de opacidad */
}

/* Opcional: si quieres animar la transición de color */
.stroke-text,
.fill-text {
  transition: stroke 0.3s, fill 0.3s, opacity 0.3s;
}

/*cards*/

/* 1) Asegura que el contenedor tenga espacio extra abajo para las flechas */
#cards {
  /* tu pb-36 quizás sea suficiente; si no, ajústala: */
  padding-bottom: 6rem; 
}

/* 2) Flexibilidad del wrapper */
#cards > .relative {
  position: relative;
}

/* 3) Mueve ambas flechas a bottom en lugar de top */
#prevBtn,
#nextBtn {
  top: auto;           /* anula top: 50% */
  bottom: 0.1rem;        /* a 1rem (16px) del fondo del section */
  transform: none;     /* anula -translate-y-1/2 */
}

/* 4) Centra horizontalmente las flechas bajo el carrusel */
#prevBtn {
  left: 45%;           /* ajusta este % para acercarla al borde de la primera card */
}
#nextBtn {
  right: 45%;          /* idem para la última card */
}

/*proyectos - categorías*/
/* Estilos para los números de proyecto */
.text-project-number {
  font-size: 9rem;
  line-height: 1;
}

/* Ajustes responsivos */
@media (max-width: 767px) {
  .text-project-number {
    font-size: 1.875rem; /* text-3xl */
  }
}

@media (min-width: 640px) and (max-width: 767px) {
  .text-project-number {
    font-size: 2.25rem; /* text-4xl */
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .text-project-number {
    font-size: 3rem; /* text-5xl */
  }
}

@media (min-width: 1024px) {
  .text-project-number {
    font-size: 5.625rem; /* text-9xl */
  }
}

/*formulario de contacto*/
/* Animaciones */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

/* Botón de descarga */
.download-button {
  background: linear-gradient(135deg, #8042BC, #CBB9E7);
  transition: all 0.3s ease;
}

.download-button:hover {
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(203, 185, 231, 0.3);
}

/*videos*/
#video-grid {
  display: grid;
  gap: 0.5rem;
  justify-items: center;
}

/* Móvil: 1 columna */
@media (max-width: 639px) {
  #video-grid {
    grid-template-columns: 1fr;
  }
  
  #video-grid > div {
    height: 300px;
    width: 100%;
  }
}

/* Tablet: 2 columnas */
@media (min-width: 640px) and (max-width: 1023px) {
  #video-grid {
    grid-template-columns: 1fr 1fr;
  }
  
  #video-grid > div {
    height: 350px;
    width: 100%;
  }
}

/* Desktop: 3 columnas (1 vertical, 1 horizontal, 1 vertical) */
@media (min-width: 1024px) {
  #video-grid {
    grid-template-columns: 0.8fr 2.4fr 0.8fr;
  }
  
  #video-grid > div {
    height: 450px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
}

/* ambos tipos de vídeo sólo necesitan llenar el alto */
.vertical-short,
.horizontal-video {
  height: 100%;
  width: auto;   /* ancho según su aspect-ratio */
}

/* opcional: en móvil, pasa a 1 columna */
@media (max-width: 768px) {
  #video-grid {
    grid-template-columns: 1fr;
  }
}


.fotos-vertical{
  aspect-ratio: 9/16;
  height: 80%;
  width: auto;
}

.fotos-altura{
  height: 92%;
  width: 100%;
}

.logos{
  width: 60%;
  height: auto;
  max-width: 100%;
}
.logos2{
  width: 50%;
  height: auto;
  max-width: 100%;
}

/* Responsivo para desktop */
@media (min-width: 768px) {
  .logos {
    width: 25%;
  }
  .logos2 {
    width: 25%;
  }
}

/* Habilidades y Herramientas - Prevenir overflow */
details {
  overflow: visible;
  width: 100%;
}

details summary {
  outline: none;
  cursor: pointer;
  user-select: none;
}

details summary svg {
  display: inline-block;
  transition: transform 0.3s ease;
}

details[open] summary svg {
  transform: rotate(180deg);
}

details ul {
  display: block;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
}

details ul li {
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
}

/* Responsive typography para secciones de proyectos */
section[id="antojitos"] p,
section[id="tep"] p,
section[id="c28"] p,
section[id="virtualPro"] p,
section[id="ecolab"] p {
  font-size: clamp(0.875rem, 2.5vw, 1rem);
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Reducir spacing en móvil para logos y contenedor */
.flex.justify-center.items-center {
  margin-bottom: clamp(0.5rem, 2vw, 2rem) !important;
  margin-top: clamp(0.25rem, 1.5vw, 1rem) !important;
}

/* Mejoras adicionales para móvil */
@media (max-width: 480px) {
  section[id="antojitos"] p,
  section[id="tep"] p,
  section[id="c28"] p,
  section[id="virtualPro"] p,
  section[id="ecolab"] p {
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
  }
}

@media (min-width: 768px) {
  section[id="antojitos"] p,
  section[id="tep"] p,
  section[id="c28"] p,
  section[id="virtualPro"] p,
  section[id="ecolab"] p {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .flex.justify-center.items-center {
    margin-bottom: 2rem !important;
    margin-top: 1rem !important;
  }
}

/* Ajustar padding en secciones de proyectos para móvil */
#virtualPro,
#ecolab,
#antojitos,
#tep,
#c28 {
  padding: clamp(1rem, 4vw, 2rem) clamp(1.5rem, 5vw, 3rem);
}

@media (max-width: 480px) {
  #virtualPro,
  #ecolab,
  #antojitos,
  #tep,
  #c28 {
    padding: 0.75rem 1rem;
  }
}

@media (min-width: 769px) {
  #virtualPro,
  #ecolab,
  #antojitos,
  #tep,
  #c28 {
    padding: 2rem 2rem;
  }
}