/* ======================================
   MISLIONICA — dijeljeni stil za sve stranice
   ====================================== */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
    --bg: #f5f0e6;
    --bg-card: #fdfaf3;
    --bg-page: #f4e8cf;
    --bg-page-edge: #e8dab6;
    --text: #1a1a1a;
    --text-muted: #5a5a5a;
    --accent: #6b2737;
    --accent-dark: #4a1a26;
    --line: #d4cfc2;
    --line-soft: #c9b98f;
    --shadow: 0 2px 12px rgba(60, 40, 20, 0.06);
    --shadow-book: 0 30px 60px -20px rgba(60, 30, 20, 0.35), 0 10px 25px -10px rgba(60, 30, 20, 0.2);

    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-sans: 'Inter', -apple-system, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-weight: 300;
    line-height: 1.7;
    min-height: 100vh;
    padding: 0;
}

/* === Navigacija === */
nav {
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 2rem;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(8px);
}

nav .nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

nav .logo {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    letter-spacing: 0.02em;
}

nav .logo:hover {
    color: var(--accent);
}

nav .nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

nav .nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s;
    position: relative;
}

nav .nav-links a:hover,
nav .nav-links a.active {
    color: var(--accent);
}

nav .nav-links a.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--accent);
}

/* === Kontejner === */
.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.container-wide {
    max-width: 1100px;
}

/* === Hero (početna) === */
.hero {
    text-align: center;
    padding: 5rem 2rem 4rem;
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero .divider {
    width: 60px;
    height: 1px;
    background: var(--accent);
    margin: 1.5rem auto;
}

.hero .quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.4rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
    font-weight: 400;
}

.hero .quote-author {
    display: block;
    font-size: 0.9rem;
    margin-top: 0.5rem;
    font-style: normal;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    font-family: var(--font-sans);
}

/* === Naslovi === */
h1.page-title {
    font-family: var(--font-serif);
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    font-weight: 500;
    text-align: center;
    margin-bottom: 0.5rem;
    letter-spacing: 0.01em;
}

.page-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-style: italic;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    margin-bottom: 3rem;
}

.page-subtitle::after {
    content: '';
    display: block;
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 1.5rem auto 0;
}

h2 {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 500;
    margin: 2.5rem 0 1.2rem;
    color: var(--text);
}

h3 {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: 500;
    margin: 1.5rem 0 0.8rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* === Kartice predmeta === */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.subject-card {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 2.5rem 2rem;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.subject-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.subject-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.subject-card:hover::before {
    transform: scaleX(1);
}

.subject-card .num {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 0.2em;
    margin-bottom: 0.8rem;
}

.subject-card h3 {
    font-size: 1.8rem;
    margin: 0 0 0.5rem;
}

.subject-card p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

/* === Sekcije s materijalima === */
.materials-section {
    margin: 3rem 0;
}

.materials-section h2 {
    border-bottom: 1px solid var(--line);
    padding-bottom: 0.8rem;
}

.material-list {
    list-style: none;
    margin-top: 1rem;
}

.material-list li {
    border-bottom: 1px solid var(--line);
    padding: 1.2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.material-list li:last-child {
    border-bottom: none;
}

.material-info {
    flex: 1;
    min-width: 200px;
}

.material-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 0.2rem;
}

.material-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.material-link {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    transition: all 0.2s;
    white-space: nowrap;
}

.material-link:hover {
    background: var(--accent);
    color: var(--bg);
}

/* === Hijerarhijske sekcije (razdoblja) === */
details.epoch,
details.period,
details.subperiod {
    margin: 1rem 0;
}

details.epoch {
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    margin-top: 2rem;
}

details.epoch > summary {
    font-family: var(--font-serif);
    font-size: 1.9rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    padding: 0.4rem 0;
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    transition: color 0.2s;
}

details.epoch > summary:hover {
    color: var(--accent);
}

details.epoch > summary::-webkit-details-marker {
    display: none;
}

details.epoch > summary::after {
    content: '+';
    margin-left: auto;
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--accent);
    transition: transform 0.3s ease;
    line-height: 1;
}

details.epoch[open] > summary::after {
    content: '−';
}

.epoch-num {
    font-family: var(--font-serif);
    font-size: 1rem;
    color: var(--accent);
    letter-spacing: 0.2em;
}

.epoch-body {
    padding: 1rem 0 0.5rem 1.2rem;
    border-left: 1px solid var(--line);
    margin-left: 0.6rem;
    margin-top: 1rem;
}

details.period > summary {
    font-family: var(--font-serif);
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--text);
    cursor: pointer;
    list-style: none;
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    transition: color 0.2s;
}

