/* ==========================================================================
   COMPONENTS - NOVO EVENTOS BY LAURA BASUALTO
   Componentes reutilizables: botones, cards, modales, etc.
   ========================================================================== */

/* ===== BOTONES ===== */

.btn {
  display: inline-block;
  padding: var(--space-sm) var(--space-xl);
  font-family: var(--font-secondary);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-semibold);
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-md);
  transition: all var(--transition-base);
  cursor: pointer;
  border: var(--border-width-medium) solid transparent;
  /* Tamaño táctil mínimo para móvil */
  min-height: 44px;
  min-width: 44px;
}

.btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Botón primario (dorado) */
.btn-primary {
  background-color: var(--color-primary);
  color: var(--color-secondary);
  border-color: var(--color-primary);
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: var(--color-secondary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-gold);
}

/* Botón outline */
.btn-outline {
  background-color: transparent;
  color: var(--color-primary);
  border-color: var(--color-primary);
}

.btn-outline:hover {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* Botón secundario (negro) */
.btn-secondary {
  background-color: var(--color-secondary);
  color: var(--color-white);
  border-color: var(--color-secondary);
}

.btn-secondary:hover {
  background-color: var(--color-secondary-light);
  border-color: var(--color-secondary-light);
  color: var(--color-white);
}

/* Tamaños de botones */
.btn-sm {
  padding: var(--space-xs) var(--space-md);
  font-size: var(--font-size-sm);
}

.btn-lg {
  padding: var(--space-md) var(--space-2xl);
  font-size: var(--font-size-lg);
}

/* ===== CARDS ===== */

.card {
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
}

.card-body {
  padding: var(--space-lg);
}

.card-title {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
  color: var(--color-secondary);
}

.card-text {
  color: var(--color-gray-600);
  line-height: var(--line-height-relaxed);
}

/* ===== BADGE (etiquetas) ===== */

.badge {
  display: inline-block;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--font-size-xs);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

/* ===== MODAL ===== */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: var(--z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}

.modal.is-active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: var(--z-modal-backdrop);
}

.modal-content {
  position: relative;
  background-color: var(--color-white);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  z-index: var(--z-modal);
  box-shadow: var(--shadow-2xl);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-lg);
  border-bottom: var(--border-width-thin) solid var(--color-gray-200);
}

.modal-title {
  font-size: var(--font-size-2xl);
  margin: 0;
}

.modal-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background-color: transparent;
  color: var(--color-gray-600);
  font-size: var(--font-size-2xl);
  transition: background-color var(--transition-fast);
}

.modal-close:hover {
  background-color: var(--color-gray-100);
  color: var(--color-secondary);
}

.modal-body {
  padding: var(--space-lg);
}

.modal-footer {
  display: flex;
  gap: var(--space-md);
  justify-content: flex-end;
  padding: var(--space-lg);
  border-top: var(--border-width-thin) solid var(--color-gray-200);
}

/* ===== ACORDEÓN ===== */

.accordion-item {
  border: var(--border-width-thin) solid var(--color-gray-200);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.accordion-header {
  width: 100%;
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-white);
  border: none;
  text-align: left;
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  color: var(--color-secondary);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color var(--transition-fast);
}

.accordion-header:hover {
  background-color: var(--color-gray-50);
}

.accordion-header[aria-expanded="true"] {
  background-color: var(--color-primary);
  color: var(--color-secondary);
}

.accordion-icon {
  transition: transform var(--transition-base);
}

.accordion-header[aria-expanded="true"] .accordion-icon {
  transform: rotate(180deg);
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-base);
}

.accordion-content.is-open {
  max-height: 1000px;
}

.accordion-body {
  padding: var(--space-lg);
  color: var(--color-gray-700);
  line-height: var(--line-height-relaxed);
}

/* ===== DIVIDER (separador) ===== */

.divider {
  width: 100%;
  height: var(--border-width-thin);
  background-color: var(--color-gray-200);
  margin: var(--space-xl) 0;
}

.divider-gold {
  background: linear-gradient(90deg,
    transparent 0%,
    var(--color-primary) 50%,
    transparent 100%
  );
  height: var(--border-width-medium);
}

/* ===== ALERT (alertas) ===== */

.alert {
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  border-left: 4px solid;
}

.alert-success {
  background-color: #D1FAE5;
  border-color: var(--color-success);
  color: #065F46;
}

.alert-error {
  background-color: #FEE2E2;
  border-color: var(--color-error);
  color: #991B1B;
}

.alert-warning {
  background-color: #FEF3C7;
  border-color: var(--color-warning);
  color: #92400E;
}

.alert-info {
  background-color: #DBEAFE;
  border-color: var(--color-info);
  color: #1E40AF;
}

/* ===== SCROLL UP BUTTON ===== */

.scrollup-btn {
  position: fixed;
  bottom: var(--space-xl);
  right: var(--space-xl);
  width: 56px;
  height: 56px;
  border: none;
  background: transparent;
  cursor: pointer;
  z-index: var(--z-fixed);
  display: none;
  transition: transform var(--transition-base), opacity var(--transition-base);
  padding: 0;
}

.scrollup-btn:hover {
  transform: translateY(-4px);
  opacity: 0.9;
}

.scrollup-btn:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-full);
}

.scrollup-btn svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
}

/* Responsive */
@media (max-width: 768px) {
  .scrollup-btn {
    bottom: var(--space-lg);
    right: var(--space-lg);
    width: 48px;
    height: 48px;
  }
}
