@import url('./core/design-tokens.css');
/* MATERIAL ICONS GLOBAL */
.material-icons {
  font-family: 'Material Icons' !important;
  font-weight: normal !important;
  font-style: normal !important;
  font-size: 24px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-feature-settings: 'liga';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--color-background-subtle);
}

/* Global link styles - ALL links red except footer */
a {
  color: var(--color-link-primary) !important;  /* Red #dc2626 */
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-link-primary-hover) !important;  /* Darker red #b91c1c */
  text-decoration: underline;
}

a:visited {
  color: var(--color-link-visited) !important;  /* Even darker red #991b1b */
}

/* Footer exception - light grey links */
.footer a,
.footer-links a,
.footer-link-button {
  color: #cccccc !important;  /* Light grey for footer */
}

.footer a:hover,
.footer-links a:hover,
.footer-link-button:hover {
  color: #ffffff !important;  /* White on hover */
  text-decoration: underline;
}

/* Preserve these elements' original styling */
.card,
.dashboard-card,
.article-card,
a.card,
a.dashboard-card,
a.article-card,
nav a,
.nav-link,
.tab,
.tab-btn,
.pagination-link,
.btn,
.button {
  color: inherit !important;
}

/* Skip Navigation for Accessibility */
.skip-nav {
  position: absolute;
  top: -40px;
  left: 6px;
  background: #6750A4;
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: 4px;
  z-index: 9999;
  font-size: 14px;
  font-weight: 600;
  transition: top 0.3s;
}

.skip-nav:focus {
  top: 6px;
}

/* Focus styles for better accessibility */
*:focus {
  outline: 2px solid #6750A4;
  outline-offset: 2px;
}

button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #6750A4;
  outline-offset: 2px;
}

/* Touch Target Optimization - WCAG AA Compliance */
button,
a,
input,
select,
textarea,
[role="button"],
[role="tab"],
[tabindex="0"],
.clickable,
.nav-tab,
.favorite-btn {
  min-width: 44px;
  min-height: 44px;
  position: relative;
}

/* Enhanced touch areas for small elements */
.favorite-btn::after,
.nav-tab::after,
button:not(.large-button)::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 44px;
  min-height: 44px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

/* Ensure interactive elements have adequate spacing */
.nav-tabs .nav-tab + .nav-tab {
  margin-left: clamp(4px, 1vw, 8px);
}

/* Card interaction optimization */
.card {
  min-height: 44px; /* Already set but ensuring compliance */
}

/* Link spacing optimization */
a:not(.card):not(.nav-tab) {
  padding: clamp(8px, 1.5vw, 12px) clamp(4px, 1vw, 8px);
  margin: 2px;
}

/* Button group spacing */
.button-group button + button,
.tabs button + button {
  margin-left: clamp(8px, 1.5vw, 12px);
}

