/*
Theme Name: TDKA
Theme URI: https://example.invalid/tdka
Author: TDKA
Description: Rodzinny motyw blogowy TDKA — podróże, camping, rowery i wspólne chwile.
Version: 1.0.0
Requires at least: 6.5
Requires PHP: 8.0
Text Domain: tdka
*/


/* ======================================================
   KOLORY I USTAWIENIA
====================================================== */

:root {
    --green: #173f2b;
    --green2: #315c3b;
    --cream: #faf8f2;
    --ink: #1d2925;
    --muted: #68736d;
    --line: #e7e2d7;
    --white: #fff;
    --max: 1240px;
}


/* ======================================================
   PODSTAWOWE
====================================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--cream);
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.65;
}

a {
    color: var(--green);
    text-decoration: none;
}

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

.wrap {
    width: min(var(--max), calc(100% - 40px));
    margin: auto;
}


/* ======================================================
   NAGŁÓWEK
====================================================== */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--line);

    position: sticky;
    top: 0;

    z-index: 1000;
}

.header-inner {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 24px;
}


/* LOGO */

.brand {
    font-size: 34px;
    font-weight: 800;
    letter-spacing: 2px;
    white-space: nowrap;
}

.brand small {
    display: block;

    font-size: 9px;
    letter-spacing: 2px;
    font-weight: 500;
}


/* PRAWA STRONA NAGŁÓWKA */

.header-right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-right nav {
    display: flex;
    align-items: center;
}


/* MENU */

.menu {
    display: flex;
    align-items: center;

    gap: 24px;

    list-style: none;

    margin: 0;
    padding: 0;
}

.menu a {
    color: var(--ink);
    font-size: 14px;
    white-space: nowrap;
}


/* ======================================================
   WYSZUKIWARKA W NAGŁÓWKU
====================================================== */

.header-search {
    position: relative;

    display: flex;
    align-items: center;
}


/* LUPA */

.search-toggle {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 34px;
    height: 34px;

    padding: 0;

    background: transparent;
    border: 0;

    font-size: 17px;
    line-height: 1;

    cursor: pointer;
}


/* FORMULARZ DOMYŚLNIE UKRYTY */

.search-form-tdka {
    display: none;

    position: absolute;

    top: 44px;
    right: 0;

    width: 330px;

    padding: 12px;

    background: #fff;

    border: 1px solid var(--line);
    border-radius: 8px;

    box-shadow: 0 10px 30px rgba(0, 0, 0, .15);

    z-index: 9999;
}


/* FORMULARZ PO KLIKNIĘCIU LUPY */

.search-form-tdka.search-open {
    display: flex;

    align-items: center;

    gap: 8px;
}


/* POLE WYSZUKIWANIA */

.search-form-tdka input {
    flex: 1;
    min-width: 0;

    height: 38px;

    padding: 0 12px;

    background: #fff;

    border: 1px solid #d8d8d8;
    border-radius: 4px;

    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;

    outline: none;
}

.search-form-tdka input:focus {
    border-color: var(--green2);
}


/* PRZYCISK SZUKAJ */

.search-form-tdka button {
    height: 38px;

    padding: 0 15px;

    border: 0;
    border-radius: 4px;

    background: var(--green2);
    color: #fff;

    font-size: 13px;

    cursor: pointer;
}


/* ======================================================
   BANER
====================================================== */

.hero {
    background: #fff;
}

.hero img {
    display: block;
    width: 100%;
    height: auto;
}


/* ======================================================
   SEKCJE
====================================================== */

.section {
    padding: 62px 0;
}

.section-title {
    margin: 0 0 32px;

    text-align: center;

    font-family: Georgia, serif;
    font-size: 38px;
}


/* ======================================================
   KARTY WPISÓW
====================================================== */

.posts-grid {
    display: grid;

    grid-template-columns: repeat(3, 1fr);

    gap: 26px;
}

.card {
    overflow: hidden;

    background: #fff;

    border-radius: 8px;

    box-shadow: 0 7px 24px rgba(0, 0, 0, .06);
}

