/**
 * Programas - Widget de Eventos para Elementor
 * CSS Ultra-optimizado con variables CSS y compatibilidad responsive completa
 */

:root {
  --prog-primary: #00a499;
  --prog-dark: #003e51;
  --prog-bg-header: #a39d89;
  --prog-bg-header-hover: #928c79;
  --prog-timeline-color: #c7c4b8;
  --prog-bullet-color: #a39d89;
  --prog-badge-bg: #939088;
  --prog-badge-text: #ffffff;
  --prog-border-color: #000000;
  --prog-transition: 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.prog-widget-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  font-family: inherit;
  color: #1e293b;
  box-sizing: border-box;
}

.prog-widget-container * {
  box-sizing: border-box;
}

/* 1. Quick Action Buttons */
.prog-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-bottom: 32px;
}

.prog-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 28px;
  border: 2px solid #334155;
  background: transparent;
  color: #003e51;
  border-radius: 4px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--prog-transition);
}

.prog-action-btn:hover {
  background: var(--prog-primary);
  border-color: var(--prog-primary);
  color: #ffffff;
  transform: translateY(-2px);
}

.prog-action-btn svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
}

/* 2. Tabs Navigation */
.prog-tabs-wrapper {
  position: relative;
  border-bottom: 2px solid #e2e8f0;
  margin-bottom: 36px;
  overflow-x: auto;
  scrollbar-width: none;
}
.prog-tabs-wrapper::-webkit-scrollbar {
  display: none;
}

.prog-tabs-nav {
  display: flex;
  align-items: flex-end;
  gap: 32px;
  padding: 0 4px;
  min-width: max-content;
}

.prog-tab-item {
  position: relative;
  padding: 12px 6px 16px 6px;
  background: none;
  border: none;
  color: #003e51;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--prog-transition);
}

.prog-tab-item:hover {
  color: var(--prog-primary);
}

.prog-tab-item.is-active {
  color: var(--prog-primary);
  font-weight: 700;
}

.prog-tab-item.is-active::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background-color: var(--prog-primary);
  border-radius: 2px 2px 0 0;
}

/* 3. Search Bar */
.prog-search-bar {
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  padding: 10px 16px;
  gap: 12px;
}
.prog-search-input {
  width: 100%;
  border: none;
  background: transparent;
  font-size: 14px;
  outline: none;
}

/* 4. Timeline & Sessions Accordion */
.prog-timeline-wrapper {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.prog-session-card {
  position: relative;
  display: flex;
  align-items: stretch;
}

/* Left Timeline Column */
.prog-timeline-col {
  width: 40px;
  position: relative;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.prog-timeline-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background-color: var(--prog-timeline-color);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.prog-bullet-start,
.prog-bullet-end {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--prog-bullet-color);
  background: #ffffff;
  position: relative;
  z-index: 2;
  margin-top: 24px;
  flex-shrink: 0;
}

.prog-session-body {
  flex: 1;
  min-width: 0;
}

/* Accordion Header */
.prog-session-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: var(--prog-bg-header);
  color: #ffffff;
  padding: 18px 24px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  transition: background-color var(--prog-transition);
}

.prog-session-header:hover {
  background-color: var(--prog-bg-header-hover);
}

.prog-header-left {
  display: flex;
  align-items: center;
  gap: 32px;
  flex: 1;
}

.prog-header-time {
  font-size: 20px;
  font-weight: 700;
  white-space: nowrap;
}

.prog-header-titles {
  display: flex;
  flex-direction: column;
}

.prog-header-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
}

.prog-header-location,
.prog-header-description {
  font-size: 15px;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0.95;
  margin: 4px 0 0 0;
  white-space: pre-line;
}

/* Room Action Buttons */
.prog-room-button-wrapper {
  margin-top: 10px;
  text-align: left;
}

.prog-room-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  background-color: #38bdf8;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  transition: all var(--prog-transition);
}

.prog-room-btn:hover {
  background-color: #0284c7;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.12);
}

