/**
 * AR Edilizia - Project Detail Page Stylesheet
 * Modern, minimalistic design with dark mode support
 */

/* ========================================
   VARIABLES & THEME
   ======================================== */
:root {
  /* Colors - Primary */
  --detail-primary: #0ea5e9;
  --detail-primary-dark: #0284c7;
  --detail-primary-light: #38bdf8;
  --detail-accent: #d97706;

  /* Status Colors */
  --detail-success: #22c55e;
  --detail-warning: #f59e0b;
  --detail-info: #3b82f6;

  /* Dark Mode Colors */
  --detail-bg-primary: #0f172a;
  --detail-bg-secondary: #1e293b;
  --detail-bg-tertiary: #334155;
  --detail-text-primary: #f1f5f9;
  --detail-text-secondary: #cbd5e1;
  --detail-text-muted: #94a3b8;

  /* Light Mode Colors */
  --detail-light-bg: #ffffff;
  --detail-light-bg-secondary: #f8fafc;
  --detail-light-text: #0f172a;
  --detail-light-text-secondary: #475569;
  --detail-light-border: #e2e8f0;

  /* Spacing */
  --detail-space-4: 1rem;
  --detail-space-5: 1.25rem;
  --detail-space-6: 1.5rem;
  --detail-space-8: 2rem;
  --detail-space-12: 3rem;
  --detail-space-16: 4rem;
  --detail-space-20: 5rem;
  --detail-space-24: 6rem;

  /* Border Radius */
  --detail-radius-md: 0.5rem;
  --detail-radius-lg: 0.75rem;
  --detail-radius-xl: 1rem;

  /* Shadows */
  --detail-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
  --detail-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --detail-shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);

  /* Transitions */
  --detail-transition: 250ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   BASE CONTAINER
   ======================================== */
.project-detail-container {
  width: 100%;
  min-height: 100vh;
  background: var(--detail-bg-primary);
  color: var(--detail-text-primary);
}

/* ========================================
   LIGHT MODE OVERRIDES - ENHANCED
   ======================================== */
html[data-theme="light"] .project-detail-container,
body[data-theme="light"] .project-detail-container {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%) !important;
  color: var(--detail-light-text);
}

/* Enhanced Hero Section Light Mode */
html[data-theme="light"] .project-hero,
body[data-theme="light"] .project-hero {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 50%, #cbd5e1 100%) !important;
  border-color: var(--detail-light-border) !important;
}

html[data-theme="light"] .project-hero__background,
body[data-theme="light"] .project-hero__background {
  filter: blur(6px) brightness(0.7) !important;
  opacity: 0.6 !important;
}

html[data-theme="light"] .project-hero__foreground,
body[data-theme="light"] .project-hero__foreground {
  border: 2px solid rgba(0, 0, 0, 0.1) !important;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="light"] .project-hero__overlay,
body[data-theme="light"] .project-hero__overlay {
  background: linear-gradient(
    to top,
    rgba(248, 250, 252, 0.9) 0%,
    rgba(226, 232, 240, 0.7) 40%,
    transparent 100%
  ) !important;
}

html[data-theme="light"] .project-hero__content,
body[data-theme="light"] .project-hero__content {
  background: rgba(255, 255, 255, 0.95) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.8) !important;
}

html[data-theme="light"] .project-hero__title,
body[data-theme="light"] .project-hero__title {
  color: var(--detail-light-text) !important;
  text-shadow: none !important;
}

