/* Základní reset a globální styly */
:root {
    /* Definice barevných proměnných pro snadnou změnu */
    --color-background-dark: #1a1a2e; /* Tmavé pozadí */
    --color-background-light: #f0f2f5; /* Světlé pozadí (pro případný světlý režim) */
    --color-text-light: #e0e0e0; /* Světlý text na tmavém pozadí */
    --color-text-dark: #333; /* Tmavý text na světlém pozadí */
    --color-primary-accent: #00BCD4; /* Zelenomodrá akcentní barva */
    --color-primary-accent-hover: #4DD0E1; /* Světlejší odstín pro najetí myší */
    --color-secondary-accent: #0f3460; /* Tmavší modrá pro kontrast */
    --color-card-background: #2e2e4a; /* Pozadí karet kategorií - použito i pro nové sekce */
    --color-card-hover: #3a3a5e; /* Pozadí karet při najetí myší */
    --color-border: #4a4a6e; /* Barva okrajů */
    /* Nové proměnné pro textové barvy z Gemini HTML, aby odpovídaly tvému schématu */
    --color-gemini-text-primary: #e0e0e0; /* Obdoba slate-900 pro tmavé pozadí */
    --color-gemini-text-secondary: #c0c0c0; /* Obdoba slate-600 */
    --color-gemini-blue-accent: var(--color-primary-accent); /* Obdoba blue-700 */
    --color-gemini-grey-text: var(--color-text-light); /* Obdoba slate-700 */
    --color-gemini-green: #28a745; /* Pro "co chrání" - zelená */
    --color-gemini-red: #dc3545;   /* Pro "co nechrání" - červená */


    /* Definice písem */
    --font-heading: 'Montserrat', sans-serif; /* Písmo pro nadpisy */
    --font-body: 'Merriweather', serif; /* Písmo pro text */
}

/* Styly pro sekce na index.html */
section { padding: 80px 20px; text-align: center; }
section.alternate-bg { background-color: var(--color-secondary-accent); }
.hero-section, .about-section, .info-section, .quote-section { display: flex; align-items: center; justify-content: center;}
.hero-section { min-height: 70vh; background: linear-gradient(135deg, var(--color-secondary-accent) 0%, var(--color-background-dark) 100%); color: #fff; }
.hero-content, .about-content { max-width: 800px; margin: auto; }
.profile-thumbnail { width: 100px; height: 100px; border-radius: 50%; border: 3px solid var(--color-primary-accent); cursor: pointer; margin-bottom: 1rem; }
.category-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; margin-top: 40px; }
.category-card { background-color: var(--color-card-background); padding: 30px; border-radius: 10px; text-align: left; transition: transform 0.3s ease, box-shadow 0.3s ease; display: flex; flex-direction: column; justify-content: space-between; color: var(--color-text-light); min-height: 250px;}
.category-card:hover { transform: translateY(-10px); }
.card-icon { width: 60px; height: 60px; background-color: var(--color-primary-accent); border-radius: 50%; margin-bottom: 20px; display: flex; align-items: center; justify-content: center; font-size: 2em; color: #fff; margin-bottom: 1rem; }
.category-card h4 { color: var(--color-primary-accent); }
.category-card p { flex-grow: 1; color: #c0c0c0;}
.card-link { display: block; margin-top: 1rem; font-weight: bold; color: var(--color-primary-accent); }

body {
    font-family: var(--font-body);
    line-height: 1.6;
    margin: 0;
    padding: 0;
    background-color: var(--color-background-dark);
    color: var(--color-text-light);
    transition: background-color 0.3s ease, color 0.3s ease; /* Plynulý přechod barev */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    color: var(--color-primary-accent);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary-accent-hover); /* Použití nové hover barvy */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    margin-top: 0;
    margin-bottom: 15px;
}

h1 { font-size: 2.8em; }
h2 { font-size: 2.2em; }
h3 { font-size: 1.8em; }

/* Styly pro tlačítka */
.btn-primary,.btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease; /* Přidána animace pro barvu textu */
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary-accent);
    color: #fff; /* Bílý text ve výchozím stavu */
    border: none;
}

.btn-primary:hover {
    background-color: var(--color-primary-accent-hover); /* Pozadí se zesvětluje */
    transform: translateY(-2px); /* Jemný posun nahoru */
    color: var(--color-background-dark); /* Text se změní na tmavou barvu pozadí pro lepší kontrast */
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-primary-accent);
    border: 2px solid var(--color-primary-accent);
}

.btn-secondary:hover {
    background-color: var(--color-primary-accent);
    color: #fff;
    transform: translateY(-2px);
}

