/**
 * ApprenticeshipHQ Directory - Enhanced Design System
 * 
 * Professional Visual Design System & Responsive Layout Framework
 * Version: 1.0.0
 * 
 * @package    Apprenticeshiphq_Directory
 * @author     TrailBlaze Creative
 * @license    GPL-2.0+
 */

/* ==========================================================================
   DESIGN SYSTEM FOUNDATION
   ========================================================================== */

/**
 * CSS Custom Properties (Design Tokens)
 * Professional color palette for apprenticeship industry
 */
:root {
  /* Brand Colors - Professional apprenticeship industry palette */
  --ahq-primary-50: #eff6ff;
  --ahq-primary-100: #dbeafe;
  --ahq-primary-200: #bfdbfe;
  --ahq-primary-300: #93c5fd;
  --ahq-primary-400: #60a5fa;
  --ahq-primary-500: #3b82f6;
  --ahq-primary-600: #2563eb;
  --ahq-primary-700: #1d4ed8;
  --ahq-primary-800: #1e40af;
  --ahq-primary-900: #1e3a8a;

  /* Secondary Colors - Complementary professional palette */
  --ahq-secondary-50: #f0f9ff;
  --ahq-secondary-100: #e0f2fe;
  --ahq-secondary-200: #bae6fd;
  --ahq-secondary-300: #7dd3fc;
  --ahq-secondary-400: #38bdf8;
  --ahq-secondary-500: #0ea5e9;
  --ahq-secondary-600: #0284c7;
  --ahq-secondary-700: #519AAE;
  --ahq-secondary-800: #075985;
  --ahq-secondary-900: #0c4a6e;

  /* Accent Colors - Industry-specific highlights */
  --ahq-accent-orange: #f97316;
  --ahq-accent-orange-light: #fed7aa;
  --ahq-accent-green: #059669;
  --ahq-accent-green-light: #a7f3d0;
  --ahq-accent-yellow: #d97706;
  --ahq-accent-yellow-light: #fde68a;
  --ahq-accent-red: #dc2626;
  --ahq-accent-red-light: #fecaca;

  /* Neutral Colors - Professional grays */
  --ahq-neutral-50: #f9fafb;
  --ahq-neutral-100: #f3f4f6;
  --ahq-neutral-200: #e5e7eb;
  --ahq-neutral-300: #d1d5db;
  --ahq-neutral-400: #9ca3af;
  --ahq-neutral-500: #6b7280;
  --ahq-neutral-600: #4b5563;
  --ahq-neutral-700: #374151;
  --ahq-neutral-800: #1f2937;
  --ahq-neutral-900: #111827;

  /* Typography Scale */
  --ahq-font-family-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --ahq-font-family-secondary: Georgia, 'Times New Roman', Times, serif;
  --ahq-font-family-mono: 'SF Mono', Monaco, Inconsolata, 'Roboto Mono', monospace;

  /* Font Sizes - Type Scale */
  --ahq-text-xs: 0.75rem;     /* 12px */
  --ahq-text-sm: 0.875rem;    /* 14px */
  --ahq-text-base: 1rem;      /* 16px */
  --ahq-text-lg: 1.125rem;    /* 18px */
  --ahq-text-xl: 1.25rem;     /* 20px */
  --ahq-text-2xl: 1.5rem;     /* 24px */
  --ahq-text-3xl: 1.875rem;   /* 30px */
  --ahq-text-4xl: 2.25rem;    /* 36px */
  --ahq-text-5xl: 3rem;       /* 48px */

  /* Font Weights */
  --ahq-font-normal: 400;
  --ahq-font-medium: 500;
  --ahq-font-semibold: 600;
  --ahq-font-bold: 700;

  /* Line Heights */
  --ahq-leading-none: 1;
  --ahq-leading-tight: 1.25;
  --ahq-leading-normal: 1.5;
  --ahq-leading-relaxed: 1.625;
  --ahq-leading-loose: 2;

  /* Spacing Scale */
  --ahq-space-px: 1px;
  --ahq-space-0: 0;
  --ahq-space-1: 0.25rem;     /* 4px */
  --ahq-space-2: 0.5rem;      /* 8px */
  --ahq-space-3: 0.75rem;     /* 12px */
  --ahq-space-4: 1rem;        /* 16px */
  --ahq-space-5: 1.25rem;     /* 20px */
  --ahq-space-6: 1.5rem;      /* 24px */
  --ahq-space-8: 2rem;        /* 32px */
  --ahq-space-10: 2.5rem;     /* 40px */
  --ahq-space-12: 3rem;       /* 48px */
  --ahq-space-16: 4rem;       /* 64px */
  --ahq-space-20: 5rem;       /* 80px */
  --ahq-space-24: 6rem;       /* 96px */

  /* Border Radius - Square Design */
  --ahq-radius-none: 0;
  --ahq-radius-sm: 0;  /* Square design */
  --ahq-radius-base: 0; /* Square design */
  --ahq-radius-md: 0;  /* Square design */
  --ahq-radius-lg: 0;    /* Square design */
  --ahq-radius-xl: 0;   /* Square design */
  --ahq-radius-2xl: 0;     /* Square design */
  --ahq-radius-full: 0; /* Square design */

  /* Shadows */
  --ahq-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --ahq-shadow-base: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --ahq-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --ahq-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --ahq-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --ahq-shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);

  /* Transitions */
  --ahq-transition-fast: 150ms ease-in-out;
  --ahq-transition-base: 200ms ease-in-out;
  --ahq-transition-slow: 300ms ease-in-out;

  /* Z-Index Scale */
  --ahq-z-dropdown: 1000;
  --ahq-z-sticky: 1020;
  --ahq-z-fixed: 1030;
  --ahq-z-modal-backdrop: 1040;
  --ahq-z-modal: 1050;
  --ahq-z-popover: 1060;
  --ahq-z-tooltip: 1070;
  --ahq-z-toast: 1080;
}

