/*
Theme Name: Mediaflex
Theme URI: https://mediaflex.pl
Author: Krzysztof Język
Author URI: https://mediaflex.pl
Description: English version of Mefiaflex software house website.
Version: 1.0
Text Domain: mediaflex
*/

:root {
    --bg-900: #181a1b;
    /* tło strony */
    --bg-850: #151718;
    /* alternatywne tło */
    --bg-800: #111315;
    /* karty / pola */
    --bg-700: #0c0e10;
    /* hover */
    --txt-100: #f2f5f7;
    /* tekst główny */
    --txt-300: #c6cdd4;
    /* tekst drugorzędny */
    --txt-500: #93a0ae;
    /* meta/placeholder */
    --bd-600: rgba(255, 255, 255, 0.1);
    --shadow: 0 10px 24px rgba(0, 0, 0, 0.35);

    --primary: #6f3bd9;
    --secondary: #2cfbba;
}

/* Ogólne */
body {
    background: var(--bg-900);
    color: var(--txt-100);
}

.container h1 {
    color: var(--txt-100);
    font-weight: 800;
    letter-spacing: 0.2px;
    margin-bottom: 0.25rem;
}

.container h1 + * {
    color: var(--txt-500);
}

/* =======================
   TAGI
   ======================= */
.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.6rem;
}

.tag-list .tag-item {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 0.9rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgb(36, 35, 39) 0%, rgb(36, 35, 39) 100%);
    /* border: 1px solid var(--bd-600); */
    color: var(--txt-300);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s,
        transform 0.15s;
}

.tag-list .tag-item:hover {
    color: #fff;
    background: var(--bg-700);
    border-color: var(--primary);
    transform: translateY(-1px);
}

.tag-list .tag-item.current-tag {
    color: #061018;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    /* border-color:transparent; */
}

/* =======================
   WYSZUKIWARKA
   ======================= */
.searchform {
    gap: 0.6rem;
    max-width: 415px;
    width: 100%;
}


.searchform .form-control {
    background: var(--bg-800);
    border: 2px solid var(--primary);
    color: var(--txt-100);
    border-radius: 4px;
    height: 52px;
    padding: 0 1rem;
    font-size: 1rem;
    box-shadow: none;
}

.searchform .form-control::placeholder {
    color: var(--txt-500);
}

.searchform .form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(44, 251, 186, 0.35);
    background: var(--bg-850);
}

.btn,
button,
input[type="submit"] {
    border-radius: 4px;
    font-weight: 500;
    border: none;
    padding: 0.9rem 1.6rem;
    transition: 0.2s ease-in-out;
    background: var(--primary);
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    background-color: #6f3bd9;
    font-size: 16px;
}

.btn:hover,
button:hover,
input[type="submit"]:hover {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.45);
}

/* =======================
   KAFELKI POSTÓW
   ======================= */
.realisation {
    margin-bottom: 2rem;
}

.r-miniature {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg-800);
    border: 1px solid var(--bd-600);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.2s ease;
}

.r-miniature:hover {
    transform: translateY(-3px);
    border-color: rgba(111, 59, 217, 0.45);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
}

.r-image {
    position: relative;
    padding-top: 56%;
    background: var(--bg-700);
}

.r-image .r-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition:
        transform 0.4s ease,
        filter 0.2s ease;
    filter: saturate(1.05);
}

.r-miniature:hover .r-image .r-bg {
    transform: scale(1.03);
}

/* Treść kafla */
.r-miniature .p-4 {
    padding: 1.1rem 1.1rem 1.2rem;
}

.r-miniature .date {
    color: var(--txt-500);
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.r-miniature .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    margin-bottom: 0.7rem;
    color: var(--txt-300);
}

.r-miniature .tags a {
    color: var(--txt-300);
    text-decoration: none;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.18);
    transition:
        color 0.2s,
        border-color 0.2s;
}

.r-miniature .tags a:hover {
    color: var(--secondary);
    border-color: var(--secondary);
}

.r-bg-header h2 {
    font-size: 1.35rem;
    line-height: 1.25;
    margin: 0 0 0.55rem 0;
    color: var(--txt-100);
    font-weight: 800;
}

.r-bg-header a {
    text-decoration: none;
}

