/*
Theme Name: Glazurnik PP
Theme URI: https://glazurnikpp.pl
Author: Piotr Pisarczyk
Description: Elegancki motyw dla usług glazurniczych – marmur w tle, glassmorphism, realizacje z automatycznym stronicowaniem, pełne SEO (Schema, Open Graph, mapa obrazów).
Version: 2.2.5
Requires at least: 5.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: glazurnik-pp
*/

:root {
  --green: #5fa83a;
  --orange: #e8792b;
  --ink: #2b3142;
  --muted: #646b7d;
  --white: #fff;
  --serif: "DM Serif Display", Georgia, serif;
  --sans: "Montserrat", system-ui, sans-serif;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: var(--sans); color: var(--white); background: #15171d; line-height: 1.6; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg img { width: 100%; height: 100%; object-fit: cover; animation: bg-drift 36s ease-in-out infinite; }
.bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,22,30,.55), rgba(16,18,26,.8)); }

.glass { background: rgba(255,255,255,.1); backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 20px 50px -20px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.25); }
.glass-strong { background: rgba(255,255,255,.82); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255,255,255,.6); box-shadow: 0 25px 60px -20px rgba(0,0,0,.7); color: var(--ink); }

.container { max-width: 1040px; margin: 0 auto; }
.container-wide { max-width: 1180px; margin: 0 auto; }
section { padding: 80px 20px; }

/* Nav */
.nav { position: sticky; top: 12px; z-index: 20; margin: 12px; display: flex; align-items: center; justify-content: space-between; border-radius: 999px; padding: 8px 16px; }
@media (min-width: 1064px) { .nav { max-width: 1024px; margin: 12px auto 0; } }
.nav-brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.15rem; }
.nav-brand img { height: 32px; width: 48px; object-fit: contain; }

.btn { display: inline-block; border-radius: 999px; padding: 12px 28px; font-weight: 600; transition: .25s; }
.btn-primary { background: var(--green); color: #fff; box-shadow: 0 10px 25px -10px rgba(0,0,0,.5); }
.btn-primary:hover { opacity: .9; }
.btn-sm { padding: 8px 16px; font-size: .875rem; }
.btn-outline { border: 2px solid var(--orange); color: var(--orange); }
.btn-outline:hover { background: var(--orange); color: #fff; }
.btn-outline-green { border: 2px solid var(--green); font-size: .875rem; }
.btn-outline-green:hover { background: var(--green); }

/* Hero */
.hero { min-height: 88vh; display: flex; align-items: center; justify-content: center; padding: 64px 20px; }
.hero-card { width: 100%; max-width: 576px; border-radius: 28px; padding: 48px 28px; text-align: center; }
.hero-card .logo { height: 96px; width: 144px; margin: 0 auto; object-fit: contain; }
.hero h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.8rem, 6vw, 3.75rem); line-height: 1.15; margin-top: 16px; text-transform: uppercase; letter-spacing: .04em; }
.kicker { font-size: .75rem; font-weight: 600; letter-spacing: .4em; text-transform: uppercase; }
.hero p.lead { color: var(--muted); max-width: 384px; margin: 24px auto 0; }
.hero-actions { margin-top: 32px; display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 640px) { .hero-actions { flex-direction: row; justify-content: center; } }

/* Headings */
.heading { text-align: center; }
.heading .kicker { color: var(--orange); }
.heading h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(2.2rem, 4.5vw, 3rem); margin-top: 12px; }
.heading .bar { display: flex; gap: 4px; width: 80px; margin: 16px auto 0; }
.heading .bar span { height: 2px; flex: 1; background: var(--green); }
.heading .bar span + span { background: var(--orange); }

.card { border-radius: 24px; padding: 32px; }
.about { margin-top: 40px; text-align: center; }
.about p { opacity: .9; }
.about p + p { margin-top: 16px; opacity: .8; }
@media (min-width: 768px) { .about { padding: 48px; } }