/* ==========================================================================
   BASE STYLES & RESETS
   ========================================================================== */

/* Reset and normalize for plugin components */
.ahq-events-calendar,
.ahq-organizations-directory,
.ahq-news-feed,
.ahq-program-gallery {
  box-sizing: border-box;
  font-family: var(--ahq-font-family-primary);
  line-height: var(--ahq-leading-normal);
  color: var(--ahq-neutral-800);
}

.ahq-events-calendar *,
.ahq-organizations-directory *,
.ahq-news-feed *,
.ahq-program-gallery * {
  box-sizing: border-box;
}

/* ==========================================================================
   ENHANCED EVENTS CALENDAR DESIGN
   ========================================================================== */

.ahq-events-calendar {
  margin: var(--ahq-space-8) 0;
  background: white;
  border-radius: var(--ahq-radius-xl);
  box-shadow: var(--ahq-shadow-lg);
  overflow: hidden;
  border: 1px solid var(--ahq-neutral-200);
}

/* Calendar Header */
.ahq-calendar-header {
  background: linear-gradient(135deg, var(--ahq-primary-600) 0%, var(--ahq-primary-700) 100%);
  color: white;
  padding: var(--ahq-space-6) var(--ahq-space-8);
  border-bottom: 1px solid var(--ahq-primary-700);
}

.ahq-calendar-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ahq-space-4);
  gap: var(--ahq-space-4);
}

.ahq-calendar-navigation {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-4);
}

.ahq-calendar-nav {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  padding: var(--ahq-space-2) var(--ahq-space-3);

  cursor: pointer;
  transition: all var(--ahq-transition-base);
  font-size: var(--ahq-text-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 44px;
  backdrop-filter: blur(10px);
}

.ahq-calendar-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.ahq-calendar-nav:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ahq-calendar-nav:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.ahq-calendar-title {
  font-size: var(--ahq-text-2xl);
  font-weight: var(--ahq-font-semibold);
  margin: 0;
  text-align: center;
  flex: 1;
  letter-spacing: -0.025em;
}

.ahq-calendar-filter {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-2);
}

.ahq-filter-label {
  font-weight: var(--ahq-font-medium);
  /*! color: rgba(255, 255, 255, 0.9); */
  font-size: var(--ahq-text-sm);
}

.ahq-program-filter {
  padding: var(--ahq-space-2) var(--ahq-space-3);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--ahq-radius-md);
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: var(--ahq-text-sm);
  backdrop-filter: blur(10px);
  transition: all var(--ahq-transition-base);
}

.ahq-program-filter:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.ahq-program-filter option {
  background: var(--ahq-primary-600);
  color: white;
}

.ahq-calendar-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--ahq-text-sm);
  color: rgba(255, 255, 255, 0.8);
  margin-top: var(--ahq-space-4);
}

.ahq-events-count {
  background: rgba(255, 255, 255, 0.1);
  padding: var(--ahq-space-1) var(--ahq-space-3);
  border-radius: var(--ahq-radius-full);
  font-weight: var(--ahq-font-medium);
  backdrop-filter: blur(10px);
}

.ahq-calendar-legend {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-4);
  flex-wrap: wrap;
}

.ahq-legend-item {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-1);
  font-size: var(--ahq-text-xs);
}

.ahq-legend-color {
  width: 12px;
  height: 12px;
  border-radius: var(--ahq-radius-sm);
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.ahq-event-default { background: var(--ahq-accent-orange); }
.ahq-event-program-1 { background: var(--ahq-accent-red); }
.ahq-event-program-2 { background: var(--ahq-accent-green); }
.ahq-event-program-3 { background: var(--ahq-accent-yellow); }
.ahq-event-program-4 { background: var(--ahq-secondary-500); }
.ahq-event-program-5 { background: var(--ahq-primary-400); }

/* Calendar Loading State */
.ahq-calendar-loading {
  text-align: center;
  padding: var(--ahq-space-8);
  color: var(--ahq-neutral-500);
}

.ahq-loading-spinner {
  border: 3px solid var(--ahq-neutral-200);
  border-top: 3px solid var(--ahq-primary-500);
  border-radius: var(--ahq-radius-full);
  width: 32px;
  height: 32px;
  animation: ahq-spin 1s linear infinite;
  display: inline-block;
  margin-bottom: var(--ahq-space-2);
}

@keyframes ahq-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Calendar Grid */
.ahq-calendar-grid {
  padding: var(--ahq-space-4);
  background: var(--ahq-neutral-50);
}

.ahq-calendar-days-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: var(--ahq-space-4);
  background: var(--ahq-neutral-300);

  overflow: hidden;
}

.ahq-calendar-day-header {
  background: var(--ahq-neutral-600);
  color: white;
  padding: var(--ahq-space-3);
  text-align: center;
  font-weight: var(--ahq-font-semibold);
  font-size: var(--ahq-text-sm);
  text-transform: uppercase;
  letter-spacing: 0.025em;
}

.ahq-calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--ahq-neutral-300);

  overflow: hidden;
}

.ahq-calendar-day {
  background: white;
  min-height: 120px;
  padding: var(--ahq-space-2);
  position: relative;
  transition: all var(--ahq-transition-base);
  border: 2px solid transparent;
  cursor: default;
}

.ahq-calendar-day.ahq-other-month {
  background: var(--ahq-neutral-100);
  opacity: 0.6;
}

.ahq-calendar-day.ahq-today {
  background: var(--ahq-primary-50);
  border-color: var(--ahq-primary-300);
}