html[data-theme="light"] .project-hero__meta-item,
body[data-theme="light"] .project-hero__meta-item {
  color: var(--detail-light-text-secondary) !important;
  background: rgba(255, 255, 255, 0.6) !important;
  border: 1px solid rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .project-hero__meta-item:hover,
body[data-theme="light"] .project-hero__meta-item:hover {
  background: rgba(14, 165, 233, 0.1) !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
}

html[data-theme="light"] .project-hero__stat,
body[data-theme="light"] .project-hero__stat {
  background: rgba(255, 255, 255, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  backdrop-filter: blur(20px);
}

html[data-theme="light"] .project-hero__stat:hover,
body[data-theme="light"] .project-hero__stat:hover {
  background: rgba(255, 255, 255, 0.9) !important;
  border-color: rgba(14, 165, 233, 0.2) !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

/* Enhanced Cards Light Mode */
html[data-theme="light"] .project-info-card,
html[data-theme="light"] .project-description-card,
html[data-theme="light"] .project-map-card,
html[data-theme="light"] .project-gallery-card,
html[data-theme="light"] .project-cta-card,
html[data-theme="light"] .project-contact-card,
html[data-theme="light"] .project-actions-card,
body[data-theme="light"] .project-info-card,
body[data-theme="light"] .project-description-card,
body[data-theme="light"] .project-map-card,
body[data-theme="light"] .project-gallery-card,
body[data-theme="light"] .project-cta-card,
body[data-theme="light"] .project-contact-card,
body[data-theme="light"] .project-actions-card {
  background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%) !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .project-info-item__label,
html[data-theme="light"] .project-description,
body[data-theme="light"] .project-info-item__label,
body[data-theme="light"] .project-description {
  color: var(--detail-light-text-secondary) !important;
}

html[data-theme="light"] .project-info-item__value,
html[data-theme="light"] .section-title,
html[data-theme="light"] .contact-intro,
html[data-theme="light"] .form-group label,
html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea,
html[data-theme="light"] .checkbox-label,
body[data-theme="light"] .project-info-item__value,
body[data-theme="light"] .section-title,
body[data-theme="light"] .contact-intro,
body[data-theme="light"] .form-group label,
body[data-theme="light"] .form-group input,
body[data-theme="light"] .form-group textarea,
body[data-theme="light"] .checkbox-label {
  color: var(--detail-light-text) !important;
}

html[data-theme="light"] .form-group input,
html[data-theme="light"] .form-group textarea,
body[data-theme="light"] .form-group input,
body[data-theme="light"] .form-group textarea {
  background: rgba(248, 250, 252, 0.8) !important;
  border: 1px solid rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] .form-group input:focus,
html[data-theme="light"] .form-group textarea:focus,
body[data-theme="light"] .form-group input:focus,
body[data-theme="light"] .form-group textarea:focus {
  border-color: var(--detail-primary) !important;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1) !important;
  background: rgba(255, 255, 255, 0.95) !important;
}

html[data-theme="light"] .contact-intro,
html[data-theme="light"] .checkbox-label,
body[data-theme="light"] .contact-intro,
body[data-theme="light"] .checkbox-label {
  color: var(--detail-light-text-secondary) !important;
}

/* Enhanced Breadcrumbs Light Mode */
html[data-theme="light"] .detail-breadcrumbs,
body[data-theme="light"] .detail-breadcrumbs {
  background: rgba(255, 255, 255, 0.9) !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .detail-breadcrumbs__link,
body[data-theme="light"] .detail-breadcrumbs__link {
  color: var(--detail-light-text-secondary) !important;
}

html[data-theme="light"] .detail-breadcrumbs__link:hover,
body[data-theme="light"] .detail-breadcrumbs__link:hover {
  color: var(--detail-primary) !important;
}

html[data-theme="light"] .detail-breadcrumbs__current,
body[data-theme="light"] .detail-breadcrumbs__current {
  color: var(--detail-light-text) !important;
}

html[data-theme="light"] .detail-breadcrumbs__separator,
body[data-theme="light"] .detail-breadcrumbs__separator {
  color: var(--detail-light-text-secondary) !important;
}

/* ========================================
   BREADCRUMBS
   ======================================== */
.detail-breadcrumbs {
  background: var(--detail-bg-secondary);
  border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  padding: var(--detail-space-4) 0;
}

.detail-breadcrumbs__container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--detail-space-6);
}

.detail-breadcrumbs__list {
  display: flex;
  align-items: center;
  gap: var(--detail-space-4);
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.detail-breadcrumbs__item {
  display: flex;
  align-items: center;
  gap: var(--detail-space-4);
}

.detail-breadcrumbs__link {
  color: var(--detail-text-secondary);
  text-decoration: none;
  transition: color var(--detail-transition);
  font-size: 0.875rem;
}

.detail-breadcrumbs__link:hover {
  color: var(--detail-primary);
}

.detail-breadcrumbs__current {
  color: var(--detail-text-primary);
  font-weight: 500;
  font-size: 0.875rem;
}

.detail-breadcrumbs__separator {
  color: var(--detail-text-muted);
}

/* ========================================
   HERO SECTION - FULL SCREEN
   ======================================== */
.project-hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  max-height: 900px;
  overflow: hidden;
  background: var(--detail-bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px) brightness(0.4);
  transform: scale(1.1);
  z-index: 1;
}

.project-hero__foreground {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  max-width: 800px;
  height: 60%;
  max-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--detail-radius-xl);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 2;
  transition: all 0.3s ease;
}

.project-hero__foreground:hover {
  transform: translate(-50%, -50%) scale(1.02);
  box-shadow: 
    0 32px 64px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* ========================================
   HERO CAROUSEL STYLES
   ======================================== */
.project-hero--carousel {
  position: relative;
}

.project-hero__carousel {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-hero__carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
}

.project-hero__carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.8s ease-in-out;
  z-index: 1;
}

.project-hero__carousel-slide.active {
  opacity: 1;
  z-index: 2;
}

.project-hero__carousel-slide .project-hero__background,
.project-hero__carousel-slide .project-hero__foreground {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.project-hero__carousel-slide .project-hero__background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: blur(8px) brightness(0.4);
  transform: scale(1.1);
  z-index: 1;
}

.project-hero__carousel-slide .project-hero__foreground {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60%;
  max-width: 800px;
  height: 60%;
  max-height: 600px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  border-radius: var(--detail-radius-xl);
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  z-index: 2;
  transition: all 0.3s ease;
}

.project-hero__carousel-slide .project-hero__foreground:hover {
  transform: translate(-50%, -50%) scale(1.02);
  box-shadow: 
    0 32px 64px -12px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.2);
}

/* Carousel Navigation Dots */
.project-hero__carousel-dots {
  position: absolute;
  bottom: 120px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.project-hero__carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.5);
  background: transparent;
  cursor: pointer;
  transition: all 0.3s ease;
  opacity: 0.7;
}

.project-hero__carousel-dot:hover {
  opacity: 1;
  border-color: rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.project-hero__carousel-dot.active {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.9);
  opacity: 1;
  transform: scale(1.2);
}

/* Carousel Navigation Arrows */
.project-hero__carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  background: rgba(0, 0, 0, 0.3);
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.project-hero__carousel-arrow:hover {
  background: rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.project-hero__carousel-arrow--prev {
  left: 30px;
}

.project-hero__carousel-arrow--next {
  right: 30px;
}

/* Carousel Info Counter */
.project-hero__carousel-info {
  margin-top: 12px;
}

.project-hero__carousel-counter {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
  letter-spacing: 0.5px;
}

.project-hero__overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.8) 0%,
    rgba(15, 23, 42, 0.4) 40%,
    transparent 100%
  );
  padding: var(--detail-space-16) 0 var(--detail-space-8);
  z-index: 3;
}

.project-hero__container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 var(--detail-space-8);
  position: relative;
  z-index: 4;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--detail-space-8);
}

.project-hero__content {
  background: rgba(15, 23, 42, 0.3);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--detail-radius-lg);
  padding: var(--detail-space-6);
  max-width: 500px;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  overflow: hidden;
}

.project-hero__content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--detail-primary) 0%, var(--detail-accent) 100%);
}

.project-hero__type {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(14, 165, 233, 0.2);
  color: var(--detail-primary);
  border: 1px solid rgba(14, 165, 233, 0.3);
  border-radius: var(--detail-radius-md);
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--detail-space-4);
  backdrop-filter: blur(10px);
}

.project-hero__title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--detail-text-primary);
  margin: 0 0 var(--detail-space-4);
  line-height: 1.2;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.project-hero__meta {
  display: flex;
  flex-direction: column;
  gap: var(--detail-space-3);
}