details.period > summary:hover {
    color: var(--accent);
}

details.period > summary::-webkit-details-marker {
    display: none;
}

details.period > summary::before {
    content: '›';
    color: var(--accent);
    font-size: 1.3rem;
    transition: transform 0.3s ease;
    display: inline-block;
}

details.period[open] > summary::before {
    transform: rotate(90deg);
}

.period-body {
    padding: 0.5rem 0 0.5rem 1.2rem;
    margin-left: 0.4rem;
    border-left: 1px dashed var(--line);
}

details.subperiod > summary {
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
    padding: 0.4rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    letter-spacing: 0.02em;
    transition: color 0.2s;
}

details.subperiod > summary:hover {
    color: var(--accent);
}

details.subperiod > summary::-webkit-details-marker {
    display: none;
}

details.subperiod > summary::before {
    content: '·';
    color: var(--accent);
    font-size: 1.5rem;
    line-height: 0.5;
}

.subperiod-body {
    padding: 0.3rem 0 0.5rem 1rem;
}

.subperiod-body .material-list li,
.period-body > .material-list li {
    padding: 0.8rem 0;
}

/* === Info okviri === */
.info-box {
    background: var(--bg-card);
    border-left: 3px solid var(--accent);
    padding: 1.5rem 1.8rem;
    margin: 2rem 0;
}

.info-box h3 {
    margin-top: 0;
    color: var(--accent);
}

.info-box p:last-child {
    margin-bottom: 0;
}

/* === Footer === */
footer {
    border-top: 1px solid var(--line);
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 4rem;
    letter-spacing: 0.05em;
}

