/* ============================================================
   Pracownia Badań Psychologicznych — Design System 2026
   ============================================================ */

/* --- Design Tokens --- */
:root {
  /* Color palette — calming, professional */
  --c-primary:     #2d5a4f;   /* deep forest teal */
  --c-primary-light: #3d7a6a; /* lighter teal for hover */
  --c-primary-dark: #1e3d35;  /* darker teal */
  --c-accent:      #c9a227;   /* warm gold */
  --c-accent-light:#e0c564;
  --c-bg:          #faf8f5;   /* warm off-white */
  --c-bg-alt:      #f0ece4;   /* slightly darker warm */
  --c-surface:     #ffffff;
  --c-text:        #2c2c2c;
  --c-text-muted:  #5a5a5a;
  --c-text-light:  #8a8a8a;
  --c-border:      #e0ddd6;
  --c-hero-overlay: rgba(30, 61, 53, 0.92);

  /* Typography */
  --f-heading: 'DM Serif Display', 'Georgia', serif;
  --f-body:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --f-size-base: 1rem;        /* 16px */
  --f-size-sm:   0.875rem;    /* 14px */
  --f-size-lg:   1.125rem;    /* 18px */
  --f-size-xl:   1.25rem;     /* 20px */
  --f-size-2xl:  1.75rem;     /* 28px */
  --f-size-3xl:  2.25rem;     /* 36px */
  --f-size-4xl:  3rem;        /* 48px */
  --f-weight-normal: 400;
  --f-weight-medium: 500;
  --f-weight-bold:   700;
  --line-height:     1.7;

  /* Spacing */
  --sp-xs:  0.25rem;
  --sp-sm:  0.5rem;
  --sp-md:  1rem;
  --sp-lg:  1.5rem;
  --sp-xl:  2rem;
  --sp-2xl: 3rem;
  --sp-3xl: 4rem;
  --sp-4xl: 6rem;

  /* Layout */
  --max-width: 1200px;
  --nav-height: 72px;

  /* Transitions */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --duration: 0.3s;
  --duration-slow: 0.6s;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl:  0 20px 60px rgba(0,0,0,0.15);

  /* Borders */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  20px;
  --radius-xl:  32px;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 100%;
}

/* Safe area insets for notched phones */
@supports (padding: env(safe-area-inset-top)) {
  .site-nav {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  .site-footer {
    padding-bottom: calc(var(--sp-xl) + env(safe-area-inset-bottom));
  }
}

body {
  font-family: var(--f-body);
  font-size: var(--f-size-base);
  font-weight: var(--f-weight-normal);
  line-height: var(--line-height);
  color: var(--c-text);
  background-color: var(--c-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--c-primary);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

a:hover {
  color: var(--c-primary-light);
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--f-heading);
  font-weight: var(--f-weight-normal);
  line-height: 1.2;
  color: var(--c-primary-dark);
}

h1 { font-size: var(--f-size-4xl); }
h2 { font-size: var(--f-size-3xl); }
h3 { font-size: var(--f-size-2xl); }

p {
  margin-bottom: var(--sp-lg);
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --- Scroll Reveal Animation --- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity var(--duration-slow) var(--ease-out),
              transform var(--duration-slow) var(--ease-out);
}

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

/* ============================================================
   NAVIGATION
   ============================================================ */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--nav-height);
  overflow: visible;
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--c-border);
  transition: background var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.site-nav.scrolled {
  background: rgba(250, 248, 245, 0.95);
  box-shadow: var(--shadow-sm);
}

.site-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--f-heading);
  font-size: var(--f-size-lg);
  color: var(--c-primary-dark);
  white-space: nowrap;
}

.nav-brand img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

.nav-links a {
  position: relative;
  padding: var(--sp-sm) var(--sp-md);
  font-size: var(--f-size-sm);
  font-weight: var(--f-weight-medium);
  color: var(--c-text-muted);
  border-radius: var(--radius-sm);
  transition: color var(--duration) var(--ease-out),
              background var(--duration) var(--ease-out);
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--c-primary);
  background: rgba(45, 90, 79, 0.06);
}

.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: var(--sp-md);
  right: var(--sp-md);
  height: 2px;
  background: var(--c-accent);
  border-radius: 1px;
}

.nav-cta {
  margin-left: var(--sp-sm);
  padding: var(--sp-sm) var(--sp-lg) !important;
  background: var(--c-primary) !important;
  color: #fff !important;
  border-radius: var(--radius-xl) !important;
  font-weight: var(--f-weight-medium) !important;
}

.nav-cta:hover {
  background: var(--c-primary-light) !important;
  color: #fff !important;
}

