/* style.css - ESFEM Premium E-Learning Styles */
:root {
  --color-primary: #2f8a57;
  --color-secondary: #384c66;
  --color-bg-light: #f8fafc;
  --color-text-dark: #1e293b;
}

body {
  font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.accordion-header { cursor: pointer; transition: all .2s ease-in-out; }
.accordion-header:hover { background-color: #f1f5f9; }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-slide-up { animation: slideUp .5s cubic-bezier(.16,1,.3,1) forwards; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Bloque compacto: Marta + una imagen distinta en cada pantalla */
.section-story-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  padding: 20px;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
}

.section-story-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-story-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: #047857;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.section-story-header img {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border-radius: 999px;
  border: 2px solid #a7f3d0;
  object-fit: cover;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15,23,42,.08);
}

.section-story-text {
  color: #334155;
  font-size: 15px;
  line-height: 1.72;
  text-align: justify;
  white-space: pre-line;
}

.section-compact-image {
  width: 100%;
  height: 210px;
  padding: 10px;
  border: 1px solid #dbe5df;
  border-radius: 15px;
  background: #fff;
  cursor: zoom-in;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease;
}

.section-compact-image:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(15,23,42,.10);
}

.section-compact-image img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  border-radius: 10px;
}

/* Portada más contenida */
.welcome-hero-image {
  width: min(620px, 100%);
  height: 190px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 18px;
  overflow: hidden;
}
.welcome-hero-image img { width: 100%; height: 100%; object-fit: contain; }

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15,23,42,.88);
  backdrop-filter: blur(6px);
}
.image-modal-content {
  position: relative;
  width: min(1050px,96vw);
  max-height: 94vh;
  padding: 18px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0,0,0,.35);
  overflow: auto;
}
.image-modal-content img { width: 100%; max-height: 82vh; object-fit: contain; display: block; border-radius: 12px; }
.image-modal-content p { margin: 12px 48px 0 6px; color: #475569; font-size: 13px; font-weight: 700; }
.image-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 999px;
  background: #1e293b;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.image-load-error { display: none !important; }

@media (max-width: 900px) {
  .section-story-card { grid-template-columns: 1fr; }
  .section-compact-image { height: 190px; max-width: 520px; margin: 0 auto; }
}

@media (max-width: 640px) {
  .section-story-card { padding: 15px; gap: 15px; }
  .section-story-header img { width: 42px; height: 42px; flex-basis: 42px; }
  .section-story-text { font-size: 14px; text-align: left; }
  .section-compact-image { height: 155px; }
  .welcome-hero-image { height: 150px; }
  .image-modal { padding: 10px; }
}