﻿/*
Theme Name: Zdobywca GĂłr
Author: Gory
Description: Lekki motyw publicznego portalu gĂłrskiego wspĂłĹ‚pracujÄ…cy z moduĹ‚ami GĂłry.
Version: 0.4.6
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: gory-motyw
*/

:root {
    --zg-forest: #123932;
    --zg-forest-dark: #0d2e29;
    --zg-forest-soft: #24554b;
    --zg-gold: #d9aa48;
    --zg-mint: #a7dace;
    --zg-ink: #152824;
    --zg-muted: #5e736e;
    --zg-line: #dbe6e1;
    --zg-surface: #f2f7f5;
    --zg-paper: #ffffff;
    --zg-shadow: 0 18px 50px rgba(17, 57, 50, .08);
    --zg-width: 1360px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #ffffff 0, #f7fbf9 520px, #ffffff 100%);
    color: var(--zg-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: var(--zg-forest-soft);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

a:hover {
    color: var(--zg-forest);
}

img {
    max-width: 100%;
    height: auto;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
}

.zg-header {
    position: sticky;
    top: 0;
    z-index: 5000;
    overflow: visible;
    border-bottom: 1px solid #edf2f0;
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(14px);
    box-shadow: 0 10px 30px rgba(17, 57, 50, .04);
}

body.admin-bar .zg-header {
    top: 32px;
}

.zg-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    max-width: var(--zg-width);
    min-height: 86px;
    margin: 0 auto;
    padding: 0 clamp(18px, 4vw, 36px);
}

@media (max-width: 782px) {
    body.admin-bar .zg-header {
        top: 46px;
    }
}

.zg-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    white-space: nowrap;
}

.zg-brand-mark {
    display: block;
    width: 46px;
    height: 46px;
    object-fit: contain;
    flex: 0 0 auto;
    filter: drop-shadow(0 6px 12px rgba(17, 57, 50, .12));
}

.zg-brand-wordmark {
    display: block;
    width: auto;
    height: 40px;
    object-fit: contain;
    flex: 0 1 auto;
    max-width: min(260px, 34vw);
}

.zg-navigation {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: clamp(13px, 2.2vw, 28px);
    font-weight: 500;
}

.zg-mobile-menu {
    display: none;
    position: relative;
}

.zg-mobile-menu summary {
    display: none;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid var(--zg-line);
    border-radius: 999px;
    background: var(--zg-surface);
    color: var(--zg-ink);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.zg-mobile-menu summary::-webkit-details-marker {
    display: none;
}

.zg-nav-icon {
    display: grid;
    gap: 3px;
}

.zg-nav-icon span {
    display: block;
    width: 16px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.zg-navigation a {
    position: relative;
    padding: 9px 0;
    color: #18243a;
    text-decoration: none;
    white-space: nowrap;
}

.zg-navigation a:hover,
.zg-navigation a[aria-current="page"] {
    color: var(--zg-forest-soft);
}

.zg-navigation a[aria-current="page"]::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 2px;
    left: 0;
    height: 2px;
    border-radius: 999px;
    background: var(--zg-gold);
}

.zg-account {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 10px 17px;
    border: 1px solid var(--zg-line);
    border-radius: 999px;
    background: var(--zg-surface);
}

.zg-account > span {
    line-height: 1;
}

.zg-account-avatar {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    border: 2px solid #fff;
    border-radius: 999px;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(17, 57, 50, .16);
}

.zg-account::after {
    content: "";
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: .75;
}

.zg-account:not([aria-haspopup])::after {
    display: none;
}

.zg-account:hover {
    border-color: var(--zg-gold);
    background: #fff8e8;
}

.zg-account-menu {
    position: relative;
    z-index: 5010;
}

.zg-account-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    z-index: 5100;
    min-width: 240px;
    padding: 10px;
    border: 1px solid var(--zg-line);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 22px 55px rgba(17, 57, 50, .14);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}

.zg-account-dropdown::before {
    content: "";
    position: absolute;
    right: 26px;
    top: -7px;
    width: 14px;
    height: 14px;
    border-top: 1px solid var(--zg-line);
    border-left: 1px solid var(--zg-line);
    background: #fff;
    transform: rotate(45deg);
}

.zg-account-menu:hover .zg-account-dropdown,
.zg-account-menu:focus-within .zg-account-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.zg-navigation .zg-account-dropdown a {
    display: block;
    padding: 11px 12px;
    border-radius: 12px;
    color: var(--zg-ink);
    font-weight: 700;
}

.zg-navigation .zg-account-dropdown a:hover {
    background: var(--zg-surface);
    color: var(--zg-forest);
}

