/* Extracted inline CSS — low-risk cleanup */

/* header.php */
/* Logo size — wyższa specyficzność niż WP auto-styles */
a.custom-logo-link img.custom-logo { height: 52px; width: auto; max-height: 52px; }

/* ── Mobile: fixed header ── */
@media (max-width:1023px) {
    /* position:fixed — html+header+klasa bije Tailwind .site-header{position:sticky} */
    html header.site-header { position: fixed; top: 0; left: 0; right: 0; width: 100%; z-index: 50; }
    body { padding-top: 72px; }
    /* Logo ZAWSZE po lewej — nav flex-start, hamburger wypychany do prawej */
    html header.site-header nav { justify-content: flex-start; }
    html header.site-header nav > button[aria-label="Otwórz menu"] { margin-left: auto; }
    /* Gdy koszyk widoczny: koszyk ma margin-left:auto, hamburger dalej po prawej */
    html header.site-header nav > a.rh-cart-btn.rh-cart-show { margin-left: auto; }
    html header.site-header nav > a.rh-cart-show ~ button[aria-label="Otwórz menu"] { margin-left: 8px; }
    a.custom-logo-link img.custom-logo { height: 40px; max-height: 40px; }
    header.site-header img[alt="Rehafit"] { height: 40px; width: auto; }
    header.site-header button[aria-label="Otwórz menu"] svg { width: 34px; height: 34px; }
}
/* Admin bar na mobile — .admin-bar header.site-header (0,1,1+0,1,0)=(0,2,1)=21 > html header.site-header (0,1,2)=12 */
@media screen and (max-width:782px) {
    .admin-bar header.site-header { top: 46px; }
    .admin-bar body { padding-top: 110px; }
    .admin-bar #galeria-tabs-bar { top: 110px; }
}
@media screen and (min-width:783px) and (max-width:1023px) {
    .admin-bar header.site-header { top: 32px; }
    .admin-bar body { padding-top: 96px; }
    .admin-bar #galeria-tabs-bar { top: 96px; }
}

/* Mobile cart — never visible on desktop regardless of JS classes */
@media (min-width: 1024px) {
    .rh-cart-mobile { display: none !important; }
}

