/* Estilos para el sistema de eventos */
/* Aumentar especificidad para Elementor */
.elementor .mpt-eventos-wrap,
.elementor-widget-shortcode .mpt-eventos-wrap,
.mpt-eventos-wrap {
  box-sizing: border-box;
}

.mpt-eventos-wrap * {
  box-sizing: border-box;
}

/* Romper contenedor de WordPress y centrar contenido */
/* En Elementor, usar ancho normal del contenedor */
.elementor .mpt-eventos-wrap,
.elementor-widget-shortcode .mpt-eventos-wrap {
  background: #ffffff;
  min-height: auto;
  font-family: 'Montserrat', sans-serif;
  padding: 30px 0;
  width: 100%;
  max-width: 100%;
  position: relative;
  left: auto;
  right: auto;
  margin-left: 0;
  margin-right: 0;
  clear: both;
  display: block;
}

/* Fuera de Elementor, usar full-width */
body:not(.elementor-page) .mpt-eventos-wrap,
.mpt-eventos-wrap {
  background: #ffffff;
  min-height: 100vh;
  font-family: 'Montserrat', sans-serif;
  padding: 30px 0;
  width: 100vw;
  max-width: 100%;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  clear: both;
  display: block;
}

.mpt-eventos-contenedor {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 40px;
  display: block;
  clear: both;
}

/* Para pantallas grandes, usar más espacio pero mantener márgenes razonables */
@media (min-width: 1200px) {
  .mpt-eventos-contenedor {
    max-width: 1400px;
    padding: 0 50px;
  }
}

@media (min-width: 1400px) {
  .mpt-eventos-contenedor {
    max-width: 1600px;
    padding: 0 60px;
  }
}

@media (min-width: 1600px) {
  .mpt-eventos-contenedor {
    max-width: 1800px;
    padding: 0 80px;
  }
}

@media (min-width: 1920px) {
  .mpt-eventos-contenedor {
    max-width: 2000px;
    padding: 0 100px;
  }
}

/* Asegurar que no se vea afectado por sidebars de WordPress */
body .mpt-eventos-wrap {
  width: 100vw !important;
  max-width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
  left: 0 !important;
  right: 0 !important;
  position: relative;
  clear: both;
  display: block;
}

/* Asegurar que el contenedor esté centrado */
.mpt-eventos-contenedor {
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
  clear: both;
}

/* Si hay sidebar, forzar ancho completo */
body.has-sidebar .mpt-eventos-wrap,
body.sidebar .mpt-eventos-wrap,
.content-area .mpt-eventos-wrap,
.site-content .mpt-eventos-wrap,
.entry-content .mpt-eventos-wrap {
  width: 100vw !important;
  margin-left: calc(-50vw + 50%) !important;
  margin-right: calc(-50vw + 50%) !important;
}

.mpt-evento {
  background: linear-gradient(145deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  position: relative;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid rgba(255, 255, 255, 0.2);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out;
}

.mpt-evento::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #005da1, #0077cc);
  border-radius: 20px 20px 0 0;
}

.mpt-evento:hover {
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.12);
  border-color: rgba(0, 93, 161, 0.2);
}