/* Hamburger */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 1001;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  transition: background var(--duration) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.nav-toggle:hover {
  background: rgba(45, 90, 79, 0.06);
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease-out),
              opacity var(--duration) var(--ease-out);
  transform-origin: center;
}

.nav-toggle.open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.open span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--nav-height) + var(--sp-3xl));
  padding-bottom: var(--sp-4xl);
  background: linear-gradient(135deg, var(--c-bg) 0%, var(--c-bg-alt) 100%);
  overflow: hidden;
}

/* Decorative organic shape */
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -15%;
  width: 60vw;
  height: 60vw;
  max-width: 700px;
  max-height: 700px;
  background: radial-gradient(circle, rgba(45, 90, 79, 0.06) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -5%;
  left: -10%;
  width: 40vw;
  height: 40vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.05) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: center;
}

.hero-content {
  max-width: 560px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: var(--sp-xs) var(--sp-md);
  background: rgba(45, 90, 79, 0.08);
  color: var(--c-primary);
  font-size: var(--f-size-sm);
  font-weight: var(--f-weight-medium);
  border-radius: var(--radius-xl);
  margin-bottom: var(--sp-xl);
}

.hero-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--c-accent);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  margin-bottom: var(--sp-lg);
  color: var(--c-primary-dark);
  letter-spacing: -0.02em;
}

.hero h1 em {
  font-style: normal;
  color: var(--c-accent);
}

.hero-text {
  font-size: var(--f-size-lg);
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2xl);
  max-width: 480px;
}

.hero-actions {
  display: flex;
  gap: var(--sp-md);
  flex-wrap: wrap;
}

.hero-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: var(--sp-md);
  max-width: 500px;
  justify-self: end;
}

.hero-gallery a {
  display: block;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.hero-gallery a:first-child {
  grid-row: 1 / 3;
  border-radius: var(--radius-lg);
}

.hero-gallery a:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.hero-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  padding: 14px 28px;
  font-family: var(--f-body);
  font-size: var(--f-size-base);
  font-weight: var(--f-weight-medium);
  border: none;
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration) var(--ease-out);
  text-decoration: none;
  line-height: 1.2;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.btn-primary {
  background: var(--c-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(45, 90, 79, 0.3);
}

.btn-primary:hover {
  background: var(--c-primary-light);
  color: #fff;
  box-shadow: 0 6px 20px rgba(45, 90, 79, 0.4);
  transform: translateY(-2px);
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border: 1.5px solid var(--c-primary);
}

.btn-outline:hover {
  background: var(--c-primary);
  color: #fff;
  transform: translateY(-2px);
}

.btn-sm {
  padding: 10px 20px;
  font-size: var(--f-size-sm);
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section {
  padding: var(--sp-4xl) 0;
}

.section-alt {
  background: var(--c-bg-alt);
}

.section-dark {
  background: var(--c-primary-dark);
  color: #fff;
}

.section-dark h2,
.section-dark h3 {
  color: #fff;
}

.section-dark p {
  color: rgba(255, 255, 255, 0.8);
}

.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--sp-3xl);
}

.section-header h2 {
  margin-bottom: var(--sp-md);
}

.section-header p {
  font-size: var(--f-size-lg);
  color: var(--c-text-muted);
}

.section-label {
  display: inline-block;
  font-family: var(--f-body);
  font-size: var(--f-size-sm);
  font-weight: var(--f-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  margin-bottom: var(--sp-md);
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--sp-xl);
}

.service-card {
  position: relative;
  padding: var(--sp-2xl);
  background: var(--c-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--c-border);
  transition: transform var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out),
              border-color var(--duration) var(--ease-out);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  opacity: 0;
  transition: opacity var(--duration) var(--ease-out);
}

.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.service-card:hover::before {
  opacity: 1;
}

.service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: rgba(45, 90, 79, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-lg);
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: var(--f-size-xl);
  margin-bottom: var(--sp-md);
}

.service-card p {
  color: var(--c-text-muted);
  font-size: var(--f-size-sm);
  margin-bottom: var(--sp-lg);
}

.service-card .btn-sm {
  font-size: var(--f-size-sm);
}

/* ============================================================
   ABOUT / INFO SECTION
   ============================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4xl);
  align-items: center;
}

.about-content h2 {
  margin-bottom: var(--sp-lg);
}

.about-content p {
  color: var(--c-text-muted);
  font-size: var(--f-size-lg);
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-lg);
  margin-top: var(--sp-2xl);
}

.stat-item {
  padding: var(--sp-lg);
  background: var(--c-bg-alt);
  border-radius: var(--radius-md);
}

.stat-number {
  display: block;
  font-family: var(--f-heading);
  font-size: var(--f-size-3xl);
  color: var(--c-primary);
  line-height: 1;
  margin-bottom: var(--sp-xs);
}

.stat-label {
  font-size: var(--f-size-sm);
  color: var(--c-text-muted);
}

.about-image {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.about-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg);
  pointer-events: none;
}

/* ============================================================
   CONTENT LISTS (for service detail pages)
   ============================================================ */
