/*  Sección de Botón Inicio  */
#btnTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100; /* siempre por encima */
  background-color: #ffcc00; /* amarillo como tu estilo */
  color: #000;
  border: none;
  border-radius: 50%;
  padding: 12px 16px;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  display: none; /* oculto por defecto */
  transition: opacity 0.3s ease;
}

#btnTop:hover {
  background-color: #e6b800; /* un amarillo más oscuro */
}

/*  Sección de Técnicas  */
.techniques {
  max-width: 1000px;
  margin: 4rem auto;
  padding: 2rem;
  background: rgba(15, 15, 15, 0.85);
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

.techniques h2 {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 2rem;
  color: #f5c542;
}

.technique {
  margin-bottom: 2rem;
  padding: 1.5rem;
  border-left: 4px solid #f5c542;
  background: rgba(30, 30, 30, 0.7);
  border-radius: 8px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.technique:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 20px rgba(0,0,0,0.6);
}

.technique h3 {
  font-size: 1.5rem;
  margin-bottom: 0.8rem;
  color: #ffd700;
}

.technique p {
  font-size: 1rem;
  line-height: 1.6;
  color: #f5f5f5;
}


/*  Reset y base  */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  background-color: #0f0f0f;
  color: #f5f5f5;
  line-height: 1.45;
}

/*  Header / Nav  */
header {
  background: #1a1a1a;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: #f5c542;
  letter-spacing: .5px;
}
nav a {
  color: #f5f5f5;
  text-decoration: none;
  margin-left: 1.5rem;
  font-weight: 500;
}
nav a:hover { color: #f5c542; }

/*  Botones de categorías  */
.category-buttons {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 2rem 0 0;
  flex-wrap: wrap;
}
.category-buttons .btn {
  background: #f5c542;
  color: #0f0f0f;
  padding: 0.7rem 1.5rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
  transition: background .25s, transform .15s;
}
.category-buttons .btn:hover { background: #d4a62c; transform: translateY(-1px); }

/* Carrousel de Inicio  */
.background-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  display: flex;
  overflow: hidden;
  z-index: -1;
}

.background-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  flex-shrink: 0;
  animation: slide 60s linear infinite;
}

/* Animación: mueve todas las imágenes en fila */
@keyframes slide {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}


/*  Hero  */
.hero {
  position: relative;
  z-index: 1;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: white;
  padding: 2rem;
}

/* Capa oscura detrás del texto */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  padding: 10rem 2rem;
}

.hero::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,0,0,0.55); /* oscurece un poco el fondo */
  z-index: -1;
}

.hero h2 {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(90deg, #ffd700, #ffffff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  animation: fadeDown 1s ease-in-out;
}

.hero p {
  font-size: 1.4rem;
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 1.3s ease-in-out forwards;
  animation-delay: 0.3s;
}

.hero .btn {
  background: #ffd700;
  color: #1a1a1a;
  padding: 0.8rem 1.8rem;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease-in-out;
}

.hero .btn:hover {
  background: #ffae00;
  transform: scale(1.05);
}

.about {
  max-width: 800px;   
  margin: 4rem auto;  
  padding: 2rem;
  background: rgba(0, 0, 0, 0.7); 
  border-radius: 12px;
  text-align: center; 
  color: #f5f5f5;     
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}
.about h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #f5c542; /* resalta el título */
}
.about p {
  font-size: 1.1rem;
  line-height: 1.6;
}

/* Efectos de entrada */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}


/*  Títulos de sección  */
.section-title {
  text-align: center;
  margin: 3rem 0 1.5rem;
  font-size: clamp(1.6rem, 3.5vw, 2rem);
  color: #f5c542;
}

/*  Galería / Tarjetas  */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}
.project {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #0b0b0b;
  min-height: 260px; /* evita saltos si la imagen tarda */
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/*  Carrusel  */
.carousel {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  height: 100%;
}
.carousel img {
  width: 100%;
  height: auto;
  display: none;
  vertical-align: middle;
  object-fit: cover;
}
.carousel img.active { display: block; }

/*  Overlay  */
.overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 1rem;
  background: rgba(30,30,30,0.75);
  color: #f5f5f5;
  opacity: 0;
  transform: translateY(15px);
  transition: opacity .28s ease, transform .28s ease;
  pointer-events: none;
  z-index: 4;
  border-top-left-radius: 10px;
  border-top-right-radius: 10px;
}

