/*
Theme Name: Galeria Oryginalow
Theme URI: https://example.com/galeria-oryginalow
Author: Codex
Description: Lekki motyw WordPress z szablonem galerii opartym o oryginalne pliki i pobieranie ZIP.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
Text Domain: galeria-oryginalow
*/

:root {
  --bg: #efe7dc;
  --surface: rgba(255, 251, 245, 0.92);
  --surface-strong: #fffdf9;
  --text: #231c16;
  --muted: #6f665f;
  --accent: #a35a1f;
  --accent-dark: #7e4315;
  --border: rgba(35, 28, 22, 0.12);
  --shadow: 0 20px 45px rgba(67, 42, 20, 0.12);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --content-width: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Georgia, "Times New Roman", serif;
  background:
    radial-gradient(circle at top left, rgba(255, 255, 255, 0.88), transparent 32%),
    linear-gradient(135deg, #f5eee3 0%, #ede2d1 52%, #e4d2bd 100%);
  min-height: 100vh;
}

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

a {
  color: inherit;
}

.site-shell {
  width: min(calc(100% - 32px), var(--content-width));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.site-header,
.site-footer,
.entry-card,
.gallery-hero,
.gallery-empty {
  backdrop-filter: blur(14px);
}

.site-header {
  margin-bottom: 28px;
  padding: 24px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.site-description {
  margin: 8px 0 0;
  color: var(--muted);
  max-width: 60ch;
  line-height: 1.6;
}

.site-main {
  display: grid;
  gap: 28px;
}

.entry-card,
.gallery-hero,
.gallery-empty {
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.entry-title,
.gallery-title {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 0.98;
}

.entry-content,
.gallery-intro {
  margin-top: 18px;
  font-size: 1rem;
  line-height: 1.8;
}

.gallery-hero {
  display: grid;
  gap: 24px;
}

.gallery-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.gallery-eyebrow::before {
  content: "";
  width: 38px;
  height: 1px;
  background: currentColor;
}

.gallery-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.gallery-count,
.gallery-help,
.gallery-caption,
.gallery-file {
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-1px);
}

.button-primary {
  color: #fffdf9;
  background: var(--accent);
}

.button-primary:hover,
.button-primary:focus-visible {
  background: var(--accent-dark);
}

.button-secondary {
  color: #fffdf9;
  background: rgba(35, 28, 22, 0.8);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  background: rgba(35, 28, 22, 0.92);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  min-height: 320px;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  box-shadow: 0 18px 34px rgba(47, 28, 13, 0.18);
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.gallery-card:hover img,
.gallery-card:focus-within img {
  transform: scale(1.03);
}

.gallery-overlay {
  position: absolute;
  inset: auto 0 0;
  display: grid;
  gap: 14px;
  padding: 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(25, 20, 15, 0.22) 18%, rgba(25, 20, 15, 0.92) 100%);
  color: #fffdf9;
  transform: translateY(12px);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.gallery-card:hover .gallery-overlay,
.gallery-card:focus-within .gallery-overlay {
  transform: translateY(0);
  opacity: 1;
}

.gallery-file {
  margin: 0;
  color: #fffdf9;
  font-weight: 700;
}

.gallery-caption {
  margin: 6px 0 0;
  color: rgba(255, 253, 249, 0.82);
  line-height: 1.55;
}

.site-footer {
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-footer p {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 720px) {
  .site-shell {
    width: min(calc(100% - 20px), var(--content-width));
    padding-top: 14px;
  }

  .site-header,
  .entry-card,
  .gallery-hero,
  .gallery-empty,
  .site-footer {
    padding: 22px;
    border-radius: 22px;
  }

  .gallery-card {
    min-height: 280px;
  }

  .button {
    width: 100%;
  }
}

@media (hover: none) {
  .gallery-overlay {
    opacity: 1;
    transform: translateY(0);
  }
}
