/*
 * AgrupaMED Design System Stylesheet
 * ===================================
 * Core styles and CSS custom properties for the AgrupaMED design system.
 * See docs/DESIGN_SYSTEM.md for full documentation.
 */

/* Design Tokens */
.agm-page {
  --agm-bg: #141414;
  --agm-surface: #1c1c1c;
  --agm-surface-hover: #232323;
  --agm-surface-secondary: #242424;
  --agm-border: rgba(255, 255, 255, 0.1);
  --agm-border-strong: rgba(255, 255, 255, 0.15);
  --agm-text: #f5f5f7;
  --agm-text-secondary: #a1a1a6;
  --agm-text-tertiary: #6e6e73;
  --agm-accent: #ff1616;
  --agm-accent-soft: rgba(255, 22, 22, 0.15);

  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Inter', sans-serif;
  background: var(--agm-bg);
  min-height: 100vh;
  color: var(--agm-text);
  -webkit-font-smoothing: antialiased;
  letter-spacing: -0.01em;
}

/* Animation Keyframes */
@keyframes agm-fade {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Section - Mobile First */
.agm-hero {
  padding: 48px 16px 24px;
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.agm-hero-title {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 12px;
}

.agm-hero-title span {
  color: var(--agm-accent);
}

.agm-hero-subtitle {
  font-size: 15px;
  color: var(--agm-text-secondary);
  max-width: 500px;
  margin: 0 auto;
}

/* Sticky Search Bar - Mobile First */
.agm-search-bar {
  position: -webkit-sticky;
  position: sticky;
  top: 64px;
  z-index: 40;
  background: var(--agm-bg);
  border-bottom: 1px solid var(--agm-border);
  padding: 12px 16px;
}

.agm-search-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: center;
}

.agm-search-box {
  flex: 1;
  min-width: 0;
  max-width: 400px;
}

/* Filters Container - Mobile First */
.agm-filters {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Filter Dropdown Menu - Drops down from button */
.agm-filter-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: calc(100vw - 32px);
  max-width: 360px;
  max-height: 70vh;
  z-index: 45;
  border-radius: 1rem;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

/* Show dropdown when open */
[data-controller="dropdown"][data-open="true"] .agm-filter-menu {
  display: block;
}

/* Filter checkbox styling */
.agm-checkbox {
  position: relative;
}

.agm-checkbox:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
  background-size: 10px 10px;
  background-position: center;
  background-repeat: no-repeat;
}

/* Filter Button Active State */
.agm-filter-btn.active {
  background: var(--agm-accent-soft);
  border-color: var(--agm-accent);
  color: var(--agm-accent);
}

.agm-filter-btn.open {
  background: var(--agm-surface-hover);
  border-color: var(--agm-border-strong);
}

/* Chevron rotation when dropdown is open */
.agm-filter-chevron {
  transition: transform 0.2s ease;
}

.agm-filter-btn.open .agm-filter-chevron,
.group[data-open="true"] .agm-filter-chevron {
  transform: rotate(180deg);
}

/* Filter Count Badge */
.agm-filter-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--agm-accent);
  color: white;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  line-height: 1;
}

/* Filter Header (inside dropdown) */
.agm-filter-header-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--agm-accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  line-height: 1;
}

/* Main Content - Mobile First */
.agm-main {
  padding: 0 0 32px;
}

/* Month Section - Mobile First */
.agm-month-section {
  padding: 40px 0;
  border-bottom: 1px solid var(--agm-border);
}

.agm-month-section:last-of-type {
  border-bottom: none;
}

.agm-month-header {
  text-align: center;
  margin-bottom: 32px;
}

.agm-month-title {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

/* Event Image Admin Overlay */
.agm-event-image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 10px;
  pointer-events: auto;
  z-index: 30;
}

.agm-event-image-placeholder {
  pointer-events: none;
  z-index: 10;
}

.agm-event-image-overlay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agm-event-image-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  pointer-events: auto;
}

.agm-event-image-control {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--agm-text);
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  border-radius: 10px;
  padding: 6px 10px;
  transition: 0.2s ease;
  pointer-events: auto;
}

.agm-event-image-control:hover {
  background: var(--agm-surface-hover);
  border-color: var(--agm-border-strong);
}

.agm-event-image-control--danger {
  color: var(--agm-accent);
}