.content-section {
  padding-top: calc(var(--nav-height) + var(--sp-3xl));
}

.page-header {
  text-align: center;
  padding: var(--sp-3xl) 0;
  margin-bottom: var(--sp-2xl);
  position: relative;
}

.page-header h1 {
  font-size: clamp(2rem, 3.5vw, 3rem);
  margin-bottom: var(--sp-md);
}

.page-header p {
  font-size: var(--f-size-lg);
  color: var(--c-text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.page-header::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--c-primary), var(--c-accent));
  margin: var(--sp-xl) auto 0;
  border-radius: 2px;
}

.content-body {
  max-width: 800px;
  margin: 0 auto;
}

.content-body p {
  font-size: var(--f-size-lg);
  color: var(--c-text-muted);
  line-height: 1.8;
}

.content-body h2 {
  font-size: var(--f-size-2xl);
  margin: var(--sp-3xl) 0 var(--sp-lg);
}

.service-list {
  margin: var(--sp-xl) 0;
  display: grid;
  gap: var(--sp-md);
}

.service-list li {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-md);
  padding: var(--sp-lg);
  background: var(--c-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--c-border);
  font-size: var(--f-size-base);
  color: var(--c-text);
  transition: border-color var(--duration) var(--ease-out),
              box-shadow var(--duration) var(--ease-out);
}

.service-list li:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-sm);
}

.service-list li::before {
  content: '';
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 8px;
  background: var(--c-accent);
  border-radius: 50%;
}

/* ============================================================
   INFO BOX
   ============================================================ */
.info-box {
  padding: var(--sp-2xl);
  background: rgba(45, 90, 79, 0.04);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  margin: var(--sp-2xl) 0;
}

.info-box p {
  color: var(--c-text);
  margin-bottom: 0;
}

.info-box strong {
  color: var(--c-primary-dark);
}

.info-box-accent {
  border-left-color: var(--c-accent);
  background: rgba(201, 162, 39, 0.06);
}

/* ============================================================
   CONTACT SECTION
   ============================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
}

.contact-item {
  display: flex;
  gap: var(--sp-lg);
  align-items: flex-start;
}

.contact-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  background: rgba(45, 90, 79, 0.08);
  border-radius: var(--radius-md);
  font-size: 1.25rem;
}

.contact-item h3 {
  font-family: var(--f-body);
  font-size: var(--f-size-base);
  font-weight: var(--f-weight-medium);
  color: var(--c-text);
  margin-bottom: var(--sp-xs);
}

.contact-item p {
  font-size: var(--f-size-sm);
  color: var(--c-text-muted);
  margin-bottom: 0;
}

.contact-map {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  position: relative;
  background: var(--c-bg-alt);
}

.contact-map iframe {
  width: 100%;
  height: 400px;
  border: 0;
  display: block;
}

.contact-map img {
  width: 100%;
  height: auto;
  display: block;
}

.map-directions-link {
  display: block;
  text-align: center;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--c-primary-dark);
  color: #fff;
  font-size: var(--f-size-sm);
  font-weight: var(--f-weight-medium);
  transition: background var(--duration) var(--ease-out);
}

.map-directions-link:hover {
  background: var(--c-primary);
  color: #fff;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  font-size: var(--f-size-sm);
  color: var(--c-text-light);
  margin-bottom: var(--sp-lg);
  justify-content: center;
}

.breadcrumb a {
  color: var(--c-text-muted);
}

.breadcrumb a:hover {
  color: var(--c-primary);
}

.breadcrumb span {
  color: var(--c-text-light);
}

/* ============================================================
   CTA BANNER
   ============================================================ */
