/* =====================================
   VARIABLES Y CONFIGURACIÓN GLOBAL (FadCam)
===================================== */
:root {
  --primary-color: #e53935;
  --secondary-color: #0a0a0a;
  --card-bg: rgba(10, 10, 10, 0.85);
  --card-border: rgba(229, 57, 53, 0.25);
  --border-subtle: rgba(229, 57, 53, 0.3);
  --backdrop-blur: 10px;
  --transition-speed: 0.3s;
  --shadow-light: 0 5px 15px rgba(0, 0, 0, 0.5);
  --shadow-dark: 0 10px 30px rgba(229, 57, 53, 0.15);
  --text-light: #f3f4f6;
  --text-muted: #aaaaaa;
}

/* =====================================
   SECCIÓN ESTUDIOS
===================================== */
.estudios-section {
  padding: 4rem 2rem;
  background: transparent;
  text-align: center;
  max-width: 1200px;
  margin: 0 auto;
}

.estudios-header {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.estudios-header-line {
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin-bottom: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-color);
}

.estudios-header h2 {
  font-size: 2.5rem;
  color: var(--text-light);
  font-weight: 700;
  text-shadow: 0 0 15px rgba(229, 57, 53, 0.4);
  margin: 0;
}

/* === GRID de Estudios (2 columnas fijas) === */
.estudios-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  padding: 20px;
  justify-content: center;
}

/* === Tarjeta de Estudio === */
.estudio-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
  box-shadow: var(--shadow-light);
  opacity: 0;
  transform: scale(0.9);
}

.estudio-card.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.estudio-card:hover {
  transform: translateY(-8px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-dark);
}

/* === Icono de Estudio (círculo con logo) === */
.estudio-icon-container {
  width: 100px;
  height: 100px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-color);
  padding: 5px;
  background: transparent;
  backdrop-filter: blur(4px);
  box-shadow: 0 0 15px rgba(229, 57, 53, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.estudio-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* === Texto dentro de la tarjeta === */
.estudio-content h3 {
  font-size: 1.4rem;
  color: var(--text-light);
  margin-bottom: 0.5rem;
}

.estudio-school {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.estudio-years {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.estudio-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(229, 57, 53, 0.15);
  color: var(--primary-color);
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
}

.estudio-badge.completed {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border: 1px solid rgba(76, 175, 80, 0.3);
}

/* =====================================
   SECCIÓN DOCUMENTOS
===================================== */
.documentos-section {
  padding: 4rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
  background: transparent;
}

/* === Encabezado === */
.documentos-header {
  margin-bottom: 3rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.documentos-header-line {
  width: 60px;
  height: 4px;
  background-color: var(--primary-color);
  margin-bottom: 1rem;
  border-radius: 2px;
  box-shadow: 0 0 10px var(--primary-color);
}

.documentos-header h2 {
  font-size: 2.5rem;
  color: var(--text-light);
  font-weight: 700;
  margin: 0;
  text-shadow: 0 0 15px rgba(229, 57, 53, 0.4);
}

/* === GRID de Documentos (3 columnas) === */
.documents-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  align-items: stretch;
  justify-content: center;
}

/* === Tarjeta de Documento === */
.document-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  text-align: center;
  transition: all var(--transition-speed) ease;
  backdrop-filter: blur(var(--backdrop-blur));
  box-shadow: var(--shadow-light);
  height: 100%;
  opacity: 0;
  transform: scale(0.9);
}

.document-card.visible {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.document-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-dark);
}

/* === Vista previa de documento === */
.document-preview {
  position: relative;
  height: 260px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
}

.document-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.5s ease;
}

.preview-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: bold;
  opacity: 0;
  transition: opacity 0.3s ease;
  font-size: 1.2rem;
}

.document-card:hover .preview-overlay {
  opacity: 1;
}

.document-card:hover .document-preview img {
  transform: scale(1.1);
}

/* === Información del Documento === */
.document-info {
  text-align: center;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.document-title {
  font-size: 1.3rem;
  color: var(--primary-color);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.document-description {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

/* === Botones === */
.document-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.btn-view,
.btn-download {
  padding: 0.6rem 1.2rem;
  border-radius: 30px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
}

.btn-view {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-view:hover {
  background: #fff;
  color: #000;
}

.btn-download {
  background: var(--primary-color);
  color: #fff;
  box-shadow: 0 4px 10px rgba(229, 57, 53, 0.4);
}

.btn-download:hover {
  background: #ff5252;
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(229, 57, 53, 0.6);
}

/* =====================================
   MODAL DE DOCUMENTOS
===================================== */
.doc-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(5px);
  z-index: 5000;
  display: none;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.doc-modal.active {
  display: flex;
  opacity: 1;
}

.doc-modal-image {
  max-width: 90%;
  max-height: 90vh;
  border-radius: 8px;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
  border: 1px solid var(--primary-color);
}

.doc-modal-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: transparent;
  color: #fff;
  font-size: 3rem;
  border: none;
  cursor: pointer;
  transition: color 0.3s;
}

.doc-modal-close:hover {
  color: var(--primary-color);
}

/* =====================================
   TARJETA COMPLETADA (CECYTEM)
===================================== */
.completed-card .estudio-icon-container {
  border-color: #4caf50;
  box-shadow: 0 0 15px rgba(76, 175, 80, 0.4);
}

.completed-card .estudio-school {
  color: #4caf50;
}

.completed-card .estudio-badge.completed {
  background: rgba(76, 175, 80, 0.15);
  color: #4caf50;
  border-color: rgba(76, 175, 80, 0.3);
  box-shadow: 0 0 10px rgba(76, 175, 80, 0.3);
}

/* =====================================
   ANIMACIONES Y FALLBACK
===================================== */
.estudio-card,
.document-card {
  opacity: 1;
  transform: scale(1);
}

.estudios-section,
.documentos-section {
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =====================================
   RESPONSIVO (TABLET Y MÓVIL)
===================================== */

/* Tablets (horizontal o vertical) */
@media (max-width: 992px) {
  .documents-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .estudios-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .document-preview {
    height: 220px;
  }
}

/* Celulares grandes (≤768px) */
@media (max-width: 768px) {
  .estudios-grid,
  .documents-grid {
    grid-template-columns: 1fr;
  }

  .estudio-card,
  .document-card {
    padding: 1.2rem;
  }

  .estudios-header h2,
  .documentos-header h2 {
    font-size: 2rem;
  }

  .document-preview {
    height: 180px;
  }

  .document-title {
    font-size: 1.1rem;
  }

  .document-description {
    font-size: 0.85rem;
  }
}

/* Celulares pequeños (≤480px) */
@media (max-width: 480px) {
  .estudios-section,
  .documentos-section {
    padding: 2rem 1rem;
  }

  .estudio-card,
  .document-card {
    padding: 1rem;
    border-radius: 10px;
  }

  .estudios-header h2,
  .documentos-header h2 {
    font-size: 1.6rem;
  }

  .estudio-icon-container {
    width: 80px;
    height: 80px;
    margin-bottom: 1rem;
  }

  .estudio-content h3 {
    font-size: 1.1rem;
  }

  .estudio-school {
    font-size: 1rem;
  }

  .estudio-years {
    font-size: 0.8rem;
  }

  .estudio-badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.8rem;
  }

  .document-preview {
    height: 150px;
  }

  .document-title {
    font-size: 1rem;
  }

  .document-description {
    font-size: 0.8rem;
  }

  .btn-view,
  .btn-download {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
  }


}