/* ===================================
   RESTOMOD SHOWCASE - PREMIUM STYLING
   Sophisticated automotive journalism meets literary magazine
   =================================== */

/* === RESET & BASE === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* Color Palette - Inspired by the Car */
  /* Deep forest green from exterior #004225 */
  --color-black: #001a10;
  --color-deep-black: #000d08;
  --color-green: #004225;
  --color-green-dark: #002815;
  
  /* Brown toned carbon fiber RAL 8002 */
  --color-burgundy: #6C3B2A;
  --color-brown: #6C3B2A;
  --color-brown-light: #8B5442;
  --color-racing-red: #8B5442;
  
  /* Frosted silver aluminum accents */
  --color-silver: #C0C0C0;
  --color-silver-light: #D8D8D8;
  --color-silver-dark: #A8A8A8;
  
  /* Text colors for readability */
  --color-cream: #F5F3EF;
  --color-off-white: #FAFAF8;
  --color-muted-text: #B8B5B0;
  
  /* Typography */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --spacing-xl: 6rem;
  
  /* Transitions */
  --transition-fast: 0.2s ease;
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-black);
  color: var(--color-cream);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-sm);
  color: var(--color-off-white);
}

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

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

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

p {
  margin-bottom: var(--spacing-sm);
  color: var(--color-cream);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--color-burgundy);
}

/* === LANGUAGE SWITCHER === */
.language-switcher {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lang-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--color-cream);
  font-size: 0.9rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  transition: all var(--transition-smooth);
  opacity: 0.6;
}

.lang-btn:hover {
  opacity: 1;
  color: var(--color-burgundy);
}

.lang-btn.active {
  opacity: 1;
  color: var(--color-burgundy);
  font-weight: 500;
}

.lang-separator {
  color: var(--color-cream);
  opacity: 0.3;
  font-size: 0.9rem;
}

/* === HAMBURGER MENU === */
.menu-toggle {
  position: fixed;
  top: 2rem;
  right: 2rem;
  z-index: 1001;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform var(--transition-smooth);
}

.menu-toggle:hover {
  transform: scale(1.1);
}

.hamburger {
  width: 30px;
  height: 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--color-silver-light);
  transition: all var(--transition-smooth);
  transform-origin: center;
  box-shadow: 0 0 5px rgba(192, 192, 192, 0.3);
}

.menu-toggle.active .hamburger span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

.menu-toggle.active .hamburger span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active .hamburger span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* === NAVIGATION OVERLAY === */
.nav-overlay {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: linear-gradient(135deg, 
    rgba(0, 13, 8, 0.98), 
    rgba(0, 66, 37, 0.95));
  backdrop-filter: blur(10px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--transition-slow), visibility 0s var(--transition-slow);
}

.nav-overlay.active {
  transform: translateX(0);
  visibility: visible;
  transition: transform var(--transition-slow), visibility 0s 0s;
}

.nav-menu {
  list-style: none;
  text-align: center;
  padding: 0;
}

.nav-menu li {
  margin: 2rem 0;
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-smooth);
}

.nav-overlay.active .nav-menu li {
  opacity: 1;
  transform: translateY(0);
}

.nav-overlay.active .nav-menu li:nth-child(1) { transition-delay: 0.1s; }
.nav-overlay.active .nav-menu li:nth-child(2) { transition-delay: 0.2s; }
.nav-overlay.active .nav-menu li:nth-child(3) { transition-delay: 0.3s; }
.nav-overlay.active .nav-menu li:nth-child(4) { transition-delay: 0.4s; }
.nav-overlay.active .nav-menu li:nth-child(5) { transition-delay: 0.5s; }
.nav-overlay.active .nav-menu li:nth-child(6) { transition-delay: 0.6s; }

.nav-menu a {
  font-family: var(--font-serif);
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  font-weight: 700;
  color: var(--color-cream);
  display: inline-block;
  position: relative;
  padding: 0.5rem 0;
}

.nav-menu a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-green), var(--color-silver));
  transition: width var(--transition-smooth);
}