.ahq-calendar-day.ahq-has-events {
  cursor: pointer;
  background: var(--ahq-accent-yellow-light);
}

.ahq-calendar-day.ahq-has-events:hover {
  background: var(--ahq-accent-orange-light);
  transform: translateY(-2px);
  box-shadow: var(--ahq-shadow-md);
}

.ahq-calendar-day.ahq-today.ahq-has-events {
  background: var(--ahq-primary-100);
  border-color: var(--ahq-primary-400);
}

.ahq-calendar-day-content {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ahq-calendar-day-number {
  display: block;
  font-weight: var(--ahq-font-semibold);
  font-size: var(--ahq-text-sm);
  color: var(--ahq-neutral-700);
  margin-bottom: var(--ahq-space-2);
}

.ahq-other-month .ahq-calendar-day-number {
  color: var(--ahq-neutral-400);
}

.ahq-today .ahq-calendar-day-number {
  color: var(--ahq-primary-700);
  font-weight: var(--ahq-font-bold);
}

/* Calendar Events */
.ahq-calendar-events {
  display: flex;
  flex-direction: column;
  gap: var(--ahq-space-1);
  flex: 1;
}

.ahq-calendar-event {
  background: var(--ahq-primary-600);
  color: white;
  padding: var(--ahq-space-1) var(--ahq-space-2);
  border-radius: var(--ahq-radius-md);
  font-size: var(--ahq-text-xs);
  cursor: pointer;
  transition: all var(--ahq-transition-base);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  position: relative;
}

.ahq-calendar-event:hover {
  background: var(--ahq-primary-700);
  transform: translateY(-1px);
  box-shadow: var(--ahq-shadow-sm);
}

.ahq-calendar-event:focus {
  outline: 2px solid var(--ahq-primary-300);
  outline-offset: 2px;
}

.ahq-event-title {
  display: block;
  font-weight: var(--ahq-font-medium);
  line-height: var(--ahq-leading-tight);
}

.ahq-event-time {
  display: block;
  font-size: var(--ahq-text-xs);
  opacity: 0.9;
  margin-top: var(--ahq-space-1);
}

.ahq-event-details-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: var(--ahq-radius-full);
  width: 16px;
  height: 16px;
  cursor: pointer;
  font-size: var(--ahq-text-xs);
  line-height: 1;
  opacity: 0;
  transition: opacity var(--ahq-transition-base);
  color: white;
}

.ahq-calendar-event:hover .ahq-event-details-btn {
  opacity: 1;
}

/* Calendar Empty State */
.ahq-calendar-empty {
  text-align: center;
  padding: var(--ahq-space-12);
  color: var(--ahq-neutral-500);
  background: white;

  margin: var(--ahq-space-4);
}

.ahq-empty-icon {
  font-size: var(--ahq-text-5xl);
  margin-bottom: var(--ahq-space-4);
  opacity: 0.5;
}

.ahq-empty-title {
  font-size: var(--ahq-text-xl);
  font-weight: var(--ahq-font-semibold);
  margin-bottom: var(--ahq-space-2);
  color: var(--ahq-neutral-700);
}

.ahq-empty-description {
  color: var(--ahq-neutral-500);
  max-width: 400px;
  margin: 0 auto;
}

/* ==========================================================================
   ENHANCED ORGANIZATIONS DIRECTORY DESIGN
   ========================================================================== */

.ahq-organizations-directory {
  margin: var(--ahq-space-8) 0;
  font-family: var(--ahq-font-family-primary);
}

.ahq-organizations-header {
  background: linear-gradient(135deg, var(--ahq-neutral-50) 0%, var(--ahq-neutral-100) 100%);
  border: 1px solid var(--ahq-neutral-200);
  border-radius: var(--ahq-radius-xl);
  padding: var(--ahq-space-6) var(--ahq-space-8);
  margin-bottom: var(--ahq-space-8);
}

.ahq-organizations-title-section {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ahq-space-6);
}

.ahq-organizations-title {
  font-size: var(--ahq-text-2xl);
  font-weight: var(--ahq-font-bold);
  color: var(--ahq-neutral-900);
  margin: 0;
  letter-spacing: -0.025em;
}

.ahq-organizations-meta {
  color: var(--ahq-neutral-600);
  font-size: var(--ahq-text-sm);
}

.ahq-organizations-count {
  background: var(--ahq-primary-100);
  color: var(--ahq-primary-800);
  padding: var(--ahq-space-1) var(--ahq-space-3);
  border-radius: var(--ahq-radius-full);
  font-weight: var(--ahq-font-medium);
}

.ahq-organizations-controls {
  display: flex;
  gap: var(--ahq-space-4);
  align-items: center;
  flex-wrap: wrap;
}

.ahq-organizations-search {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-2);
  position: relative;
}

.ahq-org-search-input {
  padding: var(--ahq-space-3);
  border: 1px solid var(--ahq-neutral-300);

  width: 300px;
  font-size: var(--ahq-text-sm);
  background: white;
  transition: all var(--ahq-transition-base);
}

