/**
 * MODERN COMPONENT SYSTEM FOR TERMÓPILAS
 * Implementable design components for rapid development
 */

/* Import brand tokens */
@import url('./brand-tokens.css');

/* === BUTTON COMPONENT SYSTEM === */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-6);
  border: none;
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-weight: var(--font-semibold);
  font-size: var(--text-base);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition-base);
  white-space: nowrap;
  user-select: none;
  position: relative;
  overflow: hidden;
}

/* Primary Button - Colombian Gold */
.btn--primary {
  background: linear-gradient(135deg, var(--brand-accent) 0%, #E6920C 100%);
  color: var(--text-inverse);
  box-shadow: var(--shadow-md);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: linear-gradient(135deg, #E6920C 0%, var(--brand-accent) 100%);
}

.btn--primary:active {
  transform: translateY(0);
  box-shadow: var(--shadow-base);
}

/* Secondary Button - Sophisticated Dark */
.btn--secondary {
  background: var(--brand-primary);
  color: var(--text-inverse);
  border: 2px solid transparent;
}

.btn--secondary:hover {
  background: var(--gray-800);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Outline Button - Elegant Border */
.btn--outline {
  background: transparent;
  color: var(--brand-accent);
  border: 2px solid var(--brand-accent);
}

.btn--outline:hover {
  background: var(--brand-accent);
  color: var(--text-inverse);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

/* Ghost Button - Minimal */
.btn--ghost {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--gray-300);
}

.btn--ghost:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
}

/* Button Sizes */
.btn--sm {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
}

.btn--lg {
  padding: var(--space-4) var(--space-8);
  font-size: var(--text-lg);
  border-radius: var(--radius-xl);
}

.btn--xl {
  padding: var(--space-5) var(--space-10);
  font-size: var(--text-xl);
  border-radius: var(--radius-2xl);
}

/* === CARD COMPONENT SYSTEM === */

.card {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-base);
  overflow: hidden;
  transition: var(--transition-base);
  border: 1px solid var(--gray-200);
}

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

.card__image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: var(--transition-base);
}

.card:hover .card__image {
  transform: scale(1.05);
}

.card__content {
  padding: var(--space-6);
}

.card__title {
  font-family: var(--font-brand);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.card__description {
  color: var(--text-secondary);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-4);
}

.card__actions {
  display: flex;
  gap: var(--space-3);
  align-items: center;
  justify-content: flex-start;
}

/* === HERO COMPONENT === */

.hero-modern {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.2) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
}

.hero-modern__content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 800px;
  padding: var(--space-6);
  color: var(--text-inverse);
}

.hero-modern__title {
  font-family: var(--font-brand);
  font-size: clamp(var(--text-4xl), 8vw, var(--text-6xl));
  font-weight: var(--font-bold);
  line-height: var(--leading-tight);
  margin-bottom: var(--space-4);
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-modern__subtitle {
  font-size: clamp(var(--text-lg), 3vw, var(--text-2xl));
  font-weight: var(--font-normal);
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-8);
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  opacity: 0.95;
}

.hero-modern__actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

/* === FORM COMPONENTS === */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-weight: var(--font-medium);
  color: var(--text-primary);
  margin-bottom: var(--space-2);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-input {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  border: 2px solid var(--gray-300);
  border-radius: var(--radius-lg);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: var(--transition-base);
  background: var(--bg-primary);
}

.form-input:focus {
  outline: none;
  border-color: var(--brand-accent);
  box-shadow: 0 0 0 3px rgba(242, 159, 5, 0.1);
}

.form-input::placeholder {
  color: var(--gray-400);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* === BADGE COMPONENT === */

.badge {
  display: inline-flex;
  align-items: center;
  padding: var(--space-1) var(--space-3);
  font-size: var(--text-xs);
  font-weight: var(--font-medium);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: var(--radius-full);
}

.badge--primary {
  background: var(--brand-accent);
  color: var(--text-inverse);
}

.badge--secondary {
  background: var(--gray-100);
  color: var(--text-secondary);
}

.badge--success {
  background: var(--success);
  color: var(--text-inverse);
}

/* === LOADING STATES === */

.btn--loading {
  position: relative;
  color: transparent;
  pointer-events: none;
}

.btn--loading::after {
  content: '';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: auto;
  border: 2px solid transparent;
  border-top: 2px solid currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* === RESPONSIVE UTILITIES === */

@media (max-width: 768px) {
  .hero-modern__actions {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .card__actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* === ACCESSIBILITY ENHANCEMENTS === */

.btn:focus-visible,
.form-input:focus-visible {
  outline: 2px solid var(--brand-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .card,
  .form-input {
    transition: none;
  }
  
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
}

/* === SOCIAL SHARING OPTIMIZED === */

.shareable-moment {
  position: relative;
  padding: var(--space-8);
  background: linear-gradient(135deg, var(--brand-cream) 0%, #FFFFFF 100%);
  border-radius: var(--radius-2xl);
  text-align: center;
  box-shadow: var(--shadow-xl);
}

.shareable-moment::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--brand-accent), var(--brand-nature), var(--brand-accent));
  border-radius: var(--radius-2xl);
  z-index: -1;
}