.card img {
    width: 100%;

    aspect-ratio: 16 / 10;

    object-fit: cover;
}

.card-body {
    padding: 20px;
}

.meta {
    color: var(--muted);

    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card h2 {
    font-family: Georgia, serif;
    font-size: 24px;
    line-height: 1.2;
}


/* ======================================================
   NASZE TEMATY
====================================================== */

.topics {
    background: #f2efe7;
}

.topic-grid {
    display: flex;

    flex-wrap: wrap;
    justify-content: center;

    gap: 24px;

    text-align: center;
}

.topic {
    flex: 0 1 calc(33.333% - 16px);

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    min-height: 180px;

    padding: 30px 24px;

    background: #fff;

    border: 1px solid rgba(23, 63, 43, .06);
    border-radius: 10px;

    box-shadow: 0 7px 24px rgba(0, 0, 0, .06);

    color: var(--ink);

    text-decoration: none;

    transition:
        transform .2s ease,
        box-shadow .2s ease;
}

a.topic:hover {
    transform: translateY(-5px);

    box-shadow: 0 12px 30px rgba(0, 0, 0, .10);
}

.topic .icon {
    display: flex;

    align-items: center;
    justify-content: center;

    width: 68px;
    height: 68px;

    margin-bottom: 14px;

    background: #f2efe7;

    border-radius: 50%;

    font-size: 36px;
    line-height: 1;
}

.topic strong {
    display: block;

    margin: 0 0 7px;

    color: var(--green);

    font-family: Georgia, serif;
    font-size: 22px;
}

.topic span {
    display: block;

    max-width: 260px;

    color: var(--muted);

    font-size: 15px;
    line-height: 1.5;
}


/* ======================================================
   O NAS
====================================================== */

.about-grid {
    display: grid;

    grid-template-columns: 1fr 1.4fr;

    gap: 48px;

    align-items: center;
}

.about-box {
    padding: 34px;

    background: #fff;

    border-radius: 8px;
}


/* ======================================================
   PRZYCISKI
====================================================== */

.btn {
    display: inline-block;

    padding: 12px 20px;

    background: var(--green2);
    color: #fff;

    border-radius: 3px;

    font-size: 13px;

    text-transform: uppercase;
    letter-spacing: .5px;
}


/* ======================================================
   TREŚĆ WPISÓW I STRON
====================================================== */

.content-area {
    max-width: 900px;

    padding: 50px 0;
}

.entry-title {
    font-family: Georgia, serif;

    font-size: 44px;

    line-height: 1.15;
}

.entry-content {
    font-size: 18px;
}


/* ======================================================
   STOPKA
====================================================== */

.site-footer {
    padding: 32px 0;

    background: #fff;

    border-top: 1px solid var(--line);
}

.footer-inner {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 30px;
}

.footer-note {
    font-family: Georgia, serif;

    font-style: italic;
}


/* ======================================================
   WORDPRESS
====================================================== */

.wp-caption,
.gallery-caption {
    max-width: 100%;
}

.alignwide {
    max-width: 1200px;

    margin-left: auto;
    margin-right: auto;
}

.alignfull {
    width: 100%;
}

.screen-reader-text {
    position: absolute;

    left: -9999px;
}


/* ======================================================
   TABLET
====================================================== */

@media (max-width: 900px) {

    .menu {
        display: none;
    }

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

    .topic {
        flex-basis: calc(50% - 12px);
    }

    .about-grid {
        grid-template-columns: 1fr;
    }


}


/* ======================================================
   TELEFON
====================================================== */

@media (max-width: 620px) {

    .wrap {
        width: min(100% - 24px, var(--max));
    }

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

    .topic {
        flex-basis: 100%;

        min-height: 170px;
    }

    .section {
        padding: 42px 0;
    }

    .section-title {
        font-size: 31px;
    }

    .entry-title {
        font-size: 34px;
    }

    .brand {
        font-size: 29px;
    }

    .search-form-tdka {
        width: 280px;
    }

}

/* ======================================================
   WYNIKI WYSZUKIWANIA - WYGLĄD
====================================================== */

.search-page {
    padding-top: 45px;
    padding-bottom: 70px;
}


/* NAGŁÓWEK */

.search-header {
    margin-bottom: 35px;
    text-align: center;
}

.search-header .section-title {
    margin-bottom: 8px;
}

.search-query {
    margin: 0;
    color: var(--muted);
    font-size: 16px;
}

.search-query strong {
    color: var(--green);
}


/* KARTY TYLKO NA STRONIE WYSZUKIWANIA */

.search-page .posts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 26px;
}