.ahq-org-search-input:focus {
  outline: none;
  border-color: var(--ahq-primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.ahq-search-btn {
  background: var(--ahq-primary-600);
  color: white;
  border: none;

  padding: var(--ahq-space-3);
  cursor: pointer;
  font-size: var(--ahq-text-sm);
  transition: all var(--ahq-transition-base);
  min-width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahq-search-btn:hover {
  background: var(--ahq-primary-700);
  transform: translateY(-1px);
  box-shadow: var(--ahq-shadow-md);
}

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

.ahq-organizations-filter {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-2);
}

.ahq-org-filter-select {
  padding: var(--ahq-space-3);
  border: 1px solid var(--ahq-neutral-300);

  background: white;
  font-size: var(--ahq-text-sm);
  cursor: pointer;
  transition: all var(--ahq-transition-base);
}

.ahq-org-filter-select:focus {
  outline: none;
  border-color: var(--ahq-primary-500);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Organizations Grid */
.ahq-organizations-grid {
  display: grid;
  gap: var(--ahq-space-6);
  margin-bottom: var(--ahq-space-8);
}

.ahq-grid-cols-1 { grid-template-columns: 1fr; }
.ahq-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ahq-grid-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ahq-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ahq-grid-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ahq-grid-cols-6 { grid-template-columns: repeat(6, 1fr); }

/* Organization card - consolidated styles */
.ahq-organization-card {
  background: white;
  border: 1px solid var(--ahq-neutral-200);
  border-radius: var(--ahq-radius-xl);
  overflow: visible;
  transition: all var(--ahq-transition-base);
  box-shadow: var(--ahq-shadow-sm);
  display: flex;
  flex-direction: row;
  align-items: center; /* Center vertically */
  padding: 1.5rem;
  gap: 1.5rem;
}

.ahq-organization-card:hover {
  box-shadow: var(--ahq-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--ahq-primary-200);
}

.ahq-org-card-header {
  padding: var(--ahq-space-6);
  border-bottom: 1px solid var(--ahq-neutral-200);
  background: var(--ahq-neutral-50);
}

.ahq-org-logo {
  text-align: center;
  margin-bottom: var(--ahq-space-4);
}

.ahq-org-logo-img {

  height: auto;

  box-shadow: var(--ahq-shadow-sm);
}

.ahq-org-title {
  font-size: var(--ahq-text-xl);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
  margin: 0 0 var(--ahq-space-2) 0;
  line-height: var(--ahq-leading-tight);
}

.ahq-org-link {
  color: var(--ahq-neutral-900);
  text-decoration: none;
  transition: color var(--ahq-transition-base);
}

.ahq-org-link:hover {
  color: var(--ahq-primary-600);
}

.ahq-org-support {
  font-size: var(--ahq-text-sm);
  color: var(--ahq-neutral-600);
  background: var(--ahq-primary-50);
  padding: var(--ahq-space-1) var(--ahq-space-3);
  border-radius: var(--ahq-radius-full);
  display: inline-block;
}

.ahq-support-label {
  font-weight: var(--ahq-font-medium);
  color: var(--ahq-primary-700);
}

.ahq-org-card-body {
  padding: var(--ahq-space-6);
  flex: 1;
}

.ahq-org-description {
  color: var(--ahq-neutral-600);
  line-height: var(--ahq-leading-relaxed);
  margin-bottom: var(--ahq-space-6);
}

.ahq-org-contact {
  margin-bottom: var(--ahq-space-6);
}

.ahq-contact-title {
  font-size: var(--ahq-text-lg);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
  margin: 0 0 var(--ahq-space-3) 0;
}

.ahq-contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--ahq-space-2);
}

.ahq-contact-item {
  display: flex;
  align-items: center;
  gap: var(--ahq-space-2);
  font-size: var(--ahq-text-sm);
}

.ahq-contact-link {
  color: var(--ahq-primary-600);
  text-decoration: none;
  transition: color var(--ahq-transition-base);
}

.ahq-contact-link:hover {
  color: var(--ahq-primary-700);
  text-decoration: underline;
}

.ahq-org-programs {
  margin-bottom: var(--ahq-space-6);
}

.ahq-programs-title {
  font-size: var(--ahq-text-lg);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
  margin: 0 0 var(--ahq-space-3) 0;
}

.ahq-programs-list {
  display: flex;
  flex-direction: column;
  gap: var(--ahq-space-2);
}

.ahq-program-item {
  font-size: var(--ahq-text-sm);
}

.ahq-program-link {
  color: var(--ahq-primary-600);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: var(--ahq-space-1);
  transition: color var(--ahq-transition-base);
}

.ahq-program-link:hover {
  color: var(--ahq-primary-700);
  text-decoration: underline;
}

.ahq-org-card-footer {
  padding: var(--ahq-space-6);
  background: var(--ahq-neutral-50);
  border-top: 1px solid var(--ahq-neutral-200);
}

.ahq-org-actions {
  display: flex;
  gap: var(--ahq-space-3);
  flex-wrap: wrap;
}

.ahq-org-btn {
  padding: var(--ahq-space-2) var(--ahq-space-4);

  text-decoration: none;
  font-weight: var(--ahq-font-medium);
  font-size: var(--ahq-text-sm);
  cursor: pointer;
  transition: all var(--ahq-transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--ahq-space-1);
  border: 1px solid transparent;
}

.ahq-btn-primary {
  background: var(--ahq-primary-600);
  color: white;
  border-color: var(--ahq-primary-600);
}

.ahq-btn-primary:hover {
  background: var(--ahq-primary-700);
  border-color: var(--ahq-primary-700);
  transform: translateY(-1px);
  box-shadow: var(--ahq-shadow-md);
}

.ahq-btn-secondary {
  background: white;
  color: var(--ahq-primary-600);
  border-color: var(--ahq-primary-600);
}

.ahq-btn-secondary:hover {
  background: var(--ahq-primary-50);
  color: var(--ahq-primary-700);
}

.ahq-btn-text {
  background: transparent;
  color: var(--ahq-primary-600);
  border: none;
}

.ahq-btn-text:hover {
  background: var(--ahq-primary-50);
  color: var(--ahq-primary-700);
}

/* ==========================================================================
   ENHANCED NEWS FEED DESIGN
   ========================================================================== */

.ahq-news-feed {
  margin: var(--ahq-space-8) 0;
  font-family: var(--ahq-font-family-primary);
}

.ahq-news-feed-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ahq-space-6);
  padding-bottom: var(--ahq-space-4);
  border-bottom: 2px solid var(--ahq-neutral-200);
}

