/* ========================================
   Design System & CSS Variables
   ======================================== */
:root {
  /* Color Palette - Vibrant Rainbow Theme */
  --color-primary: hsl(280, 85%, 60%);
  --color-secondary: hsl(200, 90%, 55%);
  --color-accent: hsl(340, 85%, 60%);
  --color-bg-dark: hsl(240, 20%, 8%);
  --color-bg-darker: hsl(240, 25%, 5%);
  --color-text-light: hsl(0, 0%, 98%);
  --color-text-muted: hsl(0, 0%, 70%);
  
  /* Rainbow Gradient */
  --gradient-rainbow: linear-gradient(
    135deg,
    hsl(0, 85%, 60%) 0%,
    hsl(30, 85%, 60%) 14%,
    hsl(60, 85%, 60%) 28%,
    hsl(120, 85%, 50%) 42%,
    hsl(180, 85%, 50%) 56%,
    hsl(240, 85%, 60%) 70%,
    hsl(280, 85%, 60%) 84%,
    hsl(340, 85%, 60%) 100%
  );
  
  /* Glassmorphism */
  --glass-bg: rgba(255, 255, 255, 0.05);
  --glass-border: rgba(255, 255, 255, 0.1);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3rem;
  --spacing-xl: 5rem;
  
  /* Typography */
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Outfit', 'Inter', sans-serif;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-medium: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  background: var(--color-bg-darker);
  color: var(--color-text-light);
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
}

/* ========================================
   Animated Background
   ======================================== */
.animated-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: var(--color-bg-darker);
  overflow: hidden;
}

.animated-background::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle at 20% 50%,
    hsla(280, 85%, 60%, 0.15) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 80% 80%,
    hsla(200, 90%, 55%, 0.15) 0%,
    transparent 50%
  ),
  radial-gradient(
    circle at 40% 20%,
    hsla(340, 85%, 60%, 0.15) 0%,
    transparent 50%
  );
  animation: backgroundFloat 20s ease-in-out infinite;
  will-change: transform;
}

@keyframes backgroundFloat {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg);
  }
  33% {
    transform: translate(30px, -30px) rotate(5deg);
  }
  66% {
    transform: translate(-20px, 20px) rotate(-5deg);
  }
}

/* ========================================
   Header & Navigation
   ======================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: var(--spacing-sm) var(--spacing-sm);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  z-index: 1000;
  transition: all var(--transition-medium);
}

.header.scrolled {
  padding: var(--spacing-xs) var(--spacing-md);
  background: rgba(0, 0, 0, 0.8);
  box-shadow: var(--glass-shadow);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  letter-spacing: -0.02em;
  transition: transform var(--transition-fast);
}

.logo:hover {
  transform: scale(1.05);
}

.nav-links {
  display: flex;
  gap: var(--spacing-md);
  list-style: none;
}

.nav-links a {
  color: var(--color-text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition-fast);
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-rainbow);
  transition: width var(--transition-medium);
}

.nav-links a:hover {
  color: var(--color-text-light);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-links .login-link {
  padding: 4px 8px;
  background: transparent;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.6);
  font-weight: 400;
  margin-left: 20px;
  font-size: 0.9em;
  transition: all 0.3s ease;
}

.nav-links .login-link::after {
  display: none;
}

.nav-links .login-link:hover {
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
}

.nav-links .user-link {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  cursor: pointer;
}

.nav-links .user-link:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* ========================================
   Mobile Burger Menu
   ======================================== */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 25px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 10002;
  position: relative;
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 10px;
  transition: all 0.3s ease;
  transform-origin: center;
}

.burger-menu.active span:nth-child(1) {
  transform: translateY(11px) rotate(45deg);
}

.burger-menu.active span:nth-child(2) {
  opacity: 0;
  transform: translateX(-20px);
}

.burger-menu.active span:nth-child(3) {
  transform: translateY(-11px) rotate(-45deg);
}

.mobile-menu-overlay {
  display: none;
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
  visibility: hidden;
}

.mobile-menu-overlay.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 280px;
  max-width: 85%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.98) 0%, rgba(250, 250, 255, 0.98) 100%);
  backdrop-filter: blur(20px);
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  z-index: 10001;
  transition: right 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  overflow-y: auto;
  padding: 80px 0 2rem 0;
  visibility: hidden;
  pointer-events: none;
}