.search-page .card {
    flex: 0 1 370px;
    max-width: 370px;
    width: 100%;
}


/* ZDJĘCIE */

.search-page .card img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}


/* TREŚĆ */

.search-page .card-body {
    padding: 22px;
}

.search-page .card h2 {
    margin: 12px 0;

    font-size: 24px;
    line-height: 1.25;
}

.search-page .card h2 a {
    color: var(--green);
}

.search-page .card p {
    margin-bottom: 16px;
}


/* CZYTAJ DALEJ */

.search-page .read-more {
    font-weight: 600;
}


/* PAGINACJA */

.search-pagination {
    margin-top: 40px;
    text-align: center;
}

.search-pagination .nav-links {
    display: flex;
    justify-content: center;
    align-items: center;

    gap: 8px;
}


/* TELEFON */

@media (max-width: 620px) {

    .search-page .card {
        flex-basis: 100%;
        max-width: 100%;
    }

}

/* ======================================================
   STRONY KATEGORII
====================================================== */

.archive-page {
    padding-top: 0;
    padding-bottom: 70px;
}


/* NAGŁÓWEK KATEGORII */

.archive-header {
    max-width: 760px;

    margin: 0 auto 45px;
    padding: 48px 20px 35px;

    text-align: center;
}

.archive-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 72px;
    height: 72px;

    margin: 0 auto 15px;

    background: #f2efe7;

    border-radius: 50%;

    font-size: 36px;
    line-height: 1;
}

.archive-header .section-title {
    margin: 0 0 12px;

    color: var(--green);

    font-size: 42px;
}

.archive-description {
    max-width: 650px;

    margin: 0 auto;

    color: var(--muted);

    font-size: 17px;
    line-height: 1.6;
}

.archive-description p {
    margin: 0;
}


/* ======================================================
   KARTY KATEGORII
====================================================== */

.archive-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;

    gap: 28px;
}


/* maksymalnie 3 karty w rzędzie */

.archive-grid .card {
    flex: 0 1 370px;

    width: 100%;
    max-width: 370px;
}


/* zdjęcie */

.archive-grid .card img {
    width: 100%;

    aspect-ratio: 16 / 10;

    object-fit: cover;
}


/* zawartość */

.archive-grid .card-body {
    padding: 22px;
}

.archive-grid .card h2 {
    margin: 10px 0 12px;

    font-size: 24px;
}

.archive-grid .card h2 a {
    color: var(--green);
}

.archive-grid .card p {
    margin-bottom: 16px;
}


/* CZYTAJ DALEJ */

.archive-grid .read-more {
    font-weight: 600;
}


/* ======================================================
   PAGINACJA
====================================================== */

.archive-pagination {
    margin-top: 45px;

    text-align: center;
}

.archive-pagination .nav-links {
    display: flex;
    align-items: center;
    justify-content: center;

    gap: 8px;
}

.archive-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 38px;
    height: 38px;

    padding: 0 10px;

    background: #fff;

    border: 1px solid var(--line);
    border-radius: 4px;

    color: var(--green);
}

.archive-pagination .page-numbers.current {
    background: var(--green2);
    color: #fff;
}


/* ======================================================
   PUSTA KATEGORIA
====================================================== */

.archive-empty {
    max-width: 600px;

    margin: 0 auto;

    padding: 40px;

    background: #fff;

    border-radius: 10px;

    text-align: center;

    box-shadow: 0 7px 24px rgba(0, 0, 0, .06);
}

.archive-empty h2 {
    margin-top: 0;

    color: var(--green);

    font-family: Georgia, serif;
}