.cta-banner {
  position: relative;
  padding: var(--sp-4xl) 0;
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
  text-align: center;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(201, 162, 39, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-banner h2 {
  color: #fff;
  margin-bottom: var(--sp-md);
}

.cta-banner p {
  color: rgba(255,255,255,0.8);
  font-size: var(--f-size-lg);
  max-width: 500px;
  margin: 0 auto var(--sp-2xl);
}

.cta-banner .btn-primary {
  background: var(--c-accent);
  color: var(--c-primary-dark);
  box-shadow: 0 4px 14px rgba(201, 162, 39, 0.3);
}

.cta-banner .btn-primary:hover {
  background: var(--c-accent-light);
  box-shadow: 0 6px 20px rgba(201, 162, 39, 0.4);
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--c-primary-dark);
  color: rgba(255, 255, 255, 0.7);
  padding: var(--sp-4xl) 0 var(--sp-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--sp-3xl);
  padding-bottom: var(--sp-3xl);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: var(--sp-xl);
}

.footer-brand h3 {
  font-size: var(--f-size-xl);
  color: #fff;
  margin-bottom: var(--sp-md);
}

.footer-brand p {
  font-size: var(--f-size-sm);
  max-width: 360px;
}

.footer-col h4 {
  font-family: var(--f-body);
  font-size: var(--f-size-sm);
  font-weight: var(--f-weight-medium);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  margin-bottom: var(--sp-lg);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: var(--sp-sm);
}

.footer-col a {
  font-size: var(--f-size-sm);
  color: rgba(255,255,255,0.7);
  transition: color var(--duration) var(--ease-out);
}

.footer-col a:hover {
  color: var(--c-accent);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--f-size-sm);
  color: rgba(255,255,255,0.4);
}

/* ============================================================
   LIGHTBOX
   ============================================================ */
.lightbox-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--duration) var(--ease-out),
              visibility var(--duration) var(--ease-out);
  cursor: zoom-out;
}

.lightbox-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-backdrop img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: max(20px, env(safe-area-inset-top, 20px));
  right: 20px;
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lightbox-close:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background: rgba(255,255,255,0.15);
  border: none;
  border-radius: 50%;
  color: #fff;
  font-size: 1.25rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--duration) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.lightbox-nav:hover {
  background: rgba(255,255,255,0.2);
}

.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* Tablet */
@media (max-width: 1024px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: var(--sp-3xl);
    text-align: center;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-text {
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-gallery {
    justify-self: center;
    max-width: 440px;
  }

  .about-grid,
  .contact-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Mobile nav */
@media (max-width: 860px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: calc(100vh - var(--nav-height));
    height: calc(100dvh - var(--nav-height));
    z-index: 999;
    flex-direction: column;
    align-items: stretch;
    padding: var(--sp-xl);
    padding-bottom: calc(var(--sp-xl) + env(safe-area-inset-bottom, 0px));
    background: var(--c-bg);
    gap: var(--sp-xs);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: var(--f-size-lg);
    padding: var(--sp-md) var(--sp-lg);
  }

  .nav-cta {
    text-align: center;
    margin-left: 0 !important;
    margin-top: var(--sp-md);
  }
}

/* Mobile */
@media (max-width: 640px) {
  :root {
    --sp-4xl: 3rem;
    --sp-3xl: 2.5rem;
  }

  .container {
    padding: 0 var(--sp-lg);
  }

  h1 { font-size: var(--f-size-3xl); }
  h2 { font-size: var(--f-size-2xl); }

  .hero {
    min-height: auto;
    padding-top: calc(var(--nav-height) + var(--sp-xl));
    padding-bottom: var(--sp-2xl);
  }

  .hero-gallery {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    max-width: 100%;
  }

  .hero-gallery a:first-child {
    grid-row: auto;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    padding: var(--sp-xl);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    min-height: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: var(--sp-2xl);
  }

  .footer-bottom {
    flex-direction: column;
    gap: var(--sp-sm);
    text-align: center;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .contact-map iframe {
    height: 280px;
  }

  .page-header {
    padding: var(--sp-xl) 0;
  }

  .info-box {
    padding: var(--sp-lg);
  }

  .about-stats {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-md);
  }

  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }

  .lightbox-close {
    top: 12px;
    right: 12px;
  }

  .breadcrumb {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section-header {
    margin-bottom: var(--sp-2xl);
  }

  .map-directions-link {
    padding: var(--sp-md);
    font-size: var(--f-size-base);
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* Ultra-narrow (320px–374px) */
@media (max-width: 374px) {
  :root {
    --sp-4xl: 2.5rem;
    --sp-3xl: 2rem;
  }

  .container {
    padding: 0 var(--sp-md);
  }

  h1 { font-size: var(--f-size-2xl); }
  h2 { font-size: var(--f-size-xl); }

  .hero-gallery {
    grid-template-columns: 1fr;
    gap: var(--sp-sm);
  }

  .hero-badge {
    font-size: 0.75rem;
  }

  .nav-brand img {
    height: 36px;
  }

  .service-card {
    padding: var(--sp-lg);
  }

  .stat-item {
    padding: var(--sp-md);
  }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .service-list li {
    padding: var(--sp-md);
    font-size: var(--f-size-sm);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* Print */
@media print {
  .site-nav,
  .lightbox-backdrop,
  .nav-toggle {
    display: none !important;
  }

  .hero { min-height: auto; padding-top: var(--sp-xl); }

  body {
    background: #fff;
    color: #000;
    font-size: 12pt;
  }
}