.mobile-menu.active {
  right: 0;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu-header {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-menu-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 700;
  color: white;
  margin: 0;
  text-align: center;
}

.mobile-menu-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 1.8rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.mobile-menu-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-nav-links li {
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.mobile-nav-links li:last-child {
  border-bottom: none;
}

.mobile-nav-links a {
  display: block;
  padding: 1.2rem 2rem;
  color: #333;
  text-decoration: none;
  font-family: var(--font-primary);
  font-size: 1rem;
  font-weight: 500;
  transition: all 0.2s ease;
  position: relative;
}

.mobile-nav-links a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  transition: height 0.2s ease;
}

.mobile-nav-links a:hover,
.mobile-nav-links a.active {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.1) 0%, transparent 100%);
  color: #667eea;
}

.mobile-nav-links a:hover::before,
.mobile-nav-links a.active::before {
  height: 60%;
}

/* ========================================
   Admin Flyout Notification
   ======================================== */
.admin-flyout {
  position: fixed;
  top: 100px;
  right: 20px;
  z-index: 900;
  opacity: 0;
  transform: translateX(400px);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
  pointer-events: none;
}

.admin-flyout.show {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.admin-flyout-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 1.5rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2),
              0 0 0 1px rgba(255, 255, 255, 0.1);
  min-width: 300px;
  position: relative;
  border: 1px solid rgba(102, 126, 234, 0.2);
}

.admin-flyout-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #666;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
}

.admin-flyout-close:hover {
  background: rgba(0, 0, 0, 0.05);
  color: #333;
}

.admin-flyout-icon {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
  animation: rotateGear 3s linear infinite;
}

@keyframes rotateGear {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.admin-flyout-text {
  text-align: center;
  margin-bottom: 1rem;
}

.admin-flyout-text h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 0.5rem 0;
  font-family: var(--font-display);
}

.admin-flyout-text p {
  font-size: 0.95rem;
  color: #6b7280;
  margin: 0;
}

.admin-flyout-button {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-align: center;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  margin-bottom: 0.5rem;
}

.admin-flyout-button:last-child {
  margin-bottom: 0;
}

.admin-flyout-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.admin-flyout-logout {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.admin-flyout-logout:hover {
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* Desktop - ensure burger is hidden */
@media (min-width: 969px) {
  .burger-menu {
    display: none !important;
  }
  
  .mobile-menu,
  .mobile-menu-overlay,
  .mobile-menu-header,
  .mobile-nav-links {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* Mobile responsive */
@media (max-width: 768px) {
  /* Show burger menu, hide desktop nav */
  .burger-menu {
    display: flex;
  }

  .nav-links {
    display: none;
  }

  .admin-flyout {
    top: 80px;
    right: 10px;
    left: 10px;
  }
  
  .admin-flyout-content {
    min-width: auto;
  }
}

/* ========================================
   Hero Section with Gallery
   ======================================== */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-xl) var(--spacing-md);
  position: relative;
}

.hero-content {
  max-width: 1400px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
  align-items: center;
}

.hero-text {
  z-index: 10;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: var(--spacing-md);
  letter-spacing: -0.03em;
}

.gradient-text {
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradientShift 8s ease infinite;
  background-size: 200% 200%;
}

@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.hero-subtitle {
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.cta-buttons {
  display: flex;
  gap: var(--spacing-sm);
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all var(--transition-medium);
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.btn-primary {
  background: var(--gradient-rainbow);
  color: white;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left var(--transition-slow);
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--color-text-light);
  border: 2px solid var(--glass-border);
  backdrop-filter: blur(10px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);
}

/* ========================================
   Gallery Container
   ======================================== */
.gallery-container {
  position: relative;
  width: 100%;
  height: 600px;
  perspective: 1000px;
}

.gallery-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.5),
    0 0 0 1px var(--glass-border);
}

.gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  transform: scale(1.05);
  will-change: opacity, transform;
  background-size: cover;
  background-position: center;
}

.gallery-image.active {
  opacity: 1;
  animation: kenBurns 10s ease-in-out infinite alternate;
}

/* Gradient circles for visual interest */
.gradient-circles {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.gradient-circle {
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  opacity: 0.3;
  filter: blur(60px);
  animation: floatCircle 8s ease-in-out infinite;
  will-change: transform;
}

@keyframes floatCircle {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(30px, 30px) scale(1.2);
  }
}

