/*
Theme Name: Wroclawski Festiwal Wina - Custom
Description: Oficjalny motyw strony Wroclawskiego Festiwalu Wina. Zbudowany bez page buildera i bez ACF - lekki, szybki, w pelni edytowalny w kodzie.
Version: 1.2
Author: Europa Forum
Text Domain: wfw-custom
*/

/* ==========================================================================
   PODSTAWOWE ZMIENNE - dopasowane do oryginalnych tokenow Breakdance
   ========================================================================== */
:root {
    --wfw-color-primary: #871811;   /* brand primary z Breakdance (--bde-brand-primary-color) */
    --wfw-color-dark: #2b2b2b;
    --wfw-color-light: #EDECE7;     /* --bde-background-color z oryginalu */
    --wfw-color-heading: #000000;   /* --bde-headings-color */
    --wfw-color-link: #000000;      /* --bde-links-color - UWAGA: linki sa CZARNE, nie bordowe */
    --wfw-color-gold: #c9a24b;
    --wfw-color-card: #FFFDF9;      /* --bde-palette-color-1 z oryginalu - tlo kart */
    --wfw-font-heading: 'Marcellus', serif;         /* --bde-heading-font-family */
    --wfw-font-body: 'Albert Sans', sans-serif;      /* --bde-body-font-family */
    --wfw-font-button: 'Sofia Sans', sans-serif;     /* font uzywany na przyciskach w oryginale */
    --wfw-max-width: 1440px;   /* --bde-section-width z oryginalu Breakdance */
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--wfw-font-body);
    color: #000;
    background: var(--wfw-color-light);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--wfw-font-heading);
    line-height: 1.2;
    text-align: center;
    color: var(--wfw-color-heading);
}

h1 {
    font-size: 3rem;      /* 48px - jak --bde-h1-font-size */
    font-weight: 600;
}

h2 {
    font-size: 2rem;      /* 32px - jak --bde-h2-font-size */
    font-weight: 500;
}

h3 {
    font-size: 1.4rem;
    font-weight: 400;
}

h4 {
    font-size: 1.2rem;
    font-weight: 400;
}

a {
    color: var(--wfw-color-link);
}

a:hover {
    color: var(--wfw-color-primary);
}

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

.wfw-container {
    max-width: var(--wfw-max-width);
    margin: 0 auto;
    padding: 0 40px;   /* --bde-section-horizontal-padding z oryginalu */
}

/* ==========================================================================
   HEADER - desktop: logo | menu (srodek) | jezyki + CTA
   ========================================================================== */
.wfw-header {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 16px 40px;
    max-width: var(--wfw-max-width);
    margin: 0 auto;
}

.wfw-logo {
    flex-shrink: 0;
}

.wfw-logo img {
    height: 60px;
    width: auto;
}

.wfw-nav {
    flex: 1 1 auto;
}

.wfw-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    margin: 0;
    padding: 0;
}

.wfw-nav li {
    margin: 0;
}

.wfw-nav a {
    text-decoration: none;
    text-transform: uppercase;
    color: var(--wfw-color-dark);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.wfw-nav a:hover {
    color: var(--wfw-color-primary);
    text-decoration: underline;
    text-underline-offset: 4px;
}

.wfw-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

.wfw-lang-switcher,
.wfw-lang-switcher ul {
    display: flex;
    gap: 8px;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
}

.wfw-lang-switcher li {
    list-style: none;
    margin: 0;
}

.wfw-lang-switcher a {
    display: flex;
}

.wfw-lang-switcher img {
    height: 18px;
    width: auto;
}

.wfw-cta-button {
    display: inline-block;
    background: var(--wfw-color-primary);
    color: #fff;
    padding: 8px 20px;
    border-radius: 9999px;   /* pigulka - jak przyciski Breakdance */
    text-decoration: none;
    font-family: var(--wfw-font-button);
    font-size: 1rem;
    font-weight: 400;
    white-space: nowrap;
}

.wfw-cta-button:hover {
    background: #6b1209;
    color: #fff;
}

/* --- Hamburger (ukryty na desktopie) --- */
.wfw-menu-toggle {
    display: none;
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    flex-shrink: 0;
}

.wfw-menu-toggle span {
    position: absolute;
    left: 10px;
    width: 24px;
    height: 2px;
    background: var(--wfw-color-dark);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.wfw-menu-toggle span:nth-child(1) { top: 14px; }
.wfw-menu-toggle span:nth-child(2) { top: 21px; }
.wfw-menu-toggle span:nth-child(3) { top: 28px; }

.wfw-menu-toggle--open span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.wfw-menu-toggle--open span:nth-child(2) { opacity: 0; }
.wfw-menu-toggle--open span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ==========================================================================
   SEKCJE OGOLNE - reuzywalne na wielu stronach
   ========================================================================== */
.wfw-section {
    padding: 60px 0;
}

/* Uzywaj tej klasy zamiast wfw-section dla podsekcji WEWNATRZ
   <main class="wfw-section"> - zapobiega sumowaniu sie paddingow */
.wfw-subsection {
    padding: 24px 0;
}

.wfw-section--light {
    background: var(--wfw-color-light);
}

.wfw-section-title {
    text-align: center;
    margin-bottom: 40px;
}

/* Karta - uzywana w Winnice, Sponsoring itd. */
.wfw-card {
    background: var(--wfw-color-card);
    border: 1px solid #e5e0da;
    border-radius: 6px;
    padding: 24px;
}

.wfw-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

/* ==========================================================================
   RZĄD LOGOTYPÓW - Partnerzy, Sponsorzy, Patronat itd.
   ========================================================================== */
.wfw-logo-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 40px;
    margin-top: 24px;
}

.wfw-logo-row img {
    max-height: 60px;
    width: auto;
}

/* ==========================================================================
   AKTUALNOSCI - lista wpisow (home.php / archive.php)
   ========================================================================== */
.wfw-news-grid {
    grid-template-columns: repeat(3, 1fr);
}

.wfw-news-card {
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    text-align: left;
}

.wfw-news-thumb {
    display: block;
    aspect-ratio: 3 / 2;
    background: #e5e0da;
}

.wfw-news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wfw-news-body {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    padding: 20px 24px 24px;
}

.wfw-news-date {
    font-size: 13px;
    color: #888;
    margin: 0 0 8px;
}

.wfw-news-card h3 {
    text-align: left;
    margin: 0 0 12px;
}

.wfw-news-card h3 a {
    text-decoration: none;
}

.wfw-news-excerpt {
    flex-grow: 1;
    font-size: 0.95rem;
}

.wfw-news-excerpt p {
    margin: 0 0 16px;
}

.wfw-news-more {
    font-weight: 600;
    text-decoration: none;
    color: var(--wfw-color-primary);
}

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

.wfw-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wfw-pagination .page-numbers {
    display: inline-block;
    min-width: 40px;
    padding: 8px 12px;
    border-radius: 9999px;
    text-decoration: none;
    background: var(--wfw-color-card);
}

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

/* ==========================================================================
   FOOTER
   ========================================================================== */
.wfw-footer {
    background: var(--wfw-color-primary);
    color: #fff;
    padding: 24px 0;
    font-size: 14px;
}

.wfw-footer .wfw-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.wfw-footer p {
    margin: 0;
}

.wfw-footer a {
    color: #fff;
}

.wfw-footer-social {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 12px;
}

.wfw-footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.2s ease;
}