/* Styly pro hlavní hlavičku */
.main-header {
    background-color: rgba(26, 26, 46, 0.9); /* Lehce průhledné pro hloubku */
    padding: 20px 0;
    position: sticky; /* Přilepená hlavička při posouvání */
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.site-title {
    margin: 0;
    font-size: 1.8em;
}

.site-title a {
    color: #fff;
    text-decoration: none;
}

/* Styly pro logo v hlavičce */
.site-logo-container {
    margin-left: 20px;
    margin-right: auto;
}

.header-logo {
    width: 50px;
    height: auto;
    transition: transform 0.3s ease-out;
    cursor: pointer;
}

.header-logo:hover {
    transform: translateY(-5px);
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav a {
    color: var(--color-text-light);
    font-weight: bold;
    font-size: 1.1em;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    background-color: var(--color-primary-accent);
    left: 0;
    bottom: -5px;
    transition: width 0.3s ease-in-out;
}

.main-nav a:hover::after {
    width: 100%;
}

/* Specifický styl pro navigační link v JRRET.html a CHT.html, aby se nepřekrýval s obecným main-nav a */
.jrret-nav-link {
    position: relative;
    transition: color 0.3s ease;
    color: var(--color-text-light);
}
.jrret-nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 50%;
    background-color: var(--color-primary-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}
.jrret-nav-link:hover, .jrret-nav-link.active {
    color: var(--color-primary-accent);
}
.jrret-nav-link:hover::after, .jrret-nav-link.active::after {
    width: 100%;
}


/* Sekce Hero - úvodní část stránky */
.hero-section {
    position: relative;
    height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-secondary-accent) 0%, var(--color-background-dark) 100%);
    color: #fff;
    padding: 50px 20px;
}

.hero-content {
    z-index: 1;
    max-width: 800px;
}

/* Styly pro úvodní text */
.welcome-message {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--color-text-light);
    opacity: 0.8;
}

/* Kontejner pro profilovou fotografii */
.profile-photo-container {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

/* Malá profilová fotografie (thumbnail) */
.profile-thumbnail {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--color-primary-accent);
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 0 15px rgba(0, 188, 212, 0.5);
}

.profile-thumbnail:hover {
    transform: scale(1.05);
    box-shadow: 0 0 25px rgba(0, 188, 212, 0.8);
}

.hero-content h2 {
    font-size: 3.5em;
    margin-bottom: 20px;
    line-height: 1.2;
    color: #fff;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 40px;
    opacity: 0.9;
}

.hero-background-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Zde můžete nahradit placeholder obrázek skutečným dynamickým pozadím */
    background: url('https://via.placeholder.com/1920x1080/0f3460/1a1a2e?text=Dynamic+Background+Visual') no-repeat center center/cover;
    opacity: 0.2;
    z-index: 0;
    animation: subtleZoom 20s infinite alternate ease-in-out;
}

@keyframes subtleZoom {
    from { transform: scale(1); }
    to { transform: scale(1.05); }
}

/* Obecné styly sekcí */
section {
    padding: 80px 0;
    text-align: center;
}

/* Zde je klíčová úprava pro střídání pozadí */
/* Základní pozadí pro liché sekce (platí pro všechny, pokud není speciálně přepsáno) */
section:nth-of-type(odd) {
    background-color: var(--color-background-dark);
}

/* Alternativní pozadí pro sudé sekce */
section:nth-of-type(even) {
    background-color: #22223a; /* Lehce světlejší tmavá pro kontrast */
}

/* Speciální úprava pro sekci hned po hero-section, aby se vždy lišila */
.hero-section + section {
    background-color: #22223a; /* Nastaví druhou barvu po hero-section */
}

/* A pak pro sekci, která následuje po sekci s id="middleearth-works", atd. */
#middleearth-works + section { /* this will target #other-works */
    background-color: var(--color-background-dark);
}
#other-works + section { /* this will target #translations */
    background-color: #22223a;
}
#translations + section { /* this will target #christopher-works */
    background-color: var(--color-background-dark);
}