@keyframes kenBurns {
  0% {
    transform: scale(1.05) translate(0, 0);
  }
  100% {
    transform: scale(1.15) translate(-2%, -2%);
  }
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--spacing-md);
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
  z-index: 10;
  transform: translateY(100%);
  transition: transform var(--transition-medium);
}

.gallery-wrapper:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.gallery-description {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.gallery-controls {
  position: absolute;
  bottom: var(--spacing-md);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: var(--spacing-xs);
  z-index: 20;
}

.gallery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.gallery-dot.active {
  background: white;
  transform: scale(1.2);
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

/* ========================================
   Features Section
   ======================================== */
.features {
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.feature-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-md);
  backdrop-filter: blur(10px);
  transition: all var(--transition-medium);
  position: relative;
  overflow: hidden;
  will-change: transform;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-rainbow);
  transform: scaleX(0);
  transition: transform var(--transition-medium);
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: var(--spacing-sm);
  display: inline-block;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

.feature-card:nth-child(1) .feature-icon { animation-delay: 0s; }
.feature-card:nth-child(2) .feature-icon { animation-delay: 0.5s; }
.feature-card:nth-child(3) .feature-icon { animation-delay: 1s; }

.feature-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: var(--spacing-xs);
}

.feature-description {
  color: var(--color-text-muted);
  line-height: 1.7;
}

/* ========================================
   Colour Code Modal
   ======================================== */
.colour-code-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  pointer-events: none;
}

.colour-code-modal.active {
  pointer-events: auto;
}

.colour-code-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-medium);
}

.colour-code-modal.active .colour-code-modal-overlay {
  opacity: 0;
  pointer-events: auto;
}

.colour-code-modal-content {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 500px;
  max-width: 90vw;
  background: var(--color-bg-dark);
  box-shadow: -5px 0 30px rgba(0, 0, 0, 0.5);
  border-left: 1px solid var(--glass-border);
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 2;
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 2rem;
  display: flex;
  flex-direction: column;
}

.colour-code-modal.active .colour-code-modal-content {
  transform: translateX(0);
}

.colour-code-modal-content.collapsed {
  width: 60px;
}

.colour-code-modal-content.collapsed .colour-code-modal-header,
.colour-code-modal-content.collapsed .colour-code-modal-body,
.colour-code-modal-content.collapsed .colour-code-modal-close {
  opacity: 0;
  pointer-events: none;
}

.colour-code-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 2.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  line-height: 1;
  z-index: 3;
}

.colour-code-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-light);
  transform: rotate(90deg);
}

.colour-code-toggle-collapse {
  position: absolute;
  left: -30px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--color-bg-dark);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--color-text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  width: 30px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  box-shadow: -3px 0 15px rgba(0, 0, 0, 0.3);
  border-top-left-radius: 15px;
  border-bottom-left-radius: 15px;
  border-right: none;
  z-index: 3;
}

.colour-code-toggle-collapse:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--color-text-light);
  left: -32px;
}

.colour-code-modal-content.collapsed .colour-code-toggle-collapse {
  transform: translateY(-50%) rotate(180deg);
}

.colour-code-modal-header {
  margin-bottom: 2rem;
  text-align: center;
  transition: opacity var(--transition-medium);
}

.colour-code-modal-header h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  background: linear-gradient(to right, #ef4444, #f97316, #eab308, #22c55e, #3b82f6);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0;
}

.colour-code-modal-body {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  flex: 1;
  overflow-y: auto;
  transition: opacity var(--transition-medium);
}

.colour-code-grid-container {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--glass-bg);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  aspect-ratio: 1;
  max-width: 500px;
  width: 100%;
}

.colour-code-grid-cell {
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
  font-weight: 700;
  border-radius: 12px;
  color: white;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  cursor: default;
  position: relative;
  overflow: hidden;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
  animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) backwards;
}

.colour-code-grid-cell.bottom-row {
  margin-top: 1.5rem;
}

.colour-code-grid-cell::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

.colour-code-grid-cell:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.3);
  z-index: 10;
}

@keyframes popIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  80% {
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Responsive modal */
@media (max-width: 768px) {
  .colour-code-modal-content {
    width: 100vw;
    max-width: 100vw;
    padding: 1.5rem;
  }

  .colour-code-modal-content.collapsed {
    width: 40px;
  }
  
  .colour-code-modal-header h2 {
    font-size: 1.5rem;
  }

  .colour-code-toggle-collapse {
    left: -25px;
    width: 25px;
    height: 50px;
  }

  .colour-code-grid-container {
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .colour-code-grid-container {
    gap: 0.5rem;
    padding: 1rem;
  }
  
  .colour-code-grid-cell {
    font-size: 1.5rem;
  }
}

/* ========================================
   Contact Modal
   ======================================== */
.contact-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition-medium), visibility 0s linear var(--transition-medium);
}

