/* ==================== ESTILOS PROGRAMAS Y PROYECTOS ==================== */

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: white;
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.hero-section h1 {
  font-size: 4rem;
  font-weight: 900;
  margin-bottom: 1.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
}

.hero-section p {
  font-size: 1.5rem;
  opacity: 0.95;
  max-width: 800px;
  margin: 0 auto;
  line-height: 1.8;
  font-weight: 300;
}

/* Section Headers */
.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1rem;
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: "";
  position: absolute;
  bottom: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark));
  border-radius: 2px;
}

.section-header p {
  font-size: 1.25rem;
  color: var(--gray-600);
  font-weight: 400;
}

/* Content Sections */
.content-section {
  padding: 4rem 0;
}

.content-section:nth-child(even) {
  background: var(--gray-50);
}

/* Programas Grid */
.programas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.programa-card {
  background: white;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(46, 125, 50, 0.1);
  position: relative;
}

.programa-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(46, 125, 50, 0.05), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.programa-card:hover::after {
  opacity: 1;
}

.programa-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 60px rgba(46, 125, 50, 0.2);
  border-color: var(--primary);
}

.programa-card-image {
  width: 100%;
  height: 280px;
  min-height: 280px;
  max-height: 280px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 50%, var(--primary) 100%);
  background-size: 200% 200%;
  animation: gradientShift 5s ease infinite;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

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

.programa-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.programa-card:hover .programa-card-image img {
  transform: scale(1.1);
}

.programa-card-image::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), transparent, rgba(0, 0, 0, 0.3));
  pointer-events: none;
}

.programa-icon {
  width: 80px;
  height: 80px;
  min-width: 80px;
  min-height: 80px;
  max-width: 80px;
  max-height: 80px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  z-index: 2;
  transition: all 0.4s ease;
}

.programa-card:hover .programa-icon {
  transform: scale(1.1) rotate(5deg);
  background: rgba(255, 255, 255, 0.3);
}

.programa-icon svg {
  width: 48px;
  height: 48px;
  min-width: 48px;
  min-height: 48px;
  max-width: 48px;
  max-height: 48px;
  color: white;
  flex-shrink: 0;
  display: block;
}

.programa-card-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.programa-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.programa-card .programa-description {
  font-size: 1rem;
  color: var(--gray-600);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  flex: 1;
}

.programa-card .programa-features {
  list-style: none;
  padding: 0;
  margin-bottom: 1.5rem;
}

.programa-card .programa-features li {
  font-size: 0.938rem;
  color: var(--gray-700);
  padding: 0.5rem 0;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  line-height: 1.6;
}

.programa-card .programa-features li::before {
  content: "✓";
  color: var(--primary);
  font-weight: 700;
  font-size: 1.125rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.programa-card-footer {
  display: flex;
  gap: 1rem;
  margin-top: auto;
}

.btn-programa {
  flex: 1;
  padding: 0.875rem 1.5rem;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.938rem;
}

.btn-programa:hover {
  background: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.btn-programa-secondary {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}

.btn-programa-secondary:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Programa Detalle */
.programa-detalle {
  background: white;
  padding: 3rem;
  border-radius: 1rem;
  box-shadow: var(--shadow-lg);
  margin-top: 2rem;
}

.programa-detalle-header {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 2px solid var(--gray-200);
}

.programa-detalle-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 1rem;
}

.programa-detalle-header .programa-meta {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
  font-size: 0.938rem;
  color: var(--gray-600);
}

.programa-detalle-content {
  line-height: 1.8;
}

.programa-detalle-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--primary);
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.programa-detalle-content h4 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--gray-900);
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
}

.programa-detalle-content p {
  font-size: 1.063rem;
  color: var(--gray-700);
  margin-bottom: 1.5rem;
}

.programa-detalle-content ul,
.programa-detalle-content ol {
  margin-left: 2rem;
  margin-bottom: 1.5rem;
}

.programa-detalle-content li {
  font-size: 1.063rem;
  color: var(--gray-700);
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

/* Filtros Section */
.filtros-section {
  background: white;
  padding: 2rem 0;
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 70px;
  z-index: 10;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.programa-filters {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.75rem;
  background: white;
  border: 2px solid var(--gray-300);
  border-radius: 2rem;
  font-weight: 600;
  font-size: 0.938rem;
  color: var(--gray-700);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-color: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(46, 125, 50, 0.3);
}

/* Impacto Section */
.impacto-section {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  padding: 5rem 0;
  color: white;
  position: relative;
  overflow: hidden;
}

.impacto-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
  opacity: 0.3;
  pointer-events: none;
}

.impacto-section .section-header h2,
.impacto-section .section-header p {
  color: white;
}

.impacto-section .section-header h2::after {
  background: linear-gradient(90deg, white, rgba(255, 255, 255, 0.5));
}

.impacto-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
  margin-top: 3rem;
  position: relative;
  z-index: 1;
}