/* ======================================================
   TELEFON
====================================================== */

@media (max-width: 620px) {

    .archive-header {
        padding-top: 35px;
        margin-bottom: 30px;
    }

    .archive-header .section-title {
        font-size: 34px;
    }

    .archive-grid .card {
        flex-basis: 100%;
        max-width: 100%;
    }

}

/* ======================================================
   GRAFIKI - NASZE TEMATY
====================================================== */

.topic .icon.topic-image {
    width: 190px;
    height: 190px;
    min-width: 190px;
    min-height: 190px;
    flex: 0 0 190px;

    margin: 0 0 18px 0;
    padding: 0;

    background: transparent;
    border-radius: 50%;
    overflow: hidden;
}

.topic .icon.topic-image img {
    display: block;
    width: 190px;
    height: 190px;
    max-width: none;

    object-fit: cover;
    object-position: center;

    border-radius: 50%;
}
/* ==================================================
   TDKA W LICZBACH
================================================== */

.tdka-stats {
    padding: 45px 0 65px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}


/* KAFEL */

.stat-card {
    position: relative;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 165px;
    padding: 25px 15px;

    background: rgba(255, 255, 255, 0.72);

    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 16px;

    text-align: center;
    text-decoration: none;

    box-shadow:
        0 8px 25px rgba(0, 0, 0, 0.05);

    opacity: 0;
    transform: translateY(25px);

    transition:
        opacity 0.7s ease,
        transform 0.7s ease,
        box-shadow 0.35s ease,
        background 0.35s ease;
}


/* pojawienie się */

.stat-card.visible {
    opacity: 1;
    transform: translateY(0);
}


/* hover */

.stat-card:hover {
    transform: translateY(-5px);

    background: #ffffff;

    box-shadow:
        0 14px 35px rgba(0, 0, 0, 0.09);

    text-decoration: none;
}


/* UKRYWAMY EMOJI */

.stat-icon {
    display: none;
}


/* LICZBA */

.stat-number {
    display: block;

    font-size: 52px;
    line-height: 1;

    font-weight: 700;

    /*color: #55524f;*/
	color: #C6CECE;

    letter-spacing: -1px;
}


/* delikatna kreska */

.stat-number::after {
    content: "";

    display: block;

    width: 32px;
    height: 2px;

    margin: 14px auto 12px;

    background: #c99a63;

    border-radius: 2px;

    transition: width 0.3s ease;
}


.stat-card:hover .stat-number::after {
    width: 55px;
}


/* OPIS */

.stat-label {
    display: block;

    font-size: 13px;
    line-height: 1.4;

    font-weight: 500;

    text-transform: uppercase;

    letter-spacing: 1.6px;

    color: #817d78;
}


/* ==================================================
   TABLET
================================================== */

@media (max-width: 900px) {

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* ==================================================
   TELEFON
================================================== */

@media (max-width: 520px) {

    .tdka-stats {
        padding: 30px 0 45px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .stat-card {
        min-height: 135px;
        padding: 20px 10px;
    }

    .stat-number {
        font-size: 42px;
    }

    .stat-label {
        font-size: 11px;
        letter-spacing: 1px;
    }

}

.tdka-stats .section-title {
    color: #C6CECE;
}

/* ======================================================
   MENU MOBILNE
====================================================== */

.menu-toggle {
    display: none;
    background: transparent;
    border: 0;
    color: var(--green);
    font-size: 28px;
    cursor: pointer;
    padding: 4px 8px;
}

@media (max-width: 900px) {

    .menu-toggle {
        display: block;
    }

    .header-right nav {
        display: none;
        position: absolute;
        top: 76px;
        left: 0;
        right: 0;

        background: #fff;
        border-top: 1px solid var(--line);
        border-bottom: 1px solid var(--line);

        padding: 18px 20px;
        box-shadow: 0 8px 20px rgba(0, 0, 0, .08);
    }

    .header-right nav.menu-open {
        display: block;
    }

    .header-right nav .menu {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .header-right nav .menu a {
        font-size: 16px;
    }
}
