:root {
    --bg: #f7f4f2;
    --card-bg: #ffffff;
    --accent: #e27d60;
    --accent-soft: #f6c9b8;
    --text: #333333;
    --muted: #777777;
    --radius-lg: 18px;
    --shadow-soft: 0 10px 25px rgba(0,0,0,0.06);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #fff5ef, #f7f4f2);
    color: var(--text);
}

.page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 40px;
}

/* HEADER */

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

/* LOGO – layout */

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

/* Krug oko logo ikonice – koristi tvoje postojeće boje */

.logo-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #e27d60, #f3a261, #f6c9b8, #e27d60);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Blago „disanje“ kruga (glow animacija) */

.animated-circle {
    animation: circleGlow 4s ease-in-out infinite;
}

@keyframes circleGlow {
    0%   { box-shadow: 0 0 6px rgba(226,125,96,0.4); transform: scale(1); }
    50%  { box-shadow: 0 0 14px rgba(226,125,96,0.75); transform: scale(1.04); }
    100% { box-shadow: 0 0 6px rgba(226,125,96,0.4); transform: scale(1); }
}

/* SVG tortica */

.logo-icon {
    width: 26px;
    height: 26px;
    display: block;
    animation: cakeBounce 2.4s ease-in-out infinite;
}

/* Boje delova torte */

.logo-icon-plate {
    fill: rgba(255,255,255,0.7);
}

.logo-icon-body {
    fill: #ffffff;
}

.logo-icon-cream {
    fill: #f6c9b8;
}

.logo-icon-candle {
    fill: #e27d60;
}

.logo-icon-flame {
    fill: #f8b46a;
}

/* Tortica blago poskakuje */

@keyframes cakeBounce {
    0%   { transform: translateY(0); }
    20%  { transform: translateY(-2px); }
    40%  { transform: translateY(0); }
    60%  { transform: translateY(-1px); }
    80%  { transform: translateY(0); }
    100% { transform: translateY(0); }
}

/* Naslov: Mala Slatkica – gradient + „shine“ */

.logo-text-main {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.03em;
}

/* Gradient boja teksta */
.logo-text-gradient {
    background: linear-gradient(120deg, #e27d60, #f3a261, #f6a5d8);
    -webkit-background-clip: text;
    color: transparent;
    position: relative;
    display: inline-block;
}

/* Shine efekat samo preko slova */
.logo-text-gradient::after {
    content: attr(data-text);  /* kopira tekst iz atributa */
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg,
        transparent 0%,
        rgba(255,255,255,0.9) 50%,
        transparent 100%
    );
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation: shineMove 3.2s ease-in-out infinite;
    transform: translateX(-150%);
    white-space: nowrap;  /* važno! da shine ne puca */
    pointer-events: none;
}

@keyframes shineMove {
    0%   { transform: translateX(-150%); }
    60%  { transform: translateX(150%); }
    100% { transform: translateX(150%); }
}



/* Podnaslov */

.logo-text-sub {
    font-size: 0.9rem;
    color: var(--muted);
}


nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

nav button {
    border: none;
    background: rgba(226,125,96,0.09);
    color: var(--accent);
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

nav button:hover {
    background: rgba(226,125,96,0.18);
    transform: translateY(-1px);
}

/* NOVO: aktivna kategorija */
.filter-btn-active {
    background: var(--accent);
    color: #fff;
}

/* BUTTONI */

.btn {
    border-radius: 999px;
    border: none;
    font-size: 0.85rem;
    padding: 7px 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.btn-primary {
    background: var(--accent);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.05);
}

.btn-ghost {
    background: transparent;
    color: var(--muted);
}

.btn-ghost:hover {
    background: rgba(0,0,0,0.03);
}

/* Osnovni stil filter dugmića (ako već postoji, možeš samo dopuniti) */
nav .filter-btn {
    position: relative;
    overflow: hidden;
}

/* Svetli prsten ispod aktivnog dugmeta */
nav .filter-btn-active {
    box-shadow:
        0 0 0 1px rgba(226,125,96,0.4),
        0 8px 15px rgba(226,125,96,0.35);
}

/* Mala svetleća linija gore, kao highlight */
nav .filter-btn-active::after {
    content: "";
    position: absolute;
    inset: 0;
    top: auto;
    height: 2px;
    background: linear-gradient(90deg, transparent, #ffe6da, transparent);
    opacity: 0.9;
}

/* Suptilan scale na hover (samo neaktivni filteri) */
nav .filter-btn:not(.filter-btn-active):hover {
    transform: translateY(-2px) scale(1.03);
}


/* PRETRAGA */

.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 24px;
}

.filter-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.filter-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-subtitle {
    font-size: 0.9rem;
    color: var(--muted);
}

.search-wrapper {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 10px 14px 10px 32px;
    border-radius: 999px;
    border: 1px solid #e3ded9;
    font-size: 0.95rem;
    outline: none;
    background: rgba(255,255,255,0.9);
    box-shadow: 0 4px 14px rgba(0,0,0,0.03);
}

.search-input:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 2px rgba(226,125,96,0.18);
}