.agm-event-image-control[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.agm-event-image-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  border-radius: 50%;
  color: var(--agm-text-secondary);
  transition: 0.2s ease;
  pointer-events: auto;
}

.agm-event-image-nav:hover {
  color: var(--agm-text);
  background: var(--agm-surface-hover);
  border-color: var(--agm-border-strong);
}

.agm-event-image-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 600;
  color: var(--agm-text);
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  border-radius: 999px;
  pointer-events: auto;
}

/* Compact Grid - Mobile First (single column) */
.agm-compact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* No Results - Mobile First */
.agm-no-results {
  text-align: center;
  padding: 60px 16px;
}

.agm-no-results-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: var(--agm-surface);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.agm-no-results-icon svg {
  width: 24px;
  height: 24px;
  color: var(--agm-text-tertiary);
}

/* Empty State - Enhanced Version */
.agm-empty-state {
  text-align: center;
  padding: 80px 24px;
  max-width: 480px;
  margin: 0 auto;
}

.agm-empty-state-illustration {
  margin-bottom: 32px;
}

.agm-empty-state-icons {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto;
}

.agm-empty-state-icon {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  color: var(--agm-text-tertiary);
  animation: agm-float 3s ease-in-out infinite;
}

.agm-empty-state-icon--search {
  width: 64px;
  height: 64px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: var(--agm-accent-soft);
  border-color: var(--agm-accent);
  color: var(--agm-accent);
  z-index: 3;
  animation-delay: 0s;
}

.agm-empty-state-icon--filter {
  width: 44px;
  height: 44px;
  top: 8px;
  right: 8px;
  z-index: 2;
  animation-delay: 0.5s;
}

.agm-empty-state-icon--location {
  width: 36px;
  height: 36px;
  bottom: 12px;
  left: 12px;
  z-index: 1;
  animation-delay: 1s;
}

@keyframes agm-float {
  0%, 100% {
    transform: translate(-50%, -50%) translateY(0);
  }
  50% {
    transform: translate(-50%, -50%) translateY(-6px);
  }
}

.agm-empty-state-icon--filter,
.agm-empty-state-icon--location {
  animation-name: agm-float-alt;
}

@keyframes agm-float-alt {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.agm-empty-state-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.agm-empty-state-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--agm-text);
  margin: 0;
}

.agm-empty-state-message {
  font-size: 0.9375rem;
  color: var(--agm-text-secondary);
  line-height: 1.5;
  margin: 0;
  max-width: 320px;
}

.agm-empty-state-filters {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  max-width: 100%;
}

.agm-empty-state-filter-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  border-radius: 980px;
  font-size: 0.8125rem;
  color: var(--agm-text-secondary);
}

.agm-empty-state-filter-tag svg {
  width: 14px;
  height: 14px;
}

.agm-empty-state-filter-tag--search {
  background: var(--agm-accent-soft);
  border-color: var(--agm-accent);
  color: var(--agm-accent);
}

.agm-empty-state-filter-tag button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  margin-left: 2px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s ease, background 0.15s ease;
}

.agm-empty-state-filter-tag button:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.1);
}

.agm-empty-state-actions {
  margin-top: 24px;
}

/* ==========================================================================
   TABLET BREAKPOINT (768px+)
   ========================================================================== */
@media (min-width: 768px) {
  .agm-hero {
    padding: 60px 24px 32px;
  }

  .agm-hero-title {
    font-size: 3.5rem;
  }

  .agm-hero-subtitle {
    font-size: 17px;
  }

  .agm-search-bar {
    padding: 14px 24px;
    top: 64px;
  }

  .agm-search-inner {
    flex-wrap: wrap;
  }

  .agm-search-box {
    min-width: 220px;
    max-width: 320px;
  }

  /* On tablet+, align dropdown to left */
  .agm-filter-menu {
    right: auto;
    left: 0;
  }

  .agm-filters {
    flex-wrap: wrap;
  }

  .agm-month-section {
    padding: 56px 0;
  }

  .agm-month-header {
    margin-bottom: 40px;
  }

  .agm-month-title {
    font-size: 2.75rem;
  }

  /* 2-column grid on tablet */
  .agm-compact-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 24px;
  }

  .agm-no-results {
    padding: 70px 24px;
  }

  .agm-no-results-icon {
    width: 60px;
    height: 60px;
  }

  .agm-no-results-icon svg {
    width: 26px;
    height: 26px;
  }
}