/* Mobile touch optimization */
@media (pointer: coarse) {
  button,
  a,
  input,
  select,
  textarea,
  [role="button"],
  [role="tab"],
  .clickable {
    min-width: 48px;
    min-height: 48px;
  }

  .favorite-btn::after,
  .nav-tab::after,
  button:not(.large-button)::after {
    min-width: 48px;
    min-height: 48px;
  }
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Inter', sans-serif;
  background-color: var(--color-background-subtle);
  color: #1a1a1a;
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography Scale */
h1 {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  margin: 0 0 clamp(16px, 3vw, 24px) 0;
}

h2 {
  font-size: clamp(24px, 4vw, 36px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #1a1a1a;
  margin: 0 0 clamp(12px, 2vw, 20px) 0;
}

h3 {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #2d2d2d;
  margin: 0 0 clamp(8px, 2vw, 16px) 0;
}

h4 {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.4;
  color: #2d2d2d;
  margin: 0 0 clamp(6px, 1.5vw, 12px) 0;
}

p {
  font-size: clamp(14px, 2vw, 16px);
  line-height: 1.6;
  color: #4a4a4a;
  margin: 0 0 clamp(12px, 2vw, 16px) 0;
}

small {
  font-size: clamp(12px, 1.5vw, 14px);
  line-height: 1.5;
  color: #6b6b6b;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}



/* Navigation */
.nav {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.nav-tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-x: auto;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  padding: 16px 24px;
  cursor: pointer;
  color: #a0a0a0;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  min-width: 44px; /* Accessibility touch target */
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-bottom: 3px solid transparent;
  will-change: transform, background-color, color;
}

.nav-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%);
  opacity: 0;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 8px 8px 0 0;
}

.nav-tab:hover {
  color: #ffffff;
  transform: translateY(-1px);
}

.nav-tab:hover::before {
  opacity: 1;
}

.nav-tab.active {
  color: #1a1a1a;
  background: linear-gradient(135deg, #ffffff 0%, var(--color-background-subtle) 100%);
  border-bottom-color: #ff9800;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  font-weight: 600;
}

.nav-tab.active::before {
  opacity: 0;
}

.nav-tab:focus-visible {
  outline: 2px solid #ff9800;
  outline-offset: 2px;
}

.nav-tab:active {
  transform: translateY(0);
  transition: transform 0.1s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Content with Enhanced Spacing */
.main {
  padding: clamp(24px, 5vw, 40px) 0 clamp(40px, 8vw, 64px) 0;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
  position: relative;
}

/* Links in main body */
.main a,
.workshops-page a,
.exercises-page a,
.icebreakers-page a,
.collections-page a,
.myworkshopr-page a,
.collection-detail-page a {
  color: var(--color-link-primary) !important;  /* Red links site-wide #dc2626 */
  text-decoration: none;
  transition: color 0.2s ease;
}

.main a:hover,
.workshops-page a:hover,
.exercises-page a:hover,
.icebreakers-page a:hover,
.collections-page a:hover,
.myworkshopr-page a:hover,
.collection-detail-page a:hover {
  color: var(--color-link-primary-hover) !important;  /* Darker red on hover #b91c1c */
  text-decoration: underline;
}

/* Detail page links - also red */
.workshop-detail a,
.collection-detail-page a {
  color: var(--color-link-primary) !important;  /* Red links site-wide #dc2626 */
}

.workshop-detail a:hover,
.collection-detail-page a:hover {
  color: var(--color-link-primary-hover) !important;  /* Darker red on hover #b91c1c */
  text-decoration: underline;
}

/* Ensure all page components respect 1024px max width */
.workshops-page,
.exercises-page,
.icebreakers-page,
.collections-page,
.myworkshopr-page,
.collection-detail-page {
  max-width: 1200px; /* Increased max-width for 3 columns */
  margin: 0 auto;
  padding: 30px 20px;
  box-sizing: border-box;
  width: 100%;
}

/* Page Header for listing pages - match homepage spacing */
.main-content .page-header {
  background: var(--color-background-subtle);
  padding: 48px 0;
  text-align: left;
  margin-bottom: 0;
}

.main-content .page-header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.main-content .page-title {
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 800;
  color: #1a1a1a;
  margin: 0 0 16px 0;
  padding: 0;
  text-align: left;
  line-height: 1.2;
}

.main-content .page-description {
  font-size: clamp(18px, 2.5vw, 24px);
  color: #4a4a4a;
  margin: 0;
  padding: 0;
  text-align: left;
  line-height: 1.5;
}



/* Content Sections with Enhanced Hierarchy */
.section {
  margin-bottom: clamp(32px, 6vw, 56px);
  padding: clamp(16px, 3vw, 24px) 0;
  border: none;
  border-bottom: none;
  background: transparent;
  box-shadow: none;
  scroll-margin-top: 80px; /* Account for fixed nav */
  position: relative;
}

.section:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(60px, 15vw, 120px);
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 152, 0, 0.3) 20%,
    rgba(255, 152, 0, 0.6) 50%,
    rgba(255, 152, 0, 0.3) 80%,
    transparent 100%
  );
  border-radius: 2px;
}

/* Clean section styling */
.section hr,
.section-header hr,
.cards-grid hr,
.section .divider,
.section .separator,
.section .line {
  display: none !important;
}

.section-header {
  margin-bottom: clamp(20px, 4vw, 32px);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: clamp(12px, 2vw, 16px);
  border: none;
  background: transparent;
  box-shadow: none;
  position: relative;
}

