/*
Theme Name: Mariusz Wojtas – Stolarz
Theme URI: https://mariuszwojtas.pl
Author: Mariusz Wojtas
Author URI: https://mariuszwojtas.pl
Description: Elegancki motyw dla stolarza – domki drewniane, schody, drzwi i obróbki drewniane. Zoptymalizowany pod SEO, w pełni responsywny.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mariusz-wojtas
Tags: portfolio, photography, custom-colors, custom-logo, full-width-template, one-column, two-columns, three-columns, responsive-layout
*/

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* ---------- CSS Variables ---------- */
:root {
  --background:   #f9f7f4;
  --foreground:   #2a2118;
  --card:         #f4f1ec;
  --secondary:    #ede9e1;
  --muted:        #ede9e1;
  --muted-fg:     #887e6e;
  --accent:       #8c6239;
  --accent-fg:    #f9f7f4;
  --border:       #e2dbd0;
  --wood:         #8c6239;
  --cream:        #ede9e1;

  --font-sans:    'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-display: 'Playfair Display', ui-serif, Georgia, serif;

  --radius:       0.25rem;
  --max-w:        1200px;
  --header-h:     80px;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  font-size: 16px;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

/* ---------- Utility ---------- */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
}

@media (min-width: 1024px) {
  .container { padding-inline: 2.5rem; }
}

.section-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: var(--accent);
  display: block;
  margin-bottom: 1.25rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  border: none;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--foreground);
  color: var(--background);
}
.btn-primary:hover { background: var(--accent); }

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.4);
}
.btn-outline:hover { background: rgba(255,255,255,0.1); }

.btn-accent {
  background: var(--foreground);
  color: var(--background);
}
.btn-accent:hover { background: var(--accent); }

/* ---------- Fade-in animation ---------- */
.fade-in-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   HEADER
   ============================================================ */
#site-header {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}

#site-header.scrolled {
  background: rgba(249,247,244,0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-color: var(--border);
}

#site-header .header-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: 1.5rem;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

@media (min-width: 1024px) {
  #site-header .header-inner { padding-inline: 2.5rem; }
}

.site-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  letter-spacing: -0.02em;
  color: var(--foreground);
  line-height: 1;
}
.site-logo span { color: var(--accent); }

.main-nav { display: none; align-items: center; gap: 2.5rem; }

@media (min-width: 768px) {
  .main-nav { display: flex; }
}

.main-nav a {
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  color: rgba(42,33,24,0.7);
  transition: color 0.2s;
}
.main-nav a:hover,
.main-nav a.current-menu-item { color: var(--accent); }

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--foreground);
}

@media (min-width: 768px) {
  .nav-toggle { display: none; }
}

.mobile-nav {
  display: none;
  background: var(--background);
  border-top: 1px solid var(--border);
}
.mobile-nav.is-open { display: block; }

.mobile-nav nav {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 1rem 1.5rem;
  display: flex;
  flex-direction: column;
}

.mobile-nav a {
  padding: 0.75rem 0;
  font-size: 1rem;
  color: rgba(42,33,24,0.85);
  border-bottom: 1px solid var(--border);
}
.mobile-nav a:last-child { border-bottom: none; }
.mobile-nav a:hover,
.mobile-nav a.current-menu-item { color: var(--accent); }

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: calc(-1 * var(--header-h));
}

.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.35) 50%, rgba(0,0,0,0.70) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  text-align: center;
  padding-inline: 1.5rem;
  max-width: 900px;
}

.hero-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.35em;
  color: rgba(255,255,255,0.7);
  margin-bottom: 1.5rem;
  display: block;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5.5rem);
  color: #fff;
  line-height: 1.05;
}

.hero-subtitle {
  margin-top: 1rem;
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  font-weight: 300;
  color: rgba(255,255,255,0.85);
  letter-spacing: 0.05em;
}

