/* Educational module responsive tweaks */
.educational-module {
  padding: 20px;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.edu-section {
  box-sizing: border-box;
  width: 100%;
  overflow: hidden;
}

.edu-section-header {
  box-sizing: border-box;
  white-space: normal;
}

.edu-filters {
  flex-wrap: wrap;
  gap: 8px;
  box-sizing: border-box;
}

.edu-filters button {
  margin: 0 !important;
  padding: 6px 10px !important;
  font-size: 11px !important;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .educational-module {
    padding: 14px;
  }

  .edu-sort-row {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    overflow: hidden;
  }

  .edu-sort-dropdown {
    width: 100% !important;
  }

  .edu-section-header {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    width: 100%;
  }

  .edu-section-header h3 {
    flex-shrink: 0;
    white-space: normal;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .edu-capsules-row {
    flex-direction: column;
    gap: 16px;
    width: 100%;
  }

  .edu-capsules-scroll {
    max-height: none !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
    width: 100%;
  }

  .capsule-card {
    min-width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
  }

  .capsule-media {
    height: 180px !important;
  }

  .edu-materials-list,
  .edu-schools-list {
    max-height: none !important;
    overflow-y: visible !important;
    padding-right: 0 !important;
    width: 100%;
    box-sizing: border-box;
  }

  .material-card {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100%;
    box-sizing: border-box;
  }

  .material-download {
    width: 100%;
    margin-top: 10px;
  }
}

@media (max-width: 640px) {
  .educational-module {
    padding: 12px;
  }

  .edu-search-input {
    padding: 12px 14px !important;
    font-size: 13px !important;
    width: 100%;
    box-sizing: border-box;
  }

  .edu-search {
    width: 100%;
    overflow: hidden;
  }

  .edu-title {
    font-size: 22px !important;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .edu-section {
    padding: 16px !important;
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 16px;
  }

  .edu-section h3 {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
  }

  .edu-filters {
    width: 100%;
    gap: 6px;
  }

  .edu-filters button {
    padding: 6px 8px !important;
    font-size: 10px !important;
    flex: 1 1 calc(50% - 3px);
  }

  .capsule-card {
    min-width: 100% !important;
    max-width: 100% !important;
  }

  .capsule-media {
    height: 160px !important;
  }

  .material-card {
    gap: 12px !important;
    padding: 12px !important;
  }

  .material-card > div:first-child {
    width: 50px;
    height: 50px;
    flex-shrink: 0;
  }

  .material-download {
    padding: 8px 14px !important;
    font-size: 12px !important;
  }
}
/* Estilos para paneles de centros escolares mejorados */
.school-panel {
  transition: box-shadow 0.3s ease;
}

.school-panel:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.12) !important;
}

/* Responsive para school panels */
@media (max-width: 1100px) {
  .school-panel {
    margin-bottom: 20px;
  }
  
  .activity-card {
    min-width: 280px;
  }
}

@media (max-width: 900px) {
  .school-panel > div:first-child {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px !important;
  }
  
  .school-panel > div:first-child > div:first-child {
    margin-right: 0 !important;
    margin-bottom: 16px;
  }
  
  .school-panel > div:nth-child(2) > div:nth-child(2) {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }
  
  .activity-card {
    min-width: 100% !important;
    max-width: 100% !important;
  }
}

@media (max-width: 640px) {
  .school-panel {
    border-radius: 8px !important;
    margin-bottom: 16px;
  }
  
  .school-panel > div:first-child {
    padding: 16px !important;
  }
  
  .school-panel > div:first-child h3 {
    font-size: 18px !important;
  }
  
  .school-panel > div:first-child p {
    font-size: 13px !important;
  }
  
  .school-panel > div:nth-child(2) {
    padding: 16px !important;
  }
  
  .school-panel > div:nth-child(2) h4 {
    font-size: 16px !important;
  }
  
  .activity-card {
    border-radius: 8px !important;
  }
  
  .activity-card h4 {
    font-size: 15px !important;
  }
  
  .activity-card p,
  .activity-card li {
    font-size: 12px !important;
  }
  
  .activity-card > div:first-child img,
  .activity-card > div:first-child > div {
    height: 140px !important;
  }
  
  .activity-card > div:nth-child(2) {
    padding: 12px !important;
  }
}