/* Override h2 styles for section headers */
.section-header h2 {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.section-count {
  color: #FF9800;
  font-weight: 800;
  margin-right: clamp(6px, 1vw, 12px);
  text-shadow: 0 1px 2px rgba(255, 152, 0, 0.1);
}

.view-all {
  background: none;
  border: none;
  color: var(--color-link-primary);  /* Changed from #666 to red */
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 16px;
  border-radius: 8px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;

  /* GPU acceleration */
  will-change: transform, background-color, color;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.view-all:hover {
  color: var(--color-link-primary-hover);  /* Changed from #333 to lighter red */
  background-color: rgba(220, 38, 38, 0.08);  /* Changed to red background */
  transform: translateY(-1px) translateZ(0);
  text-decoration: none;
}

.view-all:active {
  transform: translateY(0) translateZ(0) scale(0.98);
  transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modern Responsive Cards Grid - Enhanced Flow */
.cards-grid,
.content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(325px, 100%), 1fr));
  gap: clamp(20px, 3vw, 28px);
  justify-content: center;
  padding: clamp(20px, 4vw, 36px) 0;
  max-width: 1440px;
  margin: 0 auto;
  container-type: inline-size;
  position: relative;
}

.cards-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(255, 152, 0, 0.1) 20%,
    rgba(255, 152, 0, 0.2) 50%,
    rgba(255, 152, 0, 0.1) 80%,
    transparent 100%
  );
}

/* Enhanced breakpoint system with better progression */
@media (min-width: 640px) { /* sm */
  .cards-grid,
  .content-grid {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: clamp(18px, 2.5vw, 24px);
  }
}

@media (min-width: 1024px) { /* lg */
  .cards-grid,
  .content-grid {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
    max-width: 1200px;
  }
}

@media (min-width: 1440px) { /* xl */
  .cards-grid,
  .content-grid {
    grid-template-columns: repeat(auto-fit, minmax(325px, 1fr));
    gap: clamp(24px, 3vw, 32px);
    max-width: 1440px;
  }
}

/* Homepage section cards - 3 column grid */
.homepage .content-section .cards-grid,
.section .cards-grid,
.content-section .cards-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 20px;
  padding: 20px 0;
  max-width: 1200px;
  margin: 0 auto;
}

/* Responsive grid for homepage sections */
@media (max-width: 768px) {
  .homepage .content-section .cards-grid,
  .section .cards-grid,
  .content-section .cards-grid {
    grid-template-columns: repeat(2, 1fr) !important; /* 2 columns on tablet */
  }
}

@media (max-width: 480px) {
  .homepage .content-section .cards-grid,
  .section .cards-grid,
  .content-section .cards-grid {
    grid-template-columns: 1fr !important; /* 1 column on mobile */
  }
}

/* Hide scrollbar completely for section cards */
.section .cards-grid::-webkit-scrollbar {
  display: none;
}

.section .cards-grid {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;  /* Firefox */
}

/* Cards maintain 325px width and allow horizontal scrolling for partial cards */

/* Mobile Navigation Enhancements */
@media (max-width: 768px) {
  .nav {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  }

  .nav-tabs {
    padding: 0 12px;
    scroll-snap-type: x mandatory;
    gap: 4px;
  }

  .nav-tab {
    padding: 14px 20px;
    font-size: 13px;
    scroll-snap-align: start;
    border-radius: 12px 12px 0 0;
  }

  .nav-tab.active {
    transform: translateY(-1px);
  }
}

@media (max-width: 480px) {
  .nav-tabs {
    padding: 0 8px;
    gap: 2px;
  }

  .nav-tab {
    padding: 12px 16px;
    font-size: 12px;
    min-width: 60px;
    border-radius: 8px 8px 0 0;
  }

  .nav-tab.active {
    box-shadow: 0 2px 8px rgba(255, 152, 0, 0.4);
  }

  .container {
    padding: 0 15px;
  }

  .main {
    padding: 20px 0;
  }
  
  .stat-number {
    font-size: 36px;
  }
  
  .card {
    padding: 15px;
    height: var(--card-height);
  }
  
  .card-title {
    font-size: 16px;
  }
  
  .sidebar {
    flex-direction: column;
    gap: 20px;
  }
  
  .stat {
    text-align: left;
  }
}