.project-hero__meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--detail-text-secondary);
  font-size: 0.813rem;
  font-weight: 400;
  padding: 0.375rem 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--detail-radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.2s ease;
}

.project-hero__meta-item:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.project-hero__icon {
  width: 16px;
  height: 16px;
  color: var(--detail-primary);
  flex-shrink: 0;
  opacity: 0.8;
}

/* Project stats sidebar */
.project-hero__stats {
  display: flex;
  flex-direction: column;
  gap: var(--detail-space-4);
  max-width: 200px;
}

.project-hero__stat {
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--detail-radius-md);
  padding: var(--detail-space-4);
  text-align: center;
  transition: all 0.3s ease;
}

.project-hero__stat:hover {
  background: rgba(15, 23, 42, 0.6);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

.project-hero__stat-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--detail-primary);
  display: block;
  line-height: 1;
}

.project-hero__stat-label {
  font-size: 0.625rem;
  color: var(--detail-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.25rem;
}

/* Hero scroll indicator */
.project-hero__scroll {
  position: absolute;
  bottom: var(--detail-space-8);
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  animation: bounce 2s infinite;
}

.project-hero__scroll-icon {
  width: 32px;
  height: 32px;
  color: var(--detail-text-primary);
  opacity: 0.7;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-10px);
  }
  60% {
    transform: translateX(-50%) translateY(-5px);
  }
}

/* ========================================
   MAIN CONTENT LAYOUT
   ======================================== */
.project-main {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--detail-space-12) var(--detail-space-6);
}

.project-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: var(--detail-space-8);
  align-items: start;
}

.project-content-main {
  display: flex;
  flex-direction: column;
  gap: var(--detail-space-8);
}

.project-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--detail-space-6);
  width: 100%;
  margin: 0 auto;
}

/* Remove sticky/scrolling: sidebar always flows with content */

/* ========================================
   INFO CARDS
   ======================================== */
.project-info-card,
.project-description-card,
.project-map-card,
.project-gallery-card,
.project-cta-card,
.project-contact-card,
.project-actions-card {
  background: var(--detail-bg-secondary);
  border: 1px solid rgba(148, 163, 184, 0.1);
  border-radius: var(--detail-radius-lg);
  padding: var(--detail-space-8);
  box-shadow: var(--detail-shadow-md);
  width: 100%;
}

.section-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--detail-text-primary);
  margin: 0 0 var(--detail-space-6);
  letter-spacing: -0.02em;
}

/* ========================================
   PROJECT INFO SIDEBAR
   ======================================== */
.project-info-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Large screen info layout improvements */
@media (min-width: 1200px) {
  .project-info-list {
    gap: var(--detail-space-5);
  }
  
  .project-info-item {
    padding-bottom: var(--detail-space-5);
  }
  
  .project-info-item__label {
    font-size: 0.875rem;
  }
  
  .project-info-item__value {
    font-size: 1.125rem;
  }
}

.project-info-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  background: rgba(255, 255, 255, 0.02);
  border-radius: var(--detail-radius-md);
  border: 1px solid rgba(148, 163, 184, 0.08);
  transition: all 0.3s ease;
}

.project-info-item:hover {
  background: rgba(14, 165, 233, 0.05);
  border-color: rgba(14, 165, 233, 0.2);
  transform: translateX(4px);
}

.project-info-item:last-child {
  border-bottom: none;
  padding-bottom: 1.25rem;
}

[data-theme="light"] .project-info-item {
  background: rgba(248, 250, 252, 0.8);
  border-color: rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .project-info-item:hover {
  background: rgba(14, 165, 233, 0.08);
  border-color: rgba(14, 165, 233, 0.25);
}

.project-info-item__label {
  font-size: 0.75rem;
  color: var(--detail-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.project-info-item__label::before {
  content: '';
  width: 4px;
  height: 4px;
  background: var(--detail-primary);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(14, 165, 233, 0.5);
}

.project-info-item__value {
  font-size: 1.125rem;
  color: var(--detail-text-primary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  letter-spacing: -0.01em;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--detail-radius-md);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-badge--completed {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
}

.status-badge--in-progress {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.status-badge--planned {
  background: rgba(245, 158, 11, 0.15);
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
}

.status-badge .icon-sm {
  width: 16px;
  height: 16px;
}

/* ========================================
   PROJECT DESCRIPTION
   ======================================== */
.project-description {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--detail-text-secondary);
  white-space: pre-line;
  max-width: 72ch;
  margin-left: auto;
  margin-right: auto;
  letter-spacing: 0.01em;
  font-weight: 400;
}

.project-description p {
  margin-bottom: 1.5rem;
}

.project-description p:last-child {
  margin-bottom: 0;
}

/* Enhanced Description Card */
.project-description-card {
  position: relative;
  overflow: hidden;
}

.project-description-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--detail-primary) 0%, var(--detail-accent) 100%);
  border-radius: var(--detail-radius-lg) var(--detail-radius-lg) 0 0;
}

[data-theme="light"] .project-description {
  color: rgba(55, 65, 81, 0.9);
}

/* ========================================
   GOOGLE MAP
   ======================================== */
.project-map {
  width: 100%;
  height: 400px;
  border-radius: var(--detail-radius-md);
  overflow: hidden;
  background: var(--detail-bg-tertiary);
}

#project-map {
  width: 100%;
  height: 100%;
}

.map-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  gap: var(--detail-space-4);
  color: var(--detail-text-muted);
}

.map-placeholder-icon {
  width: 48px;
  height: 48px;
  opacity: 0.5;
}

/* ========================================
   GALLERY - MODERN MASONRY LAYOUT
   ======================================== */
.project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: var(--detail-space-6);
}

/* Gallery Item with Glass-Morphism Overlay */
.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: var(--detail-radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(251, 191, 36, 0.5);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* Glass-Morphism Overlay on Hover */
.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(15, 23, 42, 0.8) 0%,
    rgba(15, 23, 42, 0.3) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 1;
}

