/* ============================================
   ESTILOS PARA RECONOCIMIENTOS (ACORDEONES)
   ============================================ */

.content-page-modern {
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 0 !important;
  width: 100%;
}

.reconocimientos-container {
  margin: var(--spacing-xl) 0;
}

/* ================= ACORDEÓN ================= */
.accordion-reconocimiento {
  background: white;
  border-radius: 24px;
  box-shadow: 0 5px 20px -8px rgba(0, 0, 0, 0.08);
  border: 1px solid #f0f0f0;
  margin-bottom: var(--spacing-lg);
  overflow: hidden;
  transition: box-shadow 0.3s ease;
}

.accordion-reconocimiento:hover {
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.12);
}

/* HEADER CLICKEABLE (cuando tiene info extra) */
.accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease;
}

.accordion-header:hover {
  background: linear-gradient(135deg, #f0f2f5, #ffffff);
}

/* HEADER ESTÁTICO (cuando NO tiene info extra, no es clickeable) */
.accordion-header-static {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-lg);
  background: linear-gradient(135deg, #f8f9fa, #ffffff);
  border: none;
  cursor: default;
}

/* Estructura del título */
.accordion-titulo {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  flex: 1;
}

.accordion-icono {
  width: 60px;
  height: 60px;
  background: var(--color-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.accordion-icono svg {
  width: 30px;
  height: 30px;
  color: white;
}

.accordion-textos {
  text-align: left;
  flex: 1;
}

.accordion-textos h3 {
  font-size: 1.2rem;
  color: var(--color-secondary);
  margin-bottom: 0.25rem;
}

.accordion-org {
  font-size: 0.85rem;
  color: var(--color-primary);
  font-weight: 600;
}

/* Flecha (solo cuando hay despliegue) */
.accordion-flecha {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(205, 0, 0, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.accordion-flecha i {
  color: var(--color-primary);
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.accordion-header.active .accordion-flecha i {
  transform: rotate(180deg);
}

/* Contenido desplegable */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease-out;
}

.accordion-content.show {
  max-height: 800px;
  transition: max-height 0.5s ease-in;
}

.accordion-body {
  padding: var(--spacing-lg);
  border-top: 1px solid #f0f0f0;
  background: #ffffff;
}

/* Contenido interno del reconocimiento */
.reconocimiento-contenido {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-lg);
}

.reconocimiento-texto p {
  color: var(--color-gray-dark);
  line-height: 1.6;
  margin-bottom: var(--spacing-md);
  font-size: 0.95rem;
}

.detalles-listado {
  background: #f8f9fa;
  border-radius: 16px;
  padding: var(--spacing-md);
  margin: var(--spacing-md) 0;
}

.detalle-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: var(--spacing-sm);
}

.detalle-item:last-child {
  margin-bottom: 0;
}

.detalle-item i {
  color: var(--color-primary);
  width: 20px;
  margin-top: 2px;
  font-size: 0.9rem;
}

.detalle-item span {
  font-size: 0.85rem;
  color: var(--color-gray-dark);
  line-height: 1.5;
}

.texto-cierre {
  font-style: italic;
  border-left: 3px solid var(--color-primary);
  padding-left: var(--spacing-md);
  margin-top: var(--spacing-md);
  font-size: 0.9rem;
}

/* Galería de imágenes */
.reconocimiento-galeria {
  border-radius: 16px;
  overflow: hidden;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.galeria-item {
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.galeria-item:hover img {
  transform: scale(1.03);
}

/* Clase para los que NO tienen información extra */
.accordion-sin-info {
  opacity: 0.9;
}

.accordion-sin-info .accordion-header-static {
  cursor: default;
}

/* ============================================
   ESTILOS PARA IMÁGENES ÚNICAS (TAMAÑO MEDIANO - ELEGANTE)
   ============================================ */

.reconocimiento-imagen-unica {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.marco-imagen {
    max-width: 280px;
    width: 100%;
    margin: 0 auto;
    border-radius: 16px;
    background: white;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    border: 1px solid #e8e8e8;
}

.marco-imagen:hover {
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-color: var(--color-primary);
}

.galeria-item-unico {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    background: #f8f9fa;
}

.galeria-item-unico img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

.galeria-item-unico:hover img {
    transform: scale(1.05);
}

.overlay-imagen {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(205, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    opacity: 0;
    transition: opacity 0.3s ease;
    color: white;
}

.overlay-imagen i {
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.overlay-imagen span {
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 1px;
    background: rgba(0,0,0,0.6);
    padding: 4px 12px;
    border-radius: 20px;
}

.galeria-item-unico:hover .overlay-imagen {
    opacity: 1;
}

/* ============================================
   LIGHTBOX / MODAL PARA IMÁGENES
   ============================================ */

/* Contenedor de la imagen con overlay */
.galeria-item {
  position: relative;
  cursor: pointer;
  background: #f8f9fa;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 1 / 1;
}

.galeria-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.galeria-item:hover img {
  transform: scale(1.05);
}

/* Overlay que aparece al hacer hover */
.galeria-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(205, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.galeria-item:hover .galeria-overlay {
  opacity: 1;
}

.galeria-overlay i {
  color: white;
  font-size: 1.8rem;
  background: rgba(0, 0, 0, 0.6);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.lightbox.show {
  display: flex;
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  font-size: 2rem;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.2s ease;
  background: none;
  border: none;
}

.lightbox-close:hover {
  color: var(--color-primary);
}

/* ================= RESPONSIVE ================= */
/* Tablets y móviles grandes */
@media (max-width: 992px) {
  .reconocimiento-contenido {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  /* CENTRADO TOTAL DE ÍCONOS EN MÓVIL */
  .accordion-header,
  .accordion-header-static {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }
  
  .accordion-titulo {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 0.75rem;
  }
  
  .accordion-icono {
    margin: 0 auto;
  }
  
  .accordion-textos {
    text-align: center;
    width: 100%;
  }
  
  /* La flecha también se centra */
  .accordion-flecha {
    margin: 0 auto;
  }
  
  .accordion-header,
  .accordion-header-static {
    padding: var(--spacing-md);
  }
}

/* Móviles */
@media (max-width: 768px) {
  .accordion-textos h3 {
    font-size: 1rem;
  }
  
  .accordion-org {
    font-size: 0.75rem;
  }
  
  .accordion-icono {
    width: 50px;
    height: 50px;
  }
  
  .accordion-icono svg {
    width: 25px;
    height: 25px;
  }
  
  .accordion-body {
    padding: var(--spacing-md);
  }
  
  .galeria-grid {
    gap: 8px;
  }
  
  .detalle-item span {
    font-size: 0.75rem;
  }
  
  /* Imagen única responsive */
  .marco-imagen {
    max-width: 240px;
    padding: 10px;
  }
  
  .overlay-imagen i {
    font-size: 1.4rem;
  }
  
  .overlay-imagen span {
    font-size: 0.7rem;
    padding: 3px 10px;
  }
}

/* Móviles pequeños */
@media (max-width: 576px) {
  .accordion-icono {
    width: 45px;
    height: 45px;
  }
  
  .accordion-icono svg {
    width: 22px;
    height: 22px;
  }
  
  .accordion-textos h3 {
    font-size: 0.9rem;
  }
  
  .accordion-flecha {
    width: 32px;
    height: 32px;
  }
  
  .accordion-flecha i {
    font-size: 0.85rem;
  }
  
  /* Imagen única más grande en móvil */
  .marco-imagen {
    max-width: 220px;
    padding: 8px;
  }
  
  .overlay-imagen i {
    font-size: 1.3rem;
  }
  
  .overlay-imagen span {
    font-size: 0.65rem;
    padding: 2px 8px;
  }
}

@media (max-width: 480px) {
  .galeria-overlay i {
    font-size: 1.2rem;
    width: 35px;
    height: 35px;
  }
  
  .lightbox-close {
    top: -35px;
    font-size: 1.5rem;
  }
}