.nav-menu a:hover::after {
  width: 100%;
}

/* === HERO SECTION === */
.hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--color-deep-black);
}

.hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.6;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(0, 66, 37, 0.4), 
    rgba(0, 13, 8, 0.8));
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
  max-width: 900px;
  animation: fadeInUp 1s ease-out;
}

.hero-tagline {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-silver-light);
  margin-bottom: 1rem;
  font-weight: 500;
  text-shadow: 0 0 10px rgba(192, 192, 192, 0.3);
}

.hero-title {
  margin-bottom: 1.5rem;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.3rem);
  color: var(--color-muted-text);
  max-width: 700px;
  margin: 0 auto;
}

/* === HERO BUTTONS === */
.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 2rem;
}

/* === CENTRAL LINK (Special styling for Raul Gutierrez link) === */
.central-link {
  display: inline-block;
  margin-top: 0;
  padding: 1rem 2.5rem;
  background: var(--color-burgundy);
  color: var(--color-off-white);
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-weight: 600;
  border: 2px solid var(--color-burgundy);
  transition: all var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.central-link:hover {
  background: transparent;
  color: var(--color-burgundy);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(108, 59, 42, 0.4);
  border-color: var(--color-silver);
}

/* === HERO NAVIGATION LINKS === */
.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  margin-top: 3rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero-nav-link {
  position: relative;
  color: var(--color-cream);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  padding: 0.5rem 1rem;
  transition: all var(--transition-smooth);
  border-bottom: 1px solid transparent;
}

.hero-nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--color-burgundy);
  transition: all var(--transition-smooth);
  transform: translateX(-50%);
}

.hero-nav-link:hover {
  color: var(--color-burgundy);
}

.hero-nav-link:hover::after {
  width: 100%;
}

@media (max-width: 768px) {
  .hero-links {
    flex-direction: column;
    gap: 1rem;
  }
  
  .hero-nav-link {
    font-size: 0.9rem;
  }
  
  .hero-buttons {
    flex-direction: column;
    gap: 1rem;
  }
  
  .central-link {
    font-size: 1rem;
    padding: 0.875rem 2rem;
  }
}

/* === SECTIONS === */
.section {
  padding: var(--spacing-xl) var(--spacing-md);
  max-width: 1400px;
  margin: 0 auto;
  border-top: 1px solid rgba(192, 192, 192, 0.1);
}

.section:first-of-type {
  border-top: none;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-lg);
}

.section-label {
  font-size: 0.875rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
  color: var(--color-silver-light);
  margin-bottom: 0.5rem;
  font-weight: 600;
  border-left: 3px solid var(--color-silver);
  padding-left: 1rem;
  display: inline-block;
}

.section-title {
  margin-bottom: 1rem;
}

.section-description {
  font-size: 1.1rem;
  color: var(--color-muted-text);
  max-width: 700px;
  margin: 0 auto;
  line-height: 1.8;
}

/* === TEXT CONTENT SECTIONS === */
.text-content {
  max-width: 800px;
  margin: 0 auto;
  padding: var(--spacing-md);
}

.text-content p {
  font-size: 1.1rem;
  line-height: 1.9;
  margin-bottom: 1rem;
  color: var(--color-cream);
}

.text-content h3 {
  color: var(--color-silver-light);
  border-left: 4px solid var(--color-green);
  padding-left: 1rem;
  margin-top: 2rem;
}

.text-content em {
  font-style: italic;
  color: var(--color-burgundy);
}

/* === PHOTO GALLERY CAROUSEL === */
.gallery-carousel {
  position: relative;
  max-width: 1200px;
  margin: var(--spacing-lg) auto;
  padding: 0 4rem;
}

.gallery-carousel-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--color-deep-black);
  cursor: zoom-in;
}

.gallery-carousel-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-carousel-slide {
  min-width: 100%;
  position: relative;
  display: none;
}

.gallery-carousel-slide.active {
  display: block;
}