.contact-modal.active {
  opacity: 1;
  visibility: visible;
  transition: opacity var(--transition-medium), visibility 0s linear 0s;
}

.contact-modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.contact-modal-content {
  position: relative;
  background: var(--color-bg-dark);
  border-radius: var(--radius-lg);
  padding: 2rem;
  max-width: 90vw;
  max-height: 90vh;
  width: 600px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  border: 1px solid var(--glass-border);
  overflow: auto;
  z-index: 1;
}

.contact-modal-content.animate-in {
  animation: modalSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.contact-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  font-size: 2.5rem;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all var(--transition-fast);
  line-height: 1;
}

.contact-modal-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-light);
  transform: rotate(90deg);
}

.contact-modal-header {
  margin-bottom: 2rem;
  text-align: center;
}

.contact-modal-header h2 {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 0;
}

.contact-modal-body {
  color: var(--color-text-light);
  line-height: 1.8;
}

.contact-email {
  text-align: center;
  font-size: 1.3rem;
  padding: 2rem;
  margin: 0;
}

.contact-email a {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 600;
  transition: all var(--transition-fast);
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
}

.contact-email a:hover {
  color: var(--color-secondary);
  background: var(--glass-bg);
  transform: translateY(-2px);
}

/* Responsive contact modal */
@media (max-width: 768px) {
  .contact-modal-content {
    width: 95vw;
    padding: 1.5rem;
  }
  
  .contact-modal-header h2 {
    font-size: 2rem;
  }
}

/* ========================================
   Footer
   ======================================== */
.footer {
  padding: var(--spacing-lg) var(--spacing-md);
  background: var(--glass-bg);
  border-top: 1px solid var(--glass-border);
  margin-top: var(--spacing-xl);
  text-align: center;
}

.footer-content {
  max-width: 1400px;
  margin: 0 auto;
}

.footer-text {
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-sm);
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: var(--spacing-md);
  list-style: none;
  margin-bottom: var(--spacing-sm);
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--color-text-light);
}

/* ========================================
   Cookie Consent Banner
   ======================================== */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.98) 0%, rgba(20, 20, 35, 0.98) 100%);
  border-top: 2px solid var(--glass-border);
  box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.cookie-banner.show {
  transform: translateY(0);
}

.cookie-banner-content {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1.5rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.cookie-banner-text h3 {
  color: var(--color-text-light);
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cookie-banner-text p {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin: 0;
}

.cookie-banner-text a {
  color: var(--color-primary);
  text-decoration: underline;
  transition: color var(--transition-fast);
}

.cookie-banner-text a:hover {
  color: var(--color-secondary);
}

.cookie-banner-actions {
  display: flex;
  gap: 1rem;
  flex-shrink: 0;
}

.cookie-banner-btn {
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.cookie-banner-btn-accept {
  background: var(--gradient-rainbow);
  color: white;
  box-shadow: 0 4px 15px rgba(168, 85, 247, 0.4);
}

.cookie-banner-btn-accept:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6);
}

.cookie-banner-btn-decline {
  background: transparent;
  color: var(--color-text-muted);
  border: 1px solid var(--glass-border);
}

.cookie-banner-btn-decline:hover {
  background: var(--glass-bg);
  color: var(--color-text-light);
  border-color: var(--color-text-light);
}

/* Responsive cookie banner */
@media (max-width: 768px) {
  .cookie-banner-content {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem 1rem;
  }
  
  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }
  
  .cookie-banner-btn {
    width: 100%;
  }
  
  .cookie-banner-text h3 {
    justify-content: center;
  }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 968px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-md);
  }
  
  .gallery-container {
    height: 400px;
  }
  
  .burger-menu {
    display: flex;
  }
  
  .nav-links {
    display: none;
  }
}

@media (max-width: 640px) {
  .cta-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .gallery-container {
    height: 300px;
  }
}

/* ========================================
   Pages Gallery Section
   ======================================== */