.zg-navigation a.zg-nav-alert,
.zg-navigation .zg-account-dropdown a.has-unread {
    background: #fff6dd;
    color: #123932;
}

.zg-navigation .zg-account-dropdown a::after {
    display: none;
}

.zg-navigation .zg-account-dropdown a.is-logout {
    color: #9a4b1e;
}

.zg-main {
    min-height: calc(100vh - 240px);
}

.zg-content {
    max-width: 900px;
    margin: 0 auto;
    padding: clamp(28px, 5vw, 58px) 20px 72px;
}

.zg-post-header {
    margin-bottom: clamp(24px, 4vw, 36px);
}

.zg-post-header .zg-eyebrow {
    margin: 0 0 12px;
    color: var(--zg-forest-soft);
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.zg-post-header h1 {
    margin: 0 0 15px;
    color: var(--zg-ink);
    font-size: clamp(2.1rem, 5vw, 3.45rem);
    line-height: 1.12;
}

.zg-post-meta {
    margin: 0;
    color: var(--zg-muted);
}

.zg-featured {
    overflow: hidden;
    margin: 0 0 clamp(27px, 5vw, 44px);
    border-radius: 25px;
    background: var(--zg-surface);
}

.zg-featured img {
    display: block;
    width: 100%;
}

.zg-article-content {
    color: #263b37;
    font-size: clamp(1rem, 2vw, 1.08rem);
}

.zg-article-content h2,
.zg-article-content h3 {
    margin: 1.9em 0 .65em;
    color: var(--zg-ink);
    line-height: 1.2;
}

.zg-article-content p,
.zg-article-content ul,
.zg-article-content ol {
    margin: 0 0 1.25em;
}

.zg-article-content blockquote {
    margin: 1.8em 0;
    padding: 17px 22px;
    border-left: 4px solid var(--zg-gold);
    border-radius: 0 12px 12px 0;
    background: var(--zg-surface);
}

.zg-back {
    margin-top: 44px;
    padding-top: 22px;
    border-top: 1px solid var(--zg-line);
}

.zg-list {
    max-width: 1160px;
    margin: 0 auto;
    padding: clamp(30px, 5vw, 54px) 20px 70px;
}

.zg-list-header {
    margin-bottom: 28px;
    padding: clamp(28px, 5vw, 44px);
    border-radius: 26px;
    background: var(--zg-forest);
    color: #fff;
}

.zg-list-header h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(2rem, 4vw, 2.8rem);
}

.zg-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 17px;
}

.zg-card {
    overflow: hidden;
    border: 1px solid var(--zg-line);
    border-radius: 18px;
    background: #fff;
}

.zg-card-image {
    display: block;
    aspect-ratio: 16 / 9;
    background: var(--zg-surface);
}

.zg-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.zg-card-body {
    padding: 18px;
}

.zg-card-body small {
    color: var(--zg-muted);
}

.zg-card-body h2 {
    margin: 8px 0 9px;
    font-size: 1.18rem;
    line-height: 1.3;
}

.zg-card-body h2 a {
    color: var(--zg-ink);
    text-decoration: none;
}

.zg-card-body p {
    margin: 0;
    color: var(--zg-muted);
    font-size: .93rem;
}

.zg-page-body {
    margin-top: 24px;
}

.zg-not-found {
    max-width: 720px;
    margin: clamp(42px, 10vw, 96px) auto;
    padding: 40px;
    border-radius: 25px;
    background: var(--zg-surface);
    text-align: center;
}

.zg-not-found h1 {
    margin-top: 0;
}

.zg-footer {
    margin-top: 30px;
    padding: 42px clamp(18px, 4vw, 36px);
    background: var(--zg-forest);
    color: #d9e9e3;
}

.zg-footer-inner {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    max-width: var(--zg-width);
    margin: 0 auto;
}

.zg-footer-brand {
    max-width: 390px;
}

.zg-footer-brand strong {
    display: block;
    margin-bottom: 8px;
    color: #fff;
    font-size: 1.12rem;
}

.zg-footer-brand p {
    margin: 0;
    color: #bed6ce;
}

.zg-footer-links {
    display: flex;
    flex-wrap: wrap;
    align-content: start;
    justify-content: end;
    gap: 10px 22px;
}

.zg-footer-links a {
    color: #fff;
}

.zg-footer-copy {
    max-width: var(--zg-width);
    margin: 34px auto 0;
    padding-top: 19px;
    border-top: 1px solid rgba(255,255,255,.16);
    color: #b9d1ca;
    font-size: .9rem;
}

