/* ==========================================================================
   PLANTILLA DE ESTILOS CORPORATIVOS CECAPP - CENTRO DE CAPACITACIÓN EN ASUNTOS PÚBLICOS Y PRIVADOS
   ========================================================================== */

/* 1. VARIABLES CORPORATIVAS Y TEMA */
:root {
  /* Paleta de colores oficial CECAPP */
  --cecapp-navy-dark: #053B3F;      /* Títulos, topbar y footers */
  --cecapp-blue-primary: #087880;   /* Botones principales y links */
  --cecapp-blue-bright: #0A8A91;    /* Botones de acción (CTA) y destacados */
  --cecapp-blue-light: #F0F6FF;     /* Fondos suaves y badges */
  
  /* Tonos Neutros */
  --cecapp-bg-main: #FFFFFF;        /* Fondo blanco principal */
  --cecapp-bg-alt: #F8FAFC;         /* Fondo gris claro alterno */
  --cecapp-text-main: #1E293B;      /* Texto de lectura */
  --cecapp-text-muted: #64748B;     /* Subtítulos y fechas */
  --cecapp-border: #E2E8F0;         /* Bordes de tarjetas */
  
  /* Indicadores */
  --cecapp-success: #10B981;        /* Matrícula abierta / WhatsApp */
  --cecapp-warning: #F59E0B;        /* Próximo inicio */
  
  /* Tipografía y Sombras */
  --font-heading: 'Poppins', system-ui, -apple-system, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --radius-sm: 6px;
  --radius-md: 10px;
}

/* 2. RESET Y ESTILOS BASE */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  color: var(--cecapp-text-main);
  background-color: var(--cecapp-bg-main);
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color 0.2s ease;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* 3. BARRA SUPERIOR DE CONTACTO (TOPBAR) */
.topbar {
  background-color: var(--cecapp-navy-dark);
  color: #FFFFFF;
  font-size: 0.85rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.topbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-info span {
  margin-right: 20px;
}

.topbar-social a {
  color: var(--cecapp-success);
  font-weight: 600;
}

.topbar-social a:hover {
  text-decoration: underline;
}

/* 4. CABECERA INSTITUCIONAL Y NAVEGACIÓN */
.header {
  background: #FFFFFF;
  border-bottom: 1px solid var(--cecapp-border);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--cecapp-navy-dark);
}

.logo-text span {
  color: var(--cecapp-blue-bright);
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
  align-items: center;
}

.nav-menu a {
  font-weight: 500;
  color: var(--cecapp-navy-dark);
  font-size: 0.95rem;
}

.nav-menu a:hover {
  color: var(--cecapp-blue-bright);
}

/* BOTONES */
.btn-primary {
  background-color: var(--cecapp-blue-primary);
  color: #FFFFFF !important;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  border: none;
  cursor: pointer;
  display: inline-block;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background-color: var(--cecapp-blue-bright);
  transform: translateY(-1px);
}

/* 5. BANNER PROMOCIONAL (HERO) */
.hero-banner {
  background: linear-gradient(135deg, var(--cecapp-navy-dark) 0%, var(--cecapp-blue-primary) 100%);
  color: #FFFFFF;
  padding: 70px 0;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.hero-text h1 {
  font-family: var(--font-heading);
  font-size: 2.3rem;
  margin-bottom: 15px;
  line-height: 1.25;
}

.hero-text p {
  font-size: 1.05rem;
  margin-bottom: 25px;
  opacity: 0.9;
}

.hero-image img {
  width: 100%;
  max-height: 380px;
  object-fit: cover;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

/* 6. GRILLA Y TARJETAS DE CURSOS */
.section-title {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--cecapp-navy-dark);
  margin: 50px 0 30px;
}

.courses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.course-card {
  background: #FFFFFF;
  border: 1px solid var(--cecapp-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.course-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.course-cover {
  height: 180px;
  width: 100%;
  object-fit: cover;
}

.course-body {
  padding: 20px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.course-badge {
  align-self: flex-start;
  background-color: var(--cecapp-blue-light);
  color: var(--cecapp-blue-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.course-title {
  font-size: 1.15rem;
  font-family: var(--font-heading);
  color: var(--cecapp-navy-dark);
  margin-bottom: 10px;
  line-height: 1.3;
}

.course-summary {
  font-size: 0.88rem;
  color: var(--cecapp-text-muted);
  margin-bottom: 15px;
  flex-grow: 1;
}

.course-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--cecapp-border);
  padding-top: 15px;
}

.course-price {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--cecapp-navy-dark);
}

.course-price-old {
  text-decoration: line-through;
  color: var(--cecapp-text-muted);
  font-size: 0.88rem;
  margin-right: 6px;
}

/* 7. ADAPTABILIDAD PARA MÓVILES (RESPONSIVE) */
@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .topbar-content {
    flex-direction: column;
    gap: 5px;
    text-align: center;
  }
  
  .topbar-info span {
    display: block;
    margin-right: 0;
  }
  
  .nav-menu {
    gap: 12px;
    font-size: 0.85rem;
  }
}

/* ==========================================================================
   POP-UP PROMOCIONAL FLOTANTE (MODAL DESTACADO)
   ========================================================================== */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(5, 59, 63, 0.75);
  backdrop-filter: blur(4px);
  z-index: 99999;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 20px;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-container {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  max-width: 460px;
  width: 100%;
  position: relative;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
  transform: scale(0.85);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  border: 2px solid var(--cecapp-blue-bright);
}

.popup-overlay.active .popup-container {
  transform: scale(1);
}

.popup-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--cecapp-navy-dark);
  color: #FFFFFF;
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}

.popup-close-btn:hover {
  background: var(--cecapp-blue-bright);
}

.popup-image-wrapper {
  width: 100%;
  height: 260px;
  overflow: hidden;
}

.popup-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.popup-body {
  padding: 20px;
  text-align: center;
  background: #FFFFFF;
}

.popup-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--cecapp-navy-dark);
  margin-bottom: 12px;
  line-height: 1.25;
}

.popup-btn {
  width: 100%;
  display: block;
  text-align: center;
  padding: 12px 20px;
  font-size: 1rem;
  border-radius: var(--radius-sm);
  background: var(--cecapp-blue-bright);
  box-shadow: 0 4px 10px rgba(10, 138, 145, 0.3);
}

.popup-btn:hover {
  background: var(--cecapp-blue-primary);
}



