@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;1,400&family=Lato:wght@300;400;700&display=swap');

/* ==========================================================
   RESET & TOKENY
   ========================================================== */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --ziel-ciemna:   #3a5626;
    --ziel-glowna:   #4e6b36;
    --ziel-srednia:  #5e7e42;
    --ziel-jasna:    #7a9e5a;
    --tlo:           #eef5e8;
    --tlo-karta:     #f7faf4;
    --zloto:         #c9a227;
    --zloto-jasne:   rgba(201,162,39,0.65);
    --tekst-ciemny:  #2b3e1e;
    --tekst-mid:     #4a6035;
    --biel:          #ffffff;
    --cien-karta:    0 2px 12px rgba(58,86,38,0.10);
    --cien-duzy:     0 6px 28px rgba(58,86,38,0.16);
    --radius:        10px;
}

/* ==========================================================
   BODY
   ========================================================== */
body {
    font-family: 'Lato', Arial, sans-serif;
    background-color: var(--tlo);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(94,126,66,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(58,86,38,0.06) 0%, transparent 50%);
    min-height: 100vh;
    padding: 0;
    color: var(--tekst-ciemny);
}

/* ==========================================================
   WRAPPER
   ========================================================== */
.page-wrapper {
    max-width: 1240px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0 20px 40px;
}

/* ==========================================================
   NAGŁÓWEK — poziomy, sticky
   ========================================================== */
.main-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--ziel-ciemna);
    padding: 0 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 120px;
    box-shadow: 0 2px 16px rgba(30,50,15,0.22);
    /* pełna szerokość ekranu niezależnie od wrappera */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    cursor: pointer;
}

/* Złoty akcent na dole headera */
.main-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 5%, var(--zloto) 40%, var(--zloto) 60%, transparent 95%);
    opacity: 0.5;
}

/* LOGO */
.logo-box {
    background: rgba(255,255,255,0.08);
    border: 1.5px solid rgba(201,162,39,0.4);
    padding: 6px 18px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--biel);
    border-radius: 6px;
    letter-spacing: 1px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* ==========================================================
   NAWIGACJA — pozioma
   ========================================================== */
.main-nav {
    display: flex;
    flex-direction: row;
    gap: 6px;
    align-items: center;
}

.nav-btn {
    display: block;
    background-color: transparent;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    text-align: center;
    padding: 8px 20px;
    font-family: 'Lato', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    border-radius: 5px;
    border: 1px solid transparent;
    transition: background-color 0.18s, color 0.18s, border-color 0.18s;
}

.nav-btn:hover {
    background-color: rgba(255,255,255,0.12);
    color: var(--biel);
    border-color: rgba(201,162,39,0.35);
}

.nav-btn.active {
    background-color: rgba(201,162,39,0.15);
    border-color: rgba(201,162,39,0.55);
    color: var(--biel);
}

/* ==========================================================
   HERO — pasek pod nagłówkiem
   ========================================================== */
.page-hero {
    background: linear-gradient(135deg, var(--ziel-glowna) 0%, var(--ziel-srednia) 100%);
    margin: 0 -20px;
    width: calc(100% + 40px);
    padding: 48px 56px;
    color: var(--biel);
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '🐴';
    position: absolute;
    right: 48px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 7rem;
    opacity: 0.08;
    pointer-events: none;
    line-height: 1;
}

.page-hero h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.4rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 8px;
}

.page-hero p {
    font-size: 1rem;
    color: rgba(255,255,255,0.75);
    font-weight: 300;
    max-width: 520px;
}

/* ==========================================================
   MAIN — dwie kolumny z marginesem od hero
   ========================================================== */
.main-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 28px;
}

@media (min-width: 768px) {
    .main-container {
        grid-template-columns: 300px 1fr;
    }
}

/* Wspólna kolumna */
.column {
    background-color: var(--tlo-karta);
    border: 1px solid rgba(94,126,66,0.18);
    padding: 28px;
    border-radius: var(--radius);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 400px;
    box-shadow: var(--cien-karta);
}

/* ==========================================================
   LEWA KOLUMNA — wydarzenia
   ========================================================== */
.homepage-events-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--tekst-ciemny);
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(201,162,39,0.3);
}

.events-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

