/* === General Reset y Fuente === */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

@font-face {
  font-display: swap;
  font-family: 'times-new-roman';
  src: url('/proyectos_ejemplos/proyecto_avanzado/pages/font/times.ttf') format('truetype');
}

html, body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #f6f6fa;
  font-family: 'Times New Roman', Times, serif;
  z-index: -1;
}

/* === Tipografía === */
h1, h2, h3, h4, h5 {
  font-weight: 700;
  color: #4a3c8c;
}
p {
  margin-bottom: 1em;
}

/* === Header pantalla completa === */
header {
  position: relative;
  height: 100vh;
  color: white;
  overflow: hidden;
}

header video,
header .background-img,
#videoPlayer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -1;
}

#videoPlayer {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* Capa oscura */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  z-index: 0;
  pointer-events: none;
}

/* Contenido del header */
.header-content {
  position: relative;
  z-index: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  text-align: center;
  padding: 20px;
  overflow: hidden;
}

/* Título animado */
.animated-title {
  font-size: 3rem;
  font-weight: 700;
  margin: 40px auto 30px;
  padding: 15px 20px;
  width: fit-content;
  background: linear-gradient(135deg, #776cef, #f0c929, #776cef);
  background-size: 300% 300%;
  color: transparent;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  border-radius: 12px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
  animation: colorShift 6s ease-in-out infinite;
  transition: background 0.4s ease, -webkit-text-fill-color 0.4s ease;
}

.animated-title:hover {
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: #f0c929;
  color: #f0c929;
}

@keyframes colorShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* === Opiniones (Carrusel) === */
.opiniones {
  margin: auto auto 5vh auto;
  width: 90vw;
  max-width: 35%;
  overflow: hidden;
  border-radius: 1.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  box-shadow: 0 0.2rem 2rem rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(1px);
  background: linear-gradient(to right, #111a, #222a);
  padding: clamp(1rem, 2vw, 2rem);
}



.carousel .testimonial {
  display: none;
  opacity: 0;
  transition: opacity 0.7s ease-in-out;
}
.carousel .testimonial[style*="display: block"] {
  display: block;
  opacity: 1;
}

.testimonial {
  width: 100%;
  max-width: 65vw;
  padding: clamp(1rem, 2vw, 2rem);
  background-color: rgba(0, 0, 0, 0.7);
  border-radius: 1.2rem;
  box-shadow: inset 0 0 0.6rem rgba(255, 255, 255, 0.05);
}
.testimonial p {
  font-size: clamp(1rem, 3.5vw, 1.8rem);
  font-style: italic;
  color: #f0f0f0;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.testimonial cite {
  font-style: normal;
  font-weight: 800;
  font-size: clamp(0.9rem, 2.5vw, 1.4rem);
  margin: 0.7rem 1rem 0 0;
  color: #ffffff;
  display: block;
  text-align: right;
}
.stars {
  color: gold;
  font-size: clamp(1rem, 3vw, 2rem);
  margin: 1rem 0;
  letter-spacing: 0.2rem;
}
.btn-opinion {
  display: inline-block;
  margin-top: 1.2rem;
  padding: 0.75rem 1.5rem;
  font-size: clamp(0.7em, 2vw, 1rem);
  background: linear-gradient(to right, #ffcc00, #ffaa00);
  color: #000;
  font-weight: bold;
  text-decoration: none;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 0.4rem 1rem rgba(255, 204, 0, 0.4);
}
.btn-opinion:hover {
  background: linear-gradient(to right, #e6b800, #cc9900);
  transform: translateY(-0.2rem);
  box-shadow: 0 0.6rem 1.5rem rgba(230, 184, 0, 0.5);
}


/* === Navbar === */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  margin: 2rem auto;
  max-width: 90vw;
  padding: 0.8rem 5vw;
  background: #000;
  display: flex;
  justify-content: center;
  border-radius: 2.5rem;
  flex-wrap: wrap;
}


.nav-list {
  list-style: none;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 100%;
  flex-wrap: wrap;
}

.nav-link {
  color: #fff;
  text-decoration: none;
  position: relative;
  padding: 0.3rem 0;
  font-weight: 700;
  font-size: clamp(1rem, 4vw, 1.5rem);
  text-shadow: 0.05rem 0.05rem 0.2rem black;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link:focus {
  color: #ffcc00;
  animation: pulse 1s infinite alternate;
}

.nav-link::after {
  content: '';
  position: absolute;
  width: 0%;
  height: 0.2rem;
  bottom: 0;
  left: 0;
  background-color: #ffcc00;
  transition: width 0.4s ease;
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}


@keyframes pulse {
  0% { text-shadow: 0 0 4px #ffcc00; }
  100% { text-shadow: 0 0 12px #ffcc00; }
}

/* === Encabezado: logo y redes === */
.header-bar {
  position: absolute;
  top: 24px;
  left: 0;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 2;
  padding: 0 40px;
  pointer-events: none;
}

.logo-izq {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(8px);
  border-radius: 18px;
  padding: 8px 18px;
  transition: background 0.3s;
}
.logo-izq:hover {
  background: rgba(255,255,255,0.55);
}
.logo-izq img {
  height: 156px;
  width: auto;
  display: block;
  border-radius: 14px;
  background: rgba(255,255,255,0.85);
  padding: 4px 10px;
  box-shadow: 0 2px 12px rgba(74,60,140,0.13);
  transition: box-shadow 0.3s, transform 0.2s, background 0.3s;
}
.logo-izq img:hover {
  box-shadow: 0 6px 24px #7c3aed44;
  background: #fff;
  transform: scale(1.04) rotate(-2deg);
}

.redes-der {
  display: flex;
  gap: 22px;
  pointer-events: auto;
}
.redes-der a {
  color: #fff;
  font-size: 2.2rem;
  background: rgba(0,0,0,0.45);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.redes-der a:hover {
  background: #ffcc00;
  color: #4a3c8c;
}

/* =================== RESPONSIVE MOBILE =================== */

/* === MOBILE: hasta 1280px === */
@media (max-width: 1280px) {
  .opiniones {
    width: 80vw;
    max-width: 100%;
  }

  .logo-izq {
    padding: 6px 12px;
    border-radius: 12px;
  }
  .logo-izq:hover {
    background: rgba(255,255,255,0.35);
  }
  .logo-izq img {
    height: 5vw;
    padding: 2px 6px;
    border-radius: 8px;
  }
  .logo-izq img:hover {
    box-shadow: 0 4px 16px #7c3aed33;
    background: #fff;
    transform: scale(1.03) rotate(-1deg);
  }

  .redes-der {
    gap: 14px;
  }
  .redes-der a {
    font-size: 1.5rem;
    width: 2rem;
    height: 2rem;
  }
}