.section-intro {
    font-size: 1.2em;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Sekce kategorií */
.categories-section h3 {
    margin-bottom: 60px;
    font-size: 2.5em;
    color: var(--color-primary-accent);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.category-card {
    background-color: var(--color-card-background);
    padding: 30px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    z-index: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 250px;
}

.category-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Pseudo-element pro obrázek na pozadí s efektem zamlžení */
.category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: blur(5px) brightness(0.6);
    transform: scale(1.1);
    z-index: -1;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.category-card:hover::before {
    filter: blur(3px) brightness(0.7);
    transform: scale(1);
}

/* Specifické obrázky na pozadí pro nové karty */
#tolkien-middleearth-card::before {
    background-image: url('https://via.placeholder.com/600x400/8B4513/ffffff?text=Tolkien+Middle-earth'); /* Hnědá/Zemité tóny */
}
#tolkien-other-works-card::before {
    background-image: url('https://via.placeholder.com/600x400/4B0082/ffffff?text=Tolkien+Other+Works'); /* Tmavě fialová */
}
#middleearth-games-card::before {
    background-image: url('https://via.placeholder.com/600x400/2F4F4F/ffffff?text=Middle-earth+Games'); /* Tmavě šedá/zelená */
}
#fantasy-card-new::before {
    background-image: url('https://via.placeholder.com/600x400/483D8B/ffffff?text=Fantasy'); /* Střední modrofialová */
}
#sci-fi-card::before {
    background-image: url('https://via.placeholder.com/600x400/191970/ffffff?text=Sci-Fi'); /* Tmavě modrá */
}
#interesting-books-card::before {
    background-image: url('https://via.placeholder.com/600x400/696969/ffffff?text=Interesting+Books'); /* Šedá */
}
#interesting-links-card::before {
    background-image: url('https://via.placeholder.com/600x400/808000/ffffff?text=Interesting+Links'); /* Olivová zelená */
}


.card-icon {
    width: 60px;
    height: 60px;
    background-color: var(--color-primary-accent);
    border-radius: 50%;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2em;
    color: #fff;
}

.category-card h4 {
    color: var(--color-primary-accent);
    font-size: 1.5em;
    margin-bottom: 10px;
}

.category-card p {
    font-size: 0.95em;
    color: var(--color-text-light);
    flex-grow: 1;
}

.card-link {
    display: block;
    margin-top: 20px;
    color: var(--color-primary-accent);
    font-weight: bold;
}

.external-link {
    margin-top: 10px;
    font-size: 0.85em;
}
.external-link a {
    color: var(--color-text-light);
    opacity: 0.7;
}
.external-link a:hover {
    color: var(--color-primary-accent);
    opacity: 1;
}


/* Sekce služeb - není použita, ale ponechána pro konzistenci */
.services-section {
    background-color: var(--color-secondary-accent);
    color: #fff;
}

.services-section h3 {
    color: #fff;
    margin-bottom: 60px;
    font-size: 2.5em;
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.service-item {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.15);
}

.service-item h4 {
    color: var(--color-primary-accent);
    font-size: 1.6em;
    margin-bottom: 15px;
}

.service-item p {
    font-size: 1em;
    margin-bottom: 25px;
}

/* Sekce "O mně" - nyní vizuálně podobná hero-section */
.about-section {
    position: relative;
    height: auto;
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-background-dark) 0%, var(--color-secondary-accent) 100%);
    color: #fff;
    padding: 50px 20px;
}

/* Vizuální pozadí pro sekci "O mně" */
.about-background-visual {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Zde můžete nahradit placeholder obrázek skutečným dynamickým pozadím */
    background: url('https://via.placeholder.com/1920x1080/1a1a2e/0f3460?text=About+Background+Visual') no-repeat center center/cover;
    opacity: 0.2;
    z-index: 0;
    animation: subtleZoom 20s infinite alternate ease-in-out;
}


/* Patička */
.main-footer {
    background-color: #111;
    color: var(--color-text-light);
    padding: 40px 0;
    text-align: center;
    font-size: 0.9em;
}