/* ==========================================================================
   DESKTOP BREAKPOINT (1024px+)
   ========================================================================== */
@media (min-width: 1024px) {
  .agm-hero {
    padding: 80px 24px 40px;
  }

  .agm-hero-title {
    font-size: 5rem;
  }

  .agm-hero-subtitle {
    font-size: 18px;
  }

  .agm-search-bar {
    padding: 16px 24px;
  }

  .agm-search-box {
    max-width: 400px;
  }

  .agm-month-section {
    padding: 64px 0;
  }

  .agm-month-header {
    margin-bottom: 48px;
  }

  .agm-month-title {
    font-size: 4rem;
  }

  /* 3-column grid on desktop */
  .agm-compact-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
  }

  .agm-no-results {
    padding: 80px 24px;
  }

  .agm-no-results-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
  }

  .agm-no-results-icon svg {
    width: 28px;
    height: 28px;
  }
}

/* Scrollbar Styling */
.agm-page ::-webkit-scrollbar {
  width: 4px;
}

.agm-page ::-webkit-scrollbar-thumb {
  background: var(--agm-border);
  border-radius: 2px;
}

.agm-page ::-webkit-scrollbar-thumb:hover {
  background: var(--agm-border-strong);
}

/* ==========================================================================
   LANDING PAGE: CARDS VARIANT
   Card-based modular design with glassmorphism and animations
   ========================================================================== */

.agm-landing-cards {
  --agm-bg: #0a0a0a;
  --agm-surface: #141414;
  --agm-surface-glass: rgba(28, 28, 28, 0.7);
}

/* Hero Section */
.agm-cards-hero {
  position: relative;
  min-height: 100vh;
  padding: 120px 24px 40px;
  margin-top: -64px;   /* Pull up behind navbar */
  padding-top: 184px;  /* 120px + 64px to compensate */
}

.agm-cards-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.agm-cards-hero-gradient {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 120%;
  height: 80%;
  background: radial-gradient(ellipse at center, rgba(255, 22, 22, 0.08) 0%, transparent 60%);
}

.agm-cards-hero-grid-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 80%);
}

.agm-cards-hero-content {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  gap: 48px;
  align-items: center;
}

@media (min-width: 1024px) {
  .agm-cards-hero-content {
    grid-template-columns: 1fr 1fr;
    gap: 64px;
  }
}

.agm-cards-headline {
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
}

.agm-cards-headline span {
  color: var(--agm-accent);
}

.agm-cards-subhead {
  font-size: 18px;
  line-height: 1.6;
  color: var(--agm-text-secondary);
  margin-bottom: 32px;
  max-width: 500px;
}

.agm-cards-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

/* Card Composition (Hero Visual) */
.agm-cards-composition {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 20px 0;
}

/* Desktop: absolute positioning with floating cards */
@media (min-width: 1024px) {
  .agm-cards-composition {
    display: block;
    height: 400px;
    padding: 0;
  }
}

.agm-cards-comp-main {
  position: relative;
  width: 100%;
  max-width: 260px;
}

@media (min-width: 1024px) {
  .agm-cards-comp-main {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    max-width: none;
  }
}

.agm-cards-glass-card {
  background: var(--agm-surface-glass);
  backdrop-filter: blur(24px);
  border: 1px solid var(--agm-border);
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@media (min-width: 1024px) {
  .agm-cards-glass-card {
    border-radius: 24px;
    padding: 28px;
    box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4);
  }
}

.agm-cards-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 1024px) {
  .agm-cards-card-header {
    gap: 12px;
    margin-bottom: 20px;
  }
}

.agm-cards-card-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--agm-accent-soft);
  border-radius: 10px;
  color: var(--agm-accent);
}

@media (min-width: 1024px) {
  .agm-cards-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }
}

.agm-cards-card-label {
  font-size: 12px;
  color: var(--agm-text-tertiary);
}

@media (min-width: 1024px) {
  .agm-cards-card-label {
    font-size: 13px;
  }
}

.agm-cards-score-display {
  display: flex;
  align-items: baseline;
  margin-bottom: 4px;
}