.prog-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.prog-btn-icon svg,
.prog-btn-icon i {
  font-size: 15px;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.prog-chevron {
  transition: transform var(--prog-transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.prog-session-card.is-open .prog-chevron {
  transform: rotate(180deg);
}

/* Accordion Content Container */
.prog-session-content {
  overflow: hidden;
  transition: opacity var(--prog-transition);
  background: #ffffff;
  border-bottom: 2px solid #000000;
}

.prog-session-card:not(.is-open) .prog-session-content {
  display: none !important;
  max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Multi-Track Header */
.prog-track-head {
  display: grid;
  grid-template-columns: 120px repeat(var(--track-count, 3), 1fr);
  border-top: 1px solid #000000;
  border-bottom: 1px solid #000000;
  background-color: #ffffff;
}

.prog-track-title-cell {
  padding: 14px 18px;
  border-left: 1px solid #e2e8f0;
}
.prog-track-title-cell:first-of-type {
  border-left: none;
}

.prog-room-badge {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: #003e51;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.prog-room-description {
  font-size: 13px;
  font-weight: 400;
  color: #475569;
  margin-top: 2px;
  margin-bottom: 6px;
  line-height: 1.35;
  white-space: pre-line;
}

.prog-track-session-arrow {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--prog-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}

.prog-track-name {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  color: #0f172a;
}

/* Talk Rows */
.prog-talk-row {
  display: grid;
  grid-template-columns: 120px repeat(var(--track-count, 3), 1fr);
  border-bottom: 1px solid #000000;
  background: #ffffff;
  transition: background-color 150ms ease;
}

.prog-talk-row:hover {
  background-color: #fafbfc;
}

.prog-time-cell {
  padding: 16px 14px;
  font-size: 19px;
  font-weight: 500;
  color: #003e51;
  display: flex;
  align-items: flex-start;
}

.prog-talk-cell {
  padding: 16px 18px;
  border-left: 1px solid #f1f5f9;
}

.prog-lang-badge {
  display: inline-block;
  background-color: var(--prog-badge-bg);
  color: var(--prog-badge-text);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}

.prog-talk-title {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.prog-talk-authors {
  font-size: 13.5px;
  color: #334155;
  line-height: 1.45;
  margin: 0;
}

.prog-talk-notes {
  margin-top: 12px;
  font-size: 14px;
  font-weight: 400;
  color: #334155;
  line-height: 1.55;
  white-space: pre-line;
}

.prog-talk-notes p {
  margin: 0 0 8px 0;
}

.prog-talk-notes p:last-child {
  margin-bottom: 0;
}

/* Social Breaks (Coffee / Lunch / Reception) */
.prog-social-break {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: #ffffff;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #000000;
  margin-top: 8px;
}

.prog-break-left {
  display: flex;
  align-items: center;
  gap: 24px;
}

.prog-break-time {
  font-size: 18px;
  font-weight: 500;
  color: #003e51;
  white-space: nowrap;
}

.prog-break-title {
  font-size: 17px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.prog-sponsor-img {
  max-height: 48px;
  max-width: 150px;
  object-fit: contain;
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .prog-track-head,
  .prog-talk-row {
    grid-template-columns: 90px repeat(var(--track-count, 3), 1fr);
  }
  .prog-header-time {
    font-size: 17px;
  }
  .prog-header-title {
    font-size: 17px;
  }
}

@media (max-width: 768px) {
  .prog-track-head {
    display: none; /* In mobile, rooms display inline inside cards */
  }
  .prog-talk-row {
    display: flex;
    flex-direction: column;
    padding: 14px;
    gap: 12px;
  }
  .prog-time-cell {
    padding: 0;
    font-size: 17px;
    font-weight: 700;
  }
  .prog-talk-cell {
    padding: 0;
    border-left: none;
    border-top: 1px dashed #e2e8f0;
    padding-top: 10px;
  }
  .prog-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  .prog-social-break {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}