.gallery-carousel-slide img {
  width: 100%;
  height: auto;
  max-height: 70vh;
  object-fit: contain;
  display: block;
  background: var(--color-deep-black);
  transition: transform var(--transition-slow);
}

.gallery-carousel-slide.active img:hover {
  transform: scale(1.3);
}

.gallery-carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
  color: var(--color-cream);
  font-size: 1.2rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-align: center;
}

.gallery-carousel-prev,
.gallery-carousel-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(245, 243, 239, 0.1);
  border: 2px solid var(--color-cream);
  color: var(--color-cream);
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.gallery-carousel-prev {
  left: 0;
}

.gallery-carousel-next {
  right: 0;
}

.gallery-carousel-prev:hover,
.gallery-carousel-next:hover {
  background: var(--color-green);
  border-color: var(--color-silver);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px rgba(0, 66, 37, 0.5);
}

.gallery-carousel-counter {
  text-align: center;
  margin-top: 1.5rem;
  color: var(--color-cream);
  font-size: 1rem;
  letter-spacing: 0.1em;
  font-weight: 500;
}

.gallery-carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.gallery-carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--color-muted-text);
  cursor: pointer;
  transition: all var(--transition-fast);
  border: 2px solid transparent;
}

.gallery-carousel-dot:hover {
  background: var(--color-cream);
}

.gallery-carousel-dot.active {
  background: var(--color-green);
  border-color: var(--color-silver);
  transform: scale(1.3);
  box-shadow: 0 0 8px rgba(0, 66, 37, 0.6);
}

@media (max-width: 768px) {
  .gallery-carousel {
    padding: 0 3rem;
  }
  
  .gallery-carousel-prev,
  .gallery-carousel-next {
    width: 50px;
    height: 50px;
    font-size: 2rem;
  }
  
  .gallery-carousel-slide img {
    max-height: 50vh;
  }
  
  .gallery-carousel-caption {
    font-size: 1rem;
    padding: 1.5rem;
  }
}

/* === EDITORIAL IMAGES (for subsection pages) === */
.editorial-image {
  max-width: 900px;
  margin: var(--spacing-lg) auto;
  padding: 0 var(--spacing-md);
}

.editorial-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
  border: 1px solid rgba(192, 192, 192, 0.15);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.image-caption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--color-muted-text);
  padding: 1rem 0;
  font-style: italic;
  letter-spacing: 0.05em;
}

/* Alternate image layout - float beside text */
.editorial-image.float-right {
  max-width: 500px;
  float: right;
  margin: 0 0 2rem 2rem;
}

.editorial-image.float-left {
  max-width: 500px;
  float: left;
  margin: 0 2rem 2rem 0;
}

/* Small editorial image for inline content */
.editorial-image.small {
  max-width: 600px;
}

/* Full-width editorial image */
.editorial-image.full-width {
  max-width: 100%;
  padding: var(--spacing-md) 0;
}

.editorial-image.full-width img {
  border-radius: 0;
}

@media (max-width: 768px) {
  .editorial-image.float-right,
  .editorial-image.float-left {
    float: none;
    max-width: 100%;
    margin: var(--spacing-md) auto;
  }
  
  .editorial-image {
    padding: 0 1rem;
  }
}

/* === INSTAGRAM EMBED === */
.instagram-section {
  background: var(--color-deep-black);
  padding: var(--spacing-lg) var(--spacing-md);
}

.instagram-embed {
  max-width: 1000px;
  margin: 0 auto;
  min-height: 500px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--color-silver);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  text-align: center;
}

/* === QUOTE ZOOM ANIMATION (for craft-continuity.html) === */
.quote-zoom {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  text-align: center;
  padding: var(--spacing-lg) var(--spacing-md);
  color: var(--color-burgundy);
  font-style: italic;
  opacity: 0;
  transform: scale(0.8);
  transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-zoom.animate {
  opacity: 1;
  transform: scale(1);
}

.quote-zoom::before {
  content: '"';
  font-size: 3rem;
  color: var(--color-silver);
  margin-right: 0.5rem;
}

.quote-zoom::after {
  content: '"';
  font-size: 3rem;
  color: var(--color-silver);
  margin-left: 0.5rem;
}

/* === PAGE HERO (for subpages) === */
.page-hero {
  position: relative;
  height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-deep-black);
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(0, 66, 37, 0.3), 
    rgba(0, 13, 8, 0.7));
  z-index: 1;
}

