/* ============================================
   DUŠE MELCI - Frontend Styly
   Design podle náhledu: růžové pozadí,
   vertikální fialová linie, kniha, cikcak menu
   ============================================ */

:root {
    --pink-light: #F8D8E8;
    --pink-medium: #F0C0D8;
    --pink-dark: #E8A8C0;
    --purple: #9932CC;
    --purple-dark: #7B28A8;
    --orange: #FF6B35;
    --yellow: #FFD700;
    --green: #32CD32;
    --blue: #4169E1;
    --blue-border: #5B7EC0;
    --white: #FFFFFF;
    --gray: #666666;
    --text: #333333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Nunito', 'Segoe UI', sans-serif;
    background: linear-gradient(180deg, var(--pink-light) 0%, var(--pink-medium) 100%);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
}

/* ============================================
   HLAVNÍ STRÁNKA
   ============================================ */

.main-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

/* HEADER - Logo */
.site-header {
    text-align: center;
    padding: 20px 0 0;
}

.logo-wrapper {
    display: inline-block;
}

.logo {
    max-width: 180px;
    height: auto;
    border: 4px solid var(--blue-border);
    border-radius: 6px;
    padding: 8px;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.logo-placeholder {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    background: var(--white);
    border: 4px solid var(--blue-border);
    border-radius: 6px;
    padding: 15px 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.logo-duse,
.logo-melci {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(90deg, #FF6B35, #FFD700, #32CD32, #4169E1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.logo-icon {
    font-size: 1.4rem;
    margin: 2px 0;
}

/* OBSAH S VERTIKÁLNÍ LINIÍ */
.content-with-line {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 10px;
}

/* Vertikální fialová linie - prochází celou stránkou */
.vertical-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 60px;
    width: 3px;
    background-color: var(--purple);
    transform: translateX(-50%);
    z-index: 1;
}

/* PODTITULEK */
.subtitle {
    position: relative;
    z-index: 2;
    font-size: 1.3rem;
    font-weight: 700;
    font-style: italic;
    text-align: center;
    background: linear-gradient(90deg, var(--orange), #E8A000, var(--green), var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    max-width: 600px;
    margin: 15px auto 30px;
    padding: 0 20px;
}

/* KNIHA */
.book-section {
    position: relative;
    z-index: 2;
    padding: 20px 0 30px;
}

.book {
    position: relative;
    display: inline-flex;
    /* Kniha je napojená na linii - linie prochází hřbetem */
}

.book-pages {
    display: flex;
    position: relative;
    box-shadow: 0 8px 30px rgba(0,0,0,0.2);
}

.book-page {
    width: 160px;
    height: 200px;
    background: var(--white);
    padding: 30px 20px;
    display: flex;
    align-items: flex-start;
    text-decoration: none;
    color: var(--text);
    transition: all 0.3s ease;
    position: relative;
}

.book-page span {
    font-size: 1rem;
    line-height: 1.4;
    font-weight: 500;
}

.book-page.left-page {
    background: linear-gradient(90deg, #F5F5F5 0%, var(--white) 100%);
    border-radius: 4px 0 0 4px;
    border-right: 2px solid #E0E0E0;
}

.book-page.right-page {
    background: linear-gradient(90deg, var(--white) 0%, #FAFAFA 100%);
    border-radius: 0 4px 4px 0;
}

a.book-page:hover {
    background: #FAFAFA;
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.25);
}

/* Efekt stránek na pravé straně knihy */
.book-pages-effect {
    position: absolute;
    right: -8px;
    top: 4px;
    bottom: 4px;
    width: 8px;
    background: repeating-linear-gradient(
            to right,
            #F0F0F0 0px,
            #F0F0F0 1px,
            #E8E8E8 1px,
            #E8E8E8 2px
    );
    border-radius: 0 2px 2px 0;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
}

/* PŘÍBĚHY DUŠEMĚLCŮ - odkaz pod obrázkem */
.stories-link {
    position: relative;
    z-index: 2;
    display: block;
    text-align: center;
    margin: 25px auto 15px;
    max-width: 400px;
}

.stories-link a {
    display: inline-block;
    padding: 16px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--purple);
    background: var(--white);
    border: 3px solid var(--purple);
    box-shadow: 0 4px 15px rgba(153,50,204,0.2);
    transition: all 0.3s ease;
}

.stories-link a span {
    background: linear-gradient(90deg, var(--orange), #E8A000, var(--green), var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stories-link a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(153,50,204,0.35);
}

/* CIKCAK NAVIGACE */
.sections-nav {
    position: relative;
    z-index: 2;
    width: 100%;
    padding: 10px 0 20px;
}

.nav-item {
    position: relative;
    padding: 12px 0;
    display: flex;
    align-items: center;
}

.nav-item.left {
    justify-content: flex-end;
    padding-right: calc(50% + 25px);
}

.nav-item.right {
    justify-content: flex-start;
    padding-left: calc(50% + 25px);
}

/* Horizontální čárky od linie k textu */
.nav-line {
    position: absolute;
    top: 50%;
    height: 2px;
    width: 20px;
    background-color: var(--purple);
    transform: translateY(-50%);
}

.nav-item.left .nav-line {
    right: calc(50% + 1px);
}

.nav-item.right .nav-line {
    left: calc(50% + 1px);
}

.nav-link {
    text-decoration: none;
    font-size: 1.35rem;
    font-weight: 800;
    padding: 3px 0;
    position: relative;
    transition: all 0.3s ease;
    /* Stejný gradient jako subtitle */
    background: linear-gradient(90deg, var(--orange), #E8A000, var(--green), var(--blue), var(--purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--purple);
    transition: width 0.3s ease;
}

.nav-link:hover {
    background: linear-gradient(90deg, var(--purple), var(--blue), var(--green), #E8A000, var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link:hover::after {
    width: 100%;
}

/* ŠIPKA DOLŮ */
.arrow-down {
    position: relative;
    z-index: 2;
    margin-top: 5px;
}

.arrow-down svg {
    display: block;
    filter: drop-shadow(0 2px 4px rgba(153,50,204,0.3));
}

/* FOOTER */
.site-footer {
    text-align: center;
    padding: 30px 20px 40px;
}

.bank-info {
    color: var(--purple);
    font-size: 1rem;
    margin-bottom: 20px;
}

.bank-info strong {
    font-weight: 700;
}

.donio-link {
    display: inline-block;
    transition: transform 0.3s ease;
}

.donio-link:hover {
    transform: scale(1.05);
}

.donio-logo {
    max-width: 120px;
    height: auto;
}

/* ============================================
   STRÁNKA DETAILU SEKCE
   ============================================ */

.page-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
}

.page-header {
    padding: 15px 0 25px;
}

.back-home {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.back-home:hover {
    transform: scale(1.02);
}

.logo-small {
    max-width: 80px;
    height: auto;
    border: 3px solid var(--blue-border);
    border-radius: 4px;
    padding: 5px;
    background: var(--white);
}

.back-text {
    color: var(--purple);
    font-weight: 600;
    font-size: 1.1rem;
}

.page-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 30px;
    align-items: start;
}

.page-content {
    background: var(--white);
    padding: 45px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.section-detail h1 {
    color: var(--purple);
    margin-bottom: 25px;
    font-size: 2rem;
    font-weight: 700;
}

.section-body {
    font-size: 1.1rem;
    line-height: 1.8;
}

.section-body p {
    margin-bottom: 1.2em;
}

.section-body p:last-child {
    margin-bottom: 0;
}

.section-cta {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #F0F0F0;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--purple);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--purple-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(153,50,204,0.3);
}

/* BOČNÍ NAVIGACE */
.side-nav {
    background: var(--white);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    position: sticky;
    top: 20px;
}

.side-nav ul {
    list-style: none;
}

.side-nav li {
    margin-bottom: 10px;
}

.side-nav li:last-child {
    margin-bottom: 0;
}

.side-nav a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.95rem;
    display: block;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.side-nav a:hover {
    color: var(--purple);
    background: #F8F8F8;
}

.side-nav .active a {
    color: var(--purple);
    background: rgba(153,50,204,0.1);
    font-weight: 600;
}

.side-nav-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #F0F0F0;
}

.back-link {
    color: var(--purple);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* ============================================
   RESPONZIVITA
   ============================================ */

@media (max-width: 850px) {
    .page-content-wrapper {
        grid-template-columns: 1fr;
    }

    .side-nav {
        position: static;
        order: -1;
    }

    .side-nav ul {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
    }

    .side-nav li {
        margin: 0;
    }

    .page-content {
        padding: 30px;
    }

    .section-detail h1 {
        font-size: 1.7rem;
    }
}

@media (max-width: 600px) {
    .subtitle {
        font-size: 1.1rem;
    }

    .book-page {
        width: 130px;
        height: 170px;
        padding: 22px 15px;
    }

    .book-page span {
        font-size: 0.9rem;
    }

    .nav-item.left {
        padding-right: calc(50% + 18px);
    }

    .nav-item.right {
        padding-left: calc(50% + 18px);
    }

    .nav-link {
        font-size: 1.15rem;
    }

    .nav-line {
        width: 15px;
    }

    .section-body {
        font-size: 1rem;
    }
}

@media (max-width: 400px) {
    .book-page {
        width: 110px;
        height: 150px;
        padding: 18px 12px;
    }

    .book-page span {
        font-size: 0.85rem;
    }

    .logo-duse,
    .logo-melci {
        font-size: 1.5rem;
    }
}



/* ... (předchozí styly nechej, uprav jen sekci KNIHA a přidej OBRÁZEK) ... */

/* ============================================
   ILUSTRACE S ODKAZY UVNITŘ
   ============================================ */

.illustration-container {
    position: relative; /* Nutné pro absolutní pozicování odkazů */
    width: 100%;
    max-width: 800px; /* Maximální šířka obrázku */
    margin: 20px auto 40px;
    z-index: 2;
    padding: 0 10px;
}

.main-illustration {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px; /* Jemně zaoblené rohy obrázku */
    /* Jemný stín pod obrázkem */
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* SPOLEČNÝ STYL PRO ODKAZY V OBRÁZKU */
.image-link {
    position: absolute;
    top: 30%; /* Umístění v horní třetině obrázku (nad hlavami skřítků) */
    transform: translateY(-50%);

    background: rgba(255, 255, 255, 0.85); /* Bílá, mírně průhledná bublina */
    padding: 12px 20px;
    border-radius: 30px; /* Oválný tvar */

    font-size: 1.2rem;
    font-weight: 700;
    color: #4B0082; /* Tmavě fialová */
    text-decoration: none;
    text-align: center;
    line-height: 1.2;

    border: 2px solid #9932CC; /* Fialový obrys */
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;

    max-width: 40%; /* Aby nebyly moc široké */
    min-width: 150px;
}

/* LEVÝ ODKAZ */
.link-left {
    left: 5%;
}

/* PRAVÝ ODKAZ */
.link-right {
    right: 5%;
}

/* Hover efekt - bublina se zvětší a zbělá */
.image-link:hover {
    background: #FFFFFF;
    transform: translateY(-55%) scale(1.05);
    box-shadow: 0 8px 20px rgba(153, 50, 204, 0.4);
    color: #9932CC;
    z-index: 3;
}


/* ============================================
   ILUSTRACE S ODKAZY UVNITŘ
   ============================================ */

.illustration-container {
    position: relative; /* TOTO JE NEJDŮLEŽITĚJŠÍ - Drží odkazy uvnitř */
    display: block;
    width: 100%;
    max-width: 800px;
    margin: 20px auto 40px;
    z-index: 2;
}

.main-illustration {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* SPOLEČNÝ STYL ODKAZŮ */
/* ============================================
   ILUSTRACE S ODKAZY UVNITŘ - ÚPRAVA POZIC
   ============================================ */

/* SPOLEČNÝ STYL ODKAZŮ */
.image-link {
    position: absolute;
    /* Původně bylo 30%, teď odečteme 100px, aby to šlo nahoru */
    top: calc(30% - 100px);
    transform: translateY(-50%);

    background: rgba(255, 255, 255, 0.9);
    padding: 15px 25px;
    border-radius: 50px;

    font-size: 1.1rem;
    font-weight: 800;
    color: #4B0082;
    text-decoration: none;
    text-align: center;
    line-height: 1.2;

    border: 3px solid #9932CC;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;

    width: 180px;
    max-width: 40%;
    z-index: 10;
}

/* LEVÝ ODKAZ - Posunuto o 100px doprava (ke středu) */
.link-left {
    /* 8% od kraje + 100px směrem ke středu */
    left: calc(8% + 100px);
}

/* PRAVÝ ODKAZ - Posunuto o 100px doleva (ke středu) */
.link-right {
    /* 8% od kraje + 100px směrem ke středu */
    right: calc(8% + 100px);
}

/* Hover efekt */
.image-link:hover {
    background: #FFFFFF;
    transform: translateY(-55%) scale(1.05);
    box-shadow: 0 8px 20px rgba(153, 50, 204, 0.4);
    color: #9932CC;
    cursor: pointer;
}

/* ============================================
   RESPONZIVITA PRO MOBILY
   ============================================ */
/* Na mobilu těch 100px raději zrušíme, jinak by se odkazy srazily */
@media (max-width: 600px) {
    .image-link {
        font-size: 0.85rem;
        padding: 8px 10px;
        width: 120px;
        /* Na mobilu vrátíme trochu dolů, aby nebyly mimo obrázek */
        top: 20%;
        border-width: 2px;
    }

    .link-left {
        left: 5%; /* Reset na procenta */
    }

    .link-right {
        right: 5%; /* Reset na procenta */
    }
}

/* ============================================
   SEKCE - HLAVNÍ OBRÁZEK A GALERIE
   ============================================ */

.section-hero {
    margin-bottom: 30px;
    border-radius: 12px;
    overflow: hidden;
}

.section-hero-image {
    width: 100%;
    height: auto;
    display: block;
}

.section-gallery {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #F0F0F0;
}

.section-gallery h2 {
    color: var(--purple);
    font-size: 1.4rem;
    margin-bottom: 20px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    display: block;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.6);
    color: white;
    padding: 8px 12px;
    font-size: 0.85rem;
}

/* ============================================
   SEKCE - ODKAZY
   ============================================ */

.section-links {
    margin-top: 35px;
    padding-top: 25px;
    border-top: 2px solid #F0F0F0;
}

.section-links h3 {
    color: var(--purple);
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.section-links .links-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.section-links .links-list li {
    margin-bottom: 10px;
}

.section-links .link-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--purple);
    text-decoration: none;
    font-weight: 500;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.section-links .link-item:hover {
    color: var(--purple-dark);
    text-decoration: underline;
}

.external-icon {
    font-size: 0.9em;
    opacity: 0.7;
}

/* ============================================
   ADMIN - GALERIE OBRÁZKŮ
   ============================================ */

.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.image-item {
    position: relative;
    background: #F8F8F8;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: border-color 0.2s ease;
}

.image-item.is-main {
    border-color: var(--purple);
}

.image-item img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.image-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 10px;
    background: white;
}

.image-alt {
    padding: 5px 10px;
    font-size: 0.75rem;
    color: var(--gray);
    background: white;
    text-align: center;
    border-top: 1px solid #F0F0F0;
}

/* ============================================
   ADMIN - SEZNAM ODKAZŮ
   ============================================ */

.links-list {
    margin-bottom: 20px;
}

.link-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #F8F8F8;
    border-radius: 6px;
    margin-bottom: 8px;
}

.link-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.link-info strong {
    color: var(--text);
}

.link-url {
    font-size: 0.85rem;
    color: var(--gray);
    text-decoration: none;
}

.link-url:hover {
    text-decoration: underline;
}

/* ============================================
   ADMIN - FORM SEKCE
   ============================================ */

.form-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #E0E0E0;
}

.form-section h3 {
    color: var(--purple);
    font-size: 1.1rem;
    margin-bottom: 15px;
}

/* ============================================
   BADGES
   ============================================ */

.badge {
    display: inline-block;
    padding: 3px 8px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 4px;
    background: #E0E0E0;
    color: var(--gray);
}

.badge-primary {
    background: var(--purple);
    color: white;
}

/* ============================================
   BUTTONS SMALL
   ============================================ */

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--purple);
    color: var(--purple);
}

.btn-outline:hover {
    background: var(--purple);
    color: white;
}

.text-muted {
    color: var(--gray);
    font-style: italic;
}