.agm-cards-score-value {
  font-size: 44px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

@media (min-width: 1024px) {
  .agm-cards-score-value {
    font-size: 56px;
  }
}

.agm-cards-score-max {
  font-size: 20px;
  color: var(--agm-text-tertiary);
  margin-left: 4px;
}

@media (min-width: 1024px) {
  .agm-cards-score-max {
    font-size: 24px;
  }
}

.agm-cards-score-program {
  font-size: 13px;
  color: var(--agm-text-secondary);
  margin-bottom: 16px;
}

@media (min-width: 1024px) {
  .agm-cards-score-program {
    font-size: 14px;
    margin-bottom: 20px;
  }
}

.agm-cards-progress-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.agm-cards-progress-fill {
  height: 100%;
  width: 60%;
  background: linear-gradient(90deg, var(--agm-accent), #ff6b6b);
  border-radius: 3px;
}

/* Floating Mini Cards - Mobile: horizontal row below main card */
.agm-cards-floating-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  max-width: 260px;
}

@media (min-width: 1024px) {
  .agm-cards-floating-row {
    display: contents;
  }
}

.agm-cards-comp-float {
  position: relative;
  animation: agm-pulse-subtle 3s ease-in-out infinite;
}

/* Desktop: absolute positioning with floating animation */
@media (min-width: 1024px) {
  .agm-cards-comp-float {
    position: absolute;
    animation: agm-float-card 4s ease-in-out infinite;
  }
  
  .agm-cards-comp-float--1 {
    top: 20%;
    left: -10%;
  }
  
  .agm-cards-comp-float--2 {
    top: 60%;
    right: -5%;
    animation-delay: 1s;
  }
  
  .agm-cards-comp-float--3 {
    bottom: 10%;
    left: 5%;
    animation-delay: 2s;
  }
}

/* Subtle pulse for mobile */
@keyframes agm-pulse-subtle {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.85; }
}

@keyframes agm-float-card {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.agm-cards-mini-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--agm-surface-glass);
  backdrop-filter: blur(16px);
  border: 1px solid var(--agm-border);
  border-radius: 12px;
  font-size: 12px;
  color: var(--agm-text);
  white-space: nowrap;
}

@media (min-width: 1024px) {
  .agm-cards-mini-card {
    gap: 10px;
    padding: 12px 16px;
    border-radius: 14px;
    font-size: 13px;
  }
}

.agm-cards-mini-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .agm-cards-mini-icon {
    width: 24px;
    height: 24px;
  }
}

.agm-cards-mini-icon--green {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.agm-cards-mini-icon--yellow {
  background: rgba(234, 179, 8, 0.15);
  color: #eab308;
}

.agm-cards-mini-pts {
  margin-left: auto;
  color: #22c55e;
  font-weight: 600;
}

/* Stats Bar */
.agm-cards-stats-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 24px;
  margin-top: 60px;
  background: var(--agm-surface-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--agm-border);
  border-radius: 20px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.agm-cards-stat {
  text-align: center;
}

.agm-cards-stat-value {
  display: block;
  font-size: 24px;
  font-weight: 600;
}

.agm-cards-stat-label {
  font-size: 12px;
  color: var(--agm-text-tertiary);
}

.agm-cards-stat-separator {
  width: 1px;
  height: 32px;
  background: var(--agm-border);
}

/* Sections */
.agm-cards-section {
  padding: 100px 24px;
}

.agm-cards-section--dark {
  background: var(--agm-surface);
}

.agm-cards-container {
  max-width: 1120px;
  margin: 0 auto;
}

.agm-cards-section-header {
  text-align: center;
  margin-bottom: 64px;
}

.agm-cards-section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 12px;
}

.agm-cards-section-desc {
  font-size: 18px;
  color: var(--agm-text-secondary);
}

/* Steps Row */
.agm-cards-steps-row {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

@media (min-width: 768px) {
  .agm-cards-steps-row {
    flex-direction: row;
    justify-content: center;
    gap: 0;
  }
}

.agm-cards-step-card {
  position: relative;
  padding: 40px 32px;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  border-radius: 24px;
  text-align: center;
  width: 100%;
  max-width: 280px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.agm-cards-step-card:hover {
  border-color: var(--agm-accent);
  transform: translateY(-4px);
}

.agm-cards-step-number {
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  background: var(--agm-accent);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 980px;
}

.agm-cards-step-icon-wrapper {
  margin-bottom: 20px;
}

.agm-cards-step-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--agm-accent-soft);
  border-radius: 16px;
  color: var(--agm-accent);
  margin: 0 auto;
}

.agm-cards-step-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}