/* Zoom Icon */
.gallery-item::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 60px;
  height: 60px;
  background: rgba(251, 191, 36, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 2;
  background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="white" stroke-width="2"><path stroke-linecap="round" stroke-linejoin="round" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v6m3-3H7"/></svg>');
  background-size: 28px 28px;
  background-position: center;
  background-repeat: no-repeat;
}

.gallery-item:hover::after {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

/* Larger Images for First Few */
.gallery-item:first-child {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: 16 / 10;
}

@media (max-width: 768px) {
  .gallery-item:first-child {
    grid-column: span 1;
    grid-row: span 1;
    aspect-ratio: 4 / 3;
  }
}

/* Light Theme Gallery */
[data-theme="light"] .gallery-item::before {
  background: linear-gradient(
    to top,
    rgba(248, 250, 252, 0.9) 0%,
    rgba(248, 250, 252, 0.4) 50%,
    transparent 100%
  );
}

/* Gallery Empty State */
.gallery-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--detail-space-16) var(--detail-space-8);
  text-align: center;
  background: rgba(255, 255, 255, 0.02);
  border: 2px dashed rgba(148, 163, 184, 0.2);
  border-radius: var(--detail-radius-lg);
  margin-top: var(--detail-space-6);
}

.gallery-empty svg {
  color: var(--detail-text-muted);
  margin-bottom: var(--detail-space-4);
  opacity: 0.5;
}

.gallery-empty p {
  color: var(--detail-text-muted);
  font-size: 1.125rem;
  margin: 0;
}

[data-theme="light"] .gallery-empty {
  background: rgba(248, 250, 252, 0.5);
  border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .gallery-empty svg,
[data-theme="light"] .gallery-empty p {
  color: var(--detail-light-text-secondary);
}

/* ========================================
   CONTACT FORM
   ======================================== */
.contact-intro {
  color: var(--detail-text-secondary);
  margin-bottom: var(--detail-space-6);
  line-height: 1.6;
}

.project-contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--detail-space-4);
}

/* Large screen form improvements */
@media (min-width: 1200px) {
  .project-contact-form {
    gap: var(--detail-space-5);
  }
  
  .form-group {
    gap: 0.75rem;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 1rem 1.25rem;
    font-size: 1rem;
  }
  
  .contact-submit-btn {
    padding: 1.25rem 2.5rem;
    font-size: 1.125rem;
  }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--detail-text-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  padding: 0.75rem 1rem;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--detail-radius-md);
  background: var(--detail-bg-tertiary);
  color: var(--detail-text-primary);
  font-size: 0.875rem;
  transition: all var(--detail-transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--detail-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
  font-size: 0.813rem;
  line-height: 1.5;
  color: var(--detail-text-secondary);
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  cursor: pointer;
}

.checkbox-label a {
  color: var(--detail-primary);
  text-decoration: none;
}

.checkbox-label a:hover {
  text-decoration: underline;
}

.contact-submit-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--detail-primary);
  color: white;
  border: none;
  border-radius: var(--detail-radius-md);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: all var(--detail-transition);
  margin-top: var(--detail-space-2);
}

.contact-submit-btn:hover {
  background: var(--detail-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.3);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.quick-actions {
  display: flex;
  flex-direction: column;
  gap: var(--detail-space-3);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: var(--detail-radius-md);
  color: var(--detail-text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all var(--detail-transition);
}

.quick-action-btn:hover {
  background: rgba(14, 165, 233, 0.1);
  border-color: var(--detail-primary);
  color: var(--detail-primary);
  transform: translateX(4px);
}

/* ========================================
   CTA SECTION (Legacy)
   ======================================== */
.project-cta {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--detail-space-6);
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  background: var(--detail-primary);
  color: white;
  border-radius: var(--detail-radius-md);
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  transition: all var(--detail-transition);
  border: none;
  cursor: pointer;
}

.cta-button:hover {
  background: var(--detail-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(14, 165, 233, 0.3);
}

.cta-button--secondary {
  background: transparent;
  border: 2px solid var(--detail-primary);
  color: var(--detail-primary);
}

.cta-button--secondary:hover {
  background: rgba(14, 165, 233, 0.1);
  transform: translateY(-2px);
  box-shadow: none;
}

/* ========================================
   RELATED PROJECTS
   ======================================== */
.related-projects-section {
  background: var(--detail-bg-secondary);
  padding: var(--detail-space-16) 0;
  margin-top: var(--detail-space-16);
  border-top: 1px solid rgba(148, 163, 184, 0.1);
}

.related-projects-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--detail-space-6);
}