.main-footer .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.social-links img {
    width: 30px;
    height: 30px;
    margin: 0 10px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.social-links img:hover {
    opacity: 1;
}

/* Styly pro Modal (vyskakovací okno s fotografií) */
.photo-modal-overlay {
    display: none; /* Toto zajistí, že je modal zpočátku skrytý */
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
    /* display: flex;  -- TUTO ŘÁDKU ZAKOMENTUJ NEBO ODSTRAŇ -- */
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.photo-modal-content {
    position: relative;
    background-color: var(--color-background-dark);
    margin: auto;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.close-modal-btn {
    color: var(--color-text-light);
    font-size: 40px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-modal-btn:hover,
.close-modal-btn:focus {
    color: var(--color-primary-accent);
    text-decoration: none;
}

.photo-modal-image {
    max-width: 100%;
    max-height: 80vh;
    display: block;
    border-radius: 5px;
    object-fit: contain;
}

/* Třída pro skrytí sekcí */
.hidden-section {
    display: none!important;
}

/* Styly pro animaci fade-in (zajištěno v script.js, ale může být i zde) */
/* Počáteční stav pro animaci fade-in */
.fade-in-initial {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Cílový stav animace fade-in */
.fade-in {
    opacity: 1;
    transform: translateY(0);
}

/* Styles for timeline, tabs and chart from JRRET.html */
.timeline-item {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
}
.timeline-item:hover {
    transform: translateY(-5px);
}
.timeline-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
}
.tab-button {
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    font-family: var(--font-heading); /* Adjusted to use global font variable */
    font-size: 1.25rem;
    font-weight: 600;
    transition: all 0.3s ease;
    color: var(--color-text-light); /* Adjusted to use global color variable */
}
.tab-button.active {
    border-color: var(--color-primary-accent); /* Adjusted to use global color variable */
    background-color: var(--color-card-hover); /* Adjusted to use a global color variable */
    color: var(--color-primary-accent); /* Adjusted to use global color variable */
}
.tab-button:hover {
    background-color: var(--color-card-hover); /* Adjusted to use a global color variable */
    color: var(--color-primary-accent); /* Adjusted to use global color variable */
}
.tab-pane {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.tab-pane.active {
    display: block;
    opacity: 1;
}
.chart-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    height: 400px;
    max-height: 50vh;
}
@media (min-width: 768px) {
   .chart-container {
        height: 500px;
    }
}

/* Specific styles for KnihyT.html that were inline */
h1.text-5xl.md\:text-7xl.font-bold.font-display.text-stone-800 {
    font-family: var(--font-heading); /* Use global heading font */
    color: var(--color-text-light); /* Use global text light color */
}

/* Update for specific nav-link in KnihyT.html if needed, otherwise jrret-nav-link will apply */
/* .nav-link { color: var(--color-text-light); } - already covered by main-nav a and jrret-nav-link */
/* .nav-link::after { background-color: var(--color-primary-accent); } - already covered */
/* .nav-link:hover, .nav-link.active { color: var(--color-primary-accent); } - already covered */

.contribution-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.contribution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2); /* Adjusted shadow for darker theme */
}
/* Chart container already moved, ensure its specific height and max-height are here */
/* .chart-container is defined above */
/* Media query for chart container height is also defined above */

/* Timeline item specific styling for KnihyT.html */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -31px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    background-color: var(--color-primary-accent-hover); /* Using a lighter accent color */
    border: 4px solid var(--color-primary-accent); /* Using primary accent for border */
    border-radius: 50%;
    z-index: 1;
}


/* Responzivní design pro menší obrazovky */
@media (max-width: 768px) {
  .main-header .container {
        flex-direction: column;
        text-align: center;
    }

  .site-logo-container {
        margin: 10px 0;
    }

  .main-nav ul {
        margin-top: 20px;
        flex-direction: column;
        gap: 10px;
    }

  .main-nav li {
        margin-left: 0;
    }

  .hero-content h2, .about-section h3 {
        font-size: 2.5em;
    }

  .hero-content p, .about-section p {
        font-size: 1em;
    }

  .profile-thumbnail {
        width: 80px;
        height: 80px;
    }
  .photo-modal-content {
        padding: 15px;
    }
  .close-modal-btn {
        font-size: 30px;
        top: 5px;
        right: 15px;
    }

  .category-grid {
        grid-template-columns: 1fr;
    }

    section {
        padding: 60px 0;
    }

    section h3 {
        font-size: 2em;
    }
}

@media (max-width: 480px) {
  .site-title {
        font-size: 1.5em;
    }

  .hero-content h2, .about-section h3 {
        font-size: 2em;
    }

  .btn-primary,.btn-secondary {
        padding: 10px 20px;
        font-size: 0.9em;
    }
}

/* class pro viseo */

.video-section {
    padding: 60px 0; /* Přidá vertikální odsazení */
    background-color: var(--color-background-dark); /*nebo jiná barva pozadí*/
}

.video-container {
    max-width: 800px; /* Nastaví maximální šířku videa */
    margin: 0 auto; /* Vycentruje kontejner */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5); /* Přidá stín pro vizuální efekt */
    border-radius: 10px; /* Zaoblí rohy */
    overflow: hidden; /* Skryje obsah mimo zaoblené rohy */
}

/* Responzivní video v kontejneru pro zachování poměru stran */
.video-container video {
    display: block; /* Odstraní případnou mezeru pod videem */
    max-width: 100%; /* Zajistí, že video nepřeteče rodičovský prvek */
    height: auto; /* Zachová poměr stran */
}