.agm-cards-step-desc {
  font-size: 14px;
  color: var(--agm-text-secondary);
  line-height: 1.6;
}

.agm-cards-step-connector {
  width: 2px;
  height: 32px;
  background: var(--agm-border);
}

@media (min-width: 768px) {
  .agm-cards-step-connector {
    width: 64px;
    height: 2px;
  }
}

/* Bento Grid */
.agm-cards-bento {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .agm-cards-bento {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .agm-cards-bento-card--large {
    grid-column: span 2;
  }
}

@media (min-width: 1024px) {
  .agm-cards-bento {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .agm-cards-bento-card--large {
    grid-column: span 2;
  }
}

.agm-cards-bento-card {
  padding: 32px;
  background: var(--agm-bg);
  border: 1px solid var(--agm-border);
  border-radius: 24px;
  transition: transform 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}

.agm-cards-bento-card:hover {
  border-color: var(--agm-border-strong);
  transform: translateY(-2px);
}

.agm-cards-bento-card--large {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 240px;
}

.agm-cards-bento-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--agm-accent-soft);
  border-radius: 14px;
  color: var(--agm-accent);
  margin-bottom: 20px;
}

.agm-cards-bento-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.agm-cards-bento-desc {
  font-size: 14px;
  color: var(--agm-text-secondary);
  line-height: 1.6;
}

/* AI Animation */
.agm-cards-ai-animation {
  position: relative;
  height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
}

.agm-cards-ai-line {
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  position: relative;
  overflow: hidden;
}

.agm-cards-ai-line::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 30%;
  background: var(--agm-accent);
  border-radius: 2px;
  animation: agm-ai-scan 2s ease-in-out infinite;
}

.agm-cards-ai-line:nth-child(2)::after {
  animation-delay: 0.3s;
  width: 50%;
}

.agm-cards-ai-line:nth-child(3)::after {
  animation-delay: 0.6s;
  width: 20%;
}

@keyframes agm-ai-scan {
  0%, 100% { transform: translateX(0); opacity: 0.5; }
  50% { transform: translateX(230%); opacity: 1; }
}

/* Events Grid */
.agm-cards-events-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .agm-cards-events-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.agm-cards-event-card {
  display: block;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  transition: transform 0.3s ease;
  will-change: transform;
}

.agm-cards-event-card:hover {
  transform: translateY(-4px);
}

.agm-cards-event-image {
  position: relative;
  padding-top: 65%;
}

.agm-cards-event-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
  will-change: transform;
}

.agm-cards-event-card:hover .agm-cards-event-image img {
  transform: scale(1.05);
}

.agm-cards-event-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
}

.agm-cards-event-content {
  padding: 20px;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  border-top: none;
  border-radius: 0 0 20px 20px;
}

.agm-cards-event-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--agm-text);
  margin-bottom: 8px;
}

.agm-cards-event-meta {
  display: flex;
  gap: 16px;
  font-size: 13px;
  color: var(--agm-text-tertiary);
}

.agm-cards-events-cta {
  text-align: center;
  margin-top: 48px;
}

/* Pricing Grid */
.agm-cards-pricing-grid {
  display: grid;
  gap: 24px;
}

@media (min-width: 768px) {
  .agm-cards-pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

/* Billing Toggle */
.agm-cards-billing-toggle {
  display: inline-flex;
  align-items: center;
  background: var(--agm-surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: 980px;
  padding: 4px;
  border: 1px solid var(--agm-border);
  margin-top: 24px;
}

.agm-cards-toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 24px;
  border-radius: 980px;
  font-size: 14px;
  font-weight: 500;
  color: var(--agm-text-tertiary);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease, background-color 0.2s ease;
}

.agm-cards-toggle-btn:hover {
  color: var(--agm-text-secondary);
}

.agm-cards-toggle-btn:focus-visible {
  outline: 2px solid var(--agm-accent);
  outline-offset: 2px;
}

.agm-cards-toggle-btn.active {
  background: var(--agm-surface-hover);
  color: var(--agm-text);
}

.agm-cards-toggle-badge {
  padding: 3px 8px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  font-size: 11px;
  font-weight: 600;
  border-radius: 980px;
}

/* Price equivalent (for yearly) */
.agm-cards-price-equivalent {
  display: block;
  font-size: 13px;
  color: #22c55e;
  margin-top: 4px;
}

.agm-cards-price-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 40px 32px;
  background: var(--agm-bg);
  border: 1px solid var(--agm-border);
  border-radius: 24px;
  transition: border-color 0.3s ease;
}

