/* Certificados con Grid Scroll */
.certificate-filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 30px;
}

.filter-btn {
  padding: 8px 16px;
  background: var(--light-gray);
  border: none;
  border-radius: 20px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s;
  font-size: 0.9rem;
}

.filter-btn.active,
.filter-btn:hover {
  background: var(--primary);
  color: white;
}

.certificates-scroll-container {
  position: relative;
  overflow: hidden;
  padding: 0 50px;
}

.certificates-grid-scroll {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc(25% - 15px);
  gap: 20px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none; /* Firefox */
  padding: 20px 0;
}

.certificates-grid-scroll::-webkit-scrollbar {
  display: none; /* Chrome, Safari */
}

.certificate-item {
  background: white;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
  transition: transform 0.3s;
}

.certificate-item:hover {
  transform: translateY(-5px);
}

.certificate-img-container {
  position: relative;
  overflow: hidden;
}

.certificate-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.certificate-img-container:hover .certificate-thumb {
  transform: scale(1.05);
}

.certificate-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s;
}

.certificate-img-container:hover .certificate-overlay {
  opacity: 1;
}

.view-cert-btn {
  background: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--primary);
  transition: all 0.3s;
}

.view-cert-btn:hover {
  background: var(--secondary);
  color: white;
  transform: scale(1.1);
}

.certificate-info {
  padding: 15px;
}

.certificate-info h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--primary-dark);
}

.cert-badge {
  background: var(--light-gray);
  color: var(--gray);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.scroll-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  box-shadow: 0 3px 10px rgba(0,0,0,0.1);
  cursor: pointer;
  font-size: 1rem;
  color: var(--primary);
  z-index: 10;
  transition: all 0.3s;
}

.scroll-left {
  left: 0;
}

.scroll-right {
  right: 0;
}

.scroll-btn:hover {
  background: var(--primary);
  color: white;
}

.certificates-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 30px;
  padding: 15px 0;
  border-top: 1px solid var(--light-gray);
}

.cert-counter {
  font-weight: 600;
  color: var(--primary);
}

.view-all-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* Modal para vista ampliada */
.cert-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  z-index: 2000;
  justify-content: center;
  align-items: center;
}

.cert-modal.active {
  display: flex;
}

.cert-modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  animation: modalFade 0.3s;
}

@keyframes modalFade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0,0,0,0.5);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
  transition: background 0.3s;
}

.close-modal:hover {
  background: rgba(0,0,0,0.8);
}

.modal-image-container {
  max-height: 70vh;
  overflow: auto;
}

.modal-image-container img {
  width: 100%;
  height: auto;
  display: block;
}

.modal-cert-info {
  padding: 20px;
  text-align: center;
}

.modal-cert-info h3 {
  margin-bottom: 20px;
  color: var(--primary-dark);
}

.modal-nav {
  display: flex;
  justify-content: center;
  gap: 20px;
}

.modal-nav button {
  padding: 10px 20px;
  background: var(--light-gray);
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.3s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.modal-nav button:hover {
  background: var(--primary);
  color: white;
}

/* Modal de galería completa */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.95);
  z-index: 2000;
  overflow-y: auto;
  padding: 20px;
}

.gallery-modal.active {
  display: block;
}

.gallery-modal-content {
  max-width: 1200px;
  margin: 0 auto;
  background: white;
  border-radius: 10px;
  padding: 30px;
  position: relative;
  animation: modalFade 0.3s;
}

.close-gallery {
  position: absolute;
  top: 15px;
  right: 15px;
  background: var(--primary);
  color: white;
  border: none;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.5rem;
  z-index: 10;
}

.close-gallery:hover {
  background: var(--primary-dark);
}

.gallery-modal-content h3 {
  text-align: center;
  margin-bottom: 30px;
  color: var(--primary);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 15px;
  max-height: 70vh;
  overflow-y: auto;
  padding: 10px;
}

.gallery-item {
  height: 150px;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  transition: transform 0.3s;
  position: relative;
}

.gallery-item:hover {
  transform: scale(1.05);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-item .cert-title {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 5px 10px;
  font-size: 0.8rem;
  opacity: 0;
  transition: opacity 0.3s;
}

.gallery-item:hover .cert-title {
  opacity: 1;
}

/* Responsive para certificados */
@media (max-width: 992px) {
  .certificates-grid-scroll {
      grid-auto-columns: calc(33.333% - 15px);
  }
}

@media (max-width: 768px) {
  .certificates-grid-scroll {
      grid-auto-columns: calc(50% - 15px);
  }
  
  .certificates-scroll-container {
      padding: 0 40px;
  }
  
  .certificates-nav {
      flex-direction: column;
      gap: 15px;
      text-align: center;
  }
}

@media (max-width: 480px) {
  .certificates-grid-scroll {
      grid-auto-columns: calc(100% - 15px);
  }
  
  .certificate-filters {
      justify-content: flex-start;
      overflow-x: auto;
      padding-bottom: 10px;
  }
  
  .filter-btn {
      white-space: nowrap;
  }
  
  .gallery-grid {
      grid-template-columns: repeat(2, 1fr);
  }
}






.accordion {
    margin: 20px 0 30px 0;
    border-radius: 10px;
    overflow: hidden;
}
.accordion-item {
    border-bottom: 1px solid #e0e0e0;
}
.accordion-header {
    background-color: #f9f9f9;
    padding: 15px 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    transition: background-color 0.2s;
}
.accordion-header:hover {
    background-color: #f0f0f0;
}
.accordion-header i {
    transition: transform 0.3s;
}
.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: white;
    padding: 0 20px;
}
.accordion-item.active .accordion-content {
    max-height: 500px; /* Ajusta según la altura de tu texto */
    padding: 20px;
}
.about-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr; /* Ajusta el tamaño de la imagen vs texto */
    gap: 40px;
    align-items: start;
}

.about-text h3 {
    font-size: 2rem;
    margin-bottom: 5px;
    color: #2c3e50;
}
.about-text .subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 20px;
    font-weight: 300;
}
.about-text .intro {
    font-size: 1rem;
    line-height: 1.6;
    color: #34495e;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}
/* ============================================
   FORMACIÓN SIMPLE - 3 IMÁGENES
   ============================================ */

.formacion-simple {
    padding: 60px 0;
    background-color: #fafafa;
}

.fotos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 30px 0;
}

.foto-item {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.foto-item:hover {
    transform: translateY(-5px);
}

.foto-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.foto-info {
    padding: 15px;
}

.foto-info h3 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    margin-bottom: 5px;
}

.foto-info p {
    font-size: 0.9rem;
    color: var(--gray);
    margin: 0;
}

.info-extra {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
}

.info-extra p {
    margin: 8px 0;
    font-size: 0.95rem;
    color: var(--dark);
}

.info-extra i {
    color: var(--primary);
    margin-right: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .fotos-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .foto-item img {
        height: 180px;
    }
}