/*
Theme Name: Apollo Otwock
Theme URI: https://tkkf-apollo-otwock.pl
Author: Apollo
Description: Motyw WordPress 1:1 dla Ogniska TKKF "Apollo" Otwock. Nagłówek, stopka i strona wpisów w spójnej kolorystyce i typografii. Responsywny i przyjazny urządzeniom mobilnym.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apollo-otwock
*/

/* ==========================================================================
   Zmienne kolorystyczne i typograficzne
   ========================================================================== */
:root {
    --apollo-green-dark: #1e3d1e;
    --apollo-green: #2d5a2d;
    --apollo-green-mid: #3a6b34;
    --apollo-green-accent: #4a8c3f;
    --apollo-green-light: #5da34f;
    --apollo-bg-cream: #f4f4ee;
    --apollo-bg-light: #f8f8f4;
    --apollo-white: #ffffff;
    --apollo-text: #2b2b2b;
    --apollo-text-light: #6b6b6b;
    --apollo-text-muted: #8a8a8a;
    --apollo-border: #e5e5e0;
    --apollo-footer-bg: #16261a;
    --apollo-radius: 10px;
    --apollo-radius-lg: 16px;
    --apollo-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    --apollo-shadow-sm: 0 2px 12px rgba(0, 0, 0, 0.06);
    --apollo-font: 'Poppins', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
    --apollo-container: 1200px;
}

/* ==========================================================================
   Reset i podstawy
   ========================================================================== */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--apollo-font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--apollo-text);
    background-color: var(--apollo-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: var(--apollo-green-accent);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--apollo-green);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--apollo-font);
    font-weight: 700;
    color: var(--apollo-text);
    line-height: 1.2;
    margin: 0 0 0.6em;
}

p {
    margin: 0 0 1em;
}

ul, ol {
    margin: 0 0 1em;
    padding-left: 1.4em;
}

.apollo-container {
    max-width: var(--apollo-container);
    margin: 0 auto;
    padding: 0 24px;
}

/* ==========================================================================
   Przyciski
   ========================================================================== */
.apollo-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.25s ease;
    line-height: 1;
    text-align: center;
}

.apollo-btn-primary {
    background-color: var(--apollo-green);
    color: var(--apollo-white);
    border-color: var(--apollo-green);
}

.apollo-btn-primary:hover {
    background-color: var(--apollo-green-dark);
    border-color: var(--apollo-green-dark);
    color: var(--apollo-white);
}

.apollo-btn-outline {
    background-color: transparent;
    color: var(--apollo-green);
    border-color: var(--apollo-border);
}

.apollo-btn-outline:hover {
    border-color: var(--apollo-green);
    color: var(--apollo-green);
    background-color: var(--apollo-bg-light);
}

.apollo-btn-accent {
    background-color: var(--apollo-green-accent);
    color: var(--apollo-white);
    border-color: var(--apollo-green-accent);
}

.apollo-btn-accent:hover {
    background-color: var(--apollo-green);
    border-color: var(--apollo-green);
    color: var(--apollo-white);
}

/* ==========================================================================
   Nagłówek
   ========================================================================== */
.apollo-header {
    background-color: var(--apollo-white);
    border-bottom: 1px solid var(--apollo-border);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.apollo-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 14px;
    padding-bottom: 14px;
}

/* Logo */
.apollo-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.apollo-logo-mark {
    width: 54px;
    height: 54px;
    border: 3px solid var(--apollo-green);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    background: var(--apollo-white);
}

.apollo-logo-mark svg {
    width: 100%;
    height: 100%;
}

.apollo-logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.apollo-logo-small {
    font-size: 11px;
    color: var(--apollo-text-light);
    letter-spacing: 0.3px;
}

.apollo-logo-main {
    font-size: 26px;
    font-weight: 800;
    color: var(--apollo-green);
    letter-spacing: 1px;
}

.apollo-logo-sub {
    font-size: 11px;
    color: var(--apollo-text-light);
    letter-spacing: 3px;
}

/* Nawigacja */
.apollo-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.apollo-nav ul {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.apollo-nav li {
    position: relative;
}

.apollo-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--apollo-text);
    font-weight: 500;
    font-size: 15px;
    border-radius: 6px;
    transition: color 0.2s ease;
}

.apollo-nav a:hover,
.apollo-nav .current-menu-item > a,
.apollo-nav .current_page_item > a {
    color: var(--apollo-green-accent);
}

.apollo-nav .current-menu-item > a::after,
.apollo-nav .current_page_item > a::after {
    content: "";
    display: block;
    height: 3px;
    background: var(--apollo-green-accent);
    border-radius: 3px;
    margin-top: 6px;
}

