/* ===========================
   style.css - Versión consolidada
   Incluye: Global, Hero, Hero-heroix, Carousel, Botones,
            Cursos (curso-header, course-card, precios, price-card),
            Footer, Servicios y Responsive.
   =========================== */

/* ===== Global ===== */
:root {
  --hero-overlay-1: rgba(0,0,0,.65);
  --hero-overlay-2: rgba(0,0,0,.30);
  --font-sans: 'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  margin: 0;
  background: #fff;
  color: #111827;
}

/* Utilidad para secciones con padding  */
.py-6 { padding-top: 4rem; padding-bottom: 4rem; }

/* ===== Navbar ===== */
.navbar .btn { margin-left: .5rem; }

/* ===== Tipos responsivos ===== */
h1.display-3 { font-size: clamp(2rem, 6vw, 3.5rem); }
h2.text-center { font-size: clamp(1.4rem, 3.2vw, 2.1rem); }
h3.fw-bold { font-size: clamp(1.2rem, 2.6vw, 1.6rem); }

/* ===== Hero Mejorado ===== */
.hero-banner {
  position: relative;
  min-height: 85vh;
  background: url('img/portada.jpg') center/cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  isolation: isolate; /* capas correctas con overlay */
}
.hero-banner .overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom right, var(--hero-overlay-1), var(--hero-overlay-2));
  z-index: 1;
}
.hero-banner .container { position: relative; z-index: 2; padding: 4rem 1rem; }
.hero-banner h1 { text-shadow: 2px 2px 8px rgba(0,0,0,.7); letter-spacing: .3px; }
.hero-banner p  { text-shadow: 1px 1px 6px rgba(0,0,0,.6); max-width: 720px; margin-inline: auto; }
.hero-banner .btn {
  border-radius: 999px; font-weight: 700;
  transition: transform .25s ease, box-shadow .25s ease, opacity .25s ease;
}
.hero-banner .btn:hover { transform: translateY(-2px); box-shadow: 0 1rem 2rem rgba(0,0,0,.25); opacity: .95; }

/* Parallax opcional: añade .parallax al <header> si quieres */
.hero-banner.parallax { background-attachment: fixed; }

/* Zoom de fondo opcional: añade .zoom-bg */
.hero-banner.zoom-bg { overflow: hidden; }
.hero-banner.zoom-bg::before {
  content: ""; position: absolute; inset: 0;
  background: inherit; background-size: inherit; background-position: inherit;
  transform: scale(1.05);
  animation: heroZoom 10s ease-in-out infinite alternate;
  z-index: 0; filter: saturate(1.02);
}
@keyframes heroZoom { 0% {transform:scale(1.05);} 100% {transform:scale(1.12);} }

/* ===== Hero "Leonardo" - floating gallery ===== */
.hero-heroix { position: relative; overflow: hidden; min-height: 80vh; display:flex; align-items:center; }
.hero-heroix .hero-bg{
  position:absolute; inset:0;
  background-image: linear-gradient(135deg, rgba(4,8,22,0.6), rgba(18,54,120,0.25)), url('img/portada.jpg');
  background-size:cover; background-position:center;
  filter: saturate(1.02) contrast(1.03);
  transform-origin:center;
  transition: transform 0.6s ease;
  z-index:0;
}

/* container e inner */
.hero-inner{ position: relative; z-index:2; padding:4rem 1rem; display:grid; grid-template-columns: 1fr; align-items:center; }
.hero-content{ margin-bottom: 2rem; }

