/* ========================================
   Custom Brand Variables & Colors
   ======================================== */
:root {
  /* Brand Color Palette */
  --brand-primary: #D97757;        /* Warm Terracotta */
  --brand-primary-light: #E8957A;
  --brand-primary-dark: #C55F3F;
  
  --brand-secondary: #8BA888;      /* Sage Green */
  --brand-secondary-light: #A8C4A5;
  --brand-secondary-dark: #6D8A6B;
  
  --brand-accent: #FFF5E6;         /* Soft Cream */
  --brand-accent-dark: #F5E6D3;
  
  /* Neutral Colors */
  --brand-charcoal: #2C3539;
  --brand-gray: #6B7280;
  --brand-light-gray: #E5E7EB;
  
  /* Typography */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Spacing System - Based on 8px grid */
  --space-3xs: 0.25rem;   /* 4px */
  --space-2xs: 0.5rem;    /* 8px */
  --space-xs: 0.75rem;    /* 12px */
  --space-sm: 1rem;       /* 16px */
  --space-md: 1.5rem;     /* 24px */
  --space-lg: 2rem;       /* 32px */
  --space-xl: 3rem;       /* 48px */
  --space-2xl: 4rem;      /* 64px */
  --space-3xl: 6rem;      /* 96px */
  
  /* Container widths */
  --container-max: 1400px;
  --container-padding: var(--space-sm);
}

/* ========================================
   Animations & Keyframes
   ======================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Apply animations to content */
main.container {
  animation: fadeIn 0.5s ease-out;
}

main.container > section,
main.container > article {
  animation: fadeInUp 0.6s ease-out;
}

.image-article {
  animation: fadeInUp 0.6s ease-out backwards;
}

.image-article:nth-child(1) { animation-delay: 0.1s; }
.image-article:nth-child(2) { animation-delay: 0.2s; }
.image-article:nth-child(3) { animation-delay: 0.3s; }
.image-article:nth-child(4) { animation-delay: 0.4s; }
.image-article:nth-child(5) { animation-delay: 0.5s; }
.image-article:nth-child(6) { animation-delay: 0.6s; }

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ========================================
   Accessibility - Enhanced Focus States
   ======================================== */
/* Remove default outline and add custom focus styles */
a:focus-visible,
button:focus-visible,
[type="button"]:focus-visible,
[type="submit"]:focus-visible,
[type="reset"]:focus-visible,
details:focus-visible,
select:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 4px;
}

[data-theme="dark"] a:focus-visible,
[data-theme="dark"] button:focus-visible,
[data-theme="dark"] [type="button"]:focus-visible,
[data-theme="dark"] [type="submit"]:focus-visible,
[data-theme="dark"] [type="reset"]:focus-visible {
  outline-color: var(--brand-primary-light);
}

/* Focus for cards */
.image-article:focus-within {
  outline: 3px solid var(--brand-primary);
  outline-offset: 3px;
}

/* Skip to main content link for screen readers */
.skip-to-main {
  position: absolute;
  left: -9999px;
  z-index: 999;
  padding: 1rem 1.5rem;
  background-color: var(--brand-primary);
  color: white;
  text-decoration: none;
  font-weight: 600;
  border-radius: 0 0 4px 0;
}

.skip-to-main:focus {
  left: 0;
  top: 0;
}

/* Override Pico's primary colors with brand colors */
:root:not([data-theme="dark"]) {
  --pico-primary: var(--brand-primary);
  --pico-primary-hover: var(--brand-primary-dark);
  --pico-primary-focus: var(--brand-primary-light);
}

[data-theme="dark"] {
  --pico-primary: var(--brand-primary-light);
  --pico-primary-hover: var(--brand-primary);
  --pico-primary-focus: var(--brand-primary-dark);
}

/* Dark mode specific adjustments */
[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.9);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .image-article {
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .tag {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* Theme toggle button */
#theme-toggle {
  padding: 0.5rem 0.75rem;
  min-width: auto;
  transition: all 0.3s ease;
  margin-left: var(--space-sm);
  margin-right: var(--space-xs);
  vertical-align: middle;
}

#theme-toggle i {
  margin: 0;
  font-size: 1.1rem;
  transition: transform 0.3s ease;
}

#theme-toggle:hover i {
  transform: rotate(20deg) scale(1.1);
}