.collection-description {
  margin-bottom: 40px;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto 40px auto;
}

.collection-description h2 {
  font-size: 24px;
  font-weight: 500;
  color: #333;
  margin-bottom: 20px;
}

.description-content {
  background: #ffffff;
  border: 1px solid #A09A96;
  border-radius: 12px;
  padding: 30px;
  line-height: 1.6;
  color: #555;
  
  /* Properly aligned with content grid */
  display: block;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
  text-align: left;
}

.collection-content {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
}

.collection-workshops,
.collection-exercises,
.collection-icebreakers {
  margin-bottom: 40px;
  width: 100%;
  max-width: 100%;
}

.collection-workshops h2,
.collection-exercises h2,
.collection-icebreakers h2 {
  font-size: 24px;
  font-weight: 500;
  color: #333;
  margin-bottom: 20px;
}

.exercises-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  justify-content: start;
  align-items: start;
}

@media (max-width: 1100px) {
  .exercises-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .exercises-grid {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }
}

.no-exercises {
  text-align: center;
  padding: 40px;
  color: #666;
  background: #ffffff;
  border: 1px solid #A09A96;
  border-radius: 12px;
}

.no-exercises p {
  margin-bottom: 10px;
}

.loading, .error {
  text-align: center;
  padding: 40px;
  color: #666;
  font-size: 16px;
}

/* MyWorkshopr Page Styles */

/* Tabs (Workshop Detail Style) */
.workshop-tabs {
  display: flex;
  border-bottom: 1px solid #eee;
  margin-bottom: 25px;
}

.tab {
  background: none;
  border: none;
  padding: 15px 20px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 500;
  color: #666;
  border-bottom: 3px solid transparent;
  transition: all 0.2s ease;
}

.tab:hover {
  color: #333;
  background-color: #f9f9f9;
}

.tab.active {
  color: #ff9800;
  border-bottom-color: #ff9800;
}

.user-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding: 30px;
  background: #ffffff;
  border: 1px solid #A09A96;
  border-radius: 12px;
}

.user-info h1 {
  font-size: 28px;
  font-weight: 500;
  color: #333;
  margin-bottom: 5px;
}

.user-email {
  color: #666;
  font-size: 14px;
}

.page-title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.page-title-section h1 {
  margin: 0;
  font-size: 32px;
  font-weight: 600;
  color: #333;
}

.workshop-builder-btn {
  background: var(--color-brand-primary);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(0, 136, 122, 0.2);
}

.workshop-builder-btn:hover {
  background: #00695C;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 136, 122, 0.3);
}

.workshop-builder-btn .material-icons {
  font-size: 18px;
}

.sign-out-btn {
  background: var(--color-danger);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.sign-out-btn:hover {
  background: #c53030;
}


.favorites-section {
  margin-bottom: 40px;
}

.favorites-section h2 {
  font-size: 20px;
  font-weight: 500;
  color: #333;
  margin-bottom: 20px;
}

.favorites-grid {
  display: grid;
  grid-template-columns: repeat(3, 325px);
  gap: 20px;
}

@media (max-width: 1100px) {
  .favorites-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .favorites-grid {
    grid-template-columns: 325px;
    justify-content: center;
  }
}

.comments-content h2 {
  font-size: 24px;
  font-weight: 500;
  color: #333;
  margin-bottom: 20px;
}

.comments-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.comment-item {
  background: #ffffff;
  border: 1px solid #A09A96;
  border-radius: 12px;
  padding: 20px;
}

.comment-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.comment-header h4 {
  font-size: 16px;
  font-weight: 500;
  color: #333;
  margin: 0;
}

.comment-date {
  font-size: 12px;
  color: #666;
}

.comment-body {
  color: #555;
  line-height: 1.5;
  margin-bottom: 10px;
}

.comment-meta {
  display: flex;
  justify-content: flex-end;
}

.comment-type {
  background: var(--color-border-light);
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #666;
  text-transform: uppercase;
}

.no-content {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  background: #ffffff;
  border: 1px solid #A09A96;
  border-radius: 12px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.no-content h3 {
  font-size: 20px;
  margin-bottom: 10px;
  color: #555;
}

.no-content p {
  font-size: 14px;
  line-height: 1.5;
}