.ahq-news-feed-title {
  margin: 0;
  font-size: var(--ahq-text-2xl);
  font-weight: var(--ahq-font-bold);
  color: var(--ahq-neutral-900);
  letter-spacing: -0.025em;
}

.ahq-news-feed-meta {
  color: var(--ahq-neutral-600);
  font-size: var(--ahq-text-sm);
}

.ahq-news-count {
  background: var(--ahq-secondary-100);
  color: var(--ahq-secondary-800);
  padding: var(--ahq-space-1) var(--ahq-space-3);
  border-radius: 0;
  font-weight: var(--ahq-font-medium);
}

/* News Feed List */
.ahq-news-feed-list {
  display: grid;
  gap: var(--ahq-space-6);
}

.ahq-news-item {
  background: white;
  border: 1px solid var(--ahq-neutral-200);
  border-radius: 0;
  padding: var(--ahq-space-6);
  transition: all var(--ahq-transition-base);
  box-shadow: var(--ahq-shadow-sm);
}

.ahq-news-item:hover {
  box-shadow: var(--ahq-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--ahq-secondary-200);
}

.ahq-news-item-header {
  margin-bottom: var(--ahq-space-4);
}

.ahq-news-item-title {
  margin: 0 0 var(--ahq-space-3) 0;
  font-size: var(--ahq-text-xl);
  font-weight: var(--ahq-font-semibold);
  line-height: var(--ahq-leading-tight);
}

.ahq-news-item-title a {
  color: var(--ahq-neutral-900);
  text-decoration: none;
  transition: color var(--ahq-transition-base);
}

.ahq-news-item-title a:hover {
  color: var(--ahq-secondary-600);
}

.ahq-external-link-icon {
  margin-left: var(--ahq-space-1);
  font-size: var(--ahq-text-sm);
  opacity: 0.6;
}

.ahq-news-item-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--ahq-space-4);
  color: var(--ahq-neutral-500);
  font-size: var(--ahq-text-sm);
}

.ahq-news-program {
  font-weight: var(--ahq-font-medium);
  color: var(--ahq-secondary-600);
  background: var(--ahq-secondary-50);
  padding: var(--ahq-space-1) var(--ahq-space-2);
  border-radius: var(--ahq-radius-md);
}

.ahq-news-date {
  color: var(--ahq-neutral-500);
}

.ahq-news-item-content {
  margin-bottom: var(--ahq-space-4);
}

.ahq-news-excerpt {
  color: var(--ahq-neutral-600);
  line-height: var(--ahq-leading-relaxed);
  margin-bottom: var(--ahq-space-4);
}

.ahq-news-item-actions {
  display: flex;
  justify-content: flex-end;
}

.ahq-news-read-more {
  display: inline-flex;
  align-items: center;
  padding: var(--ahq-space-2) var(--ahq-space-4);
  background: #519AAE;
  color: white;
  text-decoration: none;

  font-weight: var(--ahq-font-medium);
  font-size: var(--ahq-text-sm);
  transition: all var(--ahq-transition-base);
  gap: var(--ahq-space-1);
}

.ahq-news-read-more:hover {
  background: var(--ahq-secondary-700);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--ahq-shadow-md);
}

.ahq-news-item-tags {
  border-top: 1px solid var(--ahq-neutral-200);
  padding-top: var(--ahq-space-4);
  margin-top: var(--ahq-space-4);
}

.ahq-tags-label {
  font-size: var(--ahq-text-sm);
  font-weight: var(--ahq-font-medium);
  color: var(--ahq-neutral-700);
  margin-right: var(--ahq-space-2);
}

.ahq-tags-list {
  display: inline-flex;
  flex-wrap: wrap;
  gap: var(--ahq-space-2);
  margin: 0;
  padding: 0;
  list-style: none;
}

.ahq-tag-item {
  margin: 0;
}

.ahq-tag {
  display: inline-block;
  background: var(--ahq-neutral-100);
  color: var(--ahq-neutral-700);
  padding: var(--ahq-space-1) var(--ahq-space-3);
  border-radius: var(--ahq-radius-full);
  font-size: var(--ahq-text-xs);
  font-weight: var(--ahq-font-medium);
  transition: all var(--ahq-transition-base);
}

.ahq-tag:hover {
  background: var(--ahq-neutral-200);
}

/* ==========================================================================
   ENHANCED PROGRAM GALLERY DESIGN
   ========================================================================== */

.ahq-program-gallery {
  margin: var(--ahq-space-8) 0;
  font-family: var(--ahq-font-family-primary);
}

.ahq-gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--ahq-space-8);
  padding-bottom: var(--ahq-space-4);
  border-bottom: 2px solid var(--ahq-neutral-200);
}

.ahq-gallery-title {
  margin: 0;
  font-size: var(--ahq-text-2xl);
  font-weight: var(--ahq-font-bold);
  color: var(--ahq-neutral-900);
  letter-spacing: -0.025em;
}

.ahq-gallery-filters {
  display: flex;
  gap: var(--ahq-space-2);
}

.ahq-filter-btn {
  padding: var(--ahq-space-2) var(--ahq-space-4);
  background: white;
  color: var(--ahq-neutral-700);
  border: 1px solid var(--ahq-neutral-300);

  font-size: var(--ahq-text-sm);
  font-weight: var(--ahq-font-medium);
  cursor: pointer;
  transition: all var(--ahq-transition-base);
}