.agm-cards-price-card:hover {
  border-color: var(--agm-border-strong);
}

.agm-cards-price-card--featured {
  border-color: var(--agm-accent);
  background: linear-gradient(135deg, rgba(255, 22, 22, 0.05), transparent);
}

.agm-cards-price-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 16px;
  background: var(--agm-accent);
  color: white;
  font-size: 12px;
  font-weight: 600;
  border-radius: 980px;
}

.agm-cards-price-header {
  text-align: center;
  margin-bottom: 32px;
}

.agm-cards-price-name {
  display: block;
  font-size: 14px;
  color: var(--agm-text-secondary);
  margin-bottom: 8px;
}

.agm-cards-price-amount {
  text-align: center;
  margin-bottom: 8px;
  min-height: 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.agm-cards-price-amount > div {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.agm-cards-price-amount .hidden {
  display: none;
}

.agm-cards-price-value {
  font-size: 40px;
  font-weight: 600;
}

.agm-cards-price-period {
  font-size: 16px;
  color: var(--agm-text-tertiary);
}

.agm-cards-price-desc {
  font-size: 13px;
  color: var(--agm-text-tertiary);
}

.agm-cards-price-features {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  flex-grow: 1;
}

.agm-cards-price-features li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  font-size: 14px;
  color: var(--agm-text-secondary);
  border-bottom: 1px solid var(--agm-border);
}

.agm-cards-price-features li:last-child {
  border-bottom: none;
}

.agm-cards-check {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(34, 197, 94, 0.15);
  border-radius: 50%;
  flex-shrink: 0;
}

.agm-cards-check::after {
  content: '';
  width: 8px;
  height: 5px;
  border-left: 2px solid #22c55e;
  border-bottom: 2px solid #22c55e;
  transform: rotate(-45deg) translateY(-1px);
}

/* Partner Section */
.agm-cards-partner-card {
  display: grid;
  gap: 32px;
  padding: 48px;
  background: var(--agm-bg);
  border: 1px solid var(--agm-border);
  border-radius: 24px;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
}

.agm-cards-partner-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 20% 0%, rgba(255, 22, 22, 0.06), transparent),
              radial-gradient(600px 200px at 80% 100%, rgba(147, 51, 234, 0.04), transparent);
  pointer-events: none;
}

@media (min-width: 768px) {
  .agm-cards-partner-card {
    grid-template-columns: auto 1fr;
    gap: 48px;
    padding: 56px;
    align-items: center;
  }
}

.agm-cards-partner-logo {
  display: flex;
  justify-content: center;
  position: relative;
}

.agm-cards-partner-logo img {
  height: 120px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 768px) {
  .agm-cards-partner-logo img {
    height: 160px;
  }
}

.agm-cards-partner-content {
  position: relative;
}

.agm-cards-partner-title {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

@media (min-width: 768px) {
  .agm-cards-partner-title {
    font-size: 28px;
  }
}

.agm-cards-partner-desc {
  font-size: 16px;
  line-height: 1.6;
  color: var(--agm-text-secondary);
  margin-bottom: 24px;
}

.agm-cards-partner-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.agm-text-accent {
  color: var(--agm-accent);
}

/* CTA Section */
.agm-cards-cta {
  padding: 100px 24px;
  background: var(--agm-surface);
}

.agm-cards-cta-card {
  padding: 80px 40px;
  background: linear-gradient(135deg, var(--agm-surface), rgba(255, 22, 22, 0.05));
  border: 1px solid var(--agm-border);
  border-radius: 32px;
  text-align: center;
}

.agm-cards-cta-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.agm-cards-cta-desc {
  font-size: 18px;
  color: var(--agm-text-secondary);
  margin-bottom: 40px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   AD COMPONENTS
   Banner and card-style advertisement components for the events page
   ========================================================================== */

/* -----------------------------------------------------------------------------
   AD BANNER - Full-width banner between content sections
   ----------------------------------------------------------------------------- */

.agm-ad-banner {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .agm-ad-banner {
    padding: 0 24px;
  }
}

.agm-ad-banner-link {
  display: block;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--agm-surface);
  border: 1px solid var(--agm-border);
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1), border-color 0.3s ease;
  will-change: transform;
}