.impacto-card {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 3rem 2rem;
  border-radius: 1.5rem;
  text-align: center;
  border: 2px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

.impacto-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-10px);
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.impacto-number {
  font-size: 4rem;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 1.5rem;
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.25rem;
}

.impacto-number .counter {
  font-variant-numeric: tabular-nums;
}

.impacto-card h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1rem;
}

.impacto-card p {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.6;
}

/* CTA Section */
.cta-section {
  background: linear-gradient(180deg, var(--gray-50) 0%, white 100%);
  padding: 5rem 0;
}

.cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
  padding: 4rem 3rem;
  background: white;
  border-radius: 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 1px solid var(--gray-200);
  position: relative;
  overflow: hidden;
}

.cta-content::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, var(--primary), var(--primary-dark), var(--primary));
  background-size: 200% 100%;
  animation: shimmer 3s infinite;
}

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

.cta-content h2 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--gray-900);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.cta-content p {
  font-size: 1.25rem;
  color: var(--gray-600);
  margin-bottom: 2.5rem;
  line-height: 1.7;
}

.cta-buttons {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-cta {
  padding: 1rem 2.5rem;
  border-radius: 0.75rem;
  font-weight: 600;
  font-size: 1.125rem;
  text-decoration: none;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  border: 2px solid transparent;
}

.btn-cta.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

.btn-cta.primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(46, 125, 50, 0.4);
}

.btn-cta.secondary {
  background: white;
  color: var(--primary);
  border-color: var(--primary);
}

.btn-cta.secondary:hover {
  background: var(--primary);
  color: white;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(46, 125, 50, 0.3);
}

/* Asegurar que los SVG dentro de iconos mantengan sus tamaños específicos */
.programa-icon svg,
.impacto-card svg,
.cta-content svg {
  display: block;
}

/* Responsive */

/* Tablet: 768px - 1024px */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-section {
    padding: 4rem 0;
  }

  .hero-section h1 {
    font-size: 3rem;
  }

  .programas-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .impacto-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .programa-card-content {
    padding: 2rem 1.75rem;
  }
}

/* Mobile: < 768px */
@media (max-width: 768px) {
  .hero-section {
    padding: 3rem 0;
  }

  .hero-section h1 {
    font-size: 2.5rem;
  }

  .hero-section p {
    font-size: 1.125rem;
  }

  .section-header h2 {
    font-size: 2rem;
  }

  .section-header p {
    font-size: 1rem;
  }

  .filtros-section {
    position: relative;
    top: 0;
  }

  .programa-filters {
    gap: 0.75rem;
  }

  .filter-btn {
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
  }

  .programas-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .programa-card-image {
    height: 220px;
  }

  .programa-icon {
    width: 60px;
    height: 60px;
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
  }

  .programa-icon svg {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    max-width: 32px;
    max-height: 32px;
  }

  .programa-card-content {
    padding: 1.5rem;
  }

  .programa-card h3 {
    font-size: 1.25rem;
  }

  .programa-card-footer {
    flex-direction: column;
  }

  .btn-programa {
    width: 100%;
  }

  .impacto-section {
    padding: 3rem 0;
  }

  .impacto-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .impacto-number {
    font-size: 3rem;
  }

  .impacto-card h3 {
    font-size: 1.25rem;
  }

  .cta-section {
    padding: 3rem 0;
  }

  .cta-content {
    padding: 2.5rem 2rem;
  }

  .cta-content h2 {
    font-size: 1.75rem;
  }

  .cta-content p {
    font-size: 1rem;
  }

  .cta-buttons {
    flex-direction: column;
    gap: 1rem;
  }

  .btn-cta {
    width: 100%;
    justify-content: center;
  }

  .programa-detalle {
    padding: 2rem 1.5rem;
  }

  .programa-detalle-header h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-section h1 {
    font-size: 2rem;
  }

  .hero-section p {
    font-size: 1rem;
  }

  .section-header h2 {
    font-size: 1.75rem;
  }

  .impacto-number {
    font-size: 2.5rem;
  }

  .cta-content h2 {
    font-size: 1.5rem;
  }

  .btn-cta {
    padding: 0.875rem 1.5rem;
    font-size: 1rem;
  }
}