.search-icon {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.9rem;
    color: var(--muted);
}

/* GRID KARTICA */

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    position: relative; /* DODATO zbog skeleton overlay-a */
}

/* Kada učitavamo novu stranicu – prikazuje se shimmer preko grida */
.recipes-grid.grid-loading::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        120deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.8) 40%,
        rgba(255,255,255,0) 80%
    );
    animation: gridShimmer 0.6s ease-in-out;
    pointer-events: none;
    z-index: 2;
}

/* Mali shimmer prelaz */
@keyframes gridShimmer {
    0%   { transform: translateX(-60%); opacity: 0; }
    20%  { opacity: 1; }
    100% { transform: translateX(60%); opacity: 0; }
}


.recipe-card {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    padding: 14px 14px 16px;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    overflow: hidden;
}

/* Osnovno stanje kartice – spremna za animaciju */
.recipe-card {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Kad je kartica vidljiva na stranici */
.recipe-card.card-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Kada je kartica aktivna (prikazana) i pređemo mišem preko nje */
.recipe-card.card-visible:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 10px 24px rgba(0,0,0,0.12);
}

/* Po želji, malo jače za mobilni isključimo hover efekte, da ne "lepe" */
@media (hover: none) {
    .recipe-card.card-visible:hover {
        transform: translateY(0);
        box-shadow: var(--shadow-soft);
    }
}


.recipe-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    padding: 3px 10px;
    border-radius: 999px;
    background: rgba(226,125,96,0.08);
    color: var(--accent);
    margin-bottom: 4px;
}

.recipe-title {
    font-size: 1.1rem;
    font-weight: 600;
}

.recipe-desc {
    font-size: 0.9rem;
    color: var(--muted);
}

.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.8rem;
    color: var(--muted);
}

.meta-pill {
    padding: 4px 8px;
    border-radius: 999px;
    background: #f4efea;
}

.recipe-footer {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

/* SLIKE (ako koristiš) */

.recipe-image {
    width: 100%;
    border-radius: 14px;
    margin-bottom: 8px;
    object-fit: cover;
    max-height: 180px;
}

.detail-image {
    width: 100%;
    border-radius: 16px;
    margin: 10px 0 18px;
    object-fit: cover;
    max-height: 280px;
}

/* TEŽINA / TEŽINA RECEPTA */

.difficulty-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.diff-easy {
    background: #6bbf7a;
}

.diff-medium {
    background: #f3a261;
}

.diff-hard {
    background: #d66767;
}

/* DETALJI RECEPTA */

.recipe-detail {
    margin-top: 16px;
    background: rgba(255,255,255,0.9);
    border-radius: var(--radius-lg);
    padding: 18px 16px 20px;
    box-shadow: var(--shadow-soft);
}

.detail-header-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.detail-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

.detail-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.8fr);
    gap: 18px;
}

.detail-section-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 6px;
}

ul,
ol {
    padding-left: 18px;
    margin: 0;
    font-size: 0.9rem;
}

li + li {
    margin-top: 4px;
}

.note {
    margin-top: 10px;
    font-size: 0.85rem;
    color: var(--muted);
}

/* RESPONSIVE */