.agm-ad-banner-link:hover {
  border-color: var(--agm-border-strong);
  transform: translateY(-1px);
}

.agm-ad-banner-image {
  width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.1, 0.25, 1);
}

@media (min-width: 768px) {
  .agm-ad-banner-image {
    max-height: 160px;
    object-fit: cover;
  }
}

.agm-ad-banner-link:hover .agm-ad-banner-image {
  transform: scale(1.02);
}

/* -----------------------------------------------------------------------------
   AD CARD - Base styles (matches compact event card dimensions)
   ----------------------------------------------------------------------------- */

.agm-ad-card {
  --ad-accent: var(--agm-accent);
  position: relative;
  height: 100%;
}

.agm-ad-card-link {
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  text-decoration: none;
  transition: transform 0.3s cubic-bezier(0.25, 0.1, 0.25, 1);
  will-change: transform;
}

@media (min-width: 768px) {
  .agm-ad-card-link {
    border-radius: 16px;
  }
}

.agm-ad-card-link:hover {
  transform: scale(1.02);
}

/* Background layers */
.agm-ad-card-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Partner color overlay - subtle gradient tint */
.agm-ad-card-color-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.agm-ad-card-link:hover .agm-ad-card-color-overlay {
  opacity: 1;
}

/* Content container */
.agm-ad-card-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 20px;
}

@media (min-width: 768px) {
  .agm-ad-card-content {
    padding: 24px;
  }
}

/* Header with tag and logo */
.agm-ad-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.agm-ad-card-tag {
  display: inline-flex;
  padding: 4px 10px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 980px;
  flex-shrink: 0;
}

.agm-ad-card-logo {
  flex-shrink: 0;
}

.agm-ad-card-logo-img {
  height: clamp(2.5rem, 6vw + 0.5rem, 4rem);
  width: auto;
  max-width: clamp(5rem, 12vw + 1rem, 8rem);
  object-fit: contain;
  opacity: 0.85;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.agm-ad-card-link:hover .agm-ad-card-logo-img {
  transform: scale(1.05);
  opacity: 1;
}

/* Body content */
.agm-ad-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.agm-ad-card-title {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

@media (min-width: 768px) {
  .agm-ad-card-title {
    font-size: 17px;
  }
}

.agm-ad-card-desc {
  font-size: 13px;
  line-height: 1.5;
  margin: 0 0 12px;
}

/* Benefits list */
.agm-ad-card-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agm-ad-card-benefit {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.agm-ad-card-benefit-icon {
  font-size: 16px;
  flex-shrink: 0;
  margin-top: 1px;
}

.agm-ad-card-benefit-text {
  font-size: 13px;
  line-height: 1.4;
}

/* Footer with CTA and logo */
.agm-ad-card-footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.agm-ad-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.agm-ad-card-arrow {
  transition: transform 0.3s ease;
}

.agm-ad-card-link:hover .agm-ad-card-arrow {
  transform: translateX(4px);
}

/* -----------------------------------------------------------------------------
   AD CARD - Glass variation (single style)
   Subtle glassmorphism with frosted backdrop — refined and premium
   ----------------------------------------------------------------------------- */

.agm-ad-card--glass .agm-ad-card-link {
  background: rgba(28, 28, 28, 0.6);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.agm-ad-card--glass .agm-ad-card-link:hover {
  background: rgba(28, 28, 28, 0.75);
  border-color: rgba(255, 255, 255, 0.1);
}

.agm-ad-card--glass .agm-ad-card-bg--glass {
  background: radial-gradient(
    ellipse at 50% -20%,
    rgba(255, 255, 255, 0.03) 0%,
    transparent 70%
  );
}

.agm-ad-card--glass .agm-ad-card-tag {
  color: var(--agm-text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.agm-ad-card--glass .agm-ad-card-title {
  color: var(--agm-text);
}

.agm-ad-card--glass .agm-ad-card-desc {
  color: var(--agm-text-secondary);
}

.agm-ad-card--glass .agm-ad-card-benefit-icon {
  color: var(--agm-text-tertiary);
}

.agm-ad-card--glass .agm-ad-card-benefit-text {
  color: var(--agm-text-secondary);
}

.agm-ad-card--glass .agm-ad-card-cta {
  color: var(--agm-text);
}

.agm-ad-card--glass .agm-ad-card-link:hover .agm-ad-card-cta {
  color: var(--agm-accent);
}
