/* --- Variables --- */
:root {
  --color-bg: #fafaf9;
  --color-surface: #ffffff;
  --color-text: #1c1917;
  --color-text-muted: #57534e;
  --color-accent: #1e3a5f;
  --color-accent-light: #2d4a6f;
  --color-border: #e7e5e4;
  --color-overlay: rgba(28, 25, 23, 0.6);
  --font-sans: 'Lato', system-ui, sans-serif;
  --font-display: 'Lato', system-ui, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 24px 48px rgba(0, 0, 0, 0.08);
  --transition: 0.2s ease;
}

/* --- Reset & base --- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Skip link --- */
.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--color-accent);
  color: #fff;
  border-radius: var(--radius);
  font-weight: 600;
  transition: top var(--transition);
}
.skip-link:focus { top: 1rem; outline: 2px solid var(--color-accent); outline-offset: 2px; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Header --- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.logo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
}
.logo:hover { text-decoration: none; color: var(--color-accent); }
.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}
.nav a {
  color: var(--color-text);
  font-weight: 500;
}
.nav a:hover { color: var(--color-accent); }
.lang-switcher {
  display: flex;
  gap: 0.25rem;
}
.lang-btn {
  padding: 0.35rem 0.6rem;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.lang-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}
.lang-btn.active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
}
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-text);
}

@media (max-width: 768px) {
  .nav { display: none; }
  .nav.is-open {
    display: flex;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    flex-direction: column;
    padding: 1.5rem;
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    gap: 1rem;
  }
  .menu-toggle { display: flex; }
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 50%, #3d5a80 100%);
  opacity: 0.92;
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("https://www.grafoto.pl/images/fotografia-nieruchomosci/2026/8.jpg") center/cover no-repeat;
  background-attachment: fixed;
  opacity: 0.35;
}
.hero-content {
  position: relative;
  z-index: 1;
  padding: 4rem 1.5rem;
}
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 1rem;
  line-height: 1.2;
}
.hero-subtitle {
  font-size: 1.15rem;
  color: rgba(255, 255, 255, 0.9);
  max-width: 520px;
  margin: 0 auto 2rem;
}
.btn {
  display: inline-block;
  padding: 0.9rem 2rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-primary {
  background: #fff;
  color: var(--color-accent);
}
.btn-primary:hover { text-decoration: none; }

/* --- Sections --- */
.intro, .gallery, .contact, .local-seo, .faq, .blog {
  padding: 4rem 0;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 1.5rem;
  text-align: center;
}
.intro-text {
  max-width: 680px;
  margin: 0 auto;
  text-align: center;
  color: var(--color-text-muted);
  font-size: 1.05rem;
}

/* --- Local SEO --- */
.local-seo { background: var(--color-surface); }
.local-seo-content {
  max-width: 800px;
  margin: 0 auto;
}
.local-seo-content p {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  line-height: 1.7;
  margin: 0 0 1.25rem;
}
.local-seo-content p:last-child { margin-bottom: 0; }

/* --- Gallery --- */
.gallery { background: var(--color-surface); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-top: 2rem;
  transition: max-height 0.4s ease;
}
.gallery-grid--collapsed {
  max-height: 480px;
  overflow: hidden;
}
.gallery-grid--expanded {
  max-height: none;
}
.gallery-expand-wrap {
  text-align: center;
  margin: 1.5rem 0 0;
}
.gallery-expand-wrap .btn { min-width: 200px; }
.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent);
}
.btn-outline:hover { background: var(--color-accent); color: #fff; text-decoration: none; }
.gallery-item { margin: 0; }
.gallery-link {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.gallery-link:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
}
.gallery-link img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}
.lightbox[hidden] { display: none !important; }
.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 95vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4);
}
.lightbox-counter {
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  z-index: 3;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
}
.lightbox-close { top: 1.5rem; right: 1.5rem; font-size: 2rem; line-height: 1; }
.lightbox-prev { left: 1.5rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 1.5rem; top: 50%; transform: translateY(-50%); }
@media (max-width: 768px) {
  .lightbox-prev { left: 0.5rem; width: 40px; height: 40px; }
  .lightbox-next { right: 0.5rem; width: 40px; height: 40px; }
  .lightbox-close { top: 0.75rem; right: 0.75rem; width: 40px; height: 40px; }
}