footer .quote-small {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

/* === Responzivnost === */
@media (max-width: 600px) {
    nav .nav-links {
        gap: 1.2rem;
        font-size: 0.85rem;
    }

    .container {
        padding: 2rem 1.2rem;
    }

    .hero {
        padding: 3rem 1rem 2rem;
    }

    .material-list li {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ======================================
   POČETNA: dobrodošlica + knjiga + brendovi
   ====================================== */

/* === Dobrodošlica iznad knjige === */
.welcome {
    text-align: center;
    padding: 3rem 1.5rem 0.5rem;
    opacity: 0;
    animation: fadeUp 1.2s ease-out 0.2s forwards;
}

.welcome p {
    font-family: var(--font-serif);
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-style: italic;
    color: var(--text-muted);
    letter-spacing: 0.02em;
    margin: 0;
}

/* === Scena oko knjige === */
.book-stage {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 2.5rem 1.5rem 4rem;
    perspective: 1800px;
    position: relative;
}

/* === Sama knjiga === */
.book {
    position: relative;
    width: min(960px, 100%);
    background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
    border-radius: 4px 4px 8px 8px;
    padding: 14px 22px;
    box-shadow:
        0 1px 0 rgba(255, 220, 200, 0.15) inset,
        0 -1px 0 rgba(0, 0, 0, 0.25) inset,
        var(--shadow-book),
        0 60px 80px -40px rgba(40, 20, 10, 0.4);
    opacity: 0;
    transform: translateY(20px) scale(0.985);
    animation: bookEnter 1.4s cubic-bezier(0.2, 0.7, 0.2, 1) 0.4s forwards;
}

/* Suptilna tekstura korica + zlatno-narandžaste ivice papira */
.book::before,
.book::after {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    width: 14px;
    background:
        repeating-linear-gradient(
            180deg,
            #e8dab6 0px,
            #d6c393 1.5px,
            #f0e4c0 3px,
            #e8dab6 4.5px
        );
    box-shadow: inset 0 0 0 1px rgba(120, 80, 40, 0.25);
}

.book::before { left: 8px; }
.book::after { right: 8px; }

/* unutrašnji omot za stranice */
.book-cover-top,
.book-cover-bottom {
    display: none;
}

/* === Naslov knjige === */
.book-header {
    text-align: center;
    padding: 1.5rem 1rem 0.8rem;
    background: var(--bg-page);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
    border-bottom: 1px solid var(--line-soft);
    position: relative;
    z-index: 1;
}

.book-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3.2rem);
    font-weight: 600;
    color: var(--text);
    letter-spacing: 0.04em;
    margin: 0;
    line-height: 1;
}

.book-ornament {
    color: var(--accent);
    font-size: 1.4rem;
    line-height: 1;
    opacity: 0.75;
}

/* === Stranice (lijeva + desna) === */
.book-pages {
    display: grid;
    grid-template-columns: 1fr 14px 1fr;
    min-height: 500px;
    background: var(--bg-page);
    position: relative;
    z-index: 1;
    box-shadow:
        0 0 0 1px rgba(120, 80, 40, 0.18),
        inset 0 2px 6px rgba(120, 80, 40, 0.12);
}

.page {
    position: relative;
    padding: 2.5rem 2.2rem 2.8rem;
    background: var(--bg-page);
}

/* sjenka prema hrbatu — daje 3D zakrivljenost */
.page-left {
    background:
        linear-gradient(90deg, transparent 0%, transparent 70%, rgba(120,80,40,0.14) 100%),
        radial-gradient(ellipse at top left, rgba(255,255,255,0.35) 0%, transparent 50%),
        var(--bg-page);
}

.page-right {
    background:
        linear-gradient(270deg, transparent 0%, transparent 70%, rgba(120,80,40,0.14) 100%),
        radial-gradient(ellipse at top right, rgba(255,255,255,0.35) 0%, transparent 50%),
        var(--bg-page);
}

/* binding između stranica — duboki šav */
.page-spine {
    background:
        linear-gradient(90deg,
            rgba(120,80,40,0.35) 0%,
            rgba(60,30,15,0.55) 45%,
            rgba(40,20,10,0.65) 50%,
            rgba(60,30,15,0.55) 55%,
            rgba(120,80,40,0.35) 100%);
    box-shadow:
        inset 2px 0 4px rgba(0,0,0,0.2),
        inset -2px 0 4px rgba(0,0,0,0.2);
}

.page-inner {
    max-width: 360px;
    margin: 0 auto;
    opacity: 0;
    animation: fadeUp 1s ease-out 1.2s forwards;
}

/* === Mala oznaka iznad stranice === */
.page-label {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.3em;
    text-transform: uppercase;
    color: var(--accent);
    text-align: center;
    margin: 0;
}

.page-label-line {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 0.6rem auto 2rem;
    opacity: 0.6;
}

/* === Sadržaj (TOC) === */
.toc {
    list-style: none;
    padding: 0;
    margin: 0;
}

.toc li {
    margin-bottom: 1.1rem;
}

.toc a {
    display: flex;
    align-items: baseline;
    gap: 0.8rem;
    text-decoration: none;
    color: var(--text);
    font-family: var(--font-serif);
    font-size: 1.6rem;
    font-weight: 500;
    padding: 0.3rem 0;
    transition: color 0.25s, transform 0.25s;
    position: relative;
}

.toc-num {
    color: var(--accent);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    min-width: 2.2rem;
}

.toc-name {
    flex: 0 0 auto;
}

.toc-dots {
    flex: 1;
    border-bottom: 1px dotted var(--line-soft);
    position: relative;
    top: -4px;
    margin: 0 0.4rem;
}

.toc a::after {
    content: '→';
    color: var(--accent);
    opacity: 0;
    transform: translateX(-6px);
    transition: opacity 0.25s, transform 0.25s;
}

.toc a:hover {
    color: var(--accent);
    transform: translateX(4px);
}

.toc a:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* === Misao dana === */
.thought {
    text-align: center;
}

.portrait-frame {
    width: 140px;
    height: 170px;
    margin: 0 auto 1.2rem;
    border: 1px solid var(--line-soft);
    padding: 6px;
    background: var(--bg-page);
    box-shadow: 0 2px 8px rgba(60,40,20,0.12);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.portrait-frame::before {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid var(--line-soft);
    pointer-events: none;
    z-index: 1;
    border-radius: 1px;
}

.portrait {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    filter: grayscale(100%) sepia(20%) contrast(1.05);
    opacity: 0;
    transition: opacity 0.8s ease;
}

.portrait.loaded {
    opacity: 1;
}

.thinker-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text);
    min-height: 2rem;
}