.related-projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: var(--detail-space-8);
  margin-top: var(--detail-space-8);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-hero__title {
    font-size: 1.5rem;
  }

  .project-hero__foreground {
    width: 70%;
    height: 50%;
  }

  .project-hero__container {
    flex-direction: column;
    align-items: center;
    gap: var(--detail-space-6);
  }

  .project-hero__stats {
    flex-direction: row;
    max-width: none;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .project-hero {
    height: 85vh;
    min-height: 500px;
  }

  .project-hero__foreground {
    width: 92vw;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .project-hero__content {
    padding: var(--detail-space-4);
    max-width: 400px;
  }

  /* Carousel mobile styles */
  .project-hero__carousel-slide .project-hero__foreground {
    width: 92vw;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .project-hero__carousel-dots {
    bottom: 100px;
    gap: 10px;
  }

  .project-hero__carousel-dot {
    width: 10px;
    height: 10px;
  }

  .project-hero__carousel-arrow {
    width: 40px;
    height: 40px;
  }

  .project-hero__carousel-arrow--prev {
    left: 20px;
  }

  .project-hero__carousel-arrow--next {
    right: 20px;
  }

  .project-hero__title {
    font-size: 1.375rem;
  }

  .project-hero__stats {
    flex-wrap: wrap;
    gap: var(--detail-space-3);
  }

  .project-hero__stat {
    flex: 1;
    min-width: 120px;
  }

  .project-main {
    padding: var(--detail-space-8) var(--detail-space-4);
  }

  .project-gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }

  .related-projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .project-hero {
    height: 80vh;
    min-height: 400px;
  }

  .project-hero__foreground {
    width: 94vw;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .project-hero__content {
    padding: var(--detail-space-3);
    max-width: 350px;
  }

  /* Carousel small mobile styles */
  .project-hero__carousel-slide .project-hero__foreground {
    width: 94vw;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .project-hero__carousel-dots {
    bottom: 80px;
    gap: 8px;
  }

  .project-hero__carousel-dot {
    width: 8px;
    height: 8px;
  }

  .project-hero__carousel-arrow {
    width: 36px;
    height: 36px;
  }

  .project-hero__carousel-arrow--prev {
    left: 15px;
  }

  .project-hero__carousel-arrow--next {
    right: 15px;
  }

  .project-hero__title {
    font-size: 1.25rem;
  }

  .project-hero__type {
    padding: 0.25rem 0.5rem;
    font-size: 0.563rem;
  }

  .project-hero__meta-item {
    padding: 0.25rem 0.375rem;
    font-size: 0.75rem;
  }

  .project-hero__icon {
    width: 14px;
    height: 14px;
  }

  .project-hero__stat {
    padding: var(--detail-space-3);
  }

  .project-hero__stat-value {
    font-size: 1.25rem;
  }

  .project-hero__stat-label {
    font-size: 0.563rem;
  }

  .project-info-card,
  .project-description-card,
  .project-map-card,
  .project-gallery-card,
  .project-cta-card {
    padding: var(--detail-space-4);
  }

  .section-title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .project-hero__title {
    font-size: 1.125rem;
  }

  .project-hero__content {
    padding: var(--detail-space-2);
    max-width: 300px;
  }

  .project-hero__foreground {
    width: 95vw;
    height: auto;
    aspect-ratio: 4 / 3;
  }

  .project-hero__stats {
    gap: var(--detail-space-2);
  }

  .project-hero__stat {
    min-width: 100px;
    padding: var(--detail-space-2);
  }

  .project-hero__stat-value {
    font-size: 1.125rem;
  }
}

/* Large screen enhancements */
@media (min-width: 1200px) {
  .project-main {
    max-width: 1400px;
    margin: 0 auto;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--detail-space-12);
    align-items: start;
  }
  .project-description {
    font-size: 1.0625rem;
    line-height: 1.8;
    letter-spacing: 0.01em;
  }
  .project-sidebar {
    min-width: 520px;
    max-width: 620px;
    max-height: none;
    overflow: visible;
    position: static;
    margin-left: auto;
  }
  .project-sidebar .project-info-card,
  .project-sidebar .project-contact-card,
  .project-sidebar .project-actions-card {
    margin-bottom: var(--detail-space-6);
  }
}

@media (min-width: 1400px) {
  .project-main {
    max-width: 1600px;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--detail-space-16);
    align-items: start;
  }
  .project-description {
    max-width: 85ch;
    font-size: 1.1rem;
    line-height: 1.85;
  }
  .project-sidebar {
    min-width: 560px;
    max-width: 700px;
  }
}

@media (min-width: 1600px) {
  .project-main {
    max-width: 1800px;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--detail-space-20);
    align-items: start;
  }
  .project-description {
    max-width: 90ch;
    font-size: 1.125rem;
    line-height: 1.9;
  }
  .project-sidebar {
    min-width: 600px;
    max-width: 760px;
  }
  .project-hero__container {
    max-width: 1800px;
  }
  .project-hero__foreground {
    width: 55%;
    max-width: 1000px;
  }
}

@media (min-width: 1920px) {
  .project-main {
    max-width: 2000px;
  }
  .project-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--detail-space-24);
    align-items: start;
  }
  .project-description {
    max-width: 95ch;
    font-size: 1.15rem;
    line-height: 1.95;
  }
  .project-sidebar {
    min-width: 650px;
    max-width: 820px;
  }
}

/* Mobile hero background tuning for better focus */
@media (max-width: 768px) {
  .project-hero__background {
    filter: blur(6px) brightness(0.5);
  }
}

/* ========================================
   ICON UTILITIES
   ======================================== */
.icon {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 0;
  stroke: currentColor;
  fill: currentColor;
}

.icon-sm {
  width: 16px;
  height: 16px;
}

.icon-md {
  width: 20px;
  height: 20px;
}

.icon-lg {
  width: 24px;
  height: 24px;
}

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

.project-info-card,
.project-description-card,
.project-map-card,
.project-gallery-card,
.project-cta-card {
  animation: fadeIn 0.6s ease-out backwards;
}

.project-info-card {
  animation-delay: 0.1s;
}

.project-description-card {
  animation-delay: 0.2s;
}

.project-map-card {
  animation-delay: 0.3s;
}

.project-gallery-card {
  animation-delay: 0.4s;
}

.project-cta-card {
  animation-delay: 0.5s;
}

/* ========================================
   MODERN GALLERY PREVIEW
   ======================================== */

.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.gallery-subtitle {
  color: var(--detail-text-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  font-weight: 400;
}

.btn-view-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  background: linear-gradient(135deg, var(--detail-primary) 0%, var(--detail-primary-dark) 100%);
  color: white;
  border: none;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 6px rgba(14, 165, 233, 0.2);
}

.btn-view-all:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14, 165, 233, 0.3);
  background: linear-gradient(135deg, var(--detail-primary-light) 0%, var(--detail-primary) 100%);
}

.btn-view-all svg {
  transition: transform 0.3s ease;
}

.btn-view-all:hover svg {
  transform: translateX(4px);
}

/* Gallery Preview Grid - Modern Layout */
.project-gallery-preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: 450px;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.gallery-preview-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--detail-radius-xl);
  background: var(--detail-bg-tertiary);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.gallery-preview-item:hover {
  box-shadow: 0 10px 20px rgba(14, 165, 233, 0.4);
  transform: translateY(-4px);
}

/* Featured item (first image) spans 2 columns */
.gallery-preview-item.featured {
  grid-column: span 2;
  grid-row: span 1;
}

/* Large screens: bigger, more prominent */
@media (min-width: 1400px) {
  .project-gallery-preview {
    grid-template-rows: 500px;
    gap: 2rem;
  }
}

