/* Alberta Tradesman Enhanced CSS - Modern UI/UX Improvements */

/* ===== CSS Variables & Theme ===== */
:root {
  /* Brand Colors */
  --color-burnt-orange: #DD6B20;
  --color-sky-blue: #2B6CB0;
  --color-charcoal: #2D3748;
  --color-dark-gray: #1A202C;
  --color-white: #FFFFFF;
  
  /* Extended Palette */
  --color-orange-light: #FED7AA;
  --color-orange-dark: #9C4221;
  --color-blue-light: #DBEAFE;
  --color-blue-dark: #1E4788;
  
  /* Neutral Colors */
  --color-gray-50: #F9FAFB;
  --color-gray-100: #F3F4F6;
  --color-gray-200: #E5E7EB;
  --color-gray-300: #D1D5DB;
  --color-gray-400: #9CA3AF;
  --color-gray-500: #6B7280;
  --color-gray-600: #4B5563;
  --color-gray-700: #374151;
  --color-gray-800: #1F2937;
  --color-gray-900: #111827;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, #2B6CB0, #DD6B20);
  --gradient-soft: linear-gradient(135deg, #DBEAFE, #FED7AA);
  --gradient-dark: linear-gradient(135deg, #1E4788, #9C4221);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2rem;
  --space-xl: 3rem;
  --space-2xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index Scale */
  --z-base: 0;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-popover: 500;
  --z-tooltip: 600;
}

/* Dark Mode Variables */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg-primary: #111827;
    --color-bg-secondary: #1F2937;
    --color-text-primary: #F9FAFB;
    --color-text-secondary: #D1D5DB;
  }
}

/* ===== Base Styles ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Ensure root container doesn't restrict width */
#root {
  width: 100%;
  min-width: 100%;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--color-gray-50);
  color: var(--color-charcoal);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-dark-gray);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
  font-size: clamp(1rem, 2vw, 1.125rem);
  color: var(--color-gray-600);
}

/* ===== Hero Section Enhanced ===== */
.hero {
  background: var(--gradient-primary);
  color: white;
  padding: clamp(4rem, 10vw, 8rem) 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  animation: pattern-drift 20s linear infinite;
}

@keyframes pattern-drift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(60px, 60px); }
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 1000px;
  margin: 0 auto;
  animation: fade-in-up 0.8s ease-out;
}

@keyframes fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-logo {
  height: clamp(150px, 25vw, 250px);
  margin-bottom: var(--space-lg);
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
  animation: logo-pulse 2s ease-in-out infinite;
}

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

.hero h1 {
  color: white;
  margin-bottom: var(--space-md);
  text-shadow: 2px 4px 8px rgba(0, 0, 0, 0.2);
}

.hero .tagline {
  font-size: clamp(1.25rem, 3vw, 1.75rem);
  margin-bottom: var(--space-sm);
  opacity: 0.95;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ===== Buttons Enhanced ===== */
.btn {
  padding: 1rem 2rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  cursor: pointer;
  border: none;
  font-size: 1rem;
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  min-height: 44px;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:active::before {
  width: 300px;
  height: 300px;
}

.btn-primary {
  background: white;
  color: var(--color-sky-blue);
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
  background: var(--color-gray-50);
}

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

.btn-outline {
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: white;
  color: var(--color-sky-blue);
  border-color: white;
  transform: scale(1.05);
}

/* ===== Note: Store styles moved to mall-directory-2025.css ===== */


/* ===== Loading States ===== */
.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ===== Focus States for Accessibility ===== */
*:focus-visible {
  outline: 3px solid var(--color-sky-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
    min-height: 80vh;
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    position: relative;
  }

  .hero-content {
    padding: 0 1rem;
    width: 100%;
    max-width: 100%;
  }

  /* Hero Logo on Mobile */
  .hero-logo {
    width: 150px !important;
    height: 150px !important;
    margin: 0 auto 1.5rem;
  }

  /* Adjust banner positions for mobile */
  .hero > div:first-child,
  .hero > div:nth-child(2) {
    position: absolute;
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  /* Timmy's Challenge - Top Left */
  .hero > div:first-child {
    top: 10px;
    left: 10px;
  }

  /* AI Setup - Top Right */
  .hero > div:nth-child(2) {
    top: 10px;
    right: 10px;
  }

  .hero-buttons {
    flex-direction: column;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    gap: 0.75rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
  }
  
}


/* ===== Smooth Scrollbar ===== */
::-webkit-scrollbar {
  width: 12px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: var(--color-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--color-gray-100);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-dark);
}

/* ===== Print Styles ===== */
@media print {
  .hero,
  .navigation,
  .btn,
  .store-enter {
    display: none !important;
  }
  
  .store-card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid var(--color-gray-300);
  }
}

/* ===== Recent Builds Section Animations ===== */
@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.05);
    opacity: 0.9;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

@keyframes slide {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 40px;
  }
}

/* Recent Builds Section Specific Styles */
.recent-builds {
  position: relative;
  animation: fadeIn 0.8s ease-in;
}

.recent-builds::before {
  content: '';
  position: absolute;
  top: -2px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, 
    #F59E0B 0%, 
    #EF4444 25%, 
    #F59E0B 50%, 
    #EF4444 75%, 
    #F59E0B 100%);
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

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