/* Karta wydarzenia */
.event-card {
    display: flex;
    background-color: var(--biel);
    border-radius: 7px;
    border-left: 3px solid var(--zloto-jasne);
    box-shadow: var(--cien-karta);
    overflow: hidden;
    color: var(--tekst-ciemny);
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    cursor: pointer;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--cien-duzy);
}

.event-card.highlight {
    border-left-color: #b87333;
    background: linear-gradient(135deg, #fff8f0, #fff3e0);
}

.event-card.highlight .event-date {
    background-color: #b87333;
    color: var(--biel);
}

.event-card.highlight .event-tag {
    color: #b87333;
}

.event-card.highlight .event-name { color: #6b3a00; }
.event-card.highlight .event-time { color: #9e6a30; }
.event-card.highlight .event-desc { color: rgba(60,30,0,0.6); }

.event-date {
    background-color: var(--ziel-glowna);
    color: var(--biel);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-width: 56px;
    padding: 10px 8px;
    flex-shrink: 0;
}

.event-date .day  { font-size: 1.3rem; font-weight: 700; line-height: 1; }
.event-date .month{ font-size: 0.65rem; text-transform: uppercase; margin-top: 3px; font-weight: 600; opacity: 0.85; }

.event-content { padding: 10px 12px; flex-grow: 1; }

.event-tag {
    color: var(--ziel-srednia);
    font-size: 0.6rem;
    font-weight: 700;
    text-transform: uppercase;
    display: inline-block;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.event-name  { color: var(--tekst-ciemny); margin: 0 0 2px 0; font-size: 0.92rem; font-weight: 700; line-height: 1.2; }
.event-time  { color: var(--tekst-mid); font-size: 0.73rem; font-weight: 600; margin: 0 0 4px 0; }
.event-desc  { color: rgba(42,62,26,0.65); font-size: 0.77rem; line-height: 1.4; margin: 0; }

/* ==========================================================
   LEWA KOLUMNA — link "pełny kalendarz"
   ========================================================== */
.bottom-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ziel-glowna);
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid rgba(94,126,66,0.18);
    transition: color 0.18s, gap 0.18s;
}

.bottom-link:hover {
    color: var(--zloto);
    gap: 10px;
}

/* ==========================================================
   PRAWA KOLUMNA — blog
   ========================================================== */
.blog-column {
    background-color: var(--tlo-karta);
}

/* Karta posta */
.main-recent-post-card {
    display: flex;
    background-color: var(--biel);
    border-radius: 8px;
    text-decoration: none;
    color: var(--tekst-ciemny);
    overflow: hidden;
    min-height: 180px;
    border: 1px solid rgba(94,126,66,0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
    box-shadow: var(--cien-karta);
}

.main-recent-post-card:hover {
    transform: translateX(4px);
    box-shadow: var(--cien-duzy);
    border-color: rgba(201,162,39,0.35);
}

/* Lewa strona — zdjęcie */
.recent-post-left {
    width: 38%;
    min-width: 130px;
    position: relative;
    overflow: hidden;
    background-color: var(--ziel-glowna);
    flex-shrink: 0;
}

.mini-carousel-wrap {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.mini-carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.4s ease-in-out;
}

.mini-carousel-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
}

.mini-carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mini-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.35);
    color: #fff;
    border: none;
    width: 26px;
    height: 40px;
    font-size: 0.8rem;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 2px;
    transition: background-color 0.2s;
    padding: 0;
}

.mini-carousel-btn:hover { background-color: rgba(0,0,0,0.6); }
.mini-prev { left: 0; }
.mini-next { right: 0; }

/* Prawa strona — treść */
.recent-post-right {
    width: 62%;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    border-left: 2px solid rgba(201,162,39,0.2);
}

.recent-post-right.no-image {
    width: 100%;
    border-left: none;
}

.recent-post-right h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    line-height: 1.3;
    color: var(--tekst-ciemny);
}

.recent-post-right p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(42,62,26,0.7);
    font-weight: 300;
}

.recent-post-date {
    font-size: 0.78rem;
    text-align: right;
    font-style: italic;
    color: var(--zloto);
    margin-top: 10px;
    opacity: 0.85;
}

/* ==========================================================
   STOPKA
   ========================================================== */
.main-footer {
    background: var(--ziel-ciemna);
    padding: 40px 48px;
    margin: 32px -20px 0;
    color: rgba(255,255,255,0.82);
    border-top: 2px solid rgba(201,162,39,0.25);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    font-size: 0.9rem;
    font-weight: 300;
    line-height: 1.7;
}