/* Styly pro akordeonové prvky */
.accordion-container {
    max-width: 900px;
    margin: 40px auto;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.accordion-item {
    border-bottom: 1px solid var(--color-border);
}

.accordion-item:last-child {
    border-bottom: none;
}

.accordion-header {
    background-color: var(--color-card-background); /* Použijeme barvu pozadí karet */
    color: var(--color-primary-accent);
    padding: 18px 25px;
    width: 100%;
    text-align: left;
    border: none;
    outline: none;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 1.3em;
    transition: background-color 0.3s ease, color 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header:hover {
    background-color: var(--color-card-hover); /* Tmavší odstín při najetí myší */
    color: var(--color-primary-accent-hover);
}

.accordion-header::after {
    content: '+';
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.accordion-header.active::after {
    content: '-';
    transform: rotate(180deg);
}

.accordion-content {
    background-color: #22223a; /* Lehce světlejší tmavá pro obsah akordeonu */
    padding: 0 25px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-out, padding 0.5s ease-out;
    color: var(--color-text-light);
}

.accordion-content p, .accordion-content ul {
    padding: 15px 0;
    margin: 0;
}

.accordion-content ul {
    list-style-type: disc;
    padding-left: 40px;
}

.accordion-content ul li {
    margin-bottom: 8px;
}

/* Styly pro tabulky uvnitř akordeonu */
.accordion-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--color-background-dark);
    color: var(--color-text-light);
}

.accordion-content th, .accordion-content td {
    border: 1px solid var(--color-border);
    padding: 12px 15px;
    text-align: left;
}

.accordion-content th {
    background-color: var(--color-secondary-accent);
    color: #fff;
    font-family: var(--font-heading);
    font-weight: bold;
}

.accordion-content tr:nth-child(even) {
    background-color: #282842; /* Lehce tmavší odstín pro střídání řádků */
}

/* Přizpůsobení hero-section pro novou stránku */
#hero-lotro {
    background: linear-gradient(135deg, #1d3e6c 0%, #0d1a2f 100%); /* Odstíny modré pro lore */
}

#hero-lotro .hero-background-visual {
    background: url('https://via.placeholder.com/1920x1080/1d3e6c/0d1a2f?text=LOTRO+Lore+Background') no-repeat center center/cover;
}

/* Zarovnání textu v sekcích na střed */
#intro, #inscriptions, #ruins, #statues, #conclusion {
    text-align: left; /* Text uvnitř sekcí bude zarovnán vlevo */
}

#intro h3, #inscriptions h3, #ruins h3, #statues h3, #conclusion h3,
#inscriptions h4, #ruins h4, #statues h4 {
    text-align: center; /* Nadpisy sekcí na střed */
}

/* Přidání odsazení pro podnadpisy v seznamu */
.accordion-content h5 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: var(--color-primary-accent);
    font-size: 1.2em;
}

/* Styly specifické pro KnihyT.html a obecné vylepšení zarovnání */

/* Nadpis sekce */
.section-heading {
    margin-bottom: 60px;
    font-size: 2.5em;
    color: var(--color-primary-accent);
    text-align: center; /* Centrování nadpisů */
}

/* Pro úvodní nadpis Architekt Legendária */
.title-heading {
    font-family: var(--font-heading);
    font-size: 3.5em; /* Zvětšená velikost pro hlavní nadpis */
    font-weight: bold;
    color: var(--color-primary-accent); /* Použijeme akcentní barvu */
    text-align: center;
    margin-bottom: 20px;
}

/* Pro podnadpis Christopher Tolkien */
.subsection-heading {
    font-family: var(--font-heading);
    font-size: 1.8em;
    font-weight: bold;
    color: var(--color-text-light);
    text-align: center;
    margin-top: 20px;
    margin-bottom: 5px;
}

/* Pro text "Editor, učenec a strážce odkazu" */
.subtitle-text {
    font-size: 1.1em;
    color: var(--color-text-light);
    opacity: 0.8;
    text-align: center;
    margin-bottom: 30px;
}

/* Obecný styl pro textové odstavce */
.section-intro, .section-text, .chart-description {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--color-text-light);
    opacity: 0.9;
    max-width: 900px; /* Omezení šířky textu pro lepší čitelnost */
    margin-left: auto;
    margin-right: auto;
    text-align: left; /* Zarovnání odstavců doleva */
}

.chart-description {
    text-align: center;
    font-size: 0.9em;
    color: var(--color-text-light);
    opacity: 0.7;
    margin-top: 10px;
}

/* Kontejner pro profilovou fotku CT */
.profile-photo-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--color-secondary-accent); /* Tmavší modrá barva */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--color-primary-accent);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.6);
    margin: 0 auto 20px auto; /* Centrování */
}

.initials {
    font-family: var(--font-heading);
    font-size: 5em;
    color: var(--color-primary-accent-hover); /* Světlejší odstín akcentní barvy */
    font-weight: bold;
}