@media (min-width: 1920px) {
  .project-gallery-preview {
    grid-template-rows: 550px;
    gap: 2.5rem;
  }
}

.gallery-preview-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-preview-item:hover img {
  transform: scale(1.1);
}

/* Overlay effect on hover */
.gallery-preview-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.9) 0%, rgba(2, 132, 199, 0.9) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-preview-item:hover .gallery-preview-overlay {
  opacity: 1;
}

/* "More photos" indicator on 4th image */
.gallery-preview-more {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: white;
  z-index: 2;
  pointer-events: none;
}

.more-count {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.more-text {
  font-size: 1.125rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.9;
}

/* Tablet Layout */
@media (max-width: 992px) {
  .project-gallery-preview {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 250px 250px;
    gap: 0.75rem;
  }

  .gallery-preview-item.featured {
    grid-column: span 2;
    grid-row: span 1;
  }

  .more-count {
    font-size: 2.5rem;
  }

  .more-text {
    font-size: 1rem;
  }
}

/* Mobile Layout */
@media (max-width: 768px) {
  .gallery-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .btn-view-all {
    width: 100%;
    justify-content: center;
  }

  .project-gallery-preview {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 0.5rem;
  }

  .gallery-preview-item {
    height: 250px;
  }

  .gallery-preview-item.featured {
    grid-column: span 1;
    height: 300px;
  }

  .more-count {
    font-size: 2rem;
  }

  .more-text {
    font-size: 0.875rem;
  }
}

/* Small Mobile */
@media (max-width: 576px) {
  .gallery-preview-item {
    height: 200px;
    border-radius: var(--detail-radius-lg);
  }

  .gallery-preview-item.featured {
    height: 240px;
  }
}

/* Accessibility - Focus states */
.gallery-preview-item:focus {
  outline: 3px solid var(--detail-primary);
  outline-offset: 2px;
}

.btn-view-all:focus {
  outline: 3px solid var(--detail-primary-light);
  outline-offset: 2px;
}

/* Loading state for images */
.gallery-preview-item img[loading="lazy"] {
  background: linear-gradient(90deg, var(--detail-bg-tertiary) 0%, var(--detail-bg-secondary) 50%, var(--detail-bg-tertiary) 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .gallery-preview-item,
  .gallery-preview-item img,
  .gallery-preview-overlay,
  .btn-view-all,
  .btn-view-all svg {
    transition: none;
  }

  .gallery-preview-item img[loading="lazy"] {
    animation: none;
  }
}


/* ========================================
   NEW MODERN LAYOUT STYLES
   October 18, 2025
   ======================================== */

/* Container Global */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }
}

@media (min-width: 1920px) {
  .container {
    max-width: 1600px;
  }
}

/* ========================================
   DETTAGLI COMPATTI - INLINE CARDS
   ======================================== */
.project-details-compact {
  padding: 3rem 0;
  background: var(--detail-bg-primary, #0f172a);
  border-bottom: 1px solid var(--detail-bg-tertiary, #334155);
}

.detail-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin: 0 -0.5rem;
}

.detail-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.03) 100%);
  border-radius: 16px;
  border: 1px solid rgba(14, 165, 233, 0.15);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.detail-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--detail-primary, #0ea5e9), var(--detail-primary-light, #38bdf8));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.detail-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 32px rgba(14, 165, 233, 0.25), 0 0 0 1px rgba(14, 165, 233, 0.2);
  border-color: rgba(14, 165, 233, 0.3);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
}

.detail-card:hover::before {
  transform: scaleX(1);
}

.detail-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.08) 100%);
  border-radius: 12px;
  color: var(--detail-primary, #0ea5e9);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.detail-card__icon::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.detail-card:hover .detail-card__icon {
  transform: scale(1.1);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
}

.detail-card:hover .detail-card__icon::before {
  opacity: 1;
}