.wfw-footer-social a:hover {
    transform: scale(1.12);
}

.wfw-footer-social a:nth-child(1) svg { fill: #1877f2; } /* Facebook */
.wfw-footer-social a:nth-child(2) svg { fill: #0a66c2; } /* LinkedIn */
.wfw-footer-social a:nth-child(3) svg { fill: #0a66c2; } /* Europa Forum - w kolorze reszty ikon */

/* ==========================================================================
   RESPONSYWNOSC
   ========================================================================== */

/* Ciasny desktop - menu jeszcze w jednej linii, ale ciasniej */
@media (max-width: 1399px) {
    .wfw-header { gap: 20px; padding: 16px 24px; }
    .wfw-nav ul { gap: 18px; }
    .wfw-nav a { font-size: 14px; }
}

/* Ponizej 1200px - hamburger. 7 pozycji menu + logo + CTA sie nie miesci */
@media (max-width: 1199px) {
    .wfw-header {
        flex-wrap: wrap;
        gap: 12px 16px;
        padding: 12px 20px;
    }

    .wfw-logo {
        order: 1;
        margin-right: auto;
    }

    .wfw-header-actions {
        order: 2;
    }

    .wfw-menu-toggle {
        display: block;
        order: 3;
    }

    .wfw-nav {
        order: 4;
        flex-basis: 100%;
        display: none;
    }

    .wfw-nav.wfw-nav--open {
        display: block;
    }

    .wfw-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        border-top: 1px solid rgba(0, 0, 0, 0.1);
    }

    .wfw-nav li {
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .wfw-nav a {
        display: block;
        padding: 14px 4px;
        font-size: 15px;
    }
}

/* Tablet / male laptopy */
@media (max-width: 1023px) {
    h1 { font-size: 2rem; }     /* jak --bde-h1-font-size w tym breakpoincie */
    h2 { font-size: 1.4rem; }
    h3 { font-size: 1.2rem; }
    h4 { font-size: 1rem; }

    .wfw-container {
        padding: 0 20px;
    }

    .wfw-section {
        padding: 40px 0;
    }

    .wfw-subsection {
        padding: 16px 0;
    }

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

/* Telefon */
@media (max-width: 767px) {
    :root {
        --wfw-max-width: 100%;
    }

    .wfw-container {
        padding: 0 20px;
    }

    .wfw-logo img {
        height: 48px;
    }

    .wfw-card-grid,
    .wfw-news-grid {
        grid-template-columns: 1fr;
    }

    .wfw-logo-row {
        gap: 24px;
    }

    .wfw-logo-row img {
        max-height: 44px;
    }

    .wfw-footer {
        padding: 24px 0;
    }

    .wfw-footer .wfw-container {
        flex-direction: column;
        text-align: center;
    }
}

/* Maly telefon - jezyki + CTA schodza do drugiego rzedu pod logo */
@media (max-width: 479px) {
    h1 { font-size: 1.6rem; }
    h2 { font-size: 1.2rem; }

    .wfw-logo img {
        height: 40px;
    }

    .wfw-menu-toggle {
        order: 2;
    }

    .wfw-header-actions {
        order: 3;
        flex-basis: 100%;
        justify-content: space-between;
    }

    .wfw-cta-button {
        padding: 6px 16px;
        font-size: 0.9rem;
    }

    .wfw-logo-row img {
        max-height: 36px;
    }

    .wfw-card {
        padding: 16px;
    }

    .wfw-news-card {
        padding: 0;
    }
}