.page-hero-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.5;
}

.page-hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 2rem;
}

.hero-cta {
  display: inline-block;
  margin-top: 2rem;
  padding: 1rem 2.5rem;
  background: rgba(192, 192, 192, 0.15);
  color: var(--color-off-white);
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  border: 2px solid var(--color-silver);
  transition: all var(--transition-smooth);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  backdrop-filter: blur(10px);
}

.hero-cta:hover {
  background: var(--color-silver);
  color: var(--color-deep-black);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(192, 192, 192, 0.3);
}

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

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

.fade-in {
  animation: fadeIn 0.8s ease-out;
}

.fade-in-up {
  animation: fadeInUp 1s ease-out;
}

/* === FOOTER === */
footer {
  background: var(--color-deep-black);
  padding: var(--spacing-lg) var(--spacing-md);
  text-align: center;
  border-top: 1px solid rgba(192, 192, 192, 0.2);
}

footer p {
  color: var(--color-muted-text);
  font-size: 0.9rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .section {
    padding: var(--spacing-lg) var(--spacing-sm);
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .menu-toggle {
    top: 1rem;
    right: 1rem;
  }
  
  .nav-menu li {
    margin: 1.2rem 0;
  }
  
  .nav-menu a {
    font-size: 1.1rem;
    padding: 0.3rem 0;
  }
}

@media (max-width: 480px) {
  .hero-tagline {
    font-size: 0.9rem;
    letter-spacing: 0.2em;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .nav-menu li {
    margin: 1rem 0;
  }
  
  .nav-menu a {
    font-size: 1rem;
  }
}

/* === SMOOTH SCROLLING & TRANSITIONS === */
.section {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--transition-slow);
}

.section.visible {
  opacity: 1;
  transform: translateY(0);
}

/* === CAROUSEL MODAL === */
.carousel-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 66, 37, 0.98);
  z-index: 10000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.carousel-modal.active {
  display: flex;
  opacity: 1;
}

.carousel-container {
  position: relative;
  width: 90%;
  max-width: 1200px;
  height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 2px solid var(--color-silver);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.carousel-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  background: transparent;
  border: 2px solid var(--color-cream);
  color: var(--color-cream);
  font-size: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  z-index: 10001;
}

.carousel-close:hover {
  background: var(--color-burgundy);
  border-color: var(--color-burgundy);
  transform: rotate(90deg);
}

.carousel-prev,
.carousel-next {
  position: absolute;
  background: rgba(245, 243, 239, 0.1);
  border: 2px solid var(--color-cream);
  color: var(--color-cream);
  font-size: 2rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  top: 50%;
  transform: translateY(-50%);
}

.carousel-prev {
  left: 2rem;
}

.carousel-next {
  right: 2rem;
}

.carousel-prev:hover,
.carousel-next:hover {
  background: var(--color-burgundy);
  border-color: var(--color-burgundy);
  transform: translateY(-50%) scale(1.1);
}

.carousel-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: var(--color-cream);
  padding: 0.5rem 1.5rem;
  border-radius: 25px;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
}

.carousel-caption {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-cream);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  max-width: 80%;
  text-align: center;
}