.zg-contact-form {
    display: grid;
    gap: 14px;
    max-width: 720px;
    margin-top: 22px;
}

.zg-contact-form label {
    color: var(--zg-muted);
    display: grid;
    gap: 7px;
    font-weight: 700;
}

.zg-contact-form input,
.zg-contact-form textarea {
    border: 1px solid var(--zg-border);
    border-radius: 10px;
    color: var(--zg-ink);
    font: inherit;
    padding: 12px 14px;
}

.zg-contact-form textarea {
    resize: vertical;
}

.zg-contact-form button {
    justify-self: start;
    background: var(--zg-forest);
    border: 0;
    border-radius: 999px;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    padding: 12px 20px;
}

.zg-message {
    border-radius: 10px;
    margin: 18px 0;
    padding: 13px 15px;
}

.zg-message.is-success {
    background: #e6f6ee;
    color: #117044;
}

.zg-message.is-error {
    background: #fff0ed;
    color: #9f2f20;
}

@media (max-width: 1100px) {
    .zg-header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 12px;
        min-height: 0;
        padding-top: 15px;
        padding-bottom: 15px;
    }

    .zg-navigation {
        display: none;
    }

    .zg-mobile-menu {
        display: block;
    }

    .zg-mobile-menu summary {
        display: inline-flex;
    }

    .zg-mobile-menu nav {
        position: absolute;
        top: calc(100% + 12px);
        right: 0;
        z-index: 30;
        display: grid;
        grid-column: 1 / -1;
        gap: 4px;
        width: min(310px, calc(100vw - 28px));
        padding: 10px;
        border: 1px solid var(--zg-line);
        border-radius: 18px;
        background: #fff;
        box-shadow: var(--zg-shadow);
    }

    .zg-mobile-menu nav a,
    .zg-account,
    .zg-account-menu {
        width: 100%;
    }

    .zg-mobile-menu nav a {
        display: block;
        padding: 11px 12px;
        border-radius: 12px;
        color: var(--zg-ink);
        text-decoration: none;
    }

    .zg-mobile-menu nav a:hover,
    .zg-mobile-menu nav a[aria-current="page"] {
        background: var(--zg-surface);
    }

    .zg-mobile-menu nav a::after {
        display: none;
    }

    .zg-account {
        justify-content: flex-start;
        padding: 11px 12px;
        border-radius: 12px;
    }

    .zg-mobile-menu nav a.zg-account {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .zg-cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 580px) {
    .zg-brand {
        gap: 10px;
    }

    .zg-brand-mark {
        width: 40px;
        height: 40px;
    }

    .zg-brand-wordmark {
        height: 32px;
        max-width: 210px;
    }

    .zg-cards {
        grid-template-columns: 1fr;
    }

    .zg-footer-inner {
        display: block;
    }

    .zg-footer-links {
        justify-content: start;
        margin-top: 28px;
    }
}

/* SpĂłjna oprawa moduĹ‚Ăłw portalu. Logika zostaje w osobnych wtyczkach, motyw tylko ujednolica wyglÄ…d. */
.gsg-page,
.gp-page,
.gm-page,
.gws-page,
.gck-page,
.gms-page,
.gpu-page,
.gpp-page,
.gtr-page {
    --gsg-forest: var(--zg-forest);
    --gsg-forest-soft: var(--zg-forest-soft);
    --gsg-gold: var(--zg-gold);
    --gsg-mint: var(--zg-mint);
    --gsg-ink: var(--zg-ink);
    --gsg-muted: var(--zg-muted);
    --gsg-line: var(--zg-line);
    --gsg-surface: var(--zg-surface);
    --gp-forest: var(--zg-forest);
    --gp-forest-soft: var(--zg-forest-soft);
    --gp-ink: var(--zg-ink);
    --gp-muted: var(--zg-muted);
    --gp-line: var(--zg-line);
    --gp-surface: var(--zg-surface);
    --gm-forest: var(--zg-forest);
    --gm-ink: var(--zg-ink);
    --gm-muted: var(--zg-muted);
    --gm-line: var(--zg-line);
    --gm-surface: var(--zg-surface);
    --gws-forest: var(--zg-forest);
    --gws-forest-soft: var(--zg-forest-soft);
    --gws-mint: var(--zg-mint);
    --gws-ink: var(--zg-ink);
    --gws-muted: var(--zg-muted);
    --gws-line: var(--zg-line);
    --gws-surface: var(--zg-surface);
    --gck-forest: var(--zg-forest);
    --gck-ink: var(--zg-ink);
    --gck-muted: var(--zg-muted);
    --gck-line: var(--zg-line);
    --gck-surface: var(--zg-surface);
    --gms-forest: var(--zg-forest);
    --gms-ink: var(--zg-ink);
    --gms-muted: var(--zg-muted);
    --gms-line: var(--zg-line);
    --gms-surface: var(--zg-surface);
}