/* Apply Typography */
body {
  font-family: var(--font-body);
  line-height: 1.7;
  font-size: 1rem;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

h5 {
  font-size: 1.125rem;
  font-weight: 500;
  margin-bottom: 0.875rem;
}

h6 {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

p {
  line-height: 1.7;
  margin-bottom: 1.25rem;
}

small {
  font-size: 0.875rem;
  line-height: 1.5;
}

/* Responsive Typography */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  h3 {
    font-size: 1.35rem;
  }
}

/* Global Transitions */
* {
  transition: background-color 0.3s ease, 
              color 0.3s ease, 
              border-color 0.3s ease, 
              box-shadow 0.3s ease, 
              transform 0.3s ease;
}

/* Remove transitions from elements that shouldn't animate */
*:before,
*:after {
  transition: none;
}

/* Enhanced Spacing */
main.container {
  padding: var(--space-xl) var(--container-padding);
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
}

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

/* Breadcrumb spacing */
nav[aria-label="breadcrumb"] {
  margin-bottom: var(--space-md);
  padding-top: 0;
}

nav[aria-label="breadcrumb"] + header,
nav[aria-label="breadcrumb"] + * {
  margin-top: 0;
}

/* Adjust main padding when breadcrumbs are present */
main.container:has(nav[aria-label="breadcrumb"]) {
  padding-top: var(--space-lg);
}

/* Page headers */
main > header {
  margin-bottom: var(--space-lg);
}

main > nav[aria-label="breadcrumb"] + header {
  margin-bottom: var(--space-md);
}

section {
  margin-bottom: var(--space-2xl);
}

section header {
  margin-bottom: var(--space-lg);
}

h1, h2, h3, h4, h5, h6 {
  margin-bottom: var(--space-md);
}

p {
  margin-bottom: var(--space-sm);
}

article {
  margin-bottom: var(--space-lg);
}

/* Enhanced Link Styles */
a {
  position: relative;
  transition: color 0.3s ease, transform 0.2s ease;
}

a:hover {
  transform: translateY(-1px);
}

/* Enhanced Button Styles */
button,
[type="button"],
[type="submit"],
[type="reset"] {
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

button:hover,
[type="button"]:hover,
[type="submit"]:hover,
[type="reset"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

button:active,
[type="button"]:active,
[type="submit"]:active,
[type="reset"]:active {
  transform: translateY(0);
}

/* Icon animation in buttons */
button i,
[type="button"] i,
[type="submit"] i,
[type="reset"] i {
  display: inline-block;
  transition: transform 0.3s ease;
  margin-right: 0.5rem;
}

button:hover i,
[type="button"]:hover i,
[type="submit"]:hover i,
[type="reset"]:hover i {
  transform: translateX(2px);
}

/* Outline buttons */
button.outline,
[type="button"].outline {
  border-width: 2px;
}

button.outline:hover,
[type="button"].outline:hover {
  background-color: var(--pico-primary);
  color: white;
  border-color: var(--pico-primary);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  padding: 1rem 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  margin-bottom: 0;
  transition: box-shadow 0.3s ease, background 0.3s ease;
}

[data-theme="dark"] .site-header {
  background: rgba(17, 24, 39, 0.85);
}

/* Header site title: gradient text from secondary -> primary (scoped to .site-title) */
.site-header .site-title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  background: linear-gradient(90deg, var(--brand-secondary), var(--brand-primary));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-decoration: none;
  transition: transform 0.12s ease, text-shadow 0.12s ease;
}

.site-header .site-title:hover,
.site-header .site-title:focus {
  transform: translateY(-2px);
  text-shadow: 0 6px 12px rgba(0,0,0,0.08);
}

.site-header.scrolled {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.site-header nav {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

.site-footer {
  background: var(--pico-card-background-color);
  padding: var(--space-xl) 0 var(--space-md);
  border-top: 1px solid var(--pico-muted-border-color);
  margin-top: var(--space-2xl);
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-section h4,
.footer-section h5 {
  margin-bottom: 1rem;
  color: var(--pico-color);
}

.footer-section p {
  color: var(--pico-muted-color);
  line-height: 1.6;
}

.footer-section nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-section nav ul li {
  margin-bottom: 0.5rem;
}

.footer-section nav ul li a {
  color: var(--pico-muted-color);
  text-decoration: none;
}

.footer-section nav ul li a:hover {
  color: var(--pico-primary);
  text-decoration: underline;
}

.footer-bottom {
  border-top: 1px solid var(--pico-muted-border-color);
  padding-top: 1.5rem;
  text-align: center;
  color: var(--pico-muted-color);
}

/* Generic styles for image articles */
.image-article {
  border: 1px solid var(--pico-border-color);
  border-radius: var(--pico-border-radius);
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  /* make card a column flex container so footer can stick to bottom */
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

/* Make wrapping anchor behave like a neutral card link: keep native clickability
   but avoid default link color/underline inside the card. Add accessible focus.
   Use the `.card-link` class on the <a> that wraps the card. */
.card-link {
  display: block; /* let it contain the entire card */
  color: inherit; /* don't change text color */
  text-decoration: none; /* remove underline */
}

.card-link:hover,
.card-link:focus {
  text-decoration: none;
}

/* Ensure inner text/icons inherit the surrounding color rather than browser link color */
.card-link * {
  color: inherit;
}

/* Accessible focus ring for keyboard users */
.card-link:focus-visible {
  outline: 3px solid var(--brand-primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.image-article:hover {
  transform: translateY(-8px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.image-article header {
  position: relative;
  height: 150px;
  background-size: cover;
  background-position: center;
  overflow: hidden;
  transition: transform 0.3s ease;
}

.image-article:hover header {
  transform: scale(1.02);
}

.image-article header::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.3) 50%,
    rgba(0, 0, 0, 0.6) 100%
  );
  z-index: 1;
  transition: opacity 0.3s ease;
}

.image-article:hover header::before {
  opacity: 0.7;
}

.image-article header h3 {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: 1rem;
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.8) 0%,
    rgba(0, 0, 0, 0.4) 100%
  );
  color: #ffffff;
  text-align: center;
  z-index: 2;
  font-size: 1.5rem;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.image-article p {
  padding: 1.5rem;
  margin: 0;
}

.image-article .card-body {
  /* reduce bottom padding so footer sits closer to content */

  /* allow the main content area to grow so footer stays at the bottom */
  flex: 1 1 auto;
}

.image-article footer {
  padding: 1rem 1.5rem 1.5rem;
  /* push footer to the bottom of the card */
  margin-top: auto;
}

/* Elegant tag pills - lighter, more refined, theme-aware */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 0; /* square corners (removed curvature) */
  background-color: var(--brand-accent);
  color: var(--brand-primary-dark);
  border: 1px solid rgba(44, 53, 57, 0.06);
  box-shadow: none;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background-color 0.12s ease;
  margin: 0 0.4rem 0.35rem 0; /* spacing between tags */
}

.tag:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(44, 53, 57, 0.06);
  background-color: var(--brand-accent-dark);
}

/* Variant styles - use subtle borders and accent text rather than heavy gradients */
.tag.cities {
  background-color: rgba(213,119,87,0.06);
  color: var(--brand-primary-dark);
  border-color: rgba(213,119,87,0.15);
}

.tag.studios {
  background-color: rgba(139,168,136,0.06);
  color: var(--brand-secondary-dark);
  border-color: rgba(139,168,136,0.15);
}

.tag.subject {
  background-color: rgba(139,168,136,0.06);
  color: var(--brand-secondary-dark);
  border-color: rgba(139,168,136,0.15);
  margin: 0 0.4rem 0.35rem 0;
}

/* Reset default list padding/indent inside article sections (tags list) */
article .section-body ul,
article ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

/* Social media buttons container - use a responsive grid (auto-fit) so buttons behave like Pico grid
   and form tidy rows/columns. Buttons fill their grid cell for consistent sizing. */
.social-media {
  display: grid;
  /* Mobile default: 1 column */
  grid-template-columns: 1fr;
  gap: 0.5rem; /* spacing between grid cells (rows and columns) */
  align-items: center;
}

@media (min-width: 768px) {
  /* Tablet: 2 columns */
  .social-media {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  /* Desktop: 3 columns */
  .social-media {
    grid-template-columns: repeat(3, 1fr);
  }
}

.social-media .outline {
  margin: 0; /* rely on gap for spacing instead of per-button margins */
  width: 100%; /* make buttons fill their grid cell */
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Force Pico grid to a maximum of two columns on larger screens */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  max-width: 100%;
  gap: var(--space-lg); /* Increased from default for better breathing room */
}

@media (max-width: 767px) {
  .grid {
    grid-template-columns: 1fr; /* Smallest screens: 1 column */
  }
}

@media (min-width: 768px) and (max-width: 1023px) {
  .grid {
    grid-template-columns: repeat(2, 1fr); /* Medium screens: 2 columns */
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(3, 1fr); /* Large screens: 3 columns */
  }
}