.r-bg-header a:hover h2 {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.r-miniature p {
    color: var(--txt-300);
    margin: 0;
}

/* =======================
   PAGINACJA
   ======================= */
.pagination {
    display: flex;
    justify-content: center;
}

.pagination ul {
    display: flex;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.pagination li {
    display: inline-flex;
}

.pagination a,
.pagination span {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 0.8rem;
    border-radius: 10px;
    border: 1px solid var(--bd-600);
    background: var(--bg-800);
    color: var(--txt-300);
    text-decoration: none;
    font-weight: 700;
    transition:
        background 0.2s,
        color 0.2s,
        border-color 0.2s,
        transform 0.15s;
}

.pagination a:hover {
    color: #fff;
    border-color: var(--primary);
    background: var(--bg-700);
    transform: translateY(-1px);
}

.pagination .current {
    color: #061018;
    background: var(--primary);
    border-color: transparent;
}

/* =======================
   RESPONSYWNOŚĆ
   ======================= */
@media (max-width: 991.98px) {
    .r-bg-header h2 {
        font-size: 1.2rem;
    }
}

@media (max-width: 575.98px) {
    .searchform {
        flex-direction: column;
    }

    .searchform .btn {
        width: 100%;
    }
}

/* =======================
   DROBNE DOPASOWANIA BOOTSTRAP
   ======================= */
a {
    color: var(--secondary);
}

a:hover {
    color: var(--primary);
}

.form-control:focus {
    box-shadow: none;
}

/* ============ SINGLE POST – DARK THEME (no borders) ============ */
:root {
    --bg-900: #181a1b;
    --bg-780: #141619;
    /* delikatnie jaśniejsze tło pod treść */
    --bg-800: #111315;
    --txt-100: #f2f5f7;
    --txt-300: #c6cdd4;
    --primary: #6f3bd9;
    --secondary: #2cfbba;
}

/* HERO */
.post-hero {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.25)),
        var(--hero) center/cover no-repeat;
    min-height: 45vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 4rem 0;
}

.post-title {
    color: #fff;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.post-meta {
    color: var(--txt-300);
    font-size: 0.95rem;
    display: flex;
    gap: 0.6rem;
    align-items: center;
    flex-wrap: wrap;
}

/* Kategorie (chipsy) */
.post-cats {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.6rem;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    height: 32px;
    padding: 0 0.8rem;
    border-radius: 999px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.9rem;
    letter-spacing: 0.2px;
    transition:
        transform 0.15s ease,
        background 0.2s ease;
}

.cat-chip:hover {
    transform: translateY(-1px);
    background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.post-body {
    background: var(--bg-780);
    padding: 2.5rem;
    margin-top: -2rem;
    border-radius: 12px;
}

.post-body p {
    color: var(--txt-300);
    line-height: 1.75;
    margin: 0 0 1.2rem;
}

.post-body h2,
.post-body h3 {
    color: var(--txt-100);
    font-weight: 700;
    margin: 1.8rem 0 0.8rem;
}

.post-body a {
    color: var(--secondary);
}

.post-body a:hover {
    color: var(--primary);
}

.post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* Autor */
.post-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 2rem;
    padding-top: 1.2rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.post-author .author-avatar img {
    border-radius: 50%;
}

.post-author .author-name {
    font-weight: 600;
    color: var(--txt-100);
}

/* Nawigacja */
.post-nav {
    margin-top: 3rem;
    padding: 2rem 0;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-card {
    flex: 1;
    min-width: 45%;
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--bg-780);
    border-radius: 12px;
    padding: 1rem 1.2rem;
    text-decoration: none;
    color: var(--txt-100);
    transition:
        0.2s transform ease,
        background 0.2s ease;
}

.nav-card:hover {
    transform: translateY(-3px);
    background: var(--primary);
    color: #fff;
}

.nav-card .thumb {
    flex: 0 0 64px;
    height: 64px;
    border-radius: 8px;
    background-size: cover;
    background-position: center;
    background-color: #222;
}

.nav-card .info {
    display: flex;
    flex-direction: column;
}

.nav-card .label {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--secondary);
    margin-bottom: 0.25rem;
    letter-spacing: 0.06em;
}

.nav-card h3 {
    font-size: 1rem;
    margin: 0;
    line-height: 1.3;
}

/* Responsywność */
@media (max-width: 767.98px) {
    .nav-card {
        min-width: 100%;
    }
}

.post-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.5rem;
    margin: 0.3rem 0 0.6rem;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 0 0.7rem;
    height: 28px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: var(--primary);
    color: #fff;
    text-decoration: none;
    transition:
        background 0.2s,
        transform 0.15s;
}
.cat-chip:hover {
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: translateY(-1px);
}