.ahq-filter-btn:hover {
  background: var(--ahq-neutral-50);
  border-color: var(--ahq-neutral-400);
}

.ahq-filter-btn.ahq-filter-active {
  background: var(--ahq-primary-600);
  color: white;
  border-color: var(--ahq-primary-600);
}

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

/* Gallery Grid */
.ahq-gallery-grid {
  display: grid;
  gap: var(--ahq-space-6);
}

.ahq-gallery-cols-1 { grid-template-columns: repeat(1, 1fr); }
.ahq-gallery-cols-2 { grid-template-columns: repeat(2, 1fr); }
.ahq-gallery-cols-3 { grid-template-columns: repeat(3, 1fr); }
.ahq-gallery-cols-4 { grid-template-columns: repeat(4, 1fr); }
.ahq-gallery-cols-5 { grid-template-columns: repeat(5, 1fr); }
.ahq-gallery-cols-6 { grid-template-columns: repeat(6, 1fr); }

.ahq-gallery-item {
  background: white;
  border-radius: var(--ahq-radius-xl);
  overflow: hidden;
  box-shadow: var(--ahq-shadow-sm);
  transition: all var(--ahq-transition-base);
  border: 1px solid var(--ahq-neutral-200);
}

.ahq-gallery-item:hover {
  box-shadow: var(--ahq-shadow-lg);
  transform: translateY(-2px);
  border-color: var(--ahq-primary-200);
}

.ahq-gallery-item-wrapper {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* Gallery Images */
.ahq-gallery-image-container {
  position: relative;
  overflow: hidden;
  flex-grow: 1;
}

.ahq-gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
}

.ahq-gallery-image {
  width: 100%;
  height: 240px;
  object-fit: cover;
  transition: transform var(--ahq-transition-slow);
}

.ahq-gallery-link:hover .ahq-gallery-image {
  transform: scale(1.05);
}

.ahq-gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--ahq-transition-base);
}

.ahq-gallery-link:hover .ahq-gallery-overlay {
  opacity: 1;
}

.ahq-gallery-overlay-icon {
  font-size: var(--ahq-text-2xl);
  color: white;
}

/* Gallery Videos */
.ahq-gallery-video-container {
  position: relative;
  overflow: hidden;
  flex-grow: 1;
}

.ahq-gallery-video-thumbnail {
  position: relative;
  height: 240px;
  background: var(--ahq-neutral-900);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.ahq-gallery-video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ahq-gallery-video-placeholder {
  width: 100%;
  height: 100%;
  background: var(--ahq-neutral-700);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahq-video-icon {
  font-size: var(--ahq-text-5xl);
  color: var(--ahq-neutral-400);
}

.ahq-gallery-video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color var(--ahq-transition-base);
}

.ahq-gallery-video-link:hover .ahq-gallery-video-overlay {
  background: rgba(0, 0, 0, 0.6);
}

.ahq-gallery-play-icon {
  font-size: var(--ahq-text-5xl);
  color: white;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.ahq-gallery-video-player {
  width: 100%;
  height: 240px;
  background: var(--ahq-neutral-900);
}

/* Gallery Captions */
.ahq-gallery-caption {
  padding: var(--ahq-space-4);
  background: white;
}

.ahq-gallery-item-title {
  margin: 0 0 var(--ahq-space-2) 0;
  font-size: var(--ahq-text-lg);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
  line-height: var(--ahq-leading-tight);
}

.ahq-gallery-item-caption {
  margin: 0;
  color: var(--ahq-neutral-600);
  font-size: var(--ahq-text-sm);
  line-height: var(--ahq-leading-relaxed);
}

/* ==========================================================================
   ENHANCED MODAL DESIGN
   ========================================================================== */

.ahq-event-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--ahq-z-modal);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ahq-transition-slow), visibility var(--ahq-transition-slow);
  backdrop-filter: blur(4px);
}

.ahq-event-modal[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

.ahq-modal-content {
  background: white;
  border-radius: var(--ahq-radius-2xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: var(--ahq-shadow-2xl);
  transform: scale(0.95);
  transition: transform var(--ahq-transition-slow);
}

.ahq-event-modal[aria-hidden="false"] .ahq-modal-content {
  transform: scale(1);
}

.ahq-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--ahq-space-6);
  border-bottom: 1px solid var(--ahq-neutral-200);
  background: var(--ahq-neutral-50);
}

.ahq-modal-title {
  font-size: var(--ahq-text-xl);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
  margin: 0;
}

.ahq-modal-close {
  background: none;
  border: none;
  font-size: var(--ahq-text-2xl);
  cursor: pointer;
  color: var(--ahq-neutral-500);
  padding: var(--ahq-space-1);
  border-radius: var(--ahq-radius-full);
  transition: all var(--ahq-transition-base);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahq-modal-close:hover {
  background: var(--ahq-neutral-100);
  color: var(--ahq-neutral-700);
}

.ahq-modal-close:focus {
  outline: 2px solid var(--ahq-primary-300);
  outline-offset: 2px;
}

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

.ahq-event-details {
  display: flex;
  flex-direction: column;
  gap: var(--ahq-space-6);
}

.ahq-event-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--ahq-space-4);
}

.ahq-event-meta-item {
  display: flex;
  flex-direction: column;
  gap: var(--ahq-space-1);
}

.ahq-meta-label {
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-700);
  font-size: var(--ahq-text-sm);
}

.ahq-meta-value {
  color: var(--ahq-neutral-900);
  font-size: var(--ahq-text-base);
}

.ahq-event-description {
  display: flex;
  flex-direction: column;
  gap: var(--ahq-space-2);
}

.ahq-description-title {
  font-size: var(--ahq-text-lg);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
  margin: 0;
}