.thinker-name-line {
    width: 30px;
    height: 1px;
    background: var(--accent);
    margin: 0.6rem auto 1.2rem;
}

.quote {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.25rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0 0 1.5rem;
    min-height: 5rem;
}

.quote::after {
    content: '|';
    color: var(--accent);
    margin-left: 2px;
    animation: caret 1s steps(1) infinite;
    opacity: 0;
}

.quote.typing::after { opacity: 1; }


/* === Page-turn animacija === */
.book-page-turn {
    position: absolute;
    pointer-events: none;
    background: linear-gradient(90deg, var(--bg-page) 0%, var(--bg-page-edge) 50%, var(--bg-page) 100%);
    box-shadow: -8px 0 18px rgba(60,40,20,0.18);
    transform-origin: left center;
    opacity: 0;
    z-index: 5;
}

.book-page-turn.turning {
    opacity: 1;
    animation: pageTurn 0.95s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* === Brendovi sekcija === */
.brands-section {
    background: var(--bg);
    padding: 5rem 1.5rem 4rem;
    border-top: 1px solid var(--line);
}

.brands-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.brands-header {
    text-align: center;
    margin-bottom: 3rem;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 1s ease, transform 1s ease;
}

.brands-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.brands-title {
    font-family: var(--font-serif);
    font-size: clamp(2rem, 4.5vw, 3rem);
    font-weight: 500;
    margin: 0;
    color: var(--text);
    letter-spacing: 0.02em;
}

.brands-divider {
    width: 50px;
    height: 1px;
    background: var(--accent);
    margin: 1rem auto;
}

.brands-subtitle {
    font-family: var(--font-serif);
    font-style: italic;
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto;
}

.brands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 1rem;
}

.brand {
    background: var(--bg-card);
    border: 1px solid var(--line);
    padding: 0;
    cursor: pointer;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    position: relative;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    font: inherit;
    color: inherit;
}

.brand.visible {
    opacity: 1;
    transform: translateY(0);
}

.brand img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 1rem;
    transition: transform 0.4s ease;
    background: var(--bg-card);
}

.brand:hover {
    box-shadow: 0 8px 20px rgba(60,40,20,0.12);
    border-color: var(--accent);
}

.brand:hover img {
    transform: scale(1.06);
}

.brand-cover img {
    padding: 0.4rem;
}

/* === Lightbox: kartica filozofa === */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 8, 0.82);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 1.5rem;
    backdrop-filter: blur(6px);
    overflow-y: auto;
}