.hero-text {
  margin-top: 2rem;
  max-width: 560px;
  margin-inline: auto;
  color: rgba(255,255,255,0.75);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-buttons {
  margin-top: 2.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

/* ============================================================
   ABOUT SECTION
   ============================================================ */
.about-section {
  padding-block: 6rem;
}

@media (min-width: 768px) {
  .about-section { padding-block: 9rem; }
}

.about-grid {
  display: grid;
  gap: 3rem;
  align-items: center;
}

@media (min-width: 768px) {
  .about-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

.about-text { order: 2; }

@media (min-width: 768px) {
  .about-text { order: 1; }
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--foreground);
  margin-top: 0.5rem;
}

.about-body {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  color: rgba(42,33,24,0.75);
  line-height: 1.75;
}

.about-divider {
  margin-top: 2.5rem;
  width: 4rem;
  height: 1px;
  background: var(--accent);
}

.about-image-wrap {
  order: 1;
  position: relative;
}

@media (min-width: 768px) {
  .about-image-wrap { order: 2; }
}

.about-image-inner {
  aspect-ratio: 4/5;
  overflow: hidden;
}

.about-image-inner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-deco {
  display: none;
  position: absolute;
  bottom: -1.5rem;
  left: -1.5rem;
  width: 6rem;
  height: 6rem;
  border: 1px solid var(--accent);
}

@media (min-width: 768px) {
  .about-deco { display: block; }
}

/* ============================================================
   SERVICES SECTION
   ============================================================ */
.services-section {
  padding-block: 6rem;
  background: rgba(237,233,225,0.5);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 768px) {
  .services-section { padding-block: 9rem; }
}

.services-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 4rem;
}

.services-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  color: var(--foreground);
}

.services-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .services-grid { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
}

.service-card {
  background: var(--background);
  padding: 2.5rem;
  border: 1px solid var(--border);
  transition: border-color 0.4s;
}

.service-card:hover { border-color: var(--accent); }

.service-icon {
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.service-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.service-text {
  font-size: 0.9rem;
  color: rgba(42,33,24,0.7);
  line-height: 1.75;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
  padding-block: 6rem;
  text-align: center;
}

@media (min-width: 768px) {
  .cta-section { padding-block: 9rem; }
}

.cta-heading {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5vw, 4rem);
  color: var(--foreground);
  max-width: 800px;
  margin-inline: auto;
}

.cta-text {
  margin-top: 1.5rem;
  max-width: 480px;
  margin-inline: auto;
  color: rgba(42,33,24,0.7);
}

.cta-button-wrap {
  margin-top: 2.5rem;
}

/* ============================================================
   GALLERY PAGE
   ============================================================ */
.gallery-header {
  padding-top: 4rem;
  padding-bottom: 3rem;
  text-align: center;
}

@media (min-width: 768px) {
  .gallery-header { padding-top: 6rem; }
}

.gallery-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--foreground);
}

.gallery-subtitle {
  margin-top: 1.5rem;
  max-width: 560px;
  margin-inline: auto;
  color: rgba(42,33,24,0.7);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(1, 1fr);
  gap: 1rem;
  padding-bottom: 6rem;
}

@media (min-width: 640px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--secondary);
  aspect-ratio: 4/3;
  cursor: pointer;
  border: none;
  padding: 0;
  display: block;
  width: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease;
}

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

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  transition: background 0.3s;
}

.gallery-item:hover .gallery-item-overlay { background: rgba(0,0,0,0.2); }

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox.is-open { display: flex; }

.lightbox-img {
  max-height: 85vh;
  max-width: 90vw;
  object-fit: contain;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: none;
  border: none;
  color: rgba(255,255,255,0.8);
  cursor: pointer;
  padding: 0.75rem;
  transition: color 0.2s;
  line-height: 1;
}
.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { color: #fff; }

.lightbox-close { top: 1.5rem; right: 1.5rem; }
.lightbox-prev  { left: 1rem; top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 1rem; top: 50%; transform: translateY(-50%); }

@media (min-width: 768px) {
  .lightbox-prev { left: 2rem; }
  .lightbox-next { right: 2rem; }
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-section {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .contact-section { padding-top: 6rem; padding-bottom: 8rem; }
}

.contact-header {
  text-align: center;
  margin-bottom: 4rem;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4rem);
  color: var(--foreground);
}

.contact-subtitle {
  margin-top: 1.5rem;
  max-width: 560px;
  margin-inline: auto;
  color: rgba(42,33,24,0.7);
}

.contact-grid {
  display: grid;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .contact-grid { grid-template-columns: 2fr 3fr; gap: 4rem; }
}

.contact-info-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted-fg);
  margin-bottom: 0.75rem;
  display: block;
}