/* En escritorio: el overlay aparece al pasar el ratón */
.project:hover .overlay {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.overlay h3 { 
  margin: 0 0 .25rem; 
  font-size: 1.05rem; 
  color: #f5c542;
}

.overlay p { 
  margin: 0; 
  font-size: .95rem; 
  line-height: 1.35; 
  color: #ffffff;
}

/*  Botones flechas carrusel  */
.nav-btn {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border-radius: 50%;
  border: none; background: rgba(0,0,0,0.55); color: #fff;
  font-size: 22px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 6; opacity: 0;
  transition: opacity .18s ease, transform .12s ease;
}

.nav-btn.prev { left: 10px; }
.nav-btn.next { right: 10px; }
.nav-btn:active { transform: translateY(-50%) scale(.96); }
.project:hover .nav-btn { opacity: 1; }
.nav-btn:focus { outline: 2px solid #f5c542; outline-offset: 2px; }

/* 🔧 MÓVILES: Mostrar overlay solo al tocar */
@media (hover: none) {
  .project:hover .overlay { opacity: 0; } /* evita que quede fijo */
  .overlay {
    opacity: 0;
    transform: translateY(15px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
  }
  .overlay.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-btn { opacity: .95; } /* las flechas siempre visibles en táctil */
}


/*  Contacto */
.contacto {
  max-width: 600px;
  margin: 3rem auto;
  padding: 2rem;
  background: #1a1a1a;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.5);
  text-align: center; 
}

.contacto h2 {
  color: #f5c542;
  margin-bottom: 1rem;
}

.contacto p {
  margin-bottom: 2rem;
  color: #ddd;
}

/* Asegura que el formulario se vea en columna */
form {
  display: flex;
  flex-direction: column;
  align-items: center; 
}

form label {
  align-self: flex-start;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: #f5f5f5;
}

form input,
form textarea {
  width: 100%; 
  margin-bottom: 1.5rem;
  padding: 0.8rem;
  border: none;
  border-radius: 8px;
  background: #2a2a2a;
  color: #f5f5f5;
  font-size: 1rem;
}

form textarea {
  resize: vertical;
  min-height: 120px;
}

form button {
  padding: 0.8rem 1.5rem;
  border: none;
  border-radius: 8px;
  background: #f5c542;
  color: #0f0f0f;
  font-weight: bold;
  cursor: pointer;
  transition: background 0.3s ease;
}

form button:hover {
  background: #d4a632;
}

.form {
  max-width: 820px;
  margin: 2rem auto;
  padding: 1.5rem;
  background: #121212;
  border-radius: 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35);
}
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form label { font-weight: 600; color: #ddd; }
.form input, .form textarea {
  width: 100%; padding: .8rem 1rem; border-radius: 10px;
  border: 1px solid #2a2a2a; background: #0f0f0f; color: #f5f5f5;
}
.form textarea { min-height: 140px; resize: vertical; }
.form button {
  margin-top: 1rem;
  background: #f5c542; color: #0f0f0f; border: none;
  padding: .9rem 1.6rem; border-radius: 10px; font-weight: 700; cursor: pointer;
}
.form button:hover { background: #d4a62c; }

/*  Footer  */
footer {
  background: #1a1a1a;
  text-align: center;
  padding: 1.5rem;
  margin-top: 3rem;
  border-top: 1px solid rgba(255,255,255,0.06);
}
footer a { color: #f5c542; margin: 0 .5rem; text-decoration: none; }

/*  Mobile tweaks  */
@media (max-width: 720px) {
  .form .row { grid-template-columns: 1fr; }
  header { padding: .8rem 1rem; }
  nav a { margin-left: .9rem; }
}

/* Mostrar overlay y flechas en dispositivos táctiles */
/*@media (hover: none) {
  .overlay { opacity: 1; transform: none; pointer-events: auto; }
  .nav-btn { opacity: .95; }
}*/
