/* =======================
   RESET BÁSICO
   ======================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color: #111;
  position: relative;
  overflow-x: hidden;
  background-color: #f7f7f8;
  padding-top: 60px; /* espacio para la barra superior fija */
}

/* =======================
   BARRA SUPERIOR FIJA
   ======================= */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 60px;
  background-color: #0ea5a4;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.topbar__content {
  max-width: 1100px;
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  gap: 0.75rem;
}

.topbar__logo {
  height: 40px;
  width: 40px;
  object-fit: contain;
}

.topbar__text {
  color: #fff;
  font-weight: 700;
  font-size: 1.1rem;
}

/* =======================
   HERO / HEADER
   ======================= */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #222;
  background-image: url('https://static.wixstatic.com/media/11062b_4d256bf126fc4aa0996ce38b03ef668d~mv2_d_3261_2174_s_2.jpg/v1/fill/w_1554,h_1148,al_c,q_85,usm_0.66_1.00_0.01,enc_avif,quality_auto/11062b_4d256bf126fc4aa0996ce38b03ef668d~mv2_d_3261_2174_s_2.jpg');
  background-size: cover;
  background-position: center center;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.45), rgba(0,0,0,0.55));
  z-index: 0;
}

.hero__content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  max-width: 1100px;
  color: #fff;
}

.hero__title {
  font-size: clamp(1.6rem, 4vw, 2.8rem);
  line-height: 1.1;
  font-weight: 700;
  margin-bottom: 0.75rem;
  text-shadow: 0 6px 18px rgba(0,0,0,0.45);
}

.hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  line-height: 1.4;
  opacity: 0.95;
}

/* =======================
   ESTILO DE CUBOS DE SECCIONES
   ======================= */
.container {
  max-width: 1100px;
  margin: 2rem auto;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 6px 20px rgba(16,24,40,0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background-color: #fff;
}

.container:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 40px rgba(16,24,40,0.12);
}

/* Diferentes colores de fondo por sección */
#extraescolares { background-color: #fef3c7; }
#gabinete-socioeducativo { background-color: #d1fae5; }
#actividades-semanales { background-color: #dbeafe; }
#grupos-de-estudio { background-color: #fde2e4; }
#familias-en-red { background-color: #fff7ed; }
#mas-que-memoria { background-color: #f3e8ff; }

.container h2 { color: #111; }

/* =======================
   TITULOS DE SECCIONES Y ICONO DESPLEGABLE
   ======================= */
section h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  position: relative;
  cursor: pointer;
  padding-right: 1.5rem;
  transition: color 0.3s ease;
}

section h2::after {
  content: '►';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  transition: transform 0.3s ease;
  font-size: 1.1rem;
  color: #0ea5a4;
}

.section-active h2::after {
  transform: translateY(-50%) rotate(90deg);
}

/* =======================
   ACTIVIDADES
   ======================= */
.activities {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.section-active .activities {
  max-height: 2000px;
}

article.activity {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(16,24,40,0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
  position: relative;
}

article.activity:hover {
  transform: translateY(-6px);
  box-shadow: 0 14px 40px rgba(16,24,40,0.12);
}

.activity__media {
  height: 160px;
  background-size: cover;
  background-position: center;
}

.activity__body {
  padding: 1rem 1.15rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.activity__title { font-weight: 700; margin-bottom: 0.5rem; }
.activity__desc { font-size: 0.95rem; color: #374151; margin-bottom: 1rem; flex: 1; }

/* =======================
   BOTONES Y TAGS
   ======================= */
.activity__meta {
  display: flex;
  gap: .5rem;
  align-items: center;
  flex-wrap: wrap;
}

.tag {
  background: #eef2ff;
  color: #3730a3;
  padding: .35rem .6rem;
  border-radius: 999px;
  font-size: .82rem;
}

.btn {
  display: inline-block;
  padding: .6rem .9rem;
  border-radius: 10px;
  border: 0;
  background: #0ea5a4;
  color: white;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}

a:focus,
.btn:focus {
  outline: 3px solid #c7f9f9;
  outline-offset: 3px;
}

/* =======================
   OVERLAY PARA CARTEL EXPANDIDO
   ======================= */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 900;
}

.overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =======================
   IMAGEN EXPANDIDA
   ======================= */
.expanded-img {
  max-height: 100vh;
  height: 80vh;
  width: auto;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  display: block;
  margin: auto;
margin-top:5%;
  pointer-events: none;
}

/* =======================
   ANIMACIONES
   ======================= */
@keyframes zoomIn {
  from { transform: translate(-50%, -50%) scale(0.7); opacity: 0; }
  to { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

/* =======================
   RESPONSIVE
   ======================= */
@media (max-width: 520px) {
  .hero__content { padding: 1.25rem; }
  .hero__title { font-size: 1.6rem; }
}