.contact-info-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--foreground);
  font-size: 1rem;
  margin-bottom: 2rem;
}
.contact-info-item svg { color: var(--accent); flex-shrink: 0; }

.contact-info-item a:hover { color: var(--accent); }

.contact-divider {
  width: 4rem;
  height: 1px;
  background: var(--accent);
  margin-bottom: 1.5rem;
}

.contact-note {
  font-size: 0.875rem;
  color: rgba(42,33,24,0.6);
  line-height: 1.7;
}

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.5rem; }

.form-group label {
  display: block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted-fg);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  outline: none;
  padding: 0.75rem 0;
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: border-color 0.3s;
  border-radius: 0;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus { border-color: var(--accent); }

.form-group textarea { resize: none; }

.form-success {
  display: none;
  border: 1px solid rgba(140,98,57,0.4);
  background: rgba(237,233,225,0.5);
  padding: 2.5rem;
  text-align: center;
}

.form-success.is-shown { display: block; }
.form-success-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--foreground);
  margin-top: 1rem;
}
.form-success-text {
  margin-top: 0.75rem;
  font-size: 0.875rem;
  color: rgba(42,33,24,0.7);
}
.form-success-back {
  margin-top: 1.5rem;
  font-size: 0.875rem;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
}
.form-success-back:hover { color: var(--foreground); }

/* ============================================================
   FOOTER
   ============================================================ */
#site-footer {
  border-top: 1px solid var(--border);
  background: rgba(237,233,225,0.4);
}

.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 2.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.75rem;
  color: var(--muted-fg);
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    padding-inline: 2.5rem;
  }
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.footer-links a:hover { color: var(--foreground); }

/* ============================================================
   PRIVACY PAGE
   ============================================================ */
.privacy-section {
  padding-top: 4rem;
  padding-bottom: 6rem;
}

@media (min-width: 768px) {
  .privacy-section { padding-top: 6rem; }
}

.privacy-section h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  margin-bottom: 2rem;
}

.privacy-section h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.privacy-section p,
.privacy-section ul {
  color: rgba(42,33,24,0.75);
  line-height: 1.75;
  margin-bottom: 1rem;
}

.privacy-section ul { padding-left: 1.5rem; }

/* ============================================================
   ADMIN — Gallery order notice
   ============================================================ */
.mw-gallery-notice {
  padding: 0.75rem 1rem;
  background: #fff3cd;
  border-left: 4px solid var(--accent, #8c6239);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

/* ============================================================
   WP ADMIN BAR FIX
   ============================================================ */
.admin-bar #site-header { top: 32px; }

@media screen and (max-width: 782px) {
  .admin-bar #site-header { top: 46px; }
}

/* ============================================================
   SCREEN READER
   ============================================================ */
.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;
}

/* ============================================================
   REALIZACJE — bloki z tytułem i wieloma zdjęciami
   ============================================================ */
.realizacja-block {
  margin-bottom: 4rem;
  padding-bottom: 4rem;
  border-bottom: 1px solid var(--border);
}

.realizacja-block:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.realizacja-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.realizacja-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--foreground);
  margin: 0;
}

.realizacja-count {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted-fg);
}

.realizacja-desc {
  font-size: 0.9rem;
  color: rgba(42,33,24,0.65);
  line-height: 1.7;
  margin-bottom: 1.25rem;
  max-width: 640px;
}

.realizacja-grid {
  margin-top: 1rem;
}

/* Lightbox counter */
.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  letter-spacing: 0.1em;
  pointer-events: none;
}