/* Podmenu */
.apollo-nav .menu-item-has-children > a::after {
    content: " \25be";
    font-size: 10px;
    color: var(--apollo-text-light);
}

.apollo-nav ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    flex-direction: column;
    background: var(--apollo-white);
    box-shadow: var(--apollo-shadow);
    border-radius: 8px;
    padding: 8px;
    min-width: 200px;
    gap: 0;
    z-index: 100;
}

.apollo-nav li:hover > ul {
    display: flex;
}

.apollo-nav ul ul a {
    padding: 10px 14px;
    white-space: nowrap;
}

/* Przycisk CTA w nagłówku */
.apollo-header-cta {
    flex-shrink: 0;
}

/* Hamburger */
.apollo-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.apollo-menu-toggle span {
    display: block;
    width: 26px;
    height: 3px;
    background: var(--apollo-green);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.apollo-menu-toggle.is-open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.apollo-menu-toggle.is-open span:nth-child(2) {
    opacity: 0;
}

.apollo-menu-toggle.is-open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ==========================================================================
   Strona wpisów / treść ogólna
   ========================================================================== */
.apollo-main {
    padding: 60px 0;
    min-height: 50vh;
}

.apollo-page-header {
    margin-bottom: 40px;
}

.apollo-page-title {
    font-size: 40px;
    color: var(--apollo-green);
    margin-bottom: 8px;
}

.apollo-page-subtitle {
    color: var(--apollo-text-light);
    font-size: 16px;
}

/* Układ z sidebarem */
.apollo-content-wrap {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 48px;
    align-items: start;
}

.apollo-content-wrap.no-sidebar {
    grid-template-columns: 1fr;
    max-width: 800px;
    margin: 0 auto;
}

/* Lista wpisów */
.apollo-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.apollo-post-card {
    background: var(--apollo-white);
    border: 1px solid var(--apollo-border);
    border-radius: var(--apollo-radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.apollo-post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--apollo-shadow);
}

.apollo-post-thumb {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--apollo-bg-cream);
}

.apollo-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.apollo-post-card:hover .apollo-post-thumb img {
    transform: scale(1.05);
}

.apollo-post-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.apollo-post-meta {
    font-size: 13px;
    color: var(--apollo-text-muted);
    margin-bottom: 10px;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.apollo-post-meta a {
    color: var(--apollo-green-accent);
}

.apollo-post-title {
    font-size: 20px;
    margin-bottom: 12px;
}

.apollo-post-title a {
    color: var(--apollo-text);
}

.apollo-post-title a:hover {
    color: var(--apollo-green-accent);
}

.apollo-post-excerpt {
    color: var(--apollo-text-light);
    font-size: 15px;
    margin-bottom: 18px;
    flex-grow: 1;
}

.apollo-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--apollo-green-accent);
    font-weight: 600;
    font-size: 15px;
    margin-top: auto;
}

.apollo-read-more svg {
    width: 16px;
    height: 16px;
}

/* Pojedynczy wpis */
.apollo-single-thumb {
    border-radius: var(--apollo-radius-lg);
    overflow: hidden;
    margin-bottom: 32px;
}

.apollo-single-title {
    font-size: 38px;
    color: var(--apollo-green);
    margin-bottom: 16px;
}

.apollo-single-meta {
    font-size: 14px;
    color: var(--apollo-text-muted);
    margin-bottom: 32px;
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--apollo-border);
}

.apollo-single-content {
    font-size: 17px;
    line-height: 1.8;
    color: var(--apollo-text);
}

.apollo-single-content h2 {
    font-size: 28px;
    color: var(--apollo-green);
    margin-top: 1.6em;
}

.apollo-single-content h3 {
    font-size: 22px;
    margin-top: 1.4em;
}

.apollo-single-content img {
    border-radius: var(--apollo-radius);
    margin: 1.5em 0;
}

.apollo-single-content blockquote {
    border-left: 4px solid var(--apollo-green-accent);
    padding: 8px 24px;
    margin: 1.5em 0;
    background: var(--apollo-bg-light);
    color: var(--apollo-text-light);
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

.apollo-single-content a {
    text-decoration: underline;
}

/* Nawigacja wpisów */
.apollo-post-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid var(--apollo-border);
}

.apollo-post-nav a {
    display: flex;
    flex-direction: column;
    gap: 4px;
    max-width: 45%;
}