.ahq-description-content {
  color: var(--ahq-neutral-600);
  line-height: var(--ahq-leading-relaxed);
}

.ahq-modal-footer {
  padding: var(--ahq-space-6);
  border-top: 1px solid var(--ahq-neutral-200);
  background: var(--ahq-neutral-50);
}

.ahq-modal-actions {
  display: flex;
  gap: var(--ahq-space-3);
  justify-content: flex-end;
}

.ahq-btn {
  padding: var(--ahq-space-3) var(--ahq-space-6);

  text-decoration: none;
  font-weight: var(--ahq-font-medium);
  cursor: pointer;
  transition: all var(--ahq-transition-base);
  display: inline-flex;
  align-items: center;
  gap: var(--ahq-space-2);
  border: 1px solid transparent;
  font-size: var(--ahq-text-sm);
}

.ahq-btn-primary {
  background: var(--ahq-primary-600);
  color: white;
  border-color: var(--ahq-primary-600);
}

.ahq-btn-primary:hover {
  background: var(--ahq-primary-700);
  border-color: var(--ahq-primary-700);
  transform: translateY(-1px);
  box-shadow: var(--ahq-shadow-md);
}

.ahq-btn-secondary {
  background: white;
  color: var(--ahq-primary-600);
  border-color: var(--ahq-primary-600);
}

.ahq-btn-secondary:hover {
  background: var(--ahq-primary-50);
  color: var(--ahq-primary-700);
}

/* ==========================================================================
   ENHANCED LIGHTBOX DESIGN
   ========================================================================== */

.ahq-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: var(--ahq-z-modal);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--ahq-space-8);
  backdrop-filter: blur(4px);
}

.ahq-lightbox.ahq-lightbox-open {
  display: flex;
}

.ahq-lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.ahq-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  background: white;
  border-radius: var(--ahq-radius-2xl);
  overflow: hidden;
  box-shadow: var(--ahq-shadow-2xl);
  animation: lightboxAppear var(--ahq-transition-slow) ease-out;
}

@keyframes lightboxAppear {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.ahq-lightbox-close {
  position: absolute;
  top: var(--ahq-space-4);
  right: var(--ahq-space-4);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: var(--ahq-radius-full);
  font-size: var(--ahq-text-xl);
  cursor: pointer;
  z-index: 10;
  transition: all var(--ahq-transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahq-lightbox-close:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: scale(1.1);
}

.ahq-lightbox-close:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.ahq-lightbox-prev,
.ahq-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  border: none;
  border-radius: var(--ahq-radius-full);
  font-size: var(--ahq-text-xl);
  cursor: pointer;
  z-index: 10;
  transition: all var(--ahq-transition-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ahq-lightbox-prev {
  left: var(--ahq-space-4);
}

.ahq-lightbox-next {
  right: var(--ahq-space-4);
}

.ahq-lightbox-prev:hover,
.ahq-lightbox-next:hover {
  background: rgba(0, 0, 0, 0.9);
  transform: translateY(-50%) scale(1.1);
}

.ahq-lightbox-prev:focus,
.ahq-lightbox-next:focus {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.ahq-lightbox-media {
  position: relative;
  max-width: 100%;
  max-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ahq-neutral-900);
}

.ahq-lightbox-media img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
}

.ahq-lightbox-media iframe {
  width: 80vw;
  height: 45vw;
  max-width: 1200px;
  max-height: 675px;
  border: none;
}

.ahq-lightbox-info {
  padding: var(--ahq-space-6);
  background: white;
}

.ahq-lightbox-title {
  margin: 0 0 var(--ahq-space-2) 0;
  font-size: var(--ahq-text-xl);
  font-weight: var(--ahq-font-semibold);
  color: var(--ahq-neutral-900);
}

.ahq-lightbox-description {
  margin: 0;
  color: var(--ahq-neutral-600);
  line-height: var(--ahq-leading-relaxed);
}

/* ==========================================================================
   RESPONSIVE DESIGN FRAMEWORK
   ========================================================================== */

/* Tablet and Mobile Responsive Design */
@media (max-width: 1024px) {
  .ahq-organizations-grid.ahq-grid-cols-4,
  .ahq-organizations-grid.ahq-grid-cols-5,
  .ahq-organizations-grid.ahq-grid-cols-6 {
    grid-template-columns: repeat(3, 1fr);
  }

  .ahq-gallery-grid.ahq-gallery-cols-4,
  .ahq-gallery-grid.ahq-gallery-cols-5,
  .ahq-gallery-grid.ahq-gallery-cols-6 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  :root {
    --ahq-space-4: 0.875rem;
    --ahq-space-6: 1.25rem;
    --ahq-space-8: 1.5rem;
  }

  .ahq-calendar-controls {
    flex-direction: column;
    gap: var(--ahq-space-4);
  }

  .ahq-calendar-navigation {
    order: 2;
  }

  .ahq-calendar-filter {
    order: 1;
  }

  .ahq-calendar-title {
    font-size: var(--ahq-text-xl);
  }

  .ahq-calendar-meta {
    flex-direction: column;
    gap: var(--ahq-space-2);
    align-items: flex-start;
  }

  .ahq-calendar-legend {
    flex-wrap: wrap;
  }

  .ahq-calendar-day {
    min-height: 100px;
  }

  .ahq-calendar-event {
    font-size: var(--ahq-text-xs);
    padding: var(--ahq-space-1);
  }

  .ahq-organizations-title-section {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--ahq-space-2);
  }

  .ahq-organizations-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .ahq-org-search-input {
    width: 100%;
  }

  .ahq-organizations-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  .ahq-org-actions {
    flex-direction: column;
  }

  .ahq-news-feed-header,
  .ahq-gallery-header {
    flex-direction: column;
    gap: var(--ahq-space-4);
    align-items: stretch;
  }

  .ahq-gallery-filters {
    justify-content: center;
  }

  .ahq-gallery-grid.ahq-gallery-cols-3,
  .ahq-gallery-grid.ahq-gallery-cols-4,
  .ahq-gallery-grid.ahq-gallery-cols-5,
  .ahq-gallery-grid.ahq-gallery-cols-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  .ahq-modal-content {
    width: 95%;
    margin: var(--ahq-space-4);
  }

  .ahq-event-meta {
    grid-template-columns: 1fr;
  }

  .ahq-modal-actions {
    flex-direction: column;
  }

  .ahq-lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }

  .ahq-lightbox-media iframe {
    width: 90vw;
    height: 50.6vw;
  }

  .ahq-lightbox-prev,
  .ahq-lightbox-next {
    width: 36px;
    height: 36px;
    font-size: var(--ahq-text-lg);
  }

  .ahq-lightbox-prev {
    left: var(--ahq-space-2);
  }

  .ahq-lightbox-next {
    right: var(--ahq-space-2);
  }
}