/* Styly pro dvousloupcovou mřížku (sekce Formativní léta) */
.two-column-grid {
    display: grid;
    grid-template-columns: 1fr; /* Na mobilu jeden sloupec */
    gap: 30px;
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

@media (min-width: 768px) {
    .two-column-grid {
        grid-template-columns: repeat(2, 1fr); /* Na větších obrazovkách dva sloupce */
    }
}

.card-item {
    background-color: var(--color-card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: left;
}

.card-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-item .card-title {
    font-family: var(--font-heading);
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--color-primary-accent); /* Akcentní barva pro titulky karet */
    text-align: center;
}

.card-item ul {
    list-style: none; /* Odebrání výchozích odrážek */
    padding: 0;
    margin: 0;
}

.card-item ul li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    color: var(--color-text-light);
}

.card-item ul li::before {
    content: '◆'; /* Vlastní odrážka */
    color: var(--color-primary-accent);
    margin-right: 10px;
    font-size: 1.2em;
    line-height: 1;
}

/* Styly pro mřížku příspěvků (sekce Neviditelný spolupracovník) */
.contribution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.contribution-card {
    background-color: var(--color-card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contribution-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.card-icon-svg {
    margin-bottom: 20px;
    color: var(--color-primary-accent); /* Barva ikon */
}

.icon-lg {
    width: 60px;
    height: 60px;
}

.contribution-card .card-title {
    font-family: var(--font-heading);
    font-size: 1.6em;
    margin-bottom: 10px;
    color: var(--color-primary-accent);
}

.contribution-card .card-text {
    font-size: 0.95em;
    color: var(--color-text-light);
}

/* Styly pro vertikální časovou osu (sekce Odkaz a Ochrana Vize) */
.timeline-section-books {
    margin-top: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    text-align: left; /* Text časové osy vlevo */
}

.timeline-vertical-container {
    position: relative;
    padding-left: 25px; /* Pro čáru časové osy */
    border-left: 2px solid var(--color-border);
}

.timeline-item-vertical {
    position: relative;
    margin-bottom: 30px;
    padding-left: 20px;
}

.timeline-item-vertical::before {
    content: '';
    position: absolute;
    left: -7px; /* Poloha kolečka na čáře */
    top: 5px;
    width: 12px;
    height: 12px;
    background-color: var(--color-primary-accent);
    border-radius: 50%;
    border: 2px solid var(--color-secondary-accent);
    z-index: 1;
}

.timeline-year {
    font-weight: bold;
    color: var(--color-primary-accent-hover);
    margin-bottom: 5px;
}

.timeline-description {
    color: var(--color-text-light);
    font-size: 0.95em;
}

/* Karta pro osobní život a dědictví */
.card-item-full {
    background-color: var(--color-card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
}

.card-item-full .card-title {
    font-family: var(--font-heading);
    font-size: 1.8em;
    margin-bottom: 20px;
    color: var(--color-primary-accent);
    text-align: center;
}

.card-item-full .card-text {
    color: var(--color-text-light);
    margin-bottom: 15px;
}

/* Styly pro seznam zdrojů */
.source-list-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}

.source-list {
    list-style-type: decimal;
    padding-left: 20px;
    color: var(--color-text-light);
}

.source-list li {
    margin-bottom: 10px;
    font-size: 0.95em;
}

.source-list li a {
    color: var(--color-primary-accent-hover); /* Světlejší pro odkazy */
}

.source-list li a:hover {
    text-decoration: underline;
}

/* Přizpůsobení hero-section pro KnihyT.html */
#intro.categories-section {
    padding-top: 80px; /* Zvýší odsazení nahoře, aby se vešel nadpis */
}

/* Styly specifické pro JRRET.html */

/* Hero sekce pro JRRET.html - vlastní pozadí a rozvržení */
.hero-jrret {
    background: linear-gradient(135deg, #2a2a4a 0%, #1a1a2e 100%); /* Tmavší modro-fialový gradient */
    height: auto; /* Přizpůsobí výšku obsahu */
    padding: 80px 20px; /* Větší odsazení pro lepší vzhled */
}

.hero-jrret-bg {
    background: url('https://via.placeholder.com/1920x1080/2a2a4a/1a1a2e?text=JRR+Edith+Background') no-repeat center center/cover;
}

.jrret-profile-grid {
    display: flex;
    flex-direction: column; /* Na menších obrazovkách pod sebou */
    gap: 40px;
    align-items: center;
    max-width: 600px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .jrret-profile-grid {
        flex-direction: row; /* Na větších obrazovkách vedle sebe */
        justify-content: center;
    }
}

.profile-photo-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

/* Kulaté logo s inicialami (z KnihyT.html) */
.profile-photo-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--color-secondary-accent); /* Tmavší modrá barva */
    display: flex;
    align-items: center;
    justify-content: center;
    border: 4px solid var(--color-primary-accent);
    box-shadow: 0 0 20px rgba(0, 188, 212, 0.6);
    margin: 0 auto 20px auto; /* Centrování */
}