/* --- FAQ --- */
.faq { background: var(--color-bg); }
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-surface);
  overflow: hidden;
}
.faq-question {
  padding: 1.1rem 1.25rem;
  font-weight: 600;
  font-size: 1.05rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.faq-question::-webkit-details-marker { display: none; }
.faq-question::after {
  content: '+';
  font-size: 1.25rem;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-left: 0.5rem;
}
.faq-item[open] .faq-question::after { content: '−'; }
.faq-answer {
  padding: 0 1.25rem 1.25rem;
}
.faq-answer p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.7;
  font-size: 0.98rem;
}

/* --- Blog --- */
.blog { background: var(--color-surface); }
.blog-intro {
  text-align: center;
  color: var(--color-text-muted);
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-size: 1.05rem;
}
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}
.blog-card {
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-bg);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.blog-card--more { display: none; }
.blog-grid.is-expanded .blog-card--more { display: block; }
.blog-card-cover {
  margin: 0;
  aspect-ratio: 16/10;
  overflow: hidden;
  background: var(--color-border);
}
.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card .blog-card-title,
.blog-card .blog-card-excerpt { padding: 0 1.25rem; }
.blog-card .blog-card-title { padding-top: 1rem; margin: 0 0 0.5rem; }
.blog-card .blog-card-excerpt { padding-bottom: 1.25rem; margin: 0; }
.blog-card { cursor: pointer; }
.blog-card:hover {
  box-shadow: var(--shadow);
  border-color: var(--color-accent);
}
.blog-expand-wrap {
  text-align: center;
  margin: 1.5rem 0 0;
}
.blog-expand-wrap .btn { min-width: 200px; }
.blog-expand-wrap.is-hidden { display: none; }
.blog-modal-box { max-width: 680px; }
.blog-modal-body { padding: 0 1.5rem 1.5rem; }
.blog-modal-figure { margin: 0 0 1.25rem; }
.blog-modal-figure img { width: 100%; border-radius: var(--radius); }
.blog-modal-caption { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--color-text-muted); text-align: center; }
.blog-modal-content { font-size: 1rem; line-height: 1.75; color: var(--color-text-muted); }
.blog-modal-content p { margin: 0 0 1rem; }
.blog-modal-content p:last-child { margin-bottom: 0; }
.blog-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  color: var(--color-text);
}
.blog-card-excerpt {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* --- Contact --- */
.contact { background: var(--color-bg); }
.contact-intro {
  text-align: center;
  color: var(--color-text-muted);
  margin: 0 0 2rem;
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 2rem;
}
.contact-form {
  max-width: 520px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.9rem 1rem;
  font-family: var(--font-sans);
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  transition: border-color var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-accent);
}
.contact-form textarea { resize: vertical; min-height: 120px; }
.form-rodo {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}
.link-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: var(--color-accent);
  cursor: pointer;
  text-decoration: underline;
}
.link-btn:hover { text-decoration: none; }
.btn-submit { align-self: flex-start; margin-top: 0.5rem; }
.form-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}
.form-note a { font-weight: 500; }
.form-phone {
  text-align: center;
  margin-top: 0.5rem;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.form-phone a { font-weight: 600; color: var(--color-accent); }
.form-phone a:hover { text-decoration: none; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* --- Footer --- */
.footer {
  padding: 2rem 0;
  border-top: 1px solid var(--color-border);
  background: #f5f5f5;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  text-align: center;
}
.footer-copy { margin: 0; font-size: 0.9rem; color: var(--color-text-muted); }
.footer-links { margin: 0; }
.footer-link { color: var(--color-text); font-weight: 600; }
.footer-powered { margin: 0.5rem 0 0; font-size: 0.9rem; color: var(--color-text-muted); }
.footer-grafoto-logo { display: inline-block; margin: 0.25rem 0; }
.footer-grafoto-logo:hover { text-decoration: none; opacity: 0.9; }
.footer-grafoto-logo img { width: 180px; height: auto; }
.footer-grafoto-tags { margin: 0.25rem 0 0; font-size: 0.7rem; color: #999; line-height: 1.4; }
.logo img { height: 40px; width: auto; }
.logo:hover { text-decoration: none; }
.logo:hover img { opacity: 0.85; }

/* --- Cookie banner --- */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 1rem 1.5rem;
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
}
.cookie-banner[hidden] { display: none !important; }
.cookie-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.cookie-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text);
  flex: 1;
  min-width: 260px;
}
.cookie-text .link-btn { font-size: inherit; }
.cookie-actions { flex-shrink: 0; }
.btn-sm { padding: 0.6rem 1.25rem; font-size: 0.9rem; }