.lightbox.open {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-card {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    max-width: 820px;
    width: 100%;
    background: var(--bg-card);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    border-radius: 3px;
    overflow: hidden;
    animation: lightboxIn 0.4s cubic-bezier(0.2, 0.8, 0.3, 1.05);
    max-height: 92vh;
}

.lightbox-img-wrap {
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.8rem;
    border-right: 1px solid var(--line);
}

.lightbox-img {
    max-width: 100%;
    max-height: 220px;
    object-fit: contain;
    width: auto;
    height: auto;
}

.lightbox-text {
    padding: 2.2rem 2.4rem;
    overflow-y: auto;
}

.lightbox-eyebrow {
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 0 0 0.4rem;
    opacity: 0.85;
}

.lightbox-name {
    font-family: var(--font-serif);
    font-size: clamp(1.8rem, 3.5vw, 2.4rem);
    font-weight: 600;
    margin: 0;
    color: var(--text);
    letter-spacing: 0.01em;
    line-height: 1.1;
}

.lightbox-divider {
    width: 40px;
    height: 1px;
    background: var(--accent);
    margin: 1rem 0 1.5rem;
}

.lightbox-section-label {
    font-family: var(--font-sans);
    font-size: 0.72rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--accent);
    margin: 1.2rem 0 0.5rem !important;
    font-weight: 500;
}

.lightbox-section-label:first-of-type { margin-top: 0 !important; }

.lightbox-zanimljivost,
.lightbox-aktuelno {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    line-height: 1.55;
    color: var(--text);
    margin: 0 0 1rem;
}

.lightbox-card.no-philosopher .lightbox-eyebrow {
    display: none;
}

.lightbox-close {
    position: fixed;
    top: 1rem;
    right: 1.5rem;
    background: transparent;
    border: none;
    color: white;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    padding: 0.4rem;
    z-index: 101;
}

.lightbox-close:hover { opacity: 1; }

/* === Footer credit === */
.footer-credit {
    font-size: 0.7rem;
    opacity: 0.6;
    margin-top: 0.4rem;
    letter-spacing: 0.08em;
}

/* === Animacije === */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes bookEnter {
    from { opacity: 0; transform: translateY(28px) scale(0.985); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes lightboxIn {
    from { opacity: 0; transform: scale(0.92); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes caret {
    50% { opacity: 0; }
}

@keyframes pageTurn {
    0%   { transform: rotateY(0deg); opacity: 1; }
    100% { transform: rotateY(-178deg); opacity: 1; }
}

/* === Responzivno za knjigu i brendove === */
@media (max-width: 720px) {
    .book {
        padding: 12px 14px;
    }
    .book::before, .book::after {
        width: 8px;
        top: 12px; bottom: 12px;
    }
    .book::before { left: 4px; }
    .book::after { right: 4px; }
    .book-pages {
        grid-template-columns: 1fr;
        grid-template-rows: auto 14px auto;
    }
    .page-spine {
        background: linear-gradient(180deg,
            rgba(120,80,40,0.35) 0%,
            rgba(40,20,10,0.6) 50%,
            rgba(120,80,40,0.35) 100%);
    }
    .page {
        padding: 2rem 1.5rem;
    }
    .page-inner {
        max-width: 100%;
    }
    .brands-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.7rem;
    }
    .brands-section {
        padding: 3rem 1rem 2.5rem;
    }
    .lightbox-card {
        grid-template-columns: 1fr;
        max-height: 95vh;
    }
    .lightbox-img-wrap {
        border-right: none;
        border-bottom: 1px solid var(--line);
        padding: 1.2rem;
    }
    .lightbox-img {
        max-height: 140px;
    }
    .lightbox-text {
        padding: 1.5rem 1.5rem 2rem;
    }
}

@media (max-width: 480px) {
    .book-header { gap: 0.7rem; padding: 1rem 0.5rem 0.6rem; }
    .book-ornament { font-size: 1.1rem; }
    .toc a { font-size: 1.35rem; }
    .portrait-frame { width: 120px; height: 145px; }
    .thinker-name { font-size: 1.3rem; }
    .quote { font-size: 1.1rem; }
}

/* === Smanjeno kretanje za pristupačnost === */
@media (prefers-reduced-motion: reduce) {
    .welcome, .book, .page-inner, .brands-header, .brand {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
    }
    .book-page-turn { display: none !important; }
}