.initials {
    font-family: var(--font-heading);
    font-size: 5em;
    color: var(--color-primary-accent-hover); /* Světlejší odstín akcentní barvy */
    font-weight: bold;
}

.ampersand-divider {
    font-size: 4em;
    color: var(--color-primary-accent); /* Barva podobná akcentu */
    margin: 20px 0; /* Odsazení pro mobil */
    align-self: center; /* Vycentrování ve flex kontejneru */
}

@media (min-width: 768px) {
    .ampersand-divider {
        margin: 0 30px; /* Odsazení pro desktop */
    }
}

.subsection-heading-jrret {
    font-family: var(--font-heading);
    font-size: 2em; /* Mírně větší než standardní h3 */
    font-weight: bold;
    color: var(--color-text-light);
    margin-top: 15px;
    margin-bottom: 5px;
}

.subtitle-text-jrret {
    font-size: 1.1em;
    color: var(--color-text-light);
    opacity: 0.8;
}

/* Sekce obsahu s odsazením */
.section-content-wrapper {
    max-width: 900px; /* Omezení šířky textu pro lepší čitelnost */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Vnitřní odsazení */
    text-align: left; /* Zarovnání textu vlevo */
}

.section-content-wrapper .section-heading {
    margin-bottom: 40px;
    font-size: 2.8em; /* Větší nadpisy sekcí */
    color: var(--color-primary-accent);
    text-align: center;
}

.section-content-wrapper .section-intro {
    font-size: 1.15em;
    margin-bottom: 30px;
    color: var(--color-text-light);
    opacity: 0.9;
}

.section-content-wrapper .section-text {
    font-size: 1.1em;
    margin-bottom: 20px;
    color: var(--color-text-light);
    opacity: 0.9;
}

/* Střídání pozadí sekcí pro JRRET.html */
.categories-section.alternate-bg {
    background-color: #22223a; /* Lehce světlejší tmavá pro kontrast */
}