@media (max-width: 480px) {
  .ahq-calendar-day {
    min-height: 80px;
  }

  .ahq-calendar-day-header {
    font-size: var(--ahq-text-xs);
  }

  .ahq-organizations-grid,
  .ahq-gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .ahq-news-item-meta {
    flex-direction: column;
    gap: var(--ahq-space-2);
  }

  .ahq-news-item-actions {
    justify-content: center;
  }

  .ahq-org-actions {
    text-align: center;
  }

  .ahq-org-btn {
    justify-content: center;
  }
}

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

/* Focus indicators */
.ahq-calendar-nav:focus,
.ahq-program-filter:focus,
.ahq-org-search-input:focus,
.ahq-org-filter-select:focus,
.ahq-search-btn:focus,
.ahq-org-btn:focus,
.ahq-news-read-more:focus,
.ahq-filter-btn:focus,
.ahq-gallery-link:focus {
  outline: 2px solid var(--ahq-primary-400);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .ahq-events-calendar,
  .ahq-organizations-directory,
  .ahq-news-feed,
  .ahq-program-gallery {
    border: 2px solid var(--ahq-neutral-900);
  }

  .ahq-organization-card,
  .ahq-news-item,
  .ahq-gallery-item {
    border-width: 2px;
    border-color: var(--ahq-neutral-900);
  }

  .ahq-calendar-event,
  .ahq-btn {
    border: 1px solid var(--ahq-neutral-900);
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ahq-gallery-link:hover .ahq-gallery-image {
    transform: none;
  }

  .ahq-organization-card:hover,
  .ahq-news-item:hover,
  .ahq-gallery-item:hover {
    transform: none;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  :root {
    --ahq-neutral-50: #1f2937;
    --ahq-neutral-100: #374151;
    --ahq-neutral-200: #4b5563;
    --ahq-neutral-300: #6b7280;
    --ahq-neutral-400: #9ca3af;
    --ahq-neutral-500: #d1d5db;
    --ahq-neutral-600: #e5e7eb;
    --ahq-neutral-700: #f3f4f6;
    --ahq-neutral-800: #f9fafb;
    --ahq-neutral-900: #ffffff;
  }
}

/* Print styles */
@media print {
  .ahq-calendar-controls,
  .ahq-organizations-controls,
  .ahq-gallery-filters,
  .ahq-modal,
  .ahq-lightbox {
    display: none !important;
  }

  .ahq-events-calendar,
  .ahq-organizations-directory,
  .ahq-news-feed,
  .ahq-program-gallery {
    box-shadow: none !important;
    border: 1px solid var(--ahq-neutral-900) !important;
  }

  .ahq-organization-card,
  .ahq-news-item,
  .ahq-gallery-item {
    break-inside: avoid;
    box-shadow: none !important;
    border: 1px solid var(--ahq-neutral-900) !important;
  }

  .ahq-organizations-grid,
  .ahq-gallery-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: var(--ahq-space-4) !important;
  }
}

/* Screen reader only text */
.screen-reader-text {
  position: absolute !important;
  clip: rect(1px, 1px, 1px, 1px);
  padding: 0 !important;
  border: 0 !important;
  height: 1px !important;
  width: 1px !important;
  overflow: hidden;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.ahq-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.ahq-not-sr-only {
  position: static;
  width: auto;
  height: auto;
  padding: 0;
  margin: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
}

/* Focus management */
.ahq-focus-trap {
  position: relative;
}

.ahq-focus-trap::before,
.ahq-focus-trap::after {
  content: '';
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Loading states */
.ahq-loading {
  opacity: 0.7;
  pointer-events: none;
}

.ahq-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  border: 2px solid var(--ahq-neutral-200);
  border-top: 2px solid var(--ahq-primary-500);
  border-radius: var(--ahq-radius-full);
  animation: ahq-spin 1s linear infinite;
}

/* Animation keyframes */
@keyframes ahq-fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes ahq-fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes ahq-slideInRight {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes ahq-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Enhanced focus states for accessibility */
.ahq-calendar-event:focus,
.ahq-organization-card:focus,
.ahq-news-item:focus,
.ahq-gallery-item:focus {
  outline: 2px solid var(--ahq-primary-400);
  outline-offset: 2px;
}

/* Skip links for accessibility */
.ahq-skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--ahq-primary-600);
  color: white;
  padding: 8px;
  text-decoration: none;
  border-radius: var(--ahq-radius-base);
  z-index: 100;
}

.ahq-skip-link:focus {
  top: 6px;
}