.gsg-hero,
.gp-hero,
.gp-detail-head,
.gm-hero,
.gws-hero,
.gck-hero,
.gck-login,
.gms-hero,
.gms-login,
.gpu-hero,
.gpp-hero,
.gtr-hero {
    background:
        radial-gradient(circle at 88% 10%, rgba(217,170,72,.18), transparent 30%),
        linear-gradient(135deg, var(--zg-forest) 0%, var(--zg-forest-dark) 100%) !important;
    box-shadow: var(--zg-shadow);
}

.gsg-magazine,
.gsg-explore,
.gsg-routes,
.gsg-stats div,
.gp-panel,
.gp-card,
.gp-facts div,
.gm-panel,
.gm-featured,
.gm-categories,
.gm-empty,
.gm-home,
.gws-panel,
.gws-empty,
.gws-summary,
.gck-grid article,
.gck-security,
.gck-security-grid form,
.gms-panel,
.gms-stats div,
.gpu-panel,
.gpp-card,
.gtr-panel {
    border-color: var(--zg-line) !important;
    box-shadow: 0 10px 35px rgba(17, 57, 50, .045);
}

.gsg-button-primary,
.gsg-search button,
.gp-filter button,
.gm-read,
.gws-form button,
.gck-grid a,
.gck-login a,
.gck-security-grid button,
.gms-button,
.gms-search button,
.gms-results button,
.gms-upload button,
.gms-import-result button,
.gpp-save,
.grs-save,
.gtr-button {
    border-radius: 999px !important;
    background: var(--zg-gold) !important;
    color: var(--zg-forest-dark) !important;
    font-weight: 800 !important;
    box-shadow: 0 10px 22px rgba(217,170,72,.18);
}

.gsg-button-primary:hover,
.gsg-search button:hover,
.gp-filter button:hover,
.gm-read:hover,
.gws-form button:hover,
.gck-grid a:hover,
.gck-login a:hover,
.gck-security-grid button:hover,
.gms-button:hover,
.gms-search button:hover,
.gms-results button:hover,
.gms-upload button:hover,
.gms-import-result button:hover,
.gpp-save:hover,
.grs-save:hover,
.gtr-button:hover {
    filter: brightness(1.03);
    transform: translateY(-1px);
}

.gp-filter input,
.gp-filter select,
.gsg-search input,
.gws-form input,
.gms-radius select,
.gms-ascent-fields input,
.gms-ascent-fields select,
.gms-manual-form input,
.gms-manual-form select,
.gck-security-grid input,
.gpp-page input,
.gpp-page select,
.gpp-page textarea,
.grs-form input,
.grs-form select,
.grs-form textarea {
    border-color: #cddbd6 !important;
    border-radius: 14px !important;
}

.gp-filter input:focus,
.gp-filter select:focus,
.gsg-search input:focus,
.gws-form input:focus,
.gms-radius select:focus,
.gms-ascent-fields input:focus,
.gms-ascent-fields select:focus,
.gms-manual-form input:focus,
.gms-manual-form select:focus,
.gck-security-grid input:focus,
.gpp-page input:focus,
.gpp-page select:focus,
.gpp-page textarea:focus,
.grs-form input:focus,
.grs-form select:focus,
.grs-form textarea:focus {
    outline: 3px solid rgba(217,170,72,.24);
    border-color: var(--zg-gold) !important;
}

.gck-nav {
    margin-top: 14px !important;
}

.gck-nav-inner {
    border-radius: 999px !important;
    box-shadow: 0 10px 30px rgba(17,57,50,.05);
}

.gck-nav a.is-active,
.gck-nav a:hover {
    background: var(--zg-forest) !important;
    color: #fff !important;
}

.leaflet-container {
    font-family: inherit;
    z-index: 0;
}

.leaflet-pane {
    z-index: 1;
}

.leaflet-top,
.leaflet-bottom {
    z-index: 2;
}

.leaflet-popup-pane {
    z-index: 3;
}

@media (max-width: 720px) {
    .gsg-page,
    .gp-page,
    .gm-page,
    .gws-page,
    .gck-page,
    .gms-page {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }

    .gsg-hero,
    .gp-hero,
    .gp-detail-head,
    .gm-hero,
    .gws-hero,
    .gck-hero,
    .gms-hero {
        border-radius: 22px !important;
    }

    .zg-navigation {
        gap: 18px;
    }
}