.detail-card__icon svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.detail-card__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.detail-card__label {
  font-size: 0.75rem;
  color: var(--detail-text-muted, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  line-height: 1.2;
}

.detail-card__value {
  font-size: 1rem;
  color: var(--detail-text-primary, #f1f5f9);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status Colors */
.detail-card__value.status-completed {
  color: var(--detail-success, #22c55e);
}

.detail-card__value.status-in_progress {
  color: var(--detail-warning, #f59e0b);
}

.detail-card__value.status-planning {
  color: var(--detail-info, #3b82f6);
}

/* ========================================
   LIGHT MODE OVERRIDES FOR DETAIL CARDS
   ======================================== */
html[data-theme="light"] .project-details-compact,
body[data-theme="light"] .project-details-compact {
  background: var(--detail-light-bg, #ffffff) !important;
  border-bottom-color: var(--detail-light-border, #e2e8f0) !important;
}

html[data-theme="light"] .detail-card,
body[data-theme="light"] .detail-card {
  background: var(--detail-light-bg-secondary, #f8fafc) !important;
  border-color: var(--detail-light-border, #e2e8f0) !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .detail-card:hover,
body[data-theme="light"] .detail-card:hover {
  background: var(--detail-light-bg, #ffffff) !important;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15), 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  border-color: var(--detail-primary, #0ea5e9) !important;
}

html[data-theme="light"] .detail-card__icon,
body[data-theme="light"] .detail-card__icon {
  background: rgba(14, 165, 233, 0.08) !important;
  color: var(--detail-primary, #0ea5e9) !important;
}

html[data-theme="light"] .detail-card__label,
body[data-theme="light"] .detail-card__label {
  color: var(--detail-light-text-secondary, #475569) !important;
}

html[data-theme="light"] .detail-card__value,
body[data-theme="light"] .detail-card__value {
  color: var(--detail-light-text, #0f172a) !important;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
  .detail-cards-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.875rem;
  }

  .detail-card {
    padding: 0.875rem 1rem;
  }

  .detail-card__icon {
    width: 36px;
    height: 36px;
  }

  .detail-card__icon svg {
    width: 18px;
    height: 18px;
  }

  .detail-card__label {
    font-size: 0.6875rem;
  }

  .detail-card__value {
    font-size: 0.9375rem;
  }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
  .project-details-compact {
    padding: 2rem 0;
  }

  .detail-cards-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin: 0 -0.25rem;
  }

  .detail-card {
    flex-direction: column;
    text-align: center;
    padding: 0.875rem 0.75rem;
    gap: 0.5rem;
  }

  .detail-card__icon {
    width: 32px;
    height: 32px;
  }

  .detail-card__icon svg {
    width: 16px;
    height: 16px;
  }

  .detail-card__label {
    font-size: 0.625rem;
    letter-spacing: 0.6px;
  }

  .detail-card__value {
    font-size: 0.875rem;
    font-weight: 600;
  }
}

/* ========================================
   DESCRIZIONE FULL-WIDTH
   ======================================== */
.project-description-section {
  padding: 4rem 0;
  background: var(--detail-bg-primary, #0f172a);
}

.project-description-content {
  margin-top: 2rem;
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--detail-text-secondary, #cbd5e1);
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.project-description-content p {
  margin-bottom: 1.25rem;
}

/* Light mode overrides for description section */
html[data-theme="light"] .project-description-section,
body[data-theme="light"] .project-description-section {
  background: var(--detail-light-bg, #ffffff) !important;
}

html[data-theme="light"] .project-description-content,
body[data-theme="light"] .project-description-content {
  color: var(--detail-light-text-secondary, #475569) !important;
}

/* Light mode overrides for before/after section */
html[data-theme="light"] .project-before-after-section,
body[data-theme="light"] .project-before-after-section {
  background: var(--detail-light-bg-secondary, #f8fafc) !important;
}

/* Light mode overrides for contact section */
html[data-theme="light"] .project-contact-section,
body[data-theme="light"] .project-contact-section {
  background: var(--detail-light-bg, #ffffff) !important;
}

@media (max-width: 768px) {
  .project-description-section {
    padding: 2rem 0;
  }

  .project-description-content {
    font-size: 1rem;
    line-height: 1.7;
  }
}

/* ========================================
   BEFORE/AFTER SECTION
   ======================================== */
.project-before-after-section {
  padding: 4rem 0;
  background: var(--detail-bg-secondary, #1e293b);
}

.before-after-list {
  display: flex;
  flex-direction: column;
  gap: 3rem;
  margin-top: 2rem;
}

.before-after-item {
  width: 100%;
}

.before-after-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--detail-text-primary, #f1f5f9);
  margin-bottom: 1rem;
  text-align: center;
}

.before-after-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
}

.before-image,
.after-image {
  display: block;
  width: 100%;
  height: auto;
  user-select: none;
}

.after-image-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.after-image {
  width: 200%;
  height: 100%;
  object-fit: cover;
}

.before-after-handle {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 100%;
  background: #fff;
  cursor: ew-resize;
  transform: translateX(-50%);
  z-index: 10;
}

.handle-circle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 4px 6px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #333;
}

.before-label,
.after-label {
  position: absolute;
  top: 1rem;
  background: rgba(0,0,0,0.7);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.before-label {
  left: 1rem;
}

.after-label {
  right: 1rem;
}

@media (max-width: 768px) {
  .project-before-after-section {
    padding: 2rem 0;
  }

  .before-after-list {
    gap: 2rem;
  }

  .handle-circle {
    width: 40px;
    height: 40px;
  }

  .handle-circle svg {
    width: 20px;
    height: 20px;
  }

  .before-label,
  .after-label {
    font-size: 0.75rem;
    padding: 0.4rem 0.75rem;
  }
}

/* ========================================
   MAPPA FULL-WIDTH - ENHANCED
   ======================================== */
.project-map-fullwidth {
  padding: 0;
  background: var(--detail-bg-primary, #0f172a);
  position: relative;
  overflow: hidden;
}

.project-map-fullwidth .container {
  padding: 3rem 1.5rem 2rem;
}

.map-container-fullwidth {
  width: 100%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  border: 2px solid rgba(14, 165, 233, 0.1);
  transition: all 0.3s ease;
}

.map-container-fullwidth:hover {
  border-color: rgba(14, 165, 233, 0.3);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25);
}

#project-map {
  width: 100%;
  height: 600px;
  border: none;
  border-radius: 10px;
  transition: all 0.3s ease;
}

/* Map loading state */
.map-container-fullwidth::before {
  content: 'Caricamento mappa...';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--detail-text-muted);
  font-size: 14px;
  z-index: 1;
  pointer-events: none;
  background: rgba(0, 0, 0, 0.7);
  padding: 8px 16px;
  border-radius: 6px;
  color: white;
}

.map-container-fullwidth.loaded::before {
  display: none;
}

/* Enhanced Google Maps styling */
.gm-style .gm-style-iw-c {
  border-radius: 12px !important;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
  padding: 0 !important;
}

.gm-style .gm-style-iw-tc {
  display: none !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
}

/* Custom map controls */
.gm-style .gm-style-mtc {
  background: rgba(255, 255, 255, 0.95) !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1) !important;
  backdrop-filter: blur(10px);
}

.gm-style .gm-style-mtc button {
  background: transparent !important;
  border: none !important;
  color: #374151 !important;
  font-weight: 500 !important;
  transition: all 0.2s ease !important;
  border-radius: 4px !important;
}

.gm-style .gm-style-mtc button:hover {
  background: rgba(14, 165, 233, 0.1) !important;
  color: #0ea5e9 !important;
}

.gm-style .gm-style-mtc button:focus {
  background: rgba(14, 165, 233, 0.2) !important;
  color: #0ea5e9 !important;
  outline: none !important;
}

@media (max-width: 1024px) {
  #project-map {
    height: 550px;
  }
}

@media (max-width: 768px) {
  .project-map-fullwidth .container {
    padding: 2rem 1.5rem 1.5rem;
  }

  #project-map {
    height: 500px;
  }
}

@media (max-width: 576px) {
  #project-map {
    height: 450px;
  }
}

/* ========================================
   CONTACT FORM SECTION
   ======================================== */
.project-contact-section {
  padding: 4rem 0 5rem;
  background: var(--detail-bg-secondary, #1e293b);
}

.contact-form-wrapper {
  margin-top: 2rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 768px) {
  .project-contact-section {
    padding: 2rem 0 3rem;
  }
}

/* ========================================
   SECTION TITLES & SUBTITLES (GLOBAL)
   ======================================== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  color: var(--detail-text-primary, #f1f5f9);
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
}

.section-title .icon-lg {
  width: 32px;
  height: 32px;
  color: var(--detail-primary, #0ea5e9);
}

.section-subtitle {
  text-align: center;
  color: var(--detail-text-muted, #94a3b8);
  font-size: 1rem;
  margin-top: 0.5rem;
  font-weight: 400;
}

@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
  }

  .section-title .icon-lg {
    width: 24px;
    height: 24px;
  }

  .section-subtitle {
    font-size: 0.875rem;
  }
}

/* ========================================
   SPACING & UTILITIES
   ======================================== */
.project-detail-modern section {
  position: relative;
}

.project-detail-modern section + section {
  border-top: 1px solid var(--detail-bg-tertiary, #334155);
}

/* Remove borders for specific sections */
.project-carousel-section,
.project-map-fullwidth {
  border-top: none;
}

/* ========================================
   SERVICES SECTION - MODERN COMPACT DESIGN
   ======================================== */
.project-services-section {
    padding: var(--detail-space-12) 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.02) 0%, rgba(14, 165, 233, 0.01) 100%);
    border-top: 1px solid rgba(14, 165, 233, 0.1);
    position: relative;
}

.project-services-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(14, 165, 233, 0.3) 50%, transparent 100%);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.875rem;
    margin-top: var(--detail-space-6);
}

.service-tag {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, rgba(14, 165, 233, 0.02) 100%);
    border: 1px solid rgba(14, 165, 233, 0.12);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    backdrop-filter: blur(8px);
    text-decoration: none;
    color: var(--detail-text-primary);
    min-height: 60px;
}

.service-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--detail-primary, #0ea5e9), var(--detail-primary-light, #38bdf8));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.service-tag:hover {
    transform: translateY(-2px) scale(1.02);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.12) 0%, rgba(14, 165, 233, 0.06) 100%);
    border-color: rgba(14, 165, 233, 0.25);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.2), 0 0 0 1px rgba(14, 165, 233, 0.15);
}

.service-tag:hover::before {
    transform: scaleX(1);
}

.service-tag__icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.15) 0%, rgba(14, 165, 233, 0.08) 100%);
    border-radius: 10px;
    flex-shrink: 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-tag__icon::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-tag:hover .service-tag__icon {
    transform: scale(1.1);
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.25) 0%, rgba(14, 165, 233, 0.15) 100%);
}

.service-tag:hover .service-tag__icon::before {
    opacity: 1;
}

.service-tag__content {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.service-tag__text {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--detail-text-primary);
    line-height: 1.3;
    transition: color 0.3s ease;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.service-tag:hover .service-tag__text {
    color: var(--detail-primary, #0ea5e9);
}

.service-tag__category {
    font-size: 0.6875rem;
    color: var(--detail-text-muted, #94a3b8);
    padding: 0.1875rem 0.5rem;
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(14, 165, 233, 0.05) 100%);
    border-radius: 6px;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.2px;
    border: 1px solid rgba(14, 165, 233, 0.15);
    transition: all 0.3s ease;
    width: fit-content;
    align-self: flex-start;
}

.service-tag:hover .service-tag__category {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(14, 165, 233, 0.1) 100%);
    border-color: rgba(14, 165, 233, 0.25);
    color: var(--detail-primary, #0ea5e9);
}

/* Light Mode */
html[data-theme="light"] .project-services-section,
body[data-theme="light"] .project-services-section {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.01) 0%, rgba(14, 165, 233, 0.005) 100%);
    border-top-color: rgba(14, 165, 233, 0.08);
}

html[data-theme="light"] .service-tag,
body[data-theme="light"] .service-tag {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.03) 0%, rgba(14, 165, 233, 0.01) 100%);
    border-color: rgba(14, 165, 233, 0.08);
}