.mpt-evento-fecha {
  position: absolute;
  top: 25px;
  left: 30px;
  font-size: 14px;
  color: #005da1;
  font-weight: 600;
  background: linear-gradient(135deg, #e8f0ff 0%, #f0f4ff 100%);
  padding: 8px 16px;
  border-radius: 25px;
  text-align: center;
  border: 1px solid rgba(0, 93, 161, 0.2);
  box-shadow: 0 2px 10px rgba(0, 93, 161, 0.1);
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.mpt-evento-fecha i {
  margin-right: 8px;
  color: #005da1;
}

.mpt-evento-pax {
  position: absolute;
  top: 25px;
  right: 30px;
  font-size: 14px;
  color: #005da1;
  font-weight: 600;
  background: linear-gradient(135deg, #e8f0ff 0%, #f0f4ff 100%);
  padding: 8px 16px;
  border-radius: 25px;
  border: 1px solid rgba(0, 93, 161, 0.2);
  box-shadow: 0 2px 10px rgba(0, 93, 161, 0.1);
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  white-space: nowrap;
}

.mpt-eventos-tabs #mpt-eventos-confirmados .mpt-evento-pax::before {
  content: 'PAX ';
  font-weight: 600;
}

.mpt-evento-pax i {
  margin-right: 8px;
  color: #005da1;
}

.mpt-evento-titulo {
  font-size: 26px;
  font-weight: 700;
  color: #005da1;
  margin: 60px 0 20px 0;
  display: flex;
  align-items: center;
  line-height: 1.3;
  transition: color 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.mpt-evento-titulo i {
  margin-right: 12px;
  color: #005da1;
  font-size: 24px;
}

.mpt-evento-resumen {
  font-size: 16px;
  color: #4a5568;
  margin-bottom: 20px;
  line-height: 1.7;
  font-weight: 400;
  background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
  padding: 20px;
  border-radius: 15px;
  border-left: 4px solid #005da1;
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.mpt-evento-resumen i {
  margin-right: 10px;
  color: #005da1;
  font-size: 18px;
}

.mpt-evento-sede {
  font-size: 16px;
  color: #2d3748;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #e8f0ff 0%, #f0f4ff 100%);
  border-radius: 12px;
  border: 1px solid rgba(0, 93, 161, 0.2);
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
}

.mpt-evento-sede i {
  margin-right: 10px;
  color: #005da1;
  font-size: 18px;
}

.mpt-evento-convocatoria {
  font-size: 16px;
  color: #2d3748;
  font-weight: 500;
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
  border-radius: 12px;
  border: 1px solid rgba(255, 152, 0, 0.2);
  transition: all 0.3s ease;
  font-family: 'Montserrat', sans-serif;
  margin-top: 15px;
}

.mpt-evento-convocatoria i {
  margin-right: 10px;
  color: #ff9800;
  font-size: 18px;
}

/* Estilos para tabs */
.mpt-eventos-tabs-container {
  margin-bottom: 30px;
}

.mpt-eventos-tabs-nav {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 40px;
}

.mpt-eventos-tab-button {
  background: #ffffff;
  border: 2px solid #005da1;
  color: #005da1;
  padding: 12px 24px;
  border-radius: 25px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 93, 161, 0.1);
  border: none;
}

.mpt-eventos-tab-button:hover {
  background: #005da1;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 93, 161, 0.2);
}

.mpt-eventos-tab-button.active {
  background: #005da1;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 93, 161, 0.2);
}

.mpt-eventos-tab-content {
  display: none;
}

.mpt-eventos-tab-content.active {
  display: block;
}

/* Estilos para filtros */
.mpt-eventos-filtros-container {
  margin-bottom: 30px;
  text-align: center;
  background: rgba(0, 93, 161, 0.02);
  padding: 25px;
  border-radius: 12px;
  border: 1px solid rgba(0, 93, 161, 0.1);
  box-shadow: 0 2px 8px rgba(0, 93, 161, 0.05);
}

.mpt-eventos-filtros-row {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 0;
  flex-wrap: wrap;
}

.mpt-eventos-filtro-grupo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  flex: 0 1 auto;
}

.mpt-eventos-filtro-label {
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  color: #005da1;
  font-size: 14px;
  margin-bottom: 4px;
  white-space: nowrap;
}

.mpt-eventos-filtro-select {
  padding: 10px 35px 10px 12px;
  border: 2px solid #005da1;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #005da1;
  background: #ffffff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23005da1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  width: 100%;
  max-width: 200px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.mpt-eventos-filtro-select:hover {
  background: #f0f4ff;
}

.mpt-eventos-filtro-select:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 93, 161, 0.1);
}

/* Estilos para paginación */
.mpt-eventos-paginacion-container {
  margin-top: 40px;
  text-align: center;
}

.mpt-eventos-paginacion {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.mpt-eventos-paginacion-btn {
  padding: 8px 12px;
  border: 2px solid #005da1;
  background: #ffffff;
  color: #005da1;
  border-radius: 6px;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 40px;
  text-decoration: none;
  display: inline-block;
}

.mpt-eventos-paginacion-btn:hover {
  background: #005da1;
  color: #ffffff;
  text-decoration: none;
}

.mpt-eventos-paginacion-btn.active {
  background: #005da1;
  color: #ffffff;
}

.mpt-eventos-paginacion-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.mpt-eventos-paginacion-info {
  font-family: 'Montserrat', sans-serif;
  font-size: 14px;
  color: #005da1;
  margin: 0 15px;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Responsive Design - Tablets */
@media (max-width: 1024px) and (min-width: 769px) {
  .mpt-eventos-wrap {
    width: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .mpt-eventos-contenedor {
    padding: 0 30px;
  }
  
  .mpt-evento {
    padding: 35px 25px;
  }
  
  .mpt-evento-titulo {
    font-size: 24px;
  }
  
  .mpt-eventos-filtros-container {
    padding: 20px;
  }
  
  .mpt-eventos-filtros-row {
    gap: 20px;
  }
  
  .mpt-eventos-filtro-grupo {
    min-width: 150px;
  }
  
  .mpt-eventos-filtro-select {
    max-width: 180px;
    min-width: 150px;
  }
  
  .mpt-eventos-tab-button {
    padding: 14px 28px;
    font-size: 15px;
  }
}

/* Responsive Design - Móviles */
@media (max-width: 768px) {
  .mpt-eventos-wrap {
    padding: 15px 0;
    width: 100%;
    left: 0;
    right: 0;
    margin-left: 0;
    margin-right: 0;
  }
  
  .mpt-eventos-contenedor {
    padding: 0 15px;
  }
  
  .mpt-evento {
    padding: 50px 20px 25px 20px;
    margin-bottom: 20px;
    border-radius: 15px;
  }
  
  .mpt-evento-fecha,
  .mpt-evento-pax {
    position: absolute;
    top: 15px;
    font-size: 11px;
    padding: 6px 12px;
    border-radius: 20px;
    white-space: nowrap;
    max-width: calc(50% - 25px);
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mpt-evento-fecha { 
    left: 15px; 
  }
  
  .mpt-evento-pax { 
    right: 15px; 
  }

  .mpt-evento-fecha i,
  .mpt-evento-pax i {
    font-size: 12px;
    margin-right: 4px;
  }
  
  .mpt-evento-titulo {
    font-size: 20px;
    margin: 50px 0 15px 0;
    line-height: 1.4;
  }
  
  .mpt-evento-titulo i {
    font-size: 18px;
    margin-right: 8px;
  }
  
  .mpt-evento-resumen {
    font-size: 14px;
    padding: 15px;
    line-height: 1.6;
    margin-bottom: 15px;
  }
  
  .mpt-evento-resumen i {
    font-size: 16px;
    margin-right: 8px;
  }
  
  .mpt-evento-sede,
  .mpt-evento-convocatoria {
    font-size: 14px;
    padding: 12px 15px;
  }
  
  .mpt-evento-sede i,
  .mpt-evento-convocatoria i {
    font-size: 16px;
    margin-right: 8px;
  }

  .mpt-eventos-tabs-container {
    margin-bottom: 25px;
  }

  .mpt-eventos-tabs-nav {
    flex-direction: row;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
  }
  
  .mpt-eventos-tab-button {
    flex: 1;
    min-width: 140px;
    max-width: 300px;
    font-size: 13px;
    padding: 12px 16px;
    line-height: 1.3;
    text-align: center;
    white-space: normal;
    height: auto;
    min-height: 48px;
    border-radius: 20px;
  }

  .mpt-eventos-filtros-container {
    margin-bottom: 25px;
    padding: 20px 15px;
    border-radius: 15px;
  }
  
  .mpt-eventos-filtros-row {
    flex-direction: row;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 0;
    flex-wrap: wrap;
  }
  
  .mpt-eventos-filtro-grupo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 120px;
    flex: 1;
    max-width: 200px;
  }
  
  .mpt-eventos-filtro-label {
    font-size: 13px;
    font-weight: 600;
    color: #005da1;
    width: 100%;
    text-align: center;
  }
  
  .mpt-eventos-filtro-select {
    width: 100%;
    max-width: 100%;
    font-size: 14px;
    padding: 10px 12px;
    min-height: 44px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23005da1' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
  }
  
  .mpt-eventos-paginacion {
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .mpt-eventos-paginacion-btn {
    padding: 10px 14px;
    font-size: 14px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .mpt-eventos-paginacion-info {
    font-size: 13px;
    margin: 0 10px;
    width: 100%;
    text-align: center;
    order: -1;
  }
}

/* Responsive Design - Móviles pequeños */
@media (max-width: 480px) {
  .mpt-eventos-wrap {
    padding: 10px 0;
  }
  
  .mpt-eventos-contenedor {
    padding: 0 12px;
  }
  
  .mpt-evento {
    padding: 48px 16px 20px 16px;
    margin-bottom: 15px;
    border-radius: 12px;
  }
  
  .mpt-evento-fecha,
  .mpt-evento-pax {
    top: 12px;
    font-size: 10px;
    padding: 5px 10px;
    border-radius: 15px;
    max-width: calc(50% - 20px);
  }
  
  .mpt-evento-fecha { 
    left: 12px; 
  }
  
  .mpt-evento-pax { 
    right: 12px; 
  }
  
  .mpt-evento-fecha i,
  .mpt-evento-pax i {
    font-size: 11px;
    margin-right: 3px;
  }

  .mpt-evento-titulo {
    font-size: 18px;
    margin: 45px 0 12px 0;
  }
  
  .mpt-evento-titulo i {
    font-size: 16px;
    margin-right: 6px;
  }

  .mpt-evento-resumen {
    font-size: 13px;
    padding: 12px;
    margin-bottom: 12px;
  }
  
  .mpt-evento-sede,
  .mpt-evento-convocatoria {
    font-size: 13px;
    padding: 10px 12px;
  }

  .mpt-eventos-tabs-nav {
    gap: 8px;
    margin-bottom: 20px;
  }
  
  .mpt-eventos-tab-button {
    font-size: 12px;
    padding: 10px 12px;
    min-width: 120px;
    min-height: 44px;
    border-radius: 18px;
  }

  .mpt-eventos-filtros-container {
    padding: 15px 10px;
    border-radius: 12px;
  }
  
  .mpt-eventos-filtros-row {
    gap: 12px;
  }
  
  .mpt-eventos-filtro-grupo {
    min-width: 100px;
    max-width: 150px;
    gap: 6px;
  }
  
  .mpt-eventos-filtro-label {
    font-size: 12px;
  }
  
  .mpt-eventos-filtro-select {
    font-size: 13px;
    padding: 8px 10px;
    min-height: 40px;
    padding-right: 32px;
  }
  
  .mpt-eventos-paginacion {
    gap: 6px;
  }
  
  .mpt-eventos-paginacion-btn {
    padding: 8px 12px;
    font-size: 12px;
    min-width: 40px;
    min-height: 40px;
  }
  
  .mpt-eventos-paginacion-info {
    font-size: 12px;
    margin: 0 8px;
  }
}

/* Mejoras para touch devices */
@media (hover: none) and (pointer: coarse) {
  .mpt-eventos-tab-button,
  .mpt-eventos-filtro-select,
  .mpt-eventos-paginacion-btn {
    -webkit-tap-highlight-color: rgba(0, 93, 161, 0.2);
    touch-action: manipulation;
  }
  
  .mpt-eventos-tab-button:active {
    transform: scale(0.98);
  }
  
  .mpt-eventos-paginacion-btn:active {
    transform: scale(0.95);
  }
}

/* Mejoras de accesibilidad */
@media (prefers-reduced-motion: reduce) {
  .mpt-evento,
  .mpt-eventos-tab-button,
  .mpt-eventos-filtro-select,
  .mpt-eventos-paginacion-btn {
    transition: none;
    animation: none;
  }
}