.apollo-post-nav .apollo-nav-label {
    font-size: 13px;
    color: var(--apollo-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.apollo-post-nav .apollo-nav-title {
    color: var(--apollo-text);
    font-weight: 600;
}

.apollo-post-nav a:hover .apollo-nav-title {
    color: var(--apollo-green-accent);
}

.apollo-post-nav .next {
    text-align: right;
    margin-left: auto;
    align-items: flex-end;
}

/* Paginacja */
.apollo-pagination {
    margin-top: 48px;
    display: flex;
    justify-content: center;
}

.apollo-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    margin: 0 4px;
    border-radius: 8px;
    border: 1px solid var(--apollo-border);
    color: var(--apollo-text);
    font-weight: 600;
    transition: all 0.2s ease;
}

.apollo-pagination .page-numbers.current,
.apollo-pagination .page-numbers:hover {
    background: var(--apollo-green);
    border-color: var(--apollo-green);
    color: var(--apollo-white);
}

/* Sidebar */
.apollo-sidebar .widget {
    background: var(--apollo-white);
    border: 1px solid var(--apollo-border);
    border-radius: var(--apollo-radius-lg);
    padding: 28px;
    margin-bottom: 28px;
}

.apollo-sidebar .widget-title {
    font-size: 20px;
    color: var(--apollo-green);
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 2px solid var(--apollo-green-accent);
}

.apollo-sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apollo-sidebar li {
    padding: 8px 0;
    border-bottom: 1px solid var(--apollo-border);
}

.apollo-sidebar li:last-child {
    border-bottom: none;
}

.apollo-sidebar a {
    color: var(--apollo-text);
}

.apollo-sidebar a:hover {
    color: var(--apollo-green-accent);
}

/* Wyszukiwarka */
.apollo-search-form {
    display: flex;
    gap: 8px;
}

.apollo-search-form input[type="search"] {
    flex-grow: 1;
    padding: 12px 14px;
    border: 1px solid var(--apollo-border);
    border-radius: 8px;
    font-family: var(--apollo-font);
    font-size: 15px;
}

.apollo-search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--apollo-green-accent);
}

.apollo-search-form button {
    background: var(--apollo-green);
    color: var(--apollo-white);
    border: none;
    border-radius: 8px;
    padding: 0 18px;
    cursor: pointer;
    font-weight: 600;
}

.apollo-search-form button:hover {
    background: var(--apollo-green-dark);
}

/* ==========================================================================
   Stopka
   ========================================================================== */
.apollo-footer {
    background-color: var(--apollo-footer-bg);
    color: rgba(255, 255, 255, 0.75);
    padding: 60px 0 0;
}

.apollo-footer a {
    color: rgba(255, 255, 255, 0.75);
}

.apollo-footer a:hover {
    color: var(--apollo-white);
}

.apollo-footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1.3fr;
    gap: 40px;
    padding-bottom: 48px;
}

.apollo-footer-col h4 {
    color: var(--apollo-white);
    font-size: 17px;
    margin-bottom: 20px;
}

.apollo-footer .apollo-logo-main {
    color: var(--apollo-white);
}

.apollo-footer .apollo-logo-small,
.apollo-footer .apollo-logo-sub {
    color: rgba(255, 255, 255, 0.6);
}

.apollo-footer .apollo-logo-mark {
    border-color: var(--apollo-green-accent);
    background: transparent;
}

.apollo-footer-about {
    font-size: 14px;
    line-height: 1.7;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.65);
}

.apollo-footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apollo-footer-col li {
    margin-bottom: 12px;
    font-size: 15px;
}

.apollo-footer-contact li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 15px;
}

.apollo-footer-contact svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    color: var(--apollo-green-accent);
    fill: var(--apollo-green-accent);
}

.apollo-social {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.apollo-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.apollo-social a:hover {
    background: var(--apollo-green-accent);
}

.apollo-social svg {
    width: 18px;
    height: 18px;
    fill: var(--apollo-white);
}

.apollo-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding: 24px 0;
    text-align: center;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.6);
}

/* ==========================================================================
   Komentarze
   ========================================================================== */
.apollo-comments {
    margin-top: 56px;
    padding-top: 40px;
    border-top: 1px solid var(--apollo-border);
}

.apollo-comments-title {
    font-size: 26px;
    color: var(--apollo-green);
    margin-bottom: 28px;
}

.apollo-comments .comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.apollo-comments .comment-list li {
    margin-bottom: 24px;
    padding: 20px;
    background: var(--apollo-bg-light);
    border-radius: var(--apollo-radius);
}

.apollo-comments .comment-author {
    font-weight: 700;
    color: var(--apollo-text);
}

.apollo-comments .comment-metadata {
    font-size: 13px;
    color: var(--apollo-text-muted);
    margin-bottom: 10px;
}

.apollo-comment-form input[type="text"],
.apollo-comment-form input[type="email"],
.apollo-comment-form input[type="url"],
.apollo-comment-form textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--apollo-border);
    border-radius: 8px;
    font-family: var(--apollo-font);
    font-size: 15px;
    margin-bottom: 16px;
}