.pages-gallery {
  padding: var(--spacing-xl) var(--spacing-md);
  min-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-container-wrapper {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.gallery-main-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  text-align: center;
  margin-bottom: var(--spacing-lg);
  letter-spacing: -0.02em;
}

.pages-gallery-wrapper {
  position: relative;
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.gallery-loading {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-muted);
}

.gallery-slides {
  position: relative;
  width: 100%;
  min-height: 400px;
  overflow: hidden;
  transition: height 0.6s ease-in-out;
}

.gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  opacity: 0;
  transform: translateX(100%);
  transition: all 1.2s ease-in-out;
  pointer-events: none;
}

.gallery-slide.active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: all;
}

.gallery-slide-link {
  text-decoration: none;
  display: block;
}

.gallery-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
  backdrop-filter: blur(20px);
  transition: all var(--transition-medium);
  text-align: center;
  min-height: 350px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.gallery-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-rainbow);
  transform: scaleX(0);
  transition: transform var(--transition-medium);
}

.gallery-card:hover::before {
  transform: scaleX(1);
}

.gallery-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 255, 255, 0.3);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.gallery-card-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-card-description {
  font-size: 1.25rem;
  color: var(--color-text-muted);
  margin-bottom: var(--spacing-lg);
}

.gallery-card-content {
  width: 100%;
  max-width: 800px;
  margin: var(--spacing-lg) 0;
  text-align: left;
}

.gallery-content-text {
  font-size: 1.125rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.gallery-content-html {
  font-size: 1.125rem;
  color: var(--color-text-light);
  line-height: 1.8;
  margin-bottom: var(--spacing-md);
}

.gallery-content-html h1,
.gallery-content-html h2,
.gallery-content-html h3 {
  margin-top: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
  background: var(--gradient-rainbow);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.gallery-content-html p {
  margin-bottom: var(--spacing-md);
}

.gallery-content-html ul,
.gallery-content-html ol {
  margin-left: var(--spacing-lg);
  margin-bottom: var(--spacing-md);
}

.gallery-content-image {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  margin: var(--spacing-md) 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.gallery-card-content figure {
  margin: var(--spacing-lg) 0;
  text-align: center;
}

.gallery-card-content figcaption {
  margin-top: var(--spacing-sm);
  font-size: 0.9rem;
  color: var(--color-text-muted);
  font-style: italic;
}

.gallery-card-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--gradient-rainbow);
  color: black;
  border-radius: var(--radius-md);
  font-weight: 600;
  transition: all var(--transition-medium);
}

.gallery-card:hover .gallery-card-button {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

/* Edit Mode Styles */
.edit-mode-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  color: var(--color-text-light);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  transition: all var(--transition-fast);
}

.edit-mode-toggle:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.edit-mode-toggle.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: white;
}

.edit-mode-toggle .edit-mode-icon {
  font-size: 1.1rem;
}

/* Media Delete Button */
.media-delete-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 32px;
  height: 32px;
  background: rgba(220, 38, 38, 0.9);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.media-delete-btn:hover {
  background: rgba(185, 28, 28, 1);
  transform: scale(1.1);
}

.media-delete-btn:active {
  transform: scale(0.95);
}

body.edit-mode .media-delete-btn {
  display: flex;
}

/* Media Container for positioning */
.media-container {
  position: relative;
  display: inline-block;
}

.gallery-content-image {
  display: block;
}

/* Edit mode indicator */
body.edit-mode .gallery-slides::before {
  content: 'Edit Mode Active - Click trash icons to delete media';
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(220, 38, 38, 0.95);
  color: white;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

.gallery-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-top: var(--spacing-lg);
}

.gallery-nav-btn {
  width: 50px;
  height: 50px;
  border: 2px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  color: var(--color-text-light);
  font-size: 2rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-nav-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.gallery-dots {
  display: flex;
  gap: var(--spacing-xs);
}

.gallery-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  border: 2px solid rgba(255, 255, 255, 0.5);
  cursor: pointer;
  transition: all var(--transition-fast);
  padding: 0;
}

.gallery-dot.active {
  background: white;
  transform: scale(1.3);
}

.gallery-dot:hover {
  background: rgba(255, 255, 255, 0.6);
}

.gallery-empty {
  text-align: center;
  padding: var(--spacing-xl);
  color: var(--color-text-muted);
  font-size: 1.25rem;
}

/* ========================================
   Loading Animation
   ======================================== */
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--color-bg-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity var(--transition-slow), visibility var(--transition-slow);
}

.loading.hidden {
  opacity: 0;
  visibility: hidden;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