html[data-theme="light"] .service-tag:hover,
body[data-theme="light"] .service-tag:hover {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.04) 100%);
    border-color: rgba(14, 165, 233, 0.2);
    box-shadow: 0 6px 24px rgba(14, 165, 233, 0.15), 0 0 0 1px rgba(14, 165, 233, 0.1);
}

html[data-theme="light"] .service-tag__icon,
body[data-theme="light"] .service-tag__icon {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.08) 0%, rgba(14, 165, 233, 0.04) 100%);
}

html[data-theme="light"] .service-tag__text,
body[data-theme="light"] .service-tag__text {
    color: var(--detail-light-text, #0f172a);
}

html[data-theme="light"] .service-tag__category,
body[data-theme="light"] .service-tag__category {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.06) 0%, rgba(14, 165, 233, 0.03) 100%);
    border-color: rgba(14, 165, 233, 0.1);
    color: var(--detail-light-text-secondary, #475569);
}

/* Responsive Design for Services */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 0.75rem;
    }

    .service-tag {
        padding: 0.75rem 0.875rem;
        min-height: 56px;
    }

    .service-tag__icon {
        width: 32px;
        height: 32px;
    }

    .service-tag__content {
        gap: 0.25rem;
    }

    .service-tag__text {
        font-size: 0.875rem;
    }

    .service-tag__category {
        font-size: 0.625rem;
        padding: 0.125rem 0.375rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
        gap: 0.625rem;
    }

    .service-tag {
        padding: 0.625rem 0.75rem;
        gap: 0.5rem;
        min-height: 52px;
    }

    .service-tag__icon {
        width: 28px;
        height: 28px;
    }

    .service-tag__content {
        gap: 0.1875rem;
    }

    .service-tag__text {
        font-size: 0.8125rem;
    }

    .service-tag__category {
        font-size: 0.5625rem;
        padding: 0.125rem 0.3125rem;
    }
}