/* Časová osa v JRRET.html */
.timeline-interactive-container {
    position: relative;
    padding-bottom: 80px; /* Více místa pod osou pro detaily */
    margin-top: 50px;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.timeline-line {
    border-top: 2px dashed var(--color-border);
    position: absolute;
    width: calc(100% - 40px); /* Adjust width to fit within container */
    top: 50px; /* Vertikální pozice čáry */
    left: 20px;
    z-index: 0;
}

.timeline-items-wrapper {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-top: 20px; /* Odsazení od linky */
    z-index: 1;
}

.timeline-item {
    flex: 1;
    text-align: center;
    padding: 0 10px;
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    position: relative;
    color: var(--color-text-light);
}

.timeline-item:hover {
    transform: translateY(-8px);
}

.timeline-item div:first-child { /* Cílí na kruhovou ikonku */
    width: 40px;
    height: 40px;
    background-color: var(--color-secondary-accent); /* Barva kruhu */
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 10px auto;
    border: 2px solid var(--color-primary-accent);
    transition: background-color 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.timeline-item div:first-child.bg-amber-700 { /* Active state from JS */
    background-color: var(--color-primary-accent); /* Aktivní barva kruhu */
    transform: scale(1.1);
    border-color: var(--color-primary-accent-hover);
}

.timeline-item p {
    font-family: var(--font-body);
    font-size: 0.9em;
    opacity: 0.9;
}

.timeline-details-content {
    background-color: var(--color-card-background);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    margin-top: 40px;
    text-align: center;
    color: var(--color-text-light);
    opacity: 0; /* Pro animaci */
    transition: opacity 0.5s ease;
}

.timeline-details-content h3 {
    font-family: var(--font-heading);
    font-size: 1.6em;
    color: var(--color-primary-accent);
    margin-bottom: 10px;
}
.timeline-details-content p {
    font-size: 1em;
    line-height: 1.7;
}

/* Záložky (Tabs) v JRRET.html */
.tabs-container {
    max-width: 900px;
    margin: 40px auto;
    background-color: var(--color-card-background);
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    overflow: hidden;
}

.tab-buttons-wrapper {
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--color-border);
    background-color: var(--color-secondary-accent);
}

.tab-button {
    flex: 1; /* Rozdělí prostor rovnoměrně */
    padding: 15px 25px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    font-family: var(--font-heading);
    font-size: 1.2em;
    font-weight: bold;
    color: var(--color-text-light);
    transition: all 0.3s ease;
    outline: none; /* Odstranění obrysu při fokusu */
}

.tab-button.active {
    background-color: var(--color-primary-accent);
    color: var(--color-background-dark); /* Tmavší text na aktivní záložce */
    border-bottom: 3px solid var(--color-primary-accent-hover);
    transform: translateY(-2px); /* Jemný efekt stlačení */
}

.tab-button:hover:not(.active) {
    background-color: var(--color-card-hover);
    color: var(--color-primary-accent-hover);
}

.tab-content-wrapper {
    padding: 30px;
    color: var(--color-text-light);
}

.tab-pane-heading {
    font-family: var(--font-heading);
    font-size: 1.8em;
    color: var(--color-primary-accent);
    margin-bottom: 20px;
}

.tab-pane-text {
    font-size: 1.05em;
    line-height: 1.7;
}

/* Kontext pro textové bloky s centrováním */
.text-block-center {
    max-width: 900px;
    margin: 40px auto 0 auto;
    text-align: left; /* Text uvnitř bloku zarovnat doleva */
}

.text-block-center .subsection-heading {
    text-align: center; /* Ale nadpis bloku na střed */
    margin-bottom: 20px;
}

/* Zdroje */
.source-list-container {
    max-width: 900px;
    margin: 0 auto;
    text-align: left;
}
.source-list {
    list-style-type: decimal;
    padding-left: 20px;
    color: var(--color-text-light);
}
.source-list li {
    margin-bottom: 10px;
    font-size: 0.95em;
}
.source-list li a {
    color: var(--color-primary-accent-hover);
}
.source-list li a:hover {
    text-decoration: underline;
}

/* Media Queries pro responsivní design */
@media (max-width: 768px) {
    .section-content-wrapper {
        padding: 0 15px;
    }

    .section-heading {
        font-size: 2.2em;
    }

    .section-intro, .section-text {
        font-size: 1em;
    }

    .profile-photo-circle {
        width: 120px;
        height: 120px;
    }
    .initials {
        font-size: 4em;
    }
    .subsection-heading-jrret {
        font-size: 1.6em;
    }
    .subtitle-text-jrret {
        font-size: 1em;
    }

    .timeline-interactive-container {
        padding-bottom: 60px;
    }
    .timeline-line {
        top: 40px;
    }
    .timeline-item div:first-child {
        width: 30px;
        height: 30px;
        font-size: 0.9em;
    }
    .timeline-item p {
        font-size: 0.8em;
    }
    .timeline-details-content {
        padding: 20px;
    }
    .timeline-details-content h3 {
        font-size: 1.4em;
    }
    .timeline-details-content p {
        font-size: 0.9em;
    }

    .tab-button {
        font-size: 1em;
        padding: 12px 15px;
    }
    .tab-pane-heading {
        font-size: 1.6em;
    }
    .tab-pane-text {
        font-size: 0.95em;
    }
}

/* Styly specifické pro Viznak.html */

/* Hero sekce pro Viznak.html */
#hero-viznak {
    background: linear-gradient(135deg, #4b0082 0%, #1a1a2e 100%); /* Tmavě fialový gradient */
    height: auto; /* Přizpůsobí výšku obsahu */
    padding: 80px 20px; /* Větší odsazení pro lepší vzhled */
    flex-direction: column; /* Aby se obsah uspořádal pod sebe na menších obrazovkách */
}

.hero-viznak-bg {
    background: url('https://via.placeholder.com/1920x1080/4B0082/1a1a2e?text=Viznak+Background') no-repeat center center/cover; /* Fialové pozadí */
}

.hero-viznak-image {
    max-width: 200px; /* Velikost obrázku Viznaka */
    height: auto;
    border-radius: 10px; /* Lehké zaoblení rohů */
    margin-bottom: 30px; /* Odsazení od textu */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5); /* Stín pro vyniknutí */
}

/* Sekce obsahu s odsazením - zajišťuje, že text nebude "nalepený" na okrajích */
.categories-section .section-content-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Úprava pro h3 uvnitř .categories-section, která se používá jako podnadpis */
.categories-section h3.subsection-heading {
    margin-top: 40px; /* Více místa nad podnadpisem tabulky */
    margin-bottom: 25px;
    font-size: 1.8em;
    color: var(--color-primary-accent);
}

/* Alternativní pozadí pro střídání sekcí */
.categories-section.alternate-bg {
    background-color: #22223a; /* Lehce světlejší tmavá pro kontrast */
}