/*
Theme Name: Folio Beauty
Description: Lekki portal beauty z fotograficznym układem najnowszych publikacji i sekcjami kategorii.
Version: 1.8.0
Requires at least: 5.3
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: folio-portal
*/
:root {
    --ink: #222126;
    --paper: #fff;
    --line: #e9e6e8;
    --accent: #a83f6a;
    --muted: #6d666c;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.6 Arial, Helvetica, sans-serif; overflow-wrap: anywhere; }
a { color: inherit; text-underline-offset: .2em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid #802649; outline-offset: 5px; }
.wrap { width: min(1200px, 92%); margin-inline: auto; }
.topline { padding: 8px 16px; background: #242126; color: #fff; text-align: center; font-size: 10px; letter-spacing: .2em; }
.mast { display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 10px; min-height: 155px; padding: 25px 0; text-align: center; }
.brand { font-size: clamp(30px, 5vw, 48px); font-weight: 750; line-height: 1.1; letter-spacing: -.055em; text-decoration: none; }
.tagline { color: var(--muted); font-size: 12px; letter-spacing: .06em; }
.custom-logo-link { display: inline-flex; max-width: min(360px, 85vw); }
.custom-logo { display: block; max-width: 100%; width: auto; height: auto; max-height: 100px; object-fit: contain; }
.navigation-band { background: var(--accent); color: #fff; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 24px; min-height: 52px; padding-block: 12px; }
.bar nav, .menu { display: flex; flex-wrap: wrap; gap: 10px 23px; align-items: center; }
.menu { list-style: none; padding: 0; margin: 0; }
.bar a, .bar summary { font-size: 12px; font-weight: 600; letter-spacing: .035em; text-transform: uppercase; text-decoration: none; }
.bar a:hover, .bar summary:hover { color: #fff; text-decoration: underline; }
.bar :focus-visible { outline-color: #fff; }
.bar details { position: relative; flex-shrink: 0; }
.bar summary { cursor: pointer; }
.bar details form { position: absolute; right: 0; top: 35px; width: min(340px, 86vw); background: #fff; color: var(--ink); padding: 16px; border: 1px solid var(--line); box-shadow: 0 8px 24px #22212614; z-index: 10; }
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; min-width: 0; }
input, textarea, button { max-width: 100%; font: inherit; }
input, textarea { border: 1px solid #bfb8bd; padding: 9px; }
.search-field { width: 100%; }
.search-submit, input[type=submit], button { background: var(--accent); color: #fff; border: 0; padding: 10px 16px; cursor: pointer; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.025em; text-wrap: balance; }
h1 { font-size: clamp(30px, 4vw, 48px); }
.beauty-intro { padding: 25px 0 23px; display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }
.beauty-intro h1 { font-size: 19px; letter-spacing: -.02em; margin: 0; }
.beauty-intro p { color: var(--muted); font-size: 12px; margin: 0; }
.featured-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 5px; margin-bottom: 48px; }
.feature-card { position: relative; display: flex; align-items: end; min-height: 230px; overflow: hidden; background: #48313f; }
.feature-card:first-child { grid-row: span 2; min-height: 465px; }
.feature-image { position: absolute; inset: 0; background: linear-gradient(135deg, #b291a0, #654357); }
.feature-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feature-image:after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #15101900 15%, #151019d9 100%); }
.feature-copy { padding: 22px; z-index: 1; width: 100%; color: #fff; }
.feature-copy h2 { font-size: 18px; margin: 12px 0; line-height: 1.35; }
.feature-card:first-child h2 { font-size: clamp(26px, 3vw, 38px); }
.feature-card:first-child .feature-copy { padding: 32px; }
.feature-copy h2 a { text-decoration: none; color: #fff; }
.feature-copy h2 a:after, .card h2 a:after, .card h3 a:after { content: ''; position: absolute; inset: 0; }
.feature-card:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.feature-card:hover h2 a { text-decoration: underline; }
.label, .eyebrow { font-size: 10px; font-weight: 700; line-height: 1.5; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.label { display: inline-block; }
.feature-copy .label, .paid { background: var(--accent); color: #fff; padding: 4px 8px; }
.meta { font-size: 12px; color: var(--muted); }
.feature-copy .meta { color: #eee6eb; }
.category-section { margin-bottom: 44px; }
.section-heading { display: flex; align-items: center; gap: 18px; border-bottom: 2px solid var(--line); padding-bottom: 13px; margin-bottom: 24px; }
.section-heading h2 { position: relative; text-transform: uppercase; font-size: 21px; letter-spacing: .035em; margin: 0; }
.section-heading h2:after { content: ''; position: absolute; left: 0; bottom: -15px; width: 48px; height: 3px; background: var(--accent); }
.section-heading>a { margin-left: auto; flex-shrink: 0; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.category-section .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.card { position: relative; min-width: 0; }
.art { aspect-ratio: 4/3; overflow: hidden; background: linear-gradient(130deg, #e8d9e0, #f4f0f2); }
.art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.inner { padding-top: 14px; }
.card h2, .card h3 { font-size: 22px; margin: 8px 0 12px; line-height: 1.4; }
.category-section .card h3 { font-size: 18px; }
.card h2 a, .card h3 a { text-decoration: none; }
.card:hover h2 a, .card:hover h3 a { color: var(--accent); }
.lead { grid-column: 1/-1; display: grid; grid-template-columns: 1.25fr 1fr; background: #faf5f7; }
.lead .inner { padding: 32px; align-self: center; }
.lead h2 { font-size: 32px; }
.lead .art { height: 100%; min-height: 280px; }
.intro { padding: 25px 0 30px; }
.intro h1 { margin: 12px 0; }
.reading { max-width: 780px; margin: 35px auto 55px; }
.reading>h1 { margin: 15px 0; }
.cover { max-width: 100%; height: auto; display: block; margin: 28px auto; }
.copy { font-size: 18px; line-height: 1.85; }
.copy h2 { font-size: 29px; margin-top: 1.5em; }
.copy h3 { font-size: 24px; margin-top: 1.4em; }
.copy img, .copy iframe, .copy video { max-width: 100%; }
.copy img { height: auto; }
.copy figure { max-width: 100%; margin-inline: 0; }
.copy pre, .copy table { display: block; overflow: auto; }
.copy a { color: var(--accent); }
.copy blockquote { border-left: 3px solid var(--accent); margin-inline: 0; padding: 10px 25px; background: #faf5f7; }
.nav-links { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: 30px 0; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-top: 3px solid var(--accent); padding: 30px 0; margin-top: 55px; font-size: 12px; }
.foot strong { font-size: 24px; letter-spacing: -.04em; }
.breadcrumbs { font-size: 12px; color: var(--muted); margin: 24px 0; }
.author-box { padding: 20px 24px; margin: 30px 0; background: #faf5f7; }
.author-box h2 { font-size: 20px; }
.archive-description { max-width: 760px; color: var(--muted); }
.skip, .screen-reader-text { position: absolute; clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }
.skip:focus, .screen-reader-text:focus { clip-path: none; width: auto; height: auto; background: #fff; color: #222; padding: 10px; z-index: 20; }
@media (max-width: 900px) {
    .category-section .grid, .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .featured-grid { grid-template-columns: 1.5fr 1fr; }
    .feature-card:first-child { grid-row: span 4; }
    .feature-card { min-height: 180px; }
    .beauty-intro { display: block; }
    .beauty-intro p { margin-top: 6px; }
    .bar nav, .menu { gap: 10px 16px; }
}
@media (max-width: 700px) {
    .mast { min-height: 120px; padding: 20px 0; }
    .custom-logo { max-height: 80px; }
    .featured-grid { grid-template-columns: 1fr; gap: 8px; }
    .feature-card:first-child { grid-row: auto; min-height: 340px; }
    .feature-card { min-height: 220px; }
    .feature-card:first-child .feature-copy, .feature-copy { padding: 24px; }
    .feature-copy h2 { font-size: 23px; }
    .bar { align-items: flex-start; gap: 15px; }
    .bar nav { flex: 1; }
    .bar a, .bar summary { font-size: 11px; }
    .lead { grid-template-columns: 1fr; }
}
@media (max-width: 580px) {
    .category-section .grid, .grid { grid-template-columns: 1fr; gap: 28px; }
    .category-section .card h3 { font-size: 22px; }
    .section-heading { gap: 12px; align-items: baseline; }
    .section-heading h2 { font-size: 18px; }
    .section-heading>a { max-width: 38%; font-size: 9px; }
    .copy { font-size: 17px; }
    .beauty-intro h1 { font-size: 18px; }
}

/* Shared site identity in the footer. */
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 100%; }
.footer-brand .custom-logo-link { max-width: min(240px, 75vw); }
.footer-brand .custom-logo { max-height: 76px; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.footer-brand>a { text-decoration: none; }
.footer-tagline { margin: 0; color: var(--muted); max-width: 360px; font-size: 12px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 24px; }
@media (max-width: 580px) {
    .foot { flex-direction: column; align-items: center; gap: 24px; padding-block: 28px; text-align: center; }
    .footer-brand { align-items: center; }
    .footer-brand .custom-logo-link { max-width: min(200px, 75vw); }
    .footer-brand .custom-logo { max-height: 64px; }
    .footer-links { justify-content: center; }
}

/* Atelier edition */
:root {
    --ink: #2b2025;
    --accent: #79384e;
    --paper: #fffdf9;
    --line: #e4d9d2;
    --muted: #6e6063;
    --display: "Iowan Old Style", "Palatino Linotype", Georgia, serif;
}
.topline { background: #34222c; color: #f5e4d8; font-size: 9px; letter-spacing: .26em; }
.mast { position: relative; min-height: 145px; }
.brand { font-family: var(--display); font-weight: 400; letter-spacing: -.055em; }
.navigation-band { background: #f4e6e8; color: #472e38; border-block: 1px solid #dbc8cb; }
.bar a, .bar summary { letter-spacing: .1em; font-size: 11px; }
.bar a:hover, .bar summary:hover { color: var(--accent); text-decoration: none; }
.bar :focus-visible { outline-color: var(--accent); }
.bar .current-menu-item>a, .bar .current-cat>a { color: var(--accent); box-shadow: 0 2px var(--accent); }
.menu-toggle { display: none; }
.beauty-intro { display: grid; grid-template-columns: 1.6fr 1fr; column-gap: 48px; row-gap: 8px; align-items: end; padding: 34px 0 25px; }
.edition-kicker { display: block; font: 700 10px/1.4 Arial,sans-serif; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.beauty-intro .edition-kicker { grid-column: 1/-1; }
.beauty-intro h1 { font: 400 clamp(32px,4vw,55px)/1.06 var(--display); letter-spacing: -.045em; }
.beauty-intro p { max-width: 34em; font-size: 14px; line-height: 1.55; }
.featured-grid { gap: 8px; margin-bottom: 55px; }
.feature-image { background: radial-gradient(ellipse at 90% 8%, #f8e4ce88, transparent 52%), linear-gradient(135deg,#b68b86,#794653 58%,#463344); }
.feature-card:nth-child(2n) .feature-image { background: linear-gradient(145deg,#c3b3ab,#796761 55%,#4e3e43); }
.feature-image:after { background: linear-gradient(180deg,transparent 12%,#1e132032 40%,#231621e6 100%); }
.feature-copy h2, .card h2, .card h3, .category-section .card h3 { font-family: var(--display); font-weight: 400; line-height: 1.18; }
.feature-copy h2 { font-size: clamp(20px,1.65vw,26px); }
.feature-card:first-child h2 { font-size: clamp(34px,3.4vw,48px); }
.feature-copy .label:not(.paid) { padding: 0 0 4px; color: #fff; background: none; letter-spacing: .15em; border-bottom: 1px solid #edd5bb; }
.feature-card:hover h2 a, .section-heading a, .section-heading a:hover, .category-section .card a:hover, .grid .card a:hover { text-decoration: none; }
.feature-card:hover .feature-copy { color: #fff0e8; }
.section-heading { border-bottom: 1px solid #bfa897; padding-bottom: 12px; }
.section-heading h2 { text-transform: none; font: 400 clamp(28px,3vw,40px)/1.12 var(--display); letter-spacing: -.04em; }
.section-heading h2:after { display: none; }
.section-heading>a { color: var(--accent); letter-spacing: .12em; }
.category-section { margin-bottom: 52px; }
.category-section .card h3 { font-size: clamp(21px,1.75vw,27px); }
.category-section .art { aspect-ratio: 5/4; }
.reading>h1, .intro h1 { font-family: var(--display); font-weight: 400; letter-spacing: -.045em; }
.reading>h1 { font-size: clamp(37px,5vw,62px); line-height: 1.08; }
.copy h2, .copy h3, .related-stories h2 { font-family: var(--display); font-weight: 400; }
.copy h2, .copy h3 { scroll-margin-top: 24px; }
.article-contents { margin: 30px 0; background: #f7efea; border-block: 1px solid #d7c2b3; padding: 16px clamp(18px,4vw,32px); }
.article-contents summary { font: 400 25px/1.4 var(--display); cursor: pointer; }
.article-contents summary::marker { font-size: 14px; color: var(--accent); }
.article-contents ol, .related-stories ol { counter-reset: story; list-style: none; margin: 16px 0 0; padding: 0; }
.article-contents li, .related-stories li { counter-increment: story; display: flex; align-items: baseline; gap: 12px; border-top: 1px solid var(--line); padding: 8px 0; }
.article-contents li:before, .related-stories li:before { content: counter(story, decimal-leading-zero); color: var(--accent); font: 11px/1.5 Arial,sans-serif; letter-spacing: .08em; }
.article-contents .subheading { padding-left: 18px; }
.article-contents a, .related-stories a { color: var(--ink); text-decoration: none; }
.article-contents a { font: 15px/1.5 Arial,sans-serif; }
.article-contents a:hover, .related-stories a:hover { color: var(--accent); }
.related-stories { margin: 42px 0; border-top: 2px solid var(--ink); padding-top: 18px; }
.related-stories h2 { margin: 8px 0; font-size: 32px; }
.related-stories a { font: 20px/1.4 var(--display); }
.pagination .nav-links { justify-content: center; gap: 6px; }
.pagination .page-numbers { display: inline-flex; min-width: 40px; min-height: 40px; align-items: center; justify-content: center; border: 1px solid var(--line); padding: 5px 11px; color: var(--ink); text-decoration: none; font-size: 14px; }
.pagination .current, .pagination a:hover { background: var(--accent); border-color: var(--accent); color: white; }
.pagination .dots { border-color: transparent; min-width: auto; }
.footer-shell { margin-top: 62px; background: #f5efea; border-top: 1px solid #cbb4a7; }
.foot { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 32px 64px; margin-top: 0; border: 0; padding-block: 42px 20px; }
.footer-brand { align-items: flex-start; }
.footer-brand strong { font: 400 32px/1.1 var(--display); }
.footer-directory h2 { margin: 0 0 16px; font: 400 24px/1.15 var(--display); }
.footer-directory ul { list-style: none; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 6px 24px; margin: 0; padding: 0; }
.footer-directory a, .footer-links a { text-decoration: none; }
.footer-directory a { font-size: 14px; }
.footer-links { grid-column: 1/-1; justify-content: space-between; padding-top: 15px; border-top: 1px solid var(--line); }
@media(max-width: 900px) and (min-width: 701px) {
    .featured-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .feature-card:first-child { grid-row: auto; grid-column: 1/-1; min-height: 340px; }
}
@media(max-width: 760px) {
    .mast { min-height: 107px; }
    .bar.has-toggle { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; align-items: center; }
    .has-toggle .menu-toggle { display: inline-flex; align-items: center; gap: 9px; justify-self: start; padding: 5px 0; color: var(--ink); background: transparent; font-size: 13px; }
    .menu-toggle span { font-size: 20px; line-height: 1; }
    .has-toggle nav { display: none; grid-column: 1/-1; grid-row: 2; }
    .has-toggle.menu-open nav { display: flex; padding-top: 12px; margin-top: 10px; border-top: 1px solid #d4bdc2; }
    .has-toggle nav, .has-toggle .menu { width: 100%; flex-direction: column; align-items: stretch; gap: 0; }
    .has-toggle nav a { display: block; padding: 9px 0; }
    .has-toggle details { grid-column: 2; grid-row: 1; }
    .beauty-intro { grid-template-columns: 1fr; padding: 24px 0 19px; }
    .beauty-intro p { margin: 0; }
    .foot { grid-template-columns: 1fr; text-align: left; gap: 28px; }
    .footer-directory, .footer-links { width: 100%; }
    .footer-brand { align-items: center; text-align: center; }
}

.article-faq { margin: 40px 0; border-top: 2px solid var(--ink); padding-top: 16px; }
.article-faq h2 { font: 400 clamp(26px,3vw,35px)/1.2 var(--display); margin: 4px 0 20px; }
.article-faq details { border-bottom: 1px solid var(--line); }
.article-faq summary { padding: 15px 4px; font-weight: 600; cursor: pointer; }
.article-faq summary::marker { color: var(--accent); }
.article-faq p { margin: 0; padding: 0 5px 16px; white-space: pre-line; }

.story-page .breadcrumbs { padding-block: 16px; margin: 0; border-bottom: 1px solid var(--line); }
.story-layout { display: grid; grid-template-columns: minmax(0, 2.45fr) minmax(220px, 1fr); gap: clamp(28px, 4vw, 60px); align-items: start; margin: 42px 0 56px; }
.story-layout .story { min-width: 0; max-width: none; margin: 0; }
.story-heading h1 { font: 700 clamp(32px, 3.2vw, 48px)/1.12 Arial, sans-serif; letter-spacing: -.04em; margin: 0 0 22px; }
.story-byline, .story-notes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; color: var(--muted); font-size: 13px; }
.story-byline strong { color: var(--ink); }
.story-byline a { text-decoration: none; background: #f4e5ea; color: #633147; padding: 3px 9px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.story .cover { width: 100%; height: auto; margin: 25px 0 14px; }
.story-notes { margin-block: 18px; }
.story .copy { font: 17px/1.8 Arial,sans-serif; }
.story .copy h2, .story .copy h3 { font-family: Arial,sans-serif; font-weight: 650; }
.story-rail { min-width: 0; padding-left: 22px; border-left: 1px solid var(--line); }
.story-rail h2 { font: 400 26px/1.2 var(--display); margin: 30px 0 18px; }
.story-rail ul { list-style: none; margin: 0; padding: 0; }
.story-rail li { border-left: 3px solid #e2b8c5; padding: 0 12px; margin-bottom: 20px; }
.story-rail li a { display: block; text-decoration: none; font-weight: 650; line-height: 1.4; }
.story-rail time { font-size: 12px; color: var(--muted); }
@media(max-width:850px) {
    .story-layout { grid-template-columns: minmax(0,1fr); margin-top: 24px; }
    .story-rail { padding: 24px 0 0; border-left: 0; border-top: 1px solid var(--line); }
}

/* Tables and compact site identity. */
.site-header .custom-logo-link { max-width: min(210px, 60vw); }
.site-header .custom-logo { max-height: 64px; }
.site-header .mast { min-height: 108px; padding-block: 18px; gap: 8px; }
.copy table { display: table; border-collapse: separate; border-spacing: 0; width: 100%; max-width: 100%; margin: 26px 0; border: 1px solid #d9c8ce; border-radius: 6px; background: #fff; font: 15px/1.55 Arial,sans-serif; }
.copy th, .copy td { padding: 14px 16px; border: 0; border-bottom: 1px solid #e8dde0; border-right: 1px solid #eee5e8; text-align: left; vertical-align: top; }
.copy th { background: #f1e1e7; color: #4a2636; font-weight: 700; }
.copy tbody tr:nth-child(even) td { background: #fbf7f8; }
.copy tr>:last-child { border-right: 0; }
.copy tbody tr:last-child>* { border-bottom: 0; }
.copy caption { text-align: left; font-weight: 600; padding: 0 0 10px; color: var(--muted); }
.copy .wp-block-table { overflow-x: auto; margin: 26px 0; }
.copy .wp-block-table table { margin: 0; }
.copy .wp-block-table figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }
.foot { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 28px 24px; }
.footer-brand { min-width: 0; padding-right: 12px; }
.footer-logo { display: block; width: auto; height: auto; max-width: min(180px,100%); max-height: 68px; object-fit: contain; }
.footer-tagline { max-width: 28em; }
.footer-directory { grid-column: span 2; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; }
.footer-column { min-width: 0; padding-left: 24px; border-left: 1px solid #d6c6bd; }
.footer-directory h2 { font-size: 22px; margin-bottom: 16px; }
.footer-directory ul { display: flex; flex-direction: column; gap: 9px; }
.footer-directory a { display: inline-block; line-height: 1.45; }
@media(max-width:760px) {
    .foot { grid-template-columns: 1fr; gap: 26px; }
    .footer-brand { align-items: flex-start; text-align: left; padding: 0; }
    .footer-directory { grid-column: 1; }
    .footer-column { padding-left: 16px; }
    .footer-logo { max-width: 160px; max-height: 58px; }
}
@media(max-width:580px) {
    .site-header .custom-logo-link { max-width: min(170px,60vw); }
    .site-header .custom-logo { max-height: 50px; }
    .site-header .mast { min-height: 88px; padding-block: 14px; }
    .copy table { display: block; overflow-x: auto; font-size: 14px; }
    .copy th, .copy td { padding: 10px 12px; min-width: 105px; }
    .footer-directory { gap: 16px; }
    .footer-directory h2 { font-size: 19px; }
}

.story-rail li .rail-entry { display: flex; align-items: flex-start; gap: 12px; }
.rail-thumb { width: 56px; height: 56px; flex: 0 0 56px; object-fit: cover; border-radius: 4px; }
.rail-entry time { display: block; margin-top: 5px; font-weight: 400; }
@media (min-width: 851px) {
    .story-rail { position: sticky; top: 20px; max-height: calc(100vh - 40px); overflow-y: auto; }
    .admin-bar .story-rail { top: 52px; max-height: calc(100vh - 72px); }
}