@media (max-width: 720px) {
    header {
        flex-direction: column;
        align-items: flex-start;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-header-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* PDF kartica – lep okvir, header itd. */

.recipe-pdf {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #f0e2da;
    padding: 18px 18px 20px;
}

/* Header unutar PDF-a */

.pdf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.pdf-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pdf-logo-circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #e27d60, #f3a261, #f6c9b8, #e27d60);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    box-shadow: 0 0 6px rgba(0,0,0,0.08);
}

.pdf-brand-text {
    display: flex;
    flex-direction: column;
}

.pdf-brand-name {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #b35b45;
}

.pdf-brand-sub {
    font-size: 0.75rem;
    color: #b28a7f;
}

/* Mala značkica "Recept" desno */

.pdf-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #f0cdc0;
    color: #c5775d;
    background: rgba(255,255,255,0.7);
}

/* Tanka linija ispod headera */

.pdf-divider {
    height: 1px;
    width: 100%;
    background: linear-gradient(to right, transparent, #f0ddd3, transparent);
    margin-bottom: 12px;
}


/* ŠTAMPA / PDF */

@media print {
    body {
        background: #ffffff;
    }

    header {
        display: none !important;
    }

    .filter-bar,
    .recipes-grid {
        display: none !important;
    }

    .page {
        max-width: 100%;
        padding: 0 10mm 10mm;
    }

    .recipe-detail {
        box-shadow: none;
        background: #ffffff;
        margin-top: 0;
    }

    .btn-print {
        display: none !important;
    }
}

/* ===== FOOTER – ANIMIRANI ===== */

.footer {
    margin-top: 60px;
    padding: 32px 16px;
    background: linear-gradient(135deg, #fff7f3, #fdeae4, #f6d9ff);
    background-size: 220% 220%;
    border-top: 1px solid #f6dcd3;
    animation: footerFadeIn 1.2s ease forwards, footerGradientShift 12s ease-in-out infinite;
    opacity: 0;
}

/* Fade-in animacija */
@keyframes footerFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Lagano pomeranje gradienta */
@keyframes footerGradientShift {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

/* Instagram link */
.footer-social {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-weight: 600;
    color: var(--accent);
    font-size: 1rem;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(226,125,96,0.07);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    animation: floatIn 1.4s ease forwards;
    opacity: 0;
}

/* Float-in animacija linka */
@keyframes floatIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Hover – lebdenje */
.footer-social:hover {
    transform: translateY(-4px) scale(1.04);
    box-shadow: 0 6px 18px rgba(226,125,96,0.25);
    background: rgba(226,125,96,0.12);
}

/* Instagram ikonica animacija na hover */
.footer-instagram-icon {
    width: 20px;
    height: 20px;
    fill: var(--accent);
    transition: transform 0.35s ease;
}

.footer-social:hover .footer-instagram-icon {
    transform: rotate(-10deg) scale(1.15);
}

/* Tekst u footeru */
.footer-text {
    margin-top: 14px;
    font-size: 0.92rem;
    color: var(--muted);
}

/* Brend + cupcake */
.footer-brand {
    font-weight: 700;
    color: var(--accent);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    animation: brandPulse 3s ease-in-out infinite;
}

/* Pulsiranje brenda */
/*
@keyframes brandPulse {
    0% { opacity: 0.85; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.04); }
    100% { opacity: 0.85; transform: scale(1); }
}
*/

/* Mali animirani cupcake */
.footer-cupcake {
    display: inline-block;
    animation: cupcakeBounce 2.2s ease-in-out infinite;
}

/* Cupcake skakuće nežno */
@keyframes cupcakeBounce {
    0%   { transform: translateY(0); }
    20%  { transform: translateY(-3px); }
    40%  { transform: translateY(0); }
    60%  { transform: translateY(-2px); }
    80%  { transform: translateY(0); }
    100% { transform: translateY(0); }
}

/* ===== SCROLL TO TOP DUGME ===== */

.scroll-top {
    position: fixed;
    right: 18px;
    bottom: 18px;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: none;
    background: var(--accent);
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    z-index: 50;
}

/* Vidljivo stanje */
.scroll-top--visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Hover efekat */
.scroll-top:hover {
    box-shadow: 0 10px 25px rgba(226,125,96,0.4);
    background: #f08d6f;
}

/* Manji ekrani – pomeri malo gore da ne smeta */
@media (max-width: 720px) {
    .scroll-top {
        right: 14px;
        bottom: 14px;
    }
}

/* Diskretna ljubavna poruka */

.love-note {
    text-align: center;
    font-size: 0.8rem;
    color: #c99b91;
    margin-top: -5px;
    margin-bottom: 30px;
    opacity: 0.9;
    letter-spacing: 0.6px;
}

/* Pulsirajuće srce – nežno i sporo */

.love-heart {
    display: inline-block;
    color: #e27d60;
    font-size: 1rem;
    animation: heartBeat 2.6s ease-in-out infinite;
}

@keyframes heartBeat {
    0%   { transform: scale(1); opacity: 0.8; }
    50%  { transform: scale(1.18); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

.detail-actions {
    margin-top: 14px;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.pagination {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Dugmad stranica */
.pagination button {
    padding: 8px 14px;
    border: none;
    background: #f5e1d8;
    color: #a25c4a;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition:
        background 0.2s ease,
        transform 0.15s ease,
        box-shadow 0.2s ease,
        color 0.2s ease;
}

/* Hover – mali „skok” i shadow */
.pagination button:not(.disabled):hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    background: #e9cfc2;
}

/* Aktivna stranica */
.pagination button.active {
    background: #d99d8f;
    color: #fff;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.6), 0 6px 14px rgba(217,157,143,0.6);
}

/* Disabled dugmad (prva/poslednja) */
.pagination button.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

/* Osnova za ikonicu */
.search-icon {
    transition:
        transform 0.25s ease,
        opacity 0.25s ease;
    opacity: 0.7;
}

/* Kad je fokus u inputu (ili se piše) – wrapper reaguje */
.search-wrapper:focus-within .search-icon {
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    animation: searchWiggle 0.6s ease;
}

/* Mali "wiggle" efekat kad počneš da kucaš */
@keyframes searchWiggle {
    0%   { transform: translateY(-50%) translateX(0); }
    30%  { transform: translateY(-50%) translateX(-2px); }
    60%  { transform: translateY(-50%) translateX(2px); }
    100% { transform: translateY(-50%) translateX(0); }
}

/* Kad je fokus, i okvir polja pretrage malo zasvetli (ako već nemaš) */
.search-input:focus {
    border-color: var(--accent-soft);
    box-shadow: 0 0 0 2px rgba(226,125,96,0.18);
}

.no-results {
    text-align: center;
    font-size: 0.9rem;
    color: #b08576;
    margin: 24px 0 8px;
    padding: 14px 18px;
    border-radius: 14px;
    background: rgba(250, 235, 227, 0.8);
    border: 1px dashed #e0b5a4;
}

/* ===== PRELOADER / FAKE LOADING ===== */

.preloader {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, #fff5ef, #f7f4f2);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;                /* start - nevidljiv */
    visibility: hidden;        /* da ne smeta klikovima */
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

/* Kad ga uključimo JS-om */
.preloader-show {
    opacity: 1;
    visibility: visible;
}

.preloader-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Krug sa torticom */
.preloader-circle {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: conic-gradient(from 200deg, #e27d60, #f3a261, #f6c9b8, #e27d60);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 12px 28px rgba(0,0,0,0.12);
    animation: preloaderBounce 1s ease-in-out infinite;
}

.preloader-cake {
    font-size: 2rem;
}

/* Naslov + podnaslov */
.preloader-title {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #b35b45;
}

.preloader-subtitle {
    font-size: 0.9rem;
    color: #b39186;
}

/* Skakućuća tortica */
@keyframes preloaderBounce {
    0%   { transform: translateY(0); }
    30%  { transform: translateY(-8px); }
    60%  { transform: translateY(0); }
    80%  { transform: translateY(-4px); }
    100% { transform: translateY(0); }
}

/* Kada ga sakrivamo */
.preloader-hide {
    opacity: 0;
    visibility: hidden;
}

/* Opcionalno: spreči skrol dok je preloader tu */
body.preloader-active {
    overflow: hidden;
}
