/* ============================================================
   Pracownia Bukiet Życzliwości — styl główny
   Paleta z logo: pudrowy róż, złoto, biel, ciepła zieleń
   ============================================================ */

:root {
    --rose-50: #fdf4f2;
    --rose-100: #fbe8e6;
    --rose-200: #f6d2cf;
    --rose-300: #eeb4ad;
    --rose-500: #d98a86;
    --wine: #9d3b3b;
    --wine-dark: #7c2b2f;
    --gold: #c9a24b;
    --gold-soft: #e3cf9e;
    --green-soft: #8a9a7b;
    --ink: #4a3b3b;
    --ink-soft: #6b5a5a;
    --cream: #fffaf6;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(125, 43, 47, 0.12);
    --shadow-soft: 0 4px 16px rgba(125, 43, 47, 0.08);
    --radius: 18px;
    --maxw: 1100px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Montserrat', 'Segoe UI', sans-serif;
    color: var(--ink);
    line-height: 1.7;
    background-color: var(--rose-50);
    min-height: 100vh;
}

/* ---------- Nieruchome tlo (content przewija sie na nim) ---------- */
.site-background {
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url('/img/kompozycja-kartka.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}
.site-background::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255,250,246,0.66), rgba(253,244,242,0.70));
}

h1, h2, h3, h4 {
    font-family: 'Cormorant Garamond', Georgia, serif;
    color: var(--wine);
    font-weight: 600;
    line-height: 1.2;
}

a { color: var(--wine); text-decoration: none; transition: color .2s; }
a:hover { color: var(--gold); }

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

/* ===================== NAVBAR (gorne menu) ===================== */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: linear-gradient(135deg, #fff7f3 0%, #fbe8e6 100%);
    border-bottom: 2px solid var(--gold-soft);
    box-shadow: var(--shadow-soft);
}
.navbar-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 0.6rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
.brand { display: flex; align-items: center; gap: 0.75rem; }
.brand-logo { width: 54px; height: 54px; border-radius: 50%; object-fit: cover;
    box-shadow: 0 2px 8px rgba(125,43,47,0.2); }
.brand-text { display: flex; flex-direction: column; }
.brand-title { font-family: 'Cormorant Garamond', serif; font-size: 1.4rem;
    font-weight: 700; color: var(--wine); line-height: 1.1; }
.brand-sub { font-size: 0.72rem; color: var(--ink-soft); letter-spacing: 0.03em; }

.nav-links { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.nav-links a {
    padding: 0.5rem 0.85rem;
    border-radius: 999px;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--ink);
}
.nav-links a:hover { background: var(--rose-100); color: var(--wine); }
.nav-links a.active { background: var(--wine); color: #fff; }
.nav-links a.active:hover { background: var(--wine-dark); color: #fff; }
.nav-admin { border: 1px solid var(--gold); color: var(--gold) !important; }
.nav-admin:hover { background: var(--gold); color: #fff !important; }

/* Hamburger (mobile) */
.nav-toggle { display: none; }
.nav-toggle-label { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; }
.nav-toggle-label span { width: 26px; height: 3px; background: var(--wine); border-radius: 2px; }

/* ===================== CONTENT ===================== */
.content {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3.5rem;
}

.card {
    background: rgba(255, 255, 255, 0.92);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border: 1px solid var(--rose-100);
}
.panel { padding: 2rem 2.25rem; margin-bottom: 2rem; }

.section-title {
    font-size: 1.9rem;
    margin: 0 0 1rem;
    position: relative;
    padding-bottom: 0.5rem;
}
.section-title::after {
    content: '❦';
    display: block;
    color: var(--gold);
    font-size: 1rem;
    margin-top: 0.25rem;
}

/* ---------- HERO ---------- */
.hero { text-align: center; padding: 2rem 1rem 1rem; }
.hero-logo { width: 300px; height: 300px; border-radius: 50%; margin: 0 auto 1.25rem;
    object-fit: cover; box-shadow: 0 16px 48px rgba(125,43,47,0.3);
    border: 5px solid rgba(255,255,255,0.85); }
.hero-title { font-size: 3.6rem; margin: 0.25rem 0; }
.hero-subtitle { font-size: 1.3rem; color: var(--gold); font-weight: 500; margin: 0.25rem 0 1rem; }
.hero-subtitle .icon { width: 1.1em; height: 1.1em; vertical-align: -0.15em; }
.hero-lead { max-width: 640px; margin: 0 auto 1.75rem; color: var(--ink-soft); font-size: 1.08rem; }
.hero-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---------- Przyciski ---------- */
.btn {
    display: inline-block;
    padding: 0.7rem 1.6rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform .15s, box-shadow .2s, background .2s, color .2s;
    font-family: inherit;
}
.btn-primary { background: var(--wine); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--wine-dark); color: #fff; transform: translateY(-2px); }
.btn-ghost { background: transparent; color: var(--wine); border-color: var(--wine); }
.btn-ghost:hover { background: var(--wine); color: #fff; }
.btn-mini { padding: 0.35rem 0.8rem; font-size: 0.8rem; background: var(--rose-100); color: var(--wine); }
.btn-mini:hover { background: var(--rose-200); }
.btn-danger { background: #e4b1ac; color: var(--wine-dark); }
.btn-danger:hover { background: #d98a86; color: #fff; }

/* ---------- Ikony SVG (spojne z paleta strony) ---------- */
.icon {
    width: 1.15em;
    height: 1.15em;
    display: inline-block;
    vertical-align: -0.18em;
    flex: 0 0 auto;
}
/* Przyciski i linki z ikona: ikona + tekst w jednej linii */
.btn, .link-back, .nav-admin {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}
.btn-mini .icon { width: 1em; height: 1em; }
/* Ikona w naglowku strony (przy tytule) */
.header-icon {
    width: 2.2rem;
    height: 2.2rem;
    color: var(--gold);
    vertical-align: -0.4rem;
    margin-right: 0.4rem;
}
/* Delikatne tlo-kolko pod ikona naglowka */
.icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3.4rem;
    height: 3.4rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-100), var(--gold-soft));
    color: var(--wine);
    box-shadow: var(--shadow-soft);
    margin-bottom: 0.6rem;
}
.icon-badge .icon { width: 1.7rem; height: 1.7rem; }

/* ---------- Features / Mission grid ---------- */
.features, .mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}
.feature, .mission-card { padding: 1.75rem; text-align: center; }
.feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 4rem;
    height: 4rem;
    margin: 0 auto 0.75rem;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--rose-100), var(--gold-soft));
    color: var(--wine);
    box-shadow: var(--shadow-soft);
}
.feature-icon .icon { width: 2rem; height: 2rem; }
.feature h3, .mission-card h3 { margin: 0.25rem 0 0.5rem; font-size: 1.4rem; }
.feature p, .mission-card p { color: var(--ink-soft); margin: 0; }

