/*
Theme Name: Tema ASGEM
Theme URI: https://www.asgem.cl
Author: Manuel Valenzuela
Author URI: https://www.asgem.cl
Description: Tema base profesional para ASGEM con hero en degradado azul, menú y footer con redes.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: tema-asgem
*/
:root {
  --azul: #0a3d62;
  --azul-osc: #062743;
  --azul-clar: #0f4b7a;
  --dorado: #ffd700;
  --gris-fondo: #f5f7fa;
  --texto: #222;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  color: var(--texto);
}
header {
  background: #fff;
  color: var(--azul);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand a {
  color: var(--azul);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* estilos logo menu */
.brand .logo {
  height: 70px; /* ajusta el tamaño del logo */
  width: auto;
  display: block;
}
nav {
  position: relative;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
nav a {
  color: var(--azul);
  text-decoration: none;
  font-weight: 600;
}
nav a:hover {
  color: var(--dorado);
}
.hero {
  position: relative;
  text-align: center;
  padding: 160px 20px;
  color: #fff;
  overflow: hidden;
  background: linear-gradient(rgba(10, 61, 98, 0.55), rgba(10, 61, 98, 0.55)),
    url("http://localhost/wordpress/wp-content/themes/tema-asgem/img/hero-bg1.png")
      no-repeat center center/cover;
}

/* Título principal */
.hero h1 {
  font-size: 3rem;
  font-weight: 800;
  margin: 0;
}

/* Palabra ASGEM amarilla */
.hero span {
  color: #ffca28;
}

/* Subtítulo */
.hero p {
  margin-top: 15px;
  font-size: 1.2rem;
  font-weight: 500;
}

/* Botón */
.hero a {
  display: inline-block;
  background: #ffca28;
  color: #fff;
  padding: 14px 30px;
  border-radius: 30px;
  font-weight: 700;
  margin-top: 35px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.hero a:hover {
  background: #ffd84b;
  transform: translateY(-2px);
}
.ventajas {
  padding: 80px 20px;
  background: var(--gris-fondo);
  text-align: center;
}
.ventajas h2 {
  font-size: 2rem;
  margin: 0 0 34px 0;
  color: var(--azul);
}
.ventajas-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px;
}
.ventaja {
  background: #fff;
  padding: 26px;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  text-align: left;
}
.ventaja h3 {
  margin: 0 0 8px 0;
  color: var(--azul);
  font-size: 1.1rem;
}
footer {
  background: var(--azul);
  color: #fff;
  margin-top: 60px;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
}
.social {
  display: flex;
  gap: 14px;
  align-items: center;
}
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.social a:hover {
  background: #fff;
  color: var(--azul);
}
@media (max-width: 768px) {
  .hero {
    padding: 120px 16px 100px;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
  nav ul {
    gap: 18px;
  }
}

.hero {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInHero 1s ease-out forwards;
}

@keyframes fadeInHero {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* === SECCIÓN CURSOS DESTACADOS === */
.cursos-destacados {
  background: #f8fafc;
  padding: 80px 20px;
  text-align: center;
}

.cursos-destacados h2 {
  color: #0a3d62;
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 50px;
}

.cursos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  justify-items: center;
  max-width: 1000px;
  margin: 0 auto;
}

.curso-card {
  background: #002b5c;
  border-radius: 10px;
  overflow: hidden;
  width: 100%;
  max-width: 310px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.curso-card:hover {
  transform: translateY(-6px);
}

.curso-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.curso-info {
  padding: 20px;
  color: #fff;
}

.curso-info h3 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.curso-info p {
  margin: 0 0 15px 0;
  font-size: 0.9rem;
}

/* Botones dentro de las tarjetas */
.btn-curso {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: all 0.3s ease;
}

.btn-curso.amarillo {
  background: #ffca28;
  color: #000;
}

.btn-curso.azul {
  background: #0d517e;
  color: #fff;
}

.btn-curso:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/*SECCION POR QUE ELEGIRNOS*/
.why-choose-us {
  text-align: center;
  padding: 80px 20px;
  background-color: #f8fbff;
}

.why-choose-us h2 {
  font-size: 2.2rem;
  color: #003366;
  margin-bottom: 50px;
  font-weight: 700;
}

.benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
  max-width: 1100px;
  margin: 0 auto;
}

.benefit {
  background: #ffffff;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 30px 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.1);
}

.benefit img {
  width: 70px;
  margin-bottom: 20px;
}

.benefit h3 {
  color: #003366;
  font-size: 1.3rem;
  margin-bottom: 10px;
}

.benefit p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/*SECCION QUE PUEDES ESPERAR */

.expect-section {
  padding: 80px 20px;
  background-color: #fff;
  text-align: center;
}

.expect-section h2 {
  font-size: 2rem;
  color: #003366;
  margin-bottom: 50px;
  font-weight: 700;
}

.expect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
  gap: 40px 60px;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  text-align: left;
}

.expect-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.expect-item img {
  width: 45px;
  flex-shrink: 0;
  filter: grayscale(100%) brightness(0.2) sepia(1) hue-rotate(180deg)
    saturate(4);
}

.expect-item h3 {
  color: #003366;
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.expect-item p {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ESTILOS FOOTER */
.site-footer {
  background-color: #002244;
  color: #e6e9ef;
  padding: 60px 20px 20px;
  font-family: "Poppins", sans-serif;
  background: linear-gradient(to bottom, #002244 60%, #0056b3 100%);
  position: relative;
  overflow: hidden;
}
.site-footer::after {
  content: "";
  position: absolute;
  bottom: -30px;
  left: 0;
  width: 100%;
  height: 120px;
  background: #007bff;
  border-top-left-radius: 60% 40%;
  border-top-right-radius: 60% 40%;
  z-index: 0;
}

.footer-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.footer-logo {
  width: 150px;
  margin-bottom: 15px;
}

.footer-col h4 {
  color: #ffffff;
  font-size: 1.1rem;
  margin-bottom: 15px;
  border-left: 3px solid #00b4ff;
  padding-left: 10px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col ul li {
  margin-bottom: 10px;
}

.footer-col ul li a {
  color: #cbd5e1;
  text-decoration: none;
  transition: color 0.3s;
}

.footer-col ul li a:hover {
  color: #00b4ff;
}

.footer-social a {
  display: inline-block;
  margin-right: 10px;
  color: #cbd5e1;
  font-size: 1.2rem;
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #00b4ff;
}

.footer-bottom {
  text-align: center;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.9rem;
  color: #cbd5e1;
}

/* Fondo difuminado */
.popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 999;
  transition: opacity 0.3s ease;
}

/* Caja del popup */
.popup-content {
  background: #fff;
  border-radius: 20px;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  text-align: center;
  position: relative;
  animation: slideIn 0.3s ease;

  /* 🔽 nuevo ajuste para scroll interno */
  max-height: 60vh; /* limita el alto al 80% de la pantalla */
  overflow-y: auto; /* permite desplazarse hacia abajo */
  scrollbar-width: thin; /* estilo de scroll moderno */
  scrollbar-color: #fdd835 #f1f1f1;
}

/* Opcional: personaliza el scroll en navegadores WebKit */
.popup-content::-webkit-scrollbar {
  width: 8px;
}

.popup-content::-webkit-scrollbar-thumb {
  background-color: #fdd835;
  border-radius: 4px;
}

/* Título */
.popup-content h2 {
  color: #003366;
  margin-bottom: 15px;
}

/* Botones de cursos */
.popup-cursos {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.curso-btn {
  display: block;
  background: #fff;
  border: 2px solid #fdd835;
  color: #003366;
  padding: 10px 16px;
  border-radius: 12px;
  text-decoration: none;
  transition: all 0.3s ease;
  font-weight: 500;
}

.curso-btn:hover {
  background: #fdd835;
  color: #000;
}

/* Botón de cierre */
.cerrar-popup {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 22px;
  cursor: pointer;
  color: #555;
}

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

.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  width: 100%;
  height: 3px;
  background-color: var(--azul);
  border-radius: 2px;
  transition: all 0.3s ease;
}

/* Efecto cuando se activa */
.menu-toggle.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}
.menu-toggle.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* --- Solo para móviles --- */
@media (max-width: 992px) {
  .menu-toggle {
    display: flex;
  }

  #main-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 70%;
    height: 100%;
    background: var(--azul);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    padding-top: 100px;
    z-index: 1000;
  }

  #main-nav.open {
    transform: translateX(0);
  }

  #main-nav ul {
    flex-direction: column;
    gap: 20px;
    text-align: center;
  }

  #main-nav a {
    color: #fff;
    font-size: 1.1rem;
  }

  #main-nav a:hover {
    color: var(--dorado);
  }
}

/* === Overlay para fondo atenuado del menú móvil === */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 900;
}

/* Cuando el overlay está activo */
.menu-overlay.show {
  opacity: 1;
  visibility: visible;
}