/* --- Modal (privacy) --- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal[hidden] { display: none !important; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  cursor: pointer;
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow: auto;
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 1.5rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
}
.modal-title { margin: 0; font-family: var(--font-display); font-size: 1.5rem; }
.modal-close {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--color-text-muted);
  transition: background var(--transition), color var(--transition);
}
.modal-close:hover { background: var(--color-border); color: var(--color-text); }
.modal-close::after { content: '×'; }
.modal-body { padding: 1.5rem; }
.privacy-address {
  font-style: normal;
  margin: 1rem 0;
  line-height: 1.7;
}
.privacy-address a { font-weight: 500; }
.modal-body p { margin: 0 0 1rem; color: var(--color-text-muted); }
.modal-body p:last-child { margin-bottom: 0; }

/* --- Mobile / responsive --- */
@media (max-width: 768px) {
  .container { padding: 0 1rem; }
  .hero-bg::after { background-attachment: scroll; }
  .hero { min-height: 55vh; }
  .hero-content { padding: 2.5rem 1rem; }
  .hero-title { font-size: 1.75rem; }
  .hero-subtitle { font-size: 1rem; }
  .intro, .gallery, .contact, .local-seo, .faq, .blog { padding: 2.5rem 0; }
  .section-title { font-size: 1.5rem; margin-bottom: 1rem; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  .gallery-grid--collapsed { max-height: 380px; }
  .gallery-link img { aspect-ratio: 4/3; }
  .blog-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .blog-intro { margin-bottom: 1.5rem; font-size: 0.95rem; }
  .blog-card-cover { aspect-ratio: 16/10; }
  .contact-form { padding: 0; }
  .contact-intro { margin-bottom: 1.5rem; font-size: 0.95rem; }
  .btn { padding: 0.85rem 1.5rem; min-height: 44px; }
  .btn-submit { width: 100%; }
  .footer { padding: 1.5rem 0.75rem; }
  .footer-grafoto-logo img { width: 140px; }
  .footer-grafoto-tags { font-size: 0.65rem; }
  .logo img { height: 36px; }
  .header-inner { height: 64px; padding: 0 1rem; }
  .nav.is-open { top: 64px; padding: 1rem; }
  .modal { padding: 0.75rem; align-items: flex-start; padding-top: 2rem; }
  .modal-box { max-height: 85vh; }
  .modal-header { padding: 1rem 1rem 0.5rem; }
  .modal-title { font-size: 1.25rem; }
  .blog-modal-box { max-width: 100%; }
  .blog-modal-body { padding: 0 1rem 1rem; }
  .faq-question { padding: 1rem; font-size: 0.98rem; }
  .local-seo-content p { font-size: 0.98rem; }
  .gallery-expand-wrap .btn,
  .blog-expand-wrap .btn { width: 100%; max-width: 280px; min-height: 44px; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid--collapsed { max-height: 720px; }
  .hero { min-height: 50vh; }
  .hero-title { font-size: 1.5rem; }
}