/* ---------- Prose ---------- */
.prose p { color: var(--ink-soft); margin: 0 0 1rem; }
.prose .quote, .quote {
    border-left: 4px solid var(--gold);
    background: var(--rose-50);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.5rem;
    color: var(--wine);
    font-style: italic;
    border-radius: 0 12px 12px 0;
}
.signature { margin-top: 1.5rem; color: var(--ink); }

/* ---------- Naglowki stron ---------- */
.page-header { text-align: center; margin-bottom: 2rem; }
.page-header h1 { font-size: 2.6rem; margin: 0; }
.page-subtitle { color: var(--ink-soft); font-size: 1.05rem; margin: 0.25rem 0 0; }

.link-more { color: var(--gold); font-weight: 600; }
.link-back { display: inline-block; margin-bottom: 1rem; font-weight: 600; }
.center { text-align: center; }
.cta-panel p { color: var(--ink-soft); }

/* ---------- Blog ---------- */
.latest-posts { margin-top: 1rem; }
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.post-card { overflow: hidden; transition: transform .2s, box-shadow .2s; }
.post-card:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(125,43,47,0.18); }
.post-card-link { color: inherit; display: block; height: 100%; }
.post-thumb { aspect-ratio: 16/10; overflow: hidden; background: var(--rose-100); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-body { padding: 1.1rem 1.25rem 1.4rem; }
.post-date { color: var(--gold); font-size: 0.8rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.04em; }
.post-body h3 { margin: 0.3rem 0 0.5rem; font-size: 1.35rem; }
.post-excerpt { color: var(--ink-soft); font-size: 0.95rem; margin: 0 0 0.5rem; }
.empty-note { color: var(--ink-soft); text-align: center; font-style: italic; }

/* Blog — widok pojedynczego wpisu */
.post-detail { max-width: 800px; margin: 0 auto; }
.post-detail-title { font-size: 2.4rem; margin: 0.25rem 0 1rem; }
.post-detail-image { border-radius: 14px; overflow: hidden; margin: 1.25rem 0 1.75rem;
    box-shadow: var(--shadow-soft); }
.post-detail-image img { width: 100%; }
.post-detail-body p { color: var(--ink); margin: 0 0 1rem; font-size: 1.05rem; }

/* ---------- Galeria ---------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1.5rem;
}
.gallery-item { overflow: hidden; margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 1/1; object-fit: cover; transition: transform .3s; }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption { padding: 0.75rem 1rem; text-align: center; color: var(--ink-soft);
    font-size: 0.9rem; }

/* ---------- Kontakt ---------- */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.contact-list li { padding: 0.5rem 0; border-bottom: 1px dashed var(--rose-200);
    display: flex; align-items: center; gap: 0.65rem; }
.contact-ic {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; flex: 0 0 auto;
    border-radius: 50%;
    background: var(--rose-100);
    color: var(--wine);
}
.contact-ic .icon { width: 1.1rem; height: 1.1rem; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form label, .admin-form label, .auth-form label {
    display: flex; flex-direction: column; gap: 0.35rem; font-weight: 500; color: var(--ink); }
input, textarea {
    font-family: inherit; font-size: 1rem; padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--rose-200); border-radius: 10px;
    background: var(--cream); color: var(--ink); transition: border-color .2s;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); }