/* Tipografía */
.hero-title{ font-size: clamp(1.8rem, 4.8vw, 3.6rem); color:#fff; font-weight:800; text-shadow: 0 8px 30px rgba(2,6,23,.6); margin-bottom:.6rem; }
.hero-sub{ color:rgba(255,255,255,.92); font-size: clamp(1rem,2.4vw,1.45rem); margin-bottom:1.25rem; }

/* CTA - boton moderno reutilizable */
.btn-modern{
  display:inline-block;
  padding:12px 32px;
  border-radius:50px;
  font-weight:700;
  background:linear-gradient(135deg,#f97316,#facc15);
  color:#111827;
  box-shadow:0 10px 30px rgba(0,0,0,.25);
  text-decoration:none;
  transition: all .3s ease;
  cursor:pointer;
}

/* hover for .btn-modern (más pronunciado) */
.btn-modern:hover{
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 12px 20px rgba(0,0,0,0.25);
  color: #111827;
}

/* variantes de btn-modern */
.btn-modern.primary{ background: linear-gradient(135deg,#0d6efd,#3b8bff); color:#fff; }
.btn-modern.primary:hover{ background: linear-gradient(135deg,#0b5ed7,#367ae6); }
.btn-modern.success{ background: linear-gradient(135deg,#198754,#28a96b); color:#fff; }
.btn-modern.success:hover{ background: linear-gradient(135deg,#157347,#239a60); }
.btn-modern.dark-outline{ background:#fff; color:#111827; border:2px solid #111827; }
.btn-modern.dark-outline:hover{ background:#111827; color:#fff; }

/* Gallery container (posicion absoluta central) */
.hero-gallery{
  position: absolute; inset:0; pointer-events:none; z-index:1;
  display:block; width:100%; height:100%;
}

/* Base para cada tarjeta (central y flotantes) */
.hero-card{
  position: absolute;
  width: clamp(110px, 17vw, 320px);
  height: clamp(110px, 17vw, 320px);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 50px rgba(2,8,23,0.45);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(0,0,0,0.06));
  backdrop-filter: blur(4px);
  transform-origin: center;
  transition: transform .35s cubic-bezier(.2,.9,.2,1), box-shadow .25s;
  pointer-events:auto; /* permite foco/hover en cards */
}

/* central (más grande, centrada) */
.hero-center{
  left: 50%; top: 52%;
  transform: translate(-50%,-50%) scale(1);
  width: clamp(220px, 36vw, 520px);
  height: clamp(220px, 36vw, 520px);
  border-radius: 26px;
  z-index: 5;
  transition: transform .35s cubic-bezier(.2,.9,.2,1), box-shadow .35s;
}
.hero-center img{ width:100%; height:100%; object-fit:cover; display:block; }

/* flotantes: colocación inicial usando percentages - puedes ajustar */
.hero-float{ z-index: 3; width: clamp(110px,15vw,220px); height: clamp(110px,15vw,220px); pointer-events:auto; }
.hero-float img{ width:100%; height:100%; object-fit:cover; display:block; }

/* posicionamiento manual aproximado (para 4 floats) */
.hero-float:nth-of-type(1){ left: 14%; top: 28%; transform: translate(-10%,-10%) rotate(var(--r, -12deg)); }
.hero-float:nth-of-type(2){ left: 78%; top: 24%; transform: translate(-50%,-10%) rotate(var(--r, 10deg)); }
.hero-float:nth-of-type(3){ left: 12%; top: 68%; transform: translate(-10%,-10%) rotate(var(--r, -6deg)); }
.hero-float:nth-of-type(4){ left: 82%; top: 68%; transform: translate(-50%,-10%) rotate(var(--r, 8deg)); }

/* caption pequeño en la central */
.hero-card-caption{
  position:absolute; left:12px; bottom:12px; z-index:6; font-weight:700; color:#fff;
  background: linear-gradient(90deg, rgba(0,0,0,.35), rgba(255,255,255,.02)); padding:6px 10px; border-radius:10px; font-size:.95rem;
}

/* hover/active effects */
.hero-card:hover{ transform: translateY(-10px) scale(1.02) rotate(calc(var(--r,0deg) * 0.4)); box-shadow:0 28px 70px rgba(2,8,23,0.55); }
.hero-center:focus, .hero-center:hover{ transform: translate(-50%,-50%) scale(1.04); box-shadow:0 40px 90px rgba(2,8,23,0.7); outline: none; }

/* small screens: stack layout */
@media (max-width:991px){
  .hero-heroix{ min-height:60vh; }
  .hero-float{ display:none; } /* escondemos flotantes en pantallas pequeñas para mantener performance */
  .hero-center{ left:50%; top:50%; transform:translate(-50%,-50%); width:80vw; height:52vw; }
}

/* ===== Carousel: movimiento suave de la imagen (parallax + hover zoom) ===== */
.carousel-item img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}

.carousel-img-wrap {
  position: relative;
  overflow: hidden;
  height: 100%;
  min-height: 260px;
  display:flex;
  align-items:center;
  justify-content:center;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0.04));
}

.carousel-img-wrap img {
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  transform-origin: center;
  transition: transform 0.6s cubic-bezier(.2,.9,.2,1), filter .4s;
  will-change: transform;
  backface-visibility: hidden;
}

/* Hover desktop: scale más pronunciado */
@media (hover: hover) and (pointer: fine) {
  .carousel-img-wrap:hover img {
    transform: scale(1.06);
    filter: saturate(1.03);
  }
}

/* Mobile: ajustar alto de la imagen para que no empuje */
@media (max-width: 767.98px) {
  .carousel-img-wrap { min-height: 180px; }
  .carousel-item .col-md-6 { padding: 0; } /* evita gaps */
  .carousel-item .bg-light { padding: 1.25rem; }
  .carousel-indicators { display:flex; justify-content:center; gap:.5rem; margin-top:1rem; }
}

/* Asegurar que la imagen no sobresalga de las esquinas redondeadas del contenedor */
.carousel-inner .carousel-item .carousel-img-wrap,
.carousel-inner .carousel-item img {
  border-radius: 0; /* la rounded-start-4 en img original hará las esquinas correctas */
}

/* rounded start helper if used */
.carousel-item .d-block.rounded-start-4 { border-top-left-radius: .75rem; border-bottom-left-radius: .75rem; }

/* ===== Botones personalizados (btn-custom) ===== */
.btn-custom {
  position: relative;
  display: inline-block;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.65rem;
  border: none;
  background: linear-gradient(135deg, #0066cc, #0099ff);
  color: #fff;
  font-size: 1rem;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 102, 204, 0.4);
  transition: all 0.3s ease;
}

.btn-custom:hover,
.btn-custom:focus {
  background: linear-gradient(135deg, #0052a3, #0080cc);
  box-shadow: 0 6px 18px rgba(0, 102, 204, 0.55);
  transform: translateY(-2px);
  color: #fff;
}

.btn-custom:active {
  transform: translateY(0);
  box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
}

/* Variante clara */
.btn-custom-light {
  background: #fff;
  color: #0066cc;
  border: 2px solid #0066cc;
  box-shadow: 0 3px 10px rgba(0, 102, 204, 0.15);
}

.btn-custom-light:hover,
.btn-custom-light:focus {
  background: #0066cc;
  color: #fff;
  box-shadow: 0 5px 15px rgba(0, 102, 204, 0.35);
}

/* Asegurar buen tamaño en móviles */
@media (max-width: 576px) {
  .btn-custom,
  .btn-custom-light {
    padding: 0.65rem 1.2rem;
    font-size: 0.95rem;
  }
}

/* ===== Footer estilo Leonardo AI ===== */
.footer {
  background: linear-gradient(135deg, #0a1f44 0%, #0d3b73 50%, #0a1f44 100%);
  color: #fff;
  padding: 3rem 1rem;
  font-family: 'Poppins', sans-serif;
  position: relative;
  overflow: hidden;
}

.footer::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: pulse 15s infinite linear;
}

@keyframes pulse {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.footer a {
  color: #fff;
  text-decoration: none;
  transition: all 0.3s ease;
}

.footer a:hover {
  color: #ffd700;
  transform: translateY(-3px);
}

.footer h5 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: #ffd700;
}

.footer .social-icons {
  display: flex;
  gap: 1rem;
}

.footer .social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
}

.footer .social-icons a:hover {
  background: linear-gradient(135deg, #ffd700, #ffb700);
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.5);
  transform: translateY(-4px) scale(1.1);
}

.footer .row > div {
  margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
  .footer {
    text-align: center;
  }
  .footer .social-icons {
    justify-content: center;
  }
}

/* =======================
   Sección Nuestros Servicios estilo footer
   ======================= */
#servicios {
  background: linear-gradient(135deg, #0a1f44 0%, #0d3b73 50%, #0a1f44 100%);
  color: #fff;
  padding: 4rem 1rem;
  position: relative;
  overflow: hidden;
}

#servicios::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at center, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: pulse 15s infinite linear;
  z-index: 0;
}

#servicios h2,
#servicios h4,
#servicios p {
  position: relative;
  z-index: 1;
}

#servicios i {
  color: #fff;
  transition: all 0.3s ease;
}

#servicios .col-md-4:hover i {
  color: #ffd700;
  transform: scale(1.2);
}

#cursos-section {
  background: linear-gradient(135deg, #f0f4ff, #d9e2ff);
  padding: 6rem 1rem;
}



/* ===== Tarjetas de cursos (cursos.html) ===== */
.course-card {
  border:3px solid transparent;
  border-radius:12px;
  transition:border-color .3s, transform .3s, box-shadow .3s;
  background: #fff;
  overflow: hidden;
}
.course-card:hover {
  border-color:#f97316;
  transform: translateY(-6px);
  box-shadow:0 12px 20px rgba(0,0,0,.2);
}
.course-card .card-body .card-title{ font-size:1.8rem; }
.course-card .card-body .microcopy{ font-size:1.2rem; color: #6b7280; }
.course-card .card-body .feature-list{ font-size:1.1rem; margin-top: .5rem; color: #374151; }
.course-card .card-body .feature-list li i{ font-size:1.2rem; color: #10B981; }
.course-card .card-body .btn{ font-size:1.15rem; padding:.6rem 1.2rem; }

/* ===== "Lo que aprenderás" ===== */
/* tu selector original parecía una mezcla; lo expandí para cubrir los casos más probables */
.aprenderas h2,
.aprenderas .h3.fw-bold {
  font-size:2.618rem;
  margin-bottom:1.618rem;
}
.aprenderas .feature-list li{ font-size:1.2rem; margin-bottom:.618rem; }
.aprendizaje li::before{ content:'✔'; color:#10B981; font-weight:700; margin-right:.4rem; }

/* ===== Precios y planes ===== */
.precios { display:flex; flex-wrap:wrap; gap:1.618rem; justify-content:center; margin-bottom:2.618rem; }
.plan {
  border:3px solid #111827;
  border-radius:12px;
  padding:1rem;
  width:260px;
  background:#fff;
  text-align:center;
  box-shadow:0 4px 8px rgba(0,0,0,.1);
  transition:transform .3s, box-shadow .3s;
  display:flex; flex-direction:column;
}
.plan:hover { transform: translateY(-8px); box-shadow:0 12px 20px rgba(0,0,0,.2); }
.plan h3{ font-size:1.35rem; margin-bottom:.618rem; }
.precio{ font-size:1.1rem; text-decoration:line-through; color:#666; }
.descuento{ font-size:1.2rem; color:#e11d48; font-weight:700; }



/* ===== Misc helpers ===== */
.text-primary { color: #0d6efd !important; }

/* ===== Botón moderno reutilizable (más compacto) ===== */
.btn-modern{
  display:inline-block; padding:10px 24px; font-size:1.1rem; font-weight:700; border-radius:50px;
  background: linear-gradient(135deg,#f97316,#facc15); color:#111827; border:none;
  transition: all .3s ease; text-align:center; box-shadow:0 6px 12px rgba(0,0,0,.15); text-decoration:none; cursor:pointer;
}
.btn-modern:hover{
  background: linear-gradient(135deg,#facc15,#f97316);
  transform: translateY(-3px) scale(1.05);
  box-shadow:0 12px 20px rgba(0,0,0,.25);
  color:#111827;
}
.btn-modern:active{ transform: translateY(0) scale(.98); box-shadow:0 4px 8px rgba(0,0,0,.2); }

/* ===== Responsive pequeño ===== */
@media (max-width:575px){
  .course-card .card-body .card-title{ font-size:1.25rem; }
  .btn-modern{ padding:10px 16px; font-size:1rem; }
}

/* ===== GLOBAL small responsive adjustments ===== */
@media (max-width: 992px) {
  .hero-banner { min-height: 75vh; }
  .hero-inner { padding: 3rem 1rem; }
}
@media (max-width: 576px) {
  .hero-banner .btn { padding: .9rem 2rem; }
  .btn-custom, .btn-custom-light { padding: 0.65rem 1.2rem; font-size: 0.95rem; }
  .btn-modern { padding: 10px 16px; }
}

/* Respeta reduce motion */
@media (prefers-reduced-motion: reduce) {
  .hero-banner .btn { transition: none; }
  .hero-banner.zoom-bg::before { animation: none; transform: none; }
  .hero-card, .hero-center, .carousel-img-wrap img { transition: none !important; animation: none !important; }
}

/* End of file */


