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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #fff;
  color: #0a2540;
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 85px;
}

/* ===============================
   HEADER
================================= */
header {
  position: fixed;
  width: 100%;
  top: 0;
  padding: 15px 8%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  z-index: 1000;
}

.logo img {
  height: 55px;
}

nav a {
  margin-left: 25px;
  text-decoration: none;
  font-weight: 600;
  color: #0a2540;
  transition: 0.3s ease;
}

nav a:hover {
  color: #0077cc;
}

/* ===============================
   HERO VIDEO OPTIMIZADO
================================= */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 110%;
  height: 110%;
  object-fit: cover;
  transform: translate(-50%, -50%);
  z-index: -2;
  filter: brightness(0.65) contrast(1.1);
}

.hero-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 50, 120, 0.005),
    rgba(0, 70, 150, 0.005)
  );
  z-index: -1;
}

.hero-content {
  color: #fff;
  max-width: 850px;
  padding: 20px;
}

.hero-content h1 {
  font-size: 3rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 30px;
}

/* ===============================
   BOTÓN
================================= */
.btn-primary {
  display: inline-block;
  padding: 14px 35px;
  background: #0077cc;
  color: #fff;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.btn-primary:hover {
  background: #005fa3;
  transform: translateY(-4px);
}

/* ===============================
   SECCIONES
================================= */
section {
  padding: 70px 8%;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  margin-bottom: 45px;
  font-weight: 800;
}

/* ===============================
   CARDS
================================= */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.service-card {
  background: #fff;
  padding: 30px;
  border-radius: 20px;
  box-shadow: 0 15px 35px rgba(0,0,0,0.05);
  transition: 0.4s cubic-bezier(.22,1,.36,1);
}

.service-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0,0,0,0.1);
}

.service-card h3 {
  margin-bottom: 15px;
  color: #0077cc;
}

/* ===============================
   PARALLAX ESTABLE PRODUCCIÓN
================================= */

.parallax-section {
  position: relative;
  height: 450px;
  background-image: url('../assets/images/fondo-industrial.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.parallax-overlay {
  position: absolute;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 40, 90, 0.05),
    rgba(0, 60, 120, 0.05)
  );
}

/* En móviles se desactiva fixed para evitar bug */
@media (max-width: 992px) {
  .parallax-section {
    background-attachment: scroll;
  }
}

/* ===============================
   CONTACTO
================================= */
#cursos {
  padding-bottom: 30px;
}

#contacto {
  padding-top: 40px;
}

footer {
  background: #0a2540;
  color: #fff;
  text-align: center;
  padding: 40px 20px;
}

/* ===============================
   ANIMACIÓN TIPO APPLE
================================= */
.reveal {
  opacity: 0;
  transform: translateY(60px);
  transition: all 1.2s cubic-bezier(.22,1,.36,1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* ===============================
   RESPONSIVE
================================= */
@media (max-width: 768px) {
  nav {
    display: none;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .parallax-container {
    height: 300px;
  }
}