/*
Theme Name: 7BA Brydż
Theme URI: https://7ba.pl
Author: OpenAI dla 7BA
Description: Lekki, responsywny motyw dla serwisu brydżowego 7ba.pl. Zaprojektowany pod rozbudowaną strukturę systemów, konwencji i artykułów.
Version: 1.0.0
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
Text Domain: sevenba
License: GPL-2.0-or-later
*/

:root {
  --ink: #13231f;
  --muted: #5f6f69;
  --paper: #fbfcf8;
  --panel: #ffffff;
  --line: #dfe7e2;
  --green: #0f5a46;
  --green-2: #0a4335;
  --green-soft: #e7f1ed;
  --gold: #c69a47;
  --red: #a52d39;
  --shadow: 0 18px 45px rgba(19, 35, 31, .10);
  --radius: 18px;
  --content: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.68;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--red); }
button, input, textarea, select { font: inherit; }
.container { width: min(calc(100% - 40px), var(--content)); margin-inline: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; inset: 12px auto auto 12px; width: auto; height: auto; padding: 10px 14px; clip: auto; z-index: 9999; background: #fff; }

.site-header { position: sticky; top: 0; z-index: 1000; background: rgba(251,252,248,.96); border-bottom: 1px solid rgba(15,90,70,.12); backdrop-filter: blur(12px); }
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: 78px; display: flex; align-items: center; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; text-decoration: none; color: var(--ink); }
.brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; color: #fff; background: linear-gradient(145deg, var(--green), var(--green-2)); box-shadow: 0 8px 22px rgba(15,90,70,.22); font-family: Georgia, serif; font-size: 24px; letter-spacing: -4px; padding-right: 4px; }
.brand-copy strong { display: block; font-size: 1.12rem; letter-spacing: .01em; }
.brand-copy span { display: block; color: var(--muted); font-size: .76rem; line-height: 1.2; }
.primary-nav { margin-left: auto; }
.primary-menu, .primary-menu ul { list-style: none; margin: 0; padding: 0; }
.primary-menu { display: flex; align-items: center; gap: 4px; }
.primary-menu > li { position: relative; }
.primary-menu a { display: flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 650; font-size: .91rem; }
.primary-menu > li > a:hover, .primary-menu > .current-menu-item > a, .primary-menu > .current-menu-ancestor > a { color: var(--green); background: var(--green-soft); }
.primary-menu ul { position: absolute; top: calc(100% + 8px); left: 0; min-width: 260px; max-width: min(360px, 90vw); max-height: 65vh; overflow-y: auto; visibility: hidden; opacity: 0; transform: translateY(6px); transition: .18s ease; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 8px; box-shadow: var(--shadow); }
.primary-menu ul ul { top: -8px; left: calc(100% + 8px); }
.primary-menu li:hover > ul, .primary-menu li:focus-within > ul { visibility: visible; opacity: 1; transform: translateY(0); }
.primary-menu ul a { min-height: 38px; padding: 8px 10px; font-weight: 550; line-height: 1.35; }
.primary-menu ul a:hover { background: var(--green-soft); }
.menu-toggle { display: none; margin-left: auto; border: 1px solid var(--line); background: #fff; color: var(--ink); border-radius: 11px; padding: 9px 12px; cursor: pointer; }

.hero { position: relative; overflow: hidden; background: radial-gradient(circle at 85% 20%, rgba(198,154,71,.24), transparent 32%), linear-gradient(145deg, #0c4939 0%, #12382f 55%, #11251f 100%); color: #fff; }
.hero::after { content: "♣  ♦  ♥  ♠"; position: absolute; right: -24px; bottom: -55px; font-family: Georgia, serif; font-size: clamp(72px, 12vw, 160px); letter-spacing: .02em; color: rgba(255,255,255,.055); white-space: nowrap; }
.hero-inner { position: relative; z-index: 1; min-height: 530px; display: grid; grid-template-columns: 1.25fr .75fr; align-items: center; gap: 70px; padding-block: 76px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; color: #dcebe6; font-weight: 700; font-size: .83rem; letter-spacing: .13em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 32px; height: 2px; background: var(--gold); }
.hero h1 { max-width: 820px; margin: 0 0 22px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.6rem, 5.2vw, 5.4rem); line-height: .98; letter-spacing: -.035em; }
.hero p { max-width: 680px; margin: 0 0 30px; color: #dce6e2; font-size: clamp(1.03rem, 1.8vw, 1.25rem); }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 11px 20px; border-radius: 12px; text-decoration: none; font-weight: 750; transition: transform .15s ease, box-shadow .15s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { color: #11251f; background: #fff; box-shadow: 0 12px 30px rgba(0,0,0,.15); }
.button-primary:hover { color: var(--green); }
.button-secondary { color: #fff; border: 1px solid rgba(255,255,255,.38); background: rgba(255,255,255,.07); }
.button-secondary:hover { color: #fff; background: rgba(255,255,255,.14); }
.hero-card { padding: 28px; border: 1px solid rgba(255,255,255,.18); border-radius: 22px; background: rgba(255,255,255,.08); box-shadow: 0 24px 70px rgba(0,0,0,.20); backdrop-filter: blur(10px); }
.suit-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.suit { aspect-ratio: 1 / .72; display: grid; place-items: center; border-radius: 16px; background: rgba(255,255,255,.92); color: var(--ink); font-family: Georgia, serif; font-size: clamp(2.2rem, 5vw, 4.2rem); }
.suit.red { color: var(--red); }

.section { padding-block: 80px; }
.section-tight { padding-block: 55px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.section-heading h2 { margin: 0; font-family: Georgia, serif; font-size: clamp(2rem, 3.2vw, 3.35rem); line-height: 1.08; letter-spacing: -.025em; }
.section-heading p { max-width: 560px; margin: 0; color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.feature-card { position: relative; min-height: 210px; padding: 24px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(19,35,31,.06); text-decoration: none; color: var(--ink); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.feature-card:hover { color: var(--ink); transform: translateY(-4px); border-color: rgba(15,90,70,.35); box-shadow: var(--shadow); }
.feature-card .num { display: block; color: var(--gold); font-weight: 800; font-size: .76rem; letter-spacing: .12em; }
.feature-card h3 { margin: 30px 0 8px; font-family: Georgia, serif; font-size: 1.55rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: .94rem; line-height: 1.55; }
.feature-card::after { content: "→"; position: absolute; right: 22px; bottom: 18px; color: var(--green); font-size: 1.4rem; }

.about-band { background: var(--green-soft); border-block: 1px solid rgba(15,90,70,.12); }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 70px; align-items: center; }
.quote-card { padding: 34px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); border-left: 5px solid var(--gold); }
.quote-card p { margin: 0; font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.5; }
.timeline { display: grid; gap: 12px; }
.timeline-item { display: grid; grid-template-columns: 90px 1fr; gap: 18px; padding: 15px 0; border-bottom: 1px solid rgba(15,90,70,.14); }
.timeline-item strong { color: var(--green); }

.post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.post-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: 0 9px 25px rgba(19,35,31,.055); }
.post-card-image { aspect-ratio: 16 / 9; background: linear-gradient(145deg, var(--green-soft), #f2e9d7); overflow: hidden; }
.post-card-image img { width: 100%; height: 100%; object-fit: cover; }
.post-card-body { padding: 22px; }
.post-card-meta { color: var(--muted); font-size: .8rem; }
.post-card h3 { margin: 8px 0 10px; font-family: Georgia, serif; font-size: 1.35rem; line-height: 1.25; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--green); }
.post-card p { margin: 0; color: var(--muted); font-size: .93rem; }

.page-hero { padding-block: 56px 42px; background: linear-gradient(160deg, #edf4f0, #fbfcf8); border-bottom: 1px solid var(--line); }
.page-hero h1 { margin: 0; font-family: Georgia, serif; font-size: clamp(2.2rem, 4.6vw, 4.35rem); line-height: 1.06; letter-spacing: -.03em; }
.breadcrumbs { margin-bottom: 12px; color: var(--muted); font-size: .84rem; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.content-area { padding-block: 52px 80px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 285px; gap: 48px; align-items: start; }
.entry-content { min-width: 0; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content h2, .entry-content h3, .entry-content h4 { font-family: Georgia, serif; line-height: 1.2; letter-spacing: -.015em; }
.entry-content h2 { margin-top: 2.1em; font-size: 2rem; }
.entry-content h3 { margin-top: 1.8em; font-size: 1.55rem; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; background: #fff; border-radius: 12px; }
.entry-content th, .entry-content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content th { background: var(--green-soft); }
.entry-content blockquote { margin: 30px 0; padding: 20px 24px; border-left: 4px solid var(--gold); background: #fff; }
.entry-content pre { overflow-x: auto; padding: 18px; border-radius: 12px; background: #11251f; color: #fff; }
.page-tree { position: sticky; top: 108px; padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 8px 22px rgba(19,35,31,.05); }
.admin-bar .page-tree { top: 140px; }
.page-tree h2 { margin: 0 0 12px; font-family: Georgia, serif; font-size: 1.18rem; }
.page-tree ul { list-style: none; margin: 0; padding: 0; }
.page-tree ul ul { margin-left: 12px; padding-left: 12px; border-left: 1px solid var(--line); }
.page-tree a { display: block; padding: 7px 8px; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .88rem; line-height: 1.35; }
.page-tree a:hover, .page-tree .current_page_item > a { color: var(--green); background: var(--green-soft); }

.search-form { display: flex; gap: 8px; }
.search-field { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.search-submit { border: 0; border-radius: 10px; padding: 9px 15px; background: var(--green); color: #fff; font-weight: 700; cursor: pointer; }
.pagination { margin-top: 35px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.page-numbers { min-width: 40px; min-height: 40px; display: grid; place-items: center; padding: 6px 10px; background: #fff; border: 1px solid var(--line); border-radius: 9px; text-decoration: none; }
.page-numbers.current { color: #fff; background: var(--green); border-color: var(--green); }

.site-footer { margin-top: auto; color: #dce7e3; background: #11251f; }
.footer-main { display: grid; grid-template-columns: 1.3fr .8fr .9fr; gap: 50px; padding-block: 56px; }
.footer-main h2, .footer-main h3 { margin-top: 0; color: #fff; font-family: Georgia, serif; }
.footer-main a { color: #dce7e3; }
.footer-main ul { list-style: none; margin: 0; padding: 0; }
.footer-main li { margin: 7px 0; }
.footer-bottom { padding-block: 18px; border-top: 1px solid rgba(255,255,255,.12); color: #aebdb7; font-size: .82rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 20px; }

@media (max-width: 1050px) {
  .menu-toggle { display: inline-flex; }
  .primary-nav { position: fixed; inset: 79px 0 auto 0; display: none; max-height: calc(100vh - 80px); overflow-y: auto; padding: 12px 20px 24px; background: var(--paper); border-bottom: 1px solid var(--line); box-shadow: 0 18px 40px rgba(19,35,31,.12); }
  .admin-bar .primary-nav { inset-block-start: 111px; }
  .primary-nav.is-open { display: block; }
  .primary-menu { display: block; }
  .primary-menu a { justify-content: space-between; }
  .primary-menu ul, .primary-menu ul ul { position: static; display: none; visibility: visible; opacity: 1; transform: none; min-width: 0; max-width: none; max-height: none; overflow: visible; margin: 0 0 3px 14px; padding: 3px 0 3px 10px; border: 0; border-left: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; }
  .primary-menu li.submenu-open > ul { display: block; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-inner { grid-template-columns: 1fr .55fr; gap: 40px; }
}

@media (max-width: 760px) {
  body { font-size: 16px; }
  .container { width: min(calc(100% - 28px), var(--content)); }
  .admin-bar .site-header { top: 46px; }
  .brand-copy span { display: none; }
  .header-inner { min-height: 68px; }
  .primary-nav { inset-block-start: 69px; }
  .admin-bar .primary-nav { inset-block-start: 115px; }
  .hero-inner { min-height: auto; grid-template-columns: 1fr; padding-block: 58px; }
  .hero-card { display: none; }
  .section { padding-block: 58px; }
  .section-heading { align-items: start; flex-direction: column; }
  .feature-grid, .post-grid, .about-grid, .footer-main { grid-template-columns: 1fr; }
  .about-grid { gap: 34px; }
  .content-layout { grid-template-columns: 1fr; }
  .page-tree { position: static; order: -1; }
  .footer-main { gap: 25px; }
  .footer-bottom .container { flex-direction: column; }
}