@media (min-width: 600px) {
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
}

@media (min-width: 900px) {
    .footer-content {
        grid-template-columns: 1fr 1fr 1fr 1.4fr;
        align-items: start;
    }
    .footer-map {
        grid-column: auto;
    }
}

.footer-section-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: var(--zloto);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(201,162,39,0.25);
    opacity: 0.85;
}

.footer-section p {
    margin: 0;
    color: rgba(255,255,255,0.78);
    font-size: 0.88rem;
    line-height: 1.75;
}

.footer-section a {
    color: rgba(201,162,39,0.85);
    text-decoration: none;
    transition: color 0.18s;
}

.footer-section a:hover {
    color: var(--zloto);
}

.footer-person { margin-top: 8px; }

.footer-person-name {
    font-weight: 700;
    color: var(--biel);
    font-size: 0.9rem;
}

/* Mapa */
.footer-map {
    grid-column: 1 / -1;
}

.footer-map-link {
    display: block;
    position: relative;
    border-radius: 7px;
    overflow: hidden;
    border: 1px solid rgba(201,162,39,0.2);
    text-decoration: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.footer-map-link:hover {
    border-color: rgba(201,162,39,0.5);
    box-shadow: 0 4px 16px rgba(0,0,0,0.25);
}

.footer-map-iframe {
    width: 100%;
    height: 160px;
    border: none;
    display: block;
    filter: saturate(0.7) brightness(0.85);
    transition: filter 0.2s;
}

.footer-map-link:hover .footer-map-iframe {
    filter: saturate(0.9) brightness(0.95);
}

.footer-map-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.55));
    padding: 20px 12px 8px;
    text-align: center;
}

.footer-map-overlay span {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.88);
}

/* ==========================================================
   MODAL WYDARZEŃ
   ========================================================== */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(20,35,10,0.55);
    backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: var(--tlo-karta);
    color: var(--tekst-ciemny);
    margin: auto;
    padding: 36px 32px;
    border-radius: var(--radius);
    width: 90%;
    max-width: 460px;
    position: relative;
    box-shadow: 0 12px 48px rgba(0,0,0,0.25);
    border: 1px solid rgba(201,162,39,0.3);
    border-top: 3px solid var(--zloto);
}

.modal-content h2 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.4rem;
    margin-bottom: 6px;
    color: var(--tekst-ciemny);
}

.modal-content hr {
    margin: 14px 0;
    border: 0;
    border-top: 1px solid rgba(94,126,66,0.2);
}

.modal-content p {
    margin-bottom: 8px;
    font-size: 0.94rem;
    color: rgba(42,62,26,0.82);
}

.close-btn {
    position: absolute;
    right: 16px; top: 10px;
    font-size: 24px;
    font-weight: bold;
    color: rgba(42,62,26,0.4);
    cursor: pointer;
    transition: color 0.18s;
    line-height: 1;
}

.close-btn:hover { color: var(--tekst-ciemny); }

/* ==========================================================
   LIGHTBOX
   ========================================================== */
.lightbox {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    cursor: zoom-out;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.lightbox.active {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 92vw !important;
    max-height: 90vh !important;
    object-fit: contain !important;
    border-radius: 4px;
    box-shadow: 0 8px 48px rgba(0,0,0,0.6);
}

img:not(#lightbox-img) { cursor: zoom-in; }

/* ==========================================================
   RESPONSYWNOŚĆ MOBILE
   ========================================================== */
@media (max-width: 640px) {
    .main-header {
        padding: 0 16px;
        height: 80px;
    }

    .logo-box {
        padding: 5px 12px;
        height: 40px;
        font-size: 1rem;
    }

    .nav-btn {
        padding: 6px 12px;
        font-size: 0.72rem;
        letter-spacing: 1.5px;
    }

    .page-hero {
        padding: 32px 24px;
    }

    .page-hero h1 {
        font-size: 1.75rem;
    }

    .main-footer {
        padding: 32px 24px;
    }
}

/* LOGO IMG */
.logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-img {
    height: 160px;
    width: 160px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid rgba(201,162,39,0.5);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    display: block;
    cursor: default;
}

.logo-img:hover {
    box-shadow: none;
}