/* ── Cart icon animacja ── */
@keyframes rh-cart-pop {
    from { transform: scale(0.5) rotate(-15deg); opacity: 0; }
    to   { transform: scale(1)   rotate(0deg);   opacity: 1; }
}
@keyframes rh-badge-bump {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.5); }
    100% { transform: scale(1); }
}
.rh-cart-btn { position: relative; display: none; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 8px; color: #53504D; text-decoration: none; flex-shrink: 0; transition: background 0.2s; }
.rh-cart-btn:hover { background: #F0F0F0; }
.rh-cart-btn.rh-cart-show { display: flex; animation: rh-cart-pop 0.45s cubic-bezier(0.34,1.56,0.64,1) both; }
.rh-cart-badge { position: absolute; top: -5px; right: -5px; background: #436538; color: #fff; font-size: 10px; font-weight: 700; min-width: 17px; height: 17px; border-radius: 50%; display: none; align-items: center; justify-content: center; padding: 0 3px; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }
.rh-cart-badge.is-active { display: flex; animation: rh-badge-bump 0.3s ease both; }

/* footer.php: footer visibility + seo links */
/* Domyślnie: mobile widoczny, desktop ukryty */
#footer-mobile  { display: block; }
#footer-desktop { display: none; }
@media (min-width: 1024px) {
    #footer-mobile  { display: none; }
    #footer-desktop { display: grid; }
}

/* SEO links bar */
.seo-links-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px 32px;
}
@media (max-width: 767px) {
    .seo-links-bar {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
        padding: 20px 20px !important;
        text-align: center;
    }
    .seo-links-bar a {
        font-size: 13px !important;
    }
}

/* footer.php: partner logos */
.partner-logo {
        display: inline-flex;
        opacity: 0.65;
        filter: grayscale(20%);
        transform: translateY(0);
        transition: opacity 0.25s ease, filter 0.25s ease, transform 0.25s ease;
    }
    .partner-logo:hover {
        opacity: 1;
        filter: grayscale(0%) brightness(1.08);
        transform: translateY(-4px);
    }

/* inc/mega-menu.php */
.mm-card { border-radius:12px; transition:background 0.15s; }
    .mm-card:hover { background:rgba(67,101,56,0.06); }
    .mm-card:hover .mm-card-name { color:#436538; }

/* functions.php: cookie consent */
/* ── Cookie Consent ──────────────────────────────────────── */
#rh-cookie-banner {
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: calc(100% - 48px);
    max-width: 480px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.13);
    z-index: 2147483646;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    gap: 24px;
    flex-wrap: wrap;
    font-family: inherit;
    pointer-events: auto;
    transition: opacity 0.3s, transform 0.3s;
}
#rh-cookie-banner.rh-cookie-hide {
    opacity: 0;
    transform: translateY(16px);
    pointer-events: none;
}
.rh-cookie-text {
    flex: 1;
    min-width: 220px;
}
.rh-cookie-text h3 {
    font-size: 17px;
    font-weight: 700;
    color: #313131;
    margin: 0 0 6px;
    line-height: 1.3;
}
.rh-cookie-text p {
    font-size: 14px;
    color: #53504D;
    line-height: 1.6;
    margin: 0;
}
.rh-cookie-text a {
    color: #436538;
    text-decoration: underline;
}
.rh-cookie-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    flex-shrink: 0;
}
.rh-btn-accept {
    background: #436538;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
}
.rh-btn-accept:hover { background: #2d4425; }
.rh-btn-reject {
    background: #F5F5F5;
    color: #53504D;
    border: 1px solid #D0D0D0;
    border-radius: 8px;
    padding: 11px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s;
}
.rh-btn-reject:hover { background: #E8F0E5; border-color: #436538; color: #436538; }
.rh-btn-settings {
    background: none;
    border: none;
    color: #436538;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
    padding: 4px 0;
    white-space: nowrap;
}
.rh-btn-settings:hover { color: #2d4425; }

/* ── Modal ustawień ──────────────────────────────────────── */
#rh-cookie-modal {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}
#rh-cookie-modal.rh-modal-open {
    opacity: 1;
    pointer-events: auto;
}
.rh-modal-box {
    background: #fff;
    border-radius: 20px 20px 0 0;
    width: 100%;
    max-width: 620px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 32px 28px 28px;
    transform: translateY(24px);
    transition: transform 0.25s;
}
#rh-cookie-modal.rh-modal-open .rh-modal-box {
    transform: translateY(0);
}
.rh-modal-box h2 {
    font-size: 20px;
    font-weight: 700;
    color: #313131;
    margin: 0 0 8px;
}
.rh-modal-box > p {
    font-size: 14px;
    color: #53504D;
    line-height: 1.6;
    margin: 0 0 24px;
}
.rh-cookie-category {
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 16px 18px;
    margin-bottom: 12px;
}
.rh-cat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.rh-cat-title {
    font-size: 15px;
    font-weight: 600;
    color: #313131;
}
.rh-cat-desc {
    font-size: 13px;
    color: #737373;
    line-height: 1.5;
    margin-top: 8px;
}
/* Toggle switch */
.rh-toggle {
    position: relative;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}
.rh-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.rh-toggle-slider {
    position: absolute;
    inset: 0;
    background: #D0D0D0;
    border-radius: 24px;
    cursor: pointer;
    transition: background 0.2s;
}
.rh-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    left: 3px;
    top: 3px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.rh-toggle input:checked + .rh-toggle-slider { background: #436538; }
.rh-toggle input:checked + .rh-toggle-slider::before { transform: translateX(20px); }
.rh-toggle input:disabled + .rh-toggle-slider { background: #436538; cursor: not-allowed; opacity: 0.7; }
.rh-toggle input:disabled + .rh-toggle-slider::before { transform: translateX(20px); }

.rh-modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.rh-modal-actions .rh-btn-accept { flex: 1; text-align: center; padding: 13px 16px; font-size: 15px; }
.rh-modal-actions .rh-btn-reject { flex: 1; text-align: center; padding: 13px 16px; font-size: 15px; }

@media (max-width: 600px) {
    #rh-cookie-banner { bottom: 16px; padding: 18px 16px; gap: 16px; }
    .rh-cookie-actions { width: 100%; }
    .rh-btn-accept, .rh-btn-reject { flex: 1; text-align: center; }
    .rh-modal-box { padding: 24px 16px 20px; border-radius: 20px 20px 0 0; }
}

/* functions.php: motion helpers */
/* ── Animacje strony ─────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {

/* Hero — page load */
@keyframes rh-rise {
    from { opacity: 0; transform: translateY(22px); }
    to   { opacity: 1; transform: none; }
}
@keyframes rh-fadein {
    from { opacity: 0; }
    to   { opacity: 1; }
}
section[aria-label="Hero"] h1 {
    animation: rh-rise .9s cubic-bezier(.22,.68,0,1.1) both;
}
section[aria-label="Hero"] > div > div:first-child > p {
    animation: rh-rise .8s cubic-bezier(.22,.68,0,1.1) .16s both;
}
section[aria-label="Hero"] > div > div:first-child > .flex.flex-wrap {
    animation: rh-rise .8s cubic-bezier(.22,.68,0,1.1) .3s both;
}
section[aria-label="Hero"] > div > div:last-child {
    animation: rh-fadein .9s ease .1s both;
}

/* Scroll-reveal — base */
.rh-fade {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity .65s cubic-bezier(.25,.46,.45,.94),
                transform .65s cubic-bezier(.25,.46,.45,.94);
}
.rh-fade.rh-in {
    opacity: 1;
    transform: none;
}
/* Stagger delays */
.rh-d1 { transition-delay: .08s; }
.rh-d2 { transition-delay: .18s; }
.rh-d3 { transition-delay: .28s; }
.rh-d4 { transition-delay: .38s; }

} /* end prefers-reduced-motion */