.grid { display: grid; gap: 20px; margin-top: 48px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 768px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.checks { list-style: none; margin-top: 24px; font-size: .9rem; opacity: .85; }
.checks li { display: flex; gap: 12px; margin-top: 8px; }
.checks li::before { content: "✔"; color: var(--green); }
.cert { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 100%; }
.cert img { max-height: 260px; border-radius: 12px; margin-bottom: 12px; }
.cert h3 { font-family: var(--serif); font-weight: 400; font-size: 1.5rem; margin-top: 16px; }
strong.accent { color: var(--orange); }

.service { border-radius: 18px; padding: 28px; height: 100%; transition: transform .3s, box-shadow .3s; }
.service:hover { transform: translateY(-6px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.7); }
.service .num { font-family: var(--serif); font-size: 1.9rem; color: var(--orange); }
.service h3 { margin-top: 12px; font-size: 1.1rem; }
.service p { margin-top: 8px; font-size: .9rem; opacity: .75; }

.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 48px; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
.gallery .item { border-radius: 18px; padding: 6px; overflow: hidden; transition: transform .3s; }
.gallery .item:hover { transform: translateY(-6px); }
.gallery img { aspect-ratio: 3/4; width: 100%; object-fit: cover; border-radius: 12px; transition: transform .7s; }
.gallery .item:hover img { transform: scale(1.1); }

.rating { max-width: 320px; margin: 40px auto 0; border-radius: 18px; padding: 20px 24px; display: flex; flex-direction: column; align-items: center; }
.rating b { font-size: 2.25rem; }
.stars { color: var(--orange); letter-spacing: .15em; }
.review { border-radius: 18px; padding: 24px; height: 100%; }
.review p { margin-top: 12px; font-size: .9rem; opacity: .85; }
.review .author { margin-top: 16px; font-weight: 600; opacity: 1; }
.center { text-align: center; margin-top: 32px; }

.contact { max-width: 448px; margin: 0 auto; border-radius: 28px; padding: 48px 32px; text-align: center; }
.contact .logo { height: 64px; width: 96px; margin: 0 auto; object-fit: contain; }
.contact h2 { font-family: var(--serif); font-weight: 400; font-size: 2.25rem; margin-top: 16px; }
.contact .name { color: var(--muted); margin-top: 8px; }
.contact .phone { display: inline-block; margin-top: 16px; font-size: 1.9rem; font-weight: 700; border-radius: 12px; }
.contact hr { border: 0; height: 1px; background: #ddd; margin: 24px 0; }
.contact .kicker { letter-spacing: .3em; }

.site-footer { padding-bottom: 32px; text-align: center; font-size: .75rem; opacity: .6; }

/* Animations */
@keyframes reveal-up { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes hero-in { from { opacity: 0; transform: translateY(26px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes bg-drift { 0%,100% { transform: scale(1.08); } 50% { transform: scale(1.16) translate(-1.5%,-1.2%); } }
@keyframes float-soft { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(232,121,43,.45); } 70% { box-shadow: 0 0 0 14px rgba(232,121,43,0); } 100% { box-shadow: 0 0 0 0 rgba(232,121,43,0); } }
@keyframes shine-sweep { from { transform: translateX(-130%) skewX(-18deg); } to { transform: translateX(240%) skewX(-18deg); } }

.reveal { opacity: 0; }
.reveal.is-in { animation: reveal-up .9s cubic-bezier(.22,.61,.36,1) both; }
.hero-in { opacity: 0; animation: hero-in 1s cubic-bezier(.22,.61,.36,1) .15s both; }
.float-soft { animation: float-soft 5s ease-in-out infinite; }
.btn-pulse { animation: pulse-ring 2.6s ease-out infinite; }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.14), transparent); transform: translateX(-130%) skewX(-18deg); pointer-events: none; }
.shine:hover::after { animation: shine-sweep .9s ease-out; }
.no-js .reveal { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .hero-in, .bg img, .float-soft, .btn-pulse, .shine::after { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ================= v2: nav menu, pages, mobile ================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 99; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.h1-sub { display: block; font-family: var(--sans); font-size: .75rem; margin-top: 10px; color: var(--ink); }
.nav-menu { display: flex; align-items: center; gap: 20px; }
.nav-links { list-style: none; display: flex; gap: 18px; font-size: .85rem; font-weight: 500; }
.nav-links a { opacity: .85; transition: opacity .2s, color .2s; }
.nav-links a:hover { opacity: 1; color: var(--orange); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; padding: 10px 8px; cursor: pointer; flex-direction: column; justify-content: space-between; }
.nav-toggle span { display: block; height: 2px; background: #fff; border-radius: 2px; transition: .3s; }
.nav.open .nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav.open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav.open .nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

figure { margin: 0; }
.gallery .item { display: block; position: relative; }
.gallery figcaption { position: absolute; left: 6px; right: 6px; bottom: 6px; padding: 28px 14px 12px; border-radius: 0 0 12px 12px; background: linear-gradient(transparent, rgba(10,12,18,.85)); font-size: .85rem; line-height: 1.3; }
.gallery figcaption strong { display: block; font-weight: 600; }
.gallery figcaption span { display: block; font-size: .72rem; opacity: .75; margin-top: 2px; }

.page-top { padding-top: 48px; }
.page-top h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.15; margin-top: 12px; }
.intro { max-width: 620px; margin: 18px auto 0; opacity: .8; }
.crumbs { font-size: .78rem; opacity: .7; margin-bottom: 24px; }
.crumbs a:hover { color: var(--orange); }
.crumbs span { margin: 0 6px; }
.single-hero { margin-top: 40px; border-radius: 22px; padding: 6px; overflow: hidden; }
.single-hero img { width: 100%; height: auto; border-radius: 16px; }
.entry { margin-top: 24px; line-height: 1.75; }
.entry > * + * { margin-top: 1em; }
.entry h2, .entry h3 { font-family: var(--serif); font-weight: 400; }
.entry img { border-radius: 12px; height: auto; }
.entry .wp-block-gallery, .entry .gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 768px) { .entry .wp-block-gallery { grid-template-columns: repeat(3, 1fr); } }
.entry .wp-block-gallery figure, .entry .wp-block-image { margin: 0; }
.entry .wp-block-gallery img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.single-nav { display: flex; flex-wrap: wrap; gap: 12px 20px; justify-content: center; align-items: center; font-size: .85rem; }
.single-nav > a:not(.btn) { opacity: .75; }

.pagination { margin-top: 40px; }
.pagination .nav-links { justify-content: center; flex-wrap: wrap; gap: 8px; }
.pagination .page-numbers { display: inline-flex; min-width: 44px; height: 44px; padding: 0 14px; align-items: center; justify-content: center; border-radius: 999px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); font-weight: 600; }
.pagination .page-numbers.current { background: var(--green); border-color: var(--green); }
.pagination a.page-numbers:hover { border-color: var(--orange); color: var(--orange); }

.call-fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 30; display: none; align-items: center; gap: 8px; background: var(--green); color: #fff; padding: 14px 20px; border-radius: 999px; font-weight: 700; box-shadow: 0 14px 30px -10px rgba(0,0,0,.6); transform: translateY(120px); transition: transform .35s cubic-bezier(.22,.61,.36,1); animation: pulse-ring 2.6s ease-out infinite; }
.call-fab.show { transform: none; }

.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(8,9,12,.92); display: flex; align-items: center; justify-content: center; padding: 16px; cursor: zoom-out; }
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 100%; max-height: 90vh; border-radius: 12px; }
.lb-close { position: absolute; top: 12px; right: 16px; background: none; border: 0; color: #fff; font-size: 2.4rem; cursor: pointer; }

/* ---- Tablet & phone ---- */
@media (max-width: 900px) {
  .nav { border-radius: 22px; flex-wrap: wrap; padding: 6px 8px 6px 14px; }
  .nav-toggle { display: flex; }
  .nav-menu { display: none; width: 100%; flex-direction: column; align-items: stretch; gap: 8px; padding: 8px 4px 10px; }
  .nav.open .nav-menu { display: flex; animation: hero-in .35s ease both; }
  .nav-links { flex-direction: column; gap: 0; font-size: 1rem; }
  .nav-links a { display: block; padding: 12px 6px; border-bottom: 1px solid rgba(255,255,255,.12); }
  .nav-menu .btn { text-align: center; padding: 12px; }
  .call-fab { display: inline-flex; }
}
@media (max-width: 640px) {
  section { padding: 56px 16px; }
  .hero { min-height: calc(100svh - 80px); padding: 32px 14px 48px; }
  .hero-card { padding: 36px 20px; border-radius: 24px; }
  .hero-card .logo { height: 76px; width: 116px; }
  .hero h1 { font-size: clamp(2.2rem, 10vw, 2.8rem); }
  .hero p.lead { font-size: .95rem; margin-top: 18px; }
  .hero-actions .btn { width: 100%; text-align: center; padding: 14px 20px; }
  .heading h2 { font-size: clamp(1.9rem, 8vw, 2.4rem); }
  .grid { margin-top: 32px; gap: 14px; }
  .card { padding: 24px 20px; border-radius: 20px; }
  .about { margin-top: 28px; text-align: left; }
  .service { padding: 22px; }
  .gallery { gap: 10px; margin-top: 32px; }
  .gallery .item { padding: 4px; border-radius: 14px; }
  .gallery img { border-radius: 10px; }
  .gallery figcaption { left: 4px; right: 4px; bottom: 4px; padding: 22px 10px 8px; font-size: .75rem; }
  .gallery figcaption span { display: none; }
  .contact { padding: 36px 20px; }
  .contact .phone { font-size: 1.6rem; }
  .site-footer { padding-bottom: 96px; }
  .page-top { padding-top: 28px; }
  .bg img { animation: none; transform: scale(1.05); }
  .glass { backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
  .gallery .item:hover, .service:hover { transform: none; }
}
.site-footer p + p { margin-top: 6px; }
@media (prefers-reduced-motion: reduce) { .call-fab { animation: none; transition: none; } }

.site-footer .credit { margin-top: 10px; font-size: .7rem; opacity: .75; }
.site-footer .credit a:hover { color: var(--orange); }

@media (max-width: 400px) { .nav-brand { font-size: 1rem; } }

/* Realizacje – stałe proporcje zdjęć (też na telefonie) */
.gallery .item { aspect-ratio: 3/4; }
.gallery .item img, .gallery img { display: block; width: 100% !important; height: 100% !important; max-height: none; aspect-ratio: auto; object-fit: cover; }
.gallery .item > a { display: block; height: 100%; }
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr 1fr; gap: 10px; }
  .gallery .item { aspect-ratio: 4/5; }
}

/* Adres w kontakcie i stopce */
.contact .addr { margin-top: 14px; font-size: 1.05rem; line-height: 1.55; }
.contact .addr a { color: inherit; text-decoration: none; border-bottom: 1px dashed color-mix(in srgb, var(--orange) 60%, transparent); padding-bottom: 2px; transition: color .25s ease, border-color .25s ease; }
.contact .addr a:hover { color: var(--orange); border-color: var(--orange); }
.site-footer .faddr { margin-top: 6px; font-size: .82rem; opacity: .75; }
.site-footer .faddr a { color: inherit; text-decoration: none; }
.site-footer .faddr a:hover { color: var(--orange); opacity: 1; }