@media (max-width: 768px) {
  .carousel-prev,
  .carousel-next {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .carousel-prev {
    left: 1rem;
  }
  
  .carousel-next {
    right: 1rem;
  }
  
  .carousel-close {
    top: 1rem;
    right: 1rem;
    width: 45px;
    height: 45px;
    font-size: 1.75rem;
  }
  
  .carousel-caption {
    font-size: 0.95rem;
    padding: 0.75rem 1.5rem;
    bottom: 4rem;
  }
}

/* === PORTFOLIO GALLERY === */
.portfolio-section {
  background: var(--color-deep-black);
  padding: var(--spacing-xl) 0;
}

.portfolio-header {
  text-align: center;
  max-width: 900px;
  margin: 0 auto var(--spacing-lg);
  padding: 0 var(--spacing-md);
}

.portfolio-title {
  font-size: 3rem;
  margin-bottom: 1rem;
  color: var(--color-off-white);
  letter-spacing: 0.02em;
}

.portfolio-subtitle {
  font-size: 1.2rem;
  color: var(--color-muted-text);
  line-height: 1.8;
  font-weight: 300;
}

.portfolio-category-section {
  margin-bottom: var(--spacing-xl);
}

.category-heading {
  font-size: 1.8rem;
  color: var(--color-silver);
  text-align: center;
  margin: 0 auto var(--spacing-md);
  padding: var(--spacing-md) 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 400;
  border-bottom: 1px solid rgba(192, 192, 192, 0.2);
  max-width: 1400px;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background: var(--color-black);
  transition: transform var(--transition-smooth);
  border: 1px solid rgba(192, 192, 192, 0.1);
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  text-align: left;
  width: 100%;
  display: block;
}

.portfolio-item:focus {
  outline: 2px solid var(--color-green);
  outline-offset: 2px;
}

.portfolio-item:hover {
  transform: translateY(-4px);
  border-color: rgba(192, 192, 192, 0.3);
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--transition-smooth);
  aspect-ratio: 4/3;
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95), rgba(0, 0, 0, 0.7), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  pointer-events: none;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-category {
  display: block;
  color: var(--color-cream);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* Portfolio Lightbox */
.portfolio-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  align-items: center;
  justify-content: center;
  z-index: 9999;
  display: none;
}

.portfolio-lightbox.active {
  display: flex;
}

.portfolio-lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-lightbox img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
}

.portfolio-lightbox-close {
  position: absolute;
  top: 2rem;
  right: 2rem;
  width: 60px;
  height: 60px;
  background: rgba(245, 243, 239, 0.1);
  border: 2px solid var(--color-cream);
  color: var(--color-cream);
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  z-index: 10;
  pointer-events: auto;
}

.portfolio-lightbox-close:hover {
  background: var(--color-green);
  border-color: var(--color-silver);
  transform: scale(1.1) rotate(90deg);
}

.portfolio-lightbox-prev,
.portfolio-lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(245, 243, 239, 0.1);
  border: 2px solid var(--color-cream);
  color: var(--color-cream);
  font-size: 2rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition-fast);
  backdrop-filter: blur(10px);
  z-index: 10;
  pointer-events: auto;
}

.portfolio-lightbox-prev {
  left: 2rem;
}

.portfolio-lightbox-next {
  right: 2rem;
}

.portfolio-lightbox-prev:hover,
.portfolio-lightbox-next:hover {
  background: var(--color-green);
  border-color: var(--color-silver);
  transform: translateY(-50%) scale(1.1);
}

.portfolio-lightbox-counter {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-cream);
  padding: 0.75rem 2rem;
  border-radius: 25px;
  font-size: 1rem;
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
  border: 1px solid rgba(192, 192, 192, 0.2);
}

.portfolio-lightbox-caption {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: var(--color-cream);
  padding: 1rem 2rem;
  border-radius: 8px;
  font-size: 1.1rem;
  letter-spacing: 0.05em;
  backdrop-filter: blur(10px);
  max-width: 80%;
  text-align: center;
}

/* Responsive Portfolio Grid */
@media (max-width: 1200px) {
  .portfolio-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .portfolio-title {
    font-size: 2rem;
  }
  
  .portfolio-subtitle {
    font-size: 1rem;
  }
  
  .portfolio-lightbox-prev,
  .portfolio-lightbox-next,
  .portfolio-lightbox-close {
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
  
  .portfolio-lightbox-prev {
    left: 1rem;
  }
  
  .portfolio-lightbox-next {
    right: 1rem;
  }
  
  .portfolio-lightbox-close {
    top: 1rem;
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}