.apollo-comment-form input:focus,
.apollo-comment-form textarea:focus {
    outline: none;
    border-color: var(--apollo-green-accent);
}

/* ==========================================================================
   Responsywność
   ========================================================================== */
@media (max-width: 992px) {
    .apollo-content-wrap {
        grid-template-columns: 1fr;
    }

    .apollo-sidebar {
        margin-top: 40px;
    }

    .apollo-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .apollo-menu-toggle {
        display: flex;
    }

    .apollo-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 82%;
        max-width: 360px;
        height: 100vh;
        background: var(--apollo-white);
        flex-direction: column;
        align-items: stretch;
        padding: 90px 24px 40px;
        box-shadow: -8px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }

    .apollo-nav.is-open {
        right: 0;
    }

    .apollo-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .apollo-nav li {
        width: 100%;
        border-bottom: 1px solid var(--apollo-border);
    }

    .apollo-nav a {
        padding: 14px 8px;
        font-size: 16px;
    }

    .apollo-nav .current-menu-item > a::after,
    .apollo-nav .current_page_item > a::after {
        display: none;
    }

    .apollo-nav ul ul {
        display: flex;
        position: static;
        box-shadow: none;
        padding: 0 0 0 16px;
        min-width: auto;
    }

    .apollo-nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 998;
    }

    .apollo-nav-overlay.is-open {
        display: block;
    }

    .apollo-header-cta {
        display: none;
    }

    .apollo-posts-grid {
        grid-template-columns: 1fr;
    }

    .apollo-page-title {
        font-size: 30px;
    }

    .apollo-single-title {
        font-size: 28px;
    }

    .apollo-main {
        padding: 40px 0;
    }

    .apollo-footer-grid {
        grid-template-columns: 1fr;
    }

    .apollo-post-nav {
        flex-direction: column;
    }

    .apollo-post-nav a {
        max-width: 100%;
    }

    .apollo-post-nav .next {
        text-align: left;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .apollo-container {
        padding: 0 16px;
    }

    .apollo-logo-main {
        font-size: 22px;
    }

    .apollo-logo-mark {
        width: 46px;
        height: 46px;
    }
}

/* ==========================================================================
   Pojedynczy wpis — jednolity szablon (zdjęcie główne, bez meta)
   ========================================================================== */
.apollo-single-main {
    padding: 0;
}

.apollo-single-banner {
    background-color: var(--apollo-bg-cream);
    padding: 60px 0 40px;
    text-align: center;
}

.apollo-single-cat {
    margin-bottom: 14px;
}

.apollo-single-cat a {
    display: inline-block;
    background: var(--apollo-green);
    color: var(--apollo-white);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    letter-spacing: 0.3px;
}

.apollo-single-cat a:hover {
    background: var(--apollo-green-dark);
    color: var(--apollo-white);
}

.apollo-single-banner .apollo-single-title {
    font-size: 42px;
    color: var(--apollo-text);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
}

.apollo-single-hero {
    background-color: var(--apollo-bg-cream);
    padding: 0 0 0;
}

.apollo-single-hero .apollo-single-thumb {
    max-width: 900px;
    margin: 0 auto;
    border-radius: var(--apollo-radius-lg);
    overflow: hidden;
    box-shadow: var(--apollo-shadow);
    transform: translateY(40px);
}

.apollo-single-hero .apollo-single-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.apollo-single-body {
    padding: 80px 0 70px;
    background: var(--apollo-white);
}

.apollo-single-body .apollo-single {
    max-width: 800px;
    margin: 0 auto;
}

.apollo-single-body .apollo-single-content {
    font-size: 17px;
    line-height: 1.85;
    color: var(--apollo-text);
}

.apollo-single-body .apollo-single-content > *:first-child {
    margin-top: 0;
}

.apollo-single-tags {
    margin-top: 32px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.apollo-single-tags a {
    display: inline-block;
    background: var(--apollo-bg-light);
    color: var(--apollo-text-light);
    font-size: 13px;
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--apollo-border);
}

.apollo-single-tags a:hover {
    background: var(--apollo-green-accent);
    color: var(--apollo-white);
    border-color: var(--apollo-green-accent);
}

/* Responsywność pojedynczego wpisu */
@media (max-width: 768px) {
    .apollo-single-banner {
        padding: 40px 0 30px;
    }

    .apollo-single-banner .apollo-single-title {
        font-size: 30px;
    }

    .apollo-single-hero .apollo-single-thumb {
        transform: translateY(24px);
    }

    .apollo-single-body {
        padding: 56px 0 50px;
    }

    .apollo-single-body .apollo-single-content {
        font-size: 16px;
    }
}