.form-note { font-size: 0.82rem; color: var(--ink-soft); margin: 0; }

/* ===================== PANEL ADMIN ===================== */
.admin-header { display: flex; justify-content: space-between; align-items: center;
    flex-wrap: wrap; gap: 1rem; margin-bottom: 1.5rem; }
.admin-header h1 { margin: 0; }
.admin-header-actions { display: flex; gap: 0.75rem; align-items: center; }
.inline-form { display: inline; margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 0.75rem; text-align: left;
    border-bottom: 1px solid var(--rose-100); vertical-align: middle; }
.admin-table th { color: var(--wine); font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem; }
.thumb-cell img { width: 64px; height: 48px; object-fit: cover; border-radius: 8px; }
.no-image { color: var(--ink-soft); }
.actions-col { white-space: nowrap; display: flex; gap: 0.4rem; align-items: center; }

.admin-form { display: flex; flex-direction: column; gap: 1.1rem; max-width: 640px; }
.field-error { color: var(--wine); font-size: 0.85rem; }
.field-hint, .field-label { font-size: 0.82rem; color: var(--ink-soft); }
.current-image img { max-width: 220px; border-radius: 10px; box-shadow: var(--shadow-soft); }
.form-actions { display: flex; gap: 1rem; margin-top: 0.5rem; }

/* ---------- Alerty ---------- */
.alert { padding: 0.8rem 1.1rem; border-radius: 10px; margin-bottom: 1.25rem; font-weight: 500; }
.alert-error { background: #f8dcd9; color: var(--wine-dark); border: 1px solid #e4b1ac; }
.alert-success { background: #e4efdc; color: #4b6b36; border: 1px solid #b9d3a2; }

/* ---------- Logowanie ---------- */
.auth-wrap { display: flex; justify-content: center; }
.auth-card { max-width: 420px; width: 100%; text-align: center; }
.auth-logo { width: 90px; height: 90px; border-radius: 50%; margin: 0 auto 1rem;
    object-fit: cover; box-shadow: var(--shadow-soft); }
.auth-form { display: flex; flex-direction: column; gap: 1rem; text-align: left; margin-bottom: 1rem; }
.auth-form button { margin-top: 0.5rem; }

/* ===================== STOPKA (jednolite tlo) ===================== */
.footer {
    position: relative;
    z-index: 1;
    background: linear-gradient(135deg, #7c2b2f 0%, #9d3b3b 100%);
    color: #f7e9e4;
    margin-top: 2rem;
}
.footer-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 2.5rem 1.25rem 1.5rem;
    display: grid;
    grid-template-columns: 1.2fr 1fr 1.3fr;
    gap: 2rem;
}
.footer-col h4 { color: var(--gold-soft); font-size: 1.3rem; margin: 0 0 0.75rem; }
.footer-col a { display: block; color: #f1d9d3; padding: 0.2rem 0; font-size: 0.92rem; }
.footer-col a:hover { color: #fff; }
.footer-col p { color: #e9cdc7; font-size: 0.9rem; margin: 0.25rem 0; }
.footer-logo { width: 70px; height: 70px; border-radius: 50%; object-fit: cover;
    background: #fff; padding: 2px; margin-bottom: 0.5rem; }
.footer-tagline { font-family: 'Cormorant Garamond', serif; font-style: italic;
    font-size: 1.1rem; color: var(--gold-soft) !important; }
.footer-admin-link { color: var(--gold-soft) !important; font-weight: 600; margin-top: 0.5rem; }
.footer-bottom {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.15);
    font-size: 0.82rem;
    color: #e9cdc7;
}

/* ===================== RESPONSYWNOSC ===================== */
@media (max-width: 820px) {
    .nav-toggle-label { display: flex; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%; left: 0; right: 0;
        flex-direction: column;
        background: #fff7f3;
        padding: 1rem;
        box-shadow: var(--shadow);
        border-bottom: 2px solid var(--gold-soft);
    }
    .nav-toggle:checked ~ .nav-links { display: flex; }
    .nav-links a { width: 100%; }
    .contact-layout { grid-template-columns: 1fr; }
    .footer-inner { grid-template-columns: 1fr; text-align: center; }
    .footer-logo { margin-left: auto; margin-right: auto; }
    .hero-title { font-size: 2.2rem; }
    .panel { padding: 1.5rem 1.25rem; }
    .actions-col { flex-wrap: wrap; }
}
