/* Global Styles */
:root {
    --bg-color: #0d0c0a;
    --text-color: #f1f1f1;
    --font-main: 'Poppins', sans-serif;
    --nav-padding-left: 40px;
}

body.light-mode {
    --bg-color: #ffffff;
    --text-color: #000000;
}

/* Light Mode Text Shadow Update */
body.light-mode .nav-links a {
    text-shadow: none;
    /* Clean look for light mode, or maybe a soft gray shadow */
    font-weight: 500;
    /* Slightly bolder for visibility */
}

body.light-mode .nav-links a:hover {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

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

/* Homepage News Carousel - Moved to top for priority */
:root {
    --card-bg: #1a1a1a;
    --border-color: #333;
    --primary-color: #9184ab;
    --text-muted: #aaa;
}

body.light-mode {
    --card-bg: #f9f9f9;
    --border-color: #ddd;
    --primary-color: #613999;
    --text-muted: #666;
}

#news-carousel-section {
    padding: 60px 20px;
    max-width: 1200px;
    margin: 40px auto;
    text-align: center;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 24px;
    border: 1px solid var(--border-color);
    /* Diffused blur effect */
    box-shadow: 0 0 30px rgba(145, 132, 171, 0.05);
    position: relative;
    overflow: visible;
    /* Allow glow to spill out */
    transition: box-shadow 0.3s ease;
}

/* Increase saturation/intensity on title hover */
#news-carousel-section:has(.section-title-link:hover) {
    box-shadow: 0 0 40px rgba(145, 132, 171, 0.4);
}

body.light-mode #news-carousel-section {
    box-shadow: 0 0 30px rgba(97, 57, 153, 0.15);
}

body.light-mode #news-carousel-section:has(.section-title-link:hover) {
    box-shadow: 0 0 40px rgba(97, 57, 153, 0.4);
}

/* Title Link Styling */
.section-title-link {
    text-decoration: none;
    display: inline-block;
    margin-bottom: 30px;
}

.section-title-link h2 {
    margin: 0;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.3s ease;
}

.section-title-link .hover-arrow {
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
    color: var(--primary-color);
}

.section-title-link:hover h2 {
    color: var(--primary-color);
}

.section-title-link:hover .hover-arrow {
    opacity: 1;
    transform: translateX(0);
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    /* Add padding to prevent clipping of hover effect */
    padding: 20px 0;
    margin: -20px 0;
    /* Compensate for padding to keep layout same */
}

.carousel-track {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    box-sizing: border-box;
    padding: 0 10px;
    display: flex;
    justify-content: center;
}

.carousel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: left;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    width: 100%;
    max-width: 600px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.carousel-card:hover {
    transform: translateY(-8px);
    /* Increased slightly */
    box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.carousel-card .article-category {
    display: inline-block;
    background: rgba(97, 57, 153, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 15px;
}

.carousel-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: var(--text-color);
}

.carousel-card p {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-muted);
    line-height: 1.5;
}



.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    align-items: flex-end;
    height: 20px;
}

.carousel-indicator {
    border: none;
    border-radius: 50%;
    background: var(--text-muted);
    opacity: 0.3;
    width: 10px;
    height: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
    opacity: 1;
    width: 14px;
    height: 14px;
    transform: translateY(-2px);
}

@media (min-width: 768px) {
    .carousel-slide {
        min-width: 50%;
    }
}

@media (min-width: 1024px) {
    .carousel-slide {
        min-width: 33.333%;
    }
}

/* Accordion Styles */
details {
    background-color: var(--card-background-color, var(--card-bg));
    /* Fallback to card-bg if card-background-color is missing */
    border: 2px solid rgba(145, 132, 171, 0.3);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

details:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #9184ab;
}

details[open] {
    border-color: var(--primary-color);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    padding-bottom: 30px;
}

/* Light Mode Accordion Overrides */
body.light-mode details {
    border-color: rgba(97, 57, 153, 0.2);
}

body.light-mode details:hover {
    border-color: #613999;
}

summary {
    cursor: pointer;
    font-weight: 700;
    /* Bolder text */
    font-size: 1.2rem;
    /* Larger font size */
    list-style: none;
    position: relative;
    padding-right: 40px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    min-height: 30px;
}

summary::-webkit-details-marker {
    display: none;
}

summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-weight: bold;
    color: var(--primary-color);
    font-size: 1.5rem;
    /* Larger icon */
    transition: transform 0.3s ease;
    background: rgba(var(--primary-color-rgb), 0.1);
    /* Subtle background for icon */
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
    background: var(--primary-color);
    color: #fff;
}

details p,
details ul {
    margin-top: 20px;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 10px;
    /* Indent content slightly */
    border-left: 2px solid var(--card-border);
    /* Visual guide for content */
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color 0.3s, color 0.3s;
    /* Smooth transition */
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background-color: var(--bg-color);
    position: relative;
    z-index: 10;
    transition: background-color 0.3s;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.header-content {
    display: contents;
    /* Reset header-content since original didn't use it effectively or it was part of the new structure */
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    transition: color 0.3s ease;
    white-space: nowrap;
    display: flex;
    gap: 1.2rem;
}

.logo-word {
    display: inline-block;
}

.logo-caps {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo-lower {
    font-size: 0.85rem;
    font-weight: 400;
    color: var(--text-color);
    opacity: 0.8;
}

body.light-mode .logo-lower {
    opacity: 0.8;
}

/* Contact Form Styles */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px;
}

.contact-container h1 {
    margin-bottom: 30px;
    color: var(--text-color);
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    text-align: left;
}

.form-group label {
    color: var(--text-color);
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 1px solid rgba(145, 132, 171, 0.3);
    border-radius: 4px;
    background-color: rgba(145, 132, 171, 0.05);
    color: var(--text-color);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #9184ab;
    background-color: rgba(145, 132, 171, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    padding: 14px 32px;
    background-color: #613999;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    align-self: flex-start;
}

.submit-btn:hover {
    background-color: #7a4bb8;
    transform: translateY(-1px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Light mode form overrides */
body.light-mode .form-group input,
body.light-mode .form-group textarea {
    border-color: rgba(97, 57, 153, 0.3);
    background-color: rgba(97, 57, 153, 0.05);
}

body.light-mode .form-group input:focus,
body.light-mode .form-group textarea:focus {
    border-color: #613999;
    background-color: rgba(97, 57, 153, 0.1);
}

/* Light mode submit button override */
body.light-mode .submit-btn {
    background-color: #dccbf2;
    color: #000000;
}

body.light-mode .submit-btn:hover {
    background-color: #c9b3e8;
}

/* Checkbox Styles */
.checkbox-group {
    margin-bottom: 20px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    position: relative;
    padding-left: 30px;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: rgba(145, 132, 171, 0.1);
    border: 1px solid rgba(145, 132, 171, 0.3);
    border-radius: 4px;
    transition: all 0.3s ease;
}

.checkbox-container:hover input~.checkmark {
    background-color: rgba(145, 132, 171, 0.2);
}

.checkbox-container input:checked~.checkmark {
    background-color: #613999;
    border-color: #613999;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked~.checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.consent-text {
    font-size: 0.9rem;
    color: var(--text-color);
    line-height: 1.4;
}

/* Error State */
.checkbox-container.error .checkmark {
    border-color: #ff4444;
    background-color: rgba(255, 68, 68, 0.1);
    animation: shake 0.5s;
}

.checkbox-container.error .consent-text {
    color: #ff4444;
}

@keyframes shake {
    0% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-5px);
    }

    50% {
        transform: translateX(5px);
    }

    75% {
        transform: translateX(-5px);
    }

    100% {
        transform: translateX(0);
    }
}

/* Light Mode Checkbox Overrides */
body.light-mode .checkmark {
    background-color: rgba(97, 57, 153, 0.05);
    border-color: rgba(97, 57, 153, 0.3);
}

body.light-mode .checkbox-container input:checked~.checkmark {
    background-color: #dccbf2;
    border-color: #dccbf2;
}

body.light-mode .checkbox-container input:checked~.checkmark:after {
    border-color: #000000;
}

.logo-link {
    text-decoration: none;
    color: inherit;
}

@font-face {
    font-family: 'Select Mono';
    src: url('../fonts/SelectMonoItalic.woff') format('woff'),
        url('../fonts/SelectMonoItalic.otf') format('opentype');
    font-weight: normal;
    font-style: italic;
}

.logo {
    font-family: 'Select Mono', monospace;
    font-style: italic;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0;
}

#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}

#menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
}

/* Main Content */
main {
    padding: 20px;
    min-height: 80vh;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    font-size: 0.9rem;
    color: #888;
}

.footer-disclaimer {
    font-size: 0.7rem;
    color: #666;
    text-align: center;
    margin-top: 50px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.4;
    padding: 0 15px;
    opacity: 0.6;
}

body.light-mode .footer-disclaimer {
    color: #aaa;
}

/* Navigation Popup */
.nav-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    /* Pitch black */
    z-index: 100;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    /* Space for close button */
    transform: translateX(100%);
    transition: transform 0.3s ease-in-out;
    overflow-y: auto;
    /* Allow scrolling if menu is tall */
}

.nav-popup.active {
    transform: translateX(0);
}

#menu-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2rem;
    cursor: pointer;
}

.nav-links {
    list-style: none;
    padding: 0 20px;
    /* Add padding to container */
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Reduced gap (closer together) */
}

.nav-links li {
    margin-bottom: 0;
    /* Reset margin */
    border-bottom: none;
    /* Remove separator */
    padding: 0;
    width: 100%;
}



.nav-links a {
    color: var(--text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: block;
    padding: 15px 20px;
    /* Reduced padding (flatter) */
    border-radius: 12px;
    /* Reduced radius (less rounded) */
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    /* Glassmorphism Base */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Alternating Colors - Dark Mode (Default) */
.nav-links li:nth-child(odd) a {
    background: linear-gradient(135deg, rgba(145, 132, 171, 0.15), rgba(145, 132, 171, 0.05));
    border: 1px solid rgba(145, 132, 171, 0.2);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.nav-links li:nth-child(even) a {
    background: linear-gradient(135deg, rgba(50, 50, 50, 0.4), rgba(30, 30, 30, 0.4));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* Alternating Colors - Light Mode */
body.light-mode .nav-links li:nth-child(odd) a {
    background: linear-gradient(135deg, rgba(97, 57, 153, 0.1), rgba(97, 57, 153, 0.05));
    border: 1px solid rgba(97, 57, 153, 0.2);
    color: #333;
    box-shadow: 0 4px 15px rgba(97, 57, 153, 0.1);
}

body.light-mode .nav-links li:nth-child(even) a {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(240, 240, 240, 0.8));
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #333;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.nav-links a:hover {
    opacity: 1;
    /* Reset opacity hover */
    transform: scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

body.light-mode .nav-links a:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.nav-footer {
    margin-top: auto;
    /* Push to bottom */
    padding-bottom: 40px;
    padding-top: 20px;
    /* Ensure space from menu items */
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Mobile Menu Divider */
.mobile-divider {
    width: 90%;
    height: 1px;
    background-color: var(--text-color);
    margin: 20px auto;
    opacity: 0.5;
}

/* Instagram Link in Mobile Menu */
.ig-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: opacity 0.3s ease;
}

.ig-link:hover {
    opacity: 0.8;
}

.ig-link img {
    width: 110px;
    height: 110px;
}

.ig-link span {
    font-size: 1rem;
}





/* Desktop Styles (Class-based for Toggle) */
body.desktop-view header {
    padding: 20px 40px;
    display: flex;
    flex-wrap: nowrap;
    /* Header itself shouldn't wrap, nav inside will */
    align-items: center;
    gap: 20px;
}

body.desktop-view #theme-toggle-btn {
    display: flex;
    margin-left: auto;
    /* Push to right if nav wraps or is small */
}

body.desktop-view #menu-toggle {
    display: none;
}

body.desktop-view #nav-placeholder {
    position: static;
    /* Part of the flow */
    width: auto;
    height: auto;
    z-index: 1000;
    flex: 1 1 auto;
    /* Allow growing/shrinking */
    margin: 0 20px;
}

body.desktop-view .nav-popup {
    position: relative;
    transform: none;
    width: auto;
    height: auto;
    background-color: transparent;
    padding: 0;
    display: block;
    opacity: 1;
    visibility: visible;
    overflow: visible;
}

body.desktop-view #menu-close,
body.desktop-view .nav-footer {
    display: none;
}

body.desktop-view .nav-links {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    /* Allow links to wrap */
    gap: 10px 30px;
    /* Row gap 10px, Column gap 30px */
    padding: 0;
    margin: 0;
    justify-content: flex-end;
    /* Align to right */
}

body.desktop-view .nav-links li {
    margin: 0;
    border: none;
    /* Reset separator */
    padding: 0;
    /* Reset padding */
    width: auto;
    /* Reset width */
}

body.desktop-view .nav-links a {
    background: none !important;
    /* Reset background */
    border: none !important;
    /* Reset border */
    box-shadow: none !important;
    /* Reset shadow */
    padding: 0 !important;
    /* Reset padding */
    border-radius: 0 !important;
    /* Reset radius */
    font-size: 1rem;
    font-weight: 500;
    /* Slightly less bold */
    position: relative;
    /* For pseudo-element */
    z-index: 1;
    /* Ensure text is on top */
    text-shadow: none;
    color: #534465;
    /* Dark mode purple */
}

body.desktop-view .nav-links a:hover {
    transform: none !important;
    /* Reset hover transform */
    box-shadow: none !important;
    /* Reset hover shadow */
}

/* Grainy Gradient Background Animation */
body.desktop-view .nav-links a::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.5);
    /* Start small */
    width: 300%;
    /* Increased to spread to neighbors */
    height: 300%;
    background: radial-gradient(circle, rgba(83, 68, 101, 0.25) 0%, rgba(83, 68, 101, 0) 70%);
    /* #534465 */
    filter: blur(8px);
    /* Diffused look */
    z-index: -1;
    /* Behind text */
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    border-radius: 50%;
    pointer-events: none;
    /* Don't interfere with clicks */
}

body.desktop-view .nav-links a:hover::before {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
}

body.desktop-view .nav-links a:hover {
    color: #e8e8e8;
    /* Off-white for dark mode hover */
    text-shadow: 0 0 0.5px currentColor, 0 0 0.5px currentColor;
    /* Faux-bold effect */
}

/* Light Mode Underlight Override */
body.light-mode.desktop-view .nav-links a {
    color: #9184ab !important;
    /* User requested color */
}

body.light-mode.desktop-view .nav-links a:hover {
    color: #1a1a1a !important;
    /* Off-black for light mode hover */
}

body.light-mode.desktop-view .nav-links a::before {
    background: radial-gradient(circle, rgba(220, 203, 242, 0.85) 0%, rgba(220, 203, 242, 0) 70%);
    /* #dccbf2 */
}

body.desktop-view main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}



/* Homepage Specific Styles */
.homepage-content {
    max-width: 1000px;
    margin: 120px 0 60px 0;
    padding: 0 40px;
}

.homepage-content h1 {
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--text-color);
    position: relative;
    width: fit-content;
    /* Ensure h1 doesn't take full width if not needed, helps with line calc? Actually block is fine if we measure text. */
}

/* Dynamic Underline Styles */
:root {
    --h1-underline-color: #B6A361;
    /* Dark mode default */
}

body.light-mode {
    --h1-underline-color: #FFD700;
}

.underline-segment {
    position: absolute;
    height: 4px;
    background-color: var(--h1-underline-color);
    /* bottom: -5px; Removed to avoid conflict with JS top */
    transform-origin: left;
    transform: scaleX(0);
    animation: underlineSlide 1s ease-out forwards;
    z-index: 1;
}

@keyframes underlineSlide {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

.homepage-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 60px;
    margin-left: 20px;
    max-width: 750px;
    color: var(--text-color);
}

.homepage-content .topic-cards {
    margin-top: 100px;
}

/* Desktop Footer Styles */
.desktop-footer-content {
    display: none;
    /* Hidden by default (mobile) */
}

body.desktop-view .desktop-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

body.desktop-view .ig-link-desktop {
    display: block;
    width: 150px;
    /* Same size as nav */
    margin-bottom: 10px;
}

body.desktop-view .ig-link-desktop img {
    width: 100%;
    height: auto;
}

body.desktop-view .desktop-divider {
    width: 77.77%;
    /* 7/9 approx 77.77% */
    height: 1px;
    background-color: var(--text-color);
    /* Thin line */
    margin: 10px auto;
    /* Centered */
    opacity: 0.5;
    /* Slightly dim like the nav divider */
}

/* Topic Page (Pro Nemocné) Styles */
.topic-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.topic-page-container h1 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.intro-text {
    margin-bottom: 40px;
    color: var(--text-color);
    opacity: 0.9;
}

.topic-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.topic-card {
    background-color: #534465;
    /* Darker purple with stronger saturation for dark mode */
    padding: 30px;
    border-radius: 8px;
    text-decoration: none;
    color: #ffffff;
    transition: transform 0.2s ease, background-color 0.3s ease;
    display: block;
}

.topic-card:hover {
    transform: translateY(-3px);
    background-color: #635475;
}

.topic-card h2 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
}

.topic-card p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* Light mode topic card override */
body.light-mode .topic-card {
    background-color: #dccbf2;
    /* Light violet for light mode */
    color: #000000;
}

body.light-mode .topic-card:hover {
    background-color: #c9b3e8;
}

body.light-mode .topic-card h2 {
    color: #000000;
}

/* Sub-page container */
.sub-page-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.sub-page-container h1 {
    margin-bottom: 20px;
    color: var(--text-color);
}

.back-link {
    display: inline-block;
    margin-bottom: 20px;
    color: #9184ab;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #613999;
}

body.light-mode .back-link:hover {
    color: #7a4bb8;
}

/* Desktop responsive for topic cards */
@media (min-width: 768px) {
    .topic-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* General Content Container */
.content-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
}

.content-container h1 {
    margin-bottom: 30px;
    color: var(--text-color);
    font-size: 2rem;
    position: relative;
    width: fit-content;
}

.content-container p {
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 20px;
}

.content-container h2,
.sub-page-container h2 {
    color: var(--text-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.4rem;
    font-weight: 600;
}

.content-container h3,
.sub-page-container h3 {
    color: var(--text-color);
    margin-top: 25px;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 600;
}

.content-container h4,
.sub-page-container h4 {
    color: var(--text-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.content-container ul,
.sub-page-container ul {
    margin: 15px 0;
    padding-left: 30px;
    line-height: 1.6;
}

.content-container li,
.sub-page-container li {
    margin-bottom: 8px;
    color: var(--text-color);
}

.sub-page-container p {
    line-height: 1.6;
    color: var(--text-color);
    margin-bottom: 15px;
}

.sub-page-container a {
    color: #9184ab;
    text-decoration: none;
    transition: color 0.3s ease;
}

.sub-page-container a:hover {
    color: #613999;
    text-decoration: underline;
}

body.light-mode .sub-page-container a:hover {
    color: #7a4bb8;
}

/* Download Section Styles */
.download-section {
    margin-top: 30px;
}

.download-item {
    background-color: rgba(145, 132, 171, 0.1);
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.download-item h2 {
    color: var(--text-color);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.download-description {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 15px;
}

.external-link {
    color: #9184ab;
    text-decoration: none;
    transition: color 0.3s ease;
    word-break: break-all;
}

.external-link:hover {
    color: #613999;
    text-decoration: underline;
}

body.light-mode .external-link:hover {
    color: #7a4bb8;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    background-color: #534465;
    color: #ffffff !important;
    /* Force white text default (Dark Mode) */
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 10px;
}

/* Explicitly handle visited/active for default (Dark Mode) */
.download-btn:visited,
.download-btn:active {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Hover state for default (Dark Mode) */
.download-btn:hover {
    background-color: #dccbf2;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    transform: translateY(-1px);
}

.download-btn.disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
    opacity: 0.7;
    transform: none;
    pointer-events: none;
    color: #ffffff !important;
}

.download-btn.disabled:hover {
    background-color: #a0a0a0;
    box-shadow: none;
    color: #ffffff !important;
}

.download-icon {
    font-size: 1.2rem;
}

/* Light Mode Overrides */
body.light-mode .download-btn {
    background-color: #dccbf2;
    color: #000000 !important;
    /* Force black text in Light Mode */
}

body.light-mode .download-btn:visited,
body.light-mode .download-btn:active {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

body.light-mode .download-btn:hover {
    background-color: #613999;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

body.light-mode .download-item {
    background-color: rgba(220, 203, 242, 0.2);
}

.download-item.pending {
    background-color: rgba(0, 0, 0, 0.03);
    border: 1px dashed #ccc;
}

.download-item.pending h2,
.download-item.pending .download-description {
    color: #888;
}

/* Quiz Styles */
.quiz-wrapper {
    max-width: 600px;
    margin: 40px auto;
    min-height: 400px;
}

.quiz-card {
    background: rgba(20, 20, 20, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-out;
}

.quiz-header {
    margin-bottom: 30px;
}

.category-label {
    display: block;
    font-size: 0.9rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
    font-weight: 700;
}

.progress-bar-container {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-bar {
    height: 100%;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.question-text {
    font-size: 1.5rem;
    margin-bottom: 40px;
    line-height: 1.4;
    color: var(--text-primary);
}

.options-container {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 40px;
}

.option-btn {
    flex: 1;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(5px);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.option-btn:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.2);
}

.option-btn.selected {
    background: rgba(97, 57, 153, 0.2);
    border-color: transparent;
    /* Remove visible border */
    box-shadow: 0 0 15px rgba(97, 57, 153, 0.6);
    /* Enhanced glow/shadow instead of border */
    color: #fff;
}

/* Start and Restart Buttons */
/* Start Button (Primary) */
#start-quiz-btn {
    padding: 16px 40px;
    background-color: #613999;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(97, 57, 153, 0.4);
    margin-top: 20px;
}

#start-quiz-btn:hover {
    background-color: #7a4bb8;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(97, 57, 153, 0.6);
}

/* Restart Button (Secondary/Less Contrast) */
#restart-btn {
    padding: 12px 30px;
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid rgba(97, 57, 153, 0.5);
    border-radius: 8px;
    font-family: var(--font-main);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

#restart-btn:hover {
    background-color: rgba(97, 57, 153, 0.1);
    border-color: #613999;
    transform: translateY(-2px);
}

/* Navigation Styles */
.quiz-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-arrow-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: #534465;
    /* Dark Mode Static */
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 12px;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.nav-arrow-btn:hover {
    background-color: #534465;
    /* Dark Mode Hover Bg */
    color: #ffffff;
    /* Dark Mode Hover Text */
    box-shadow: 0 4px 15px rgba(83, 68, 101, 0.6);
    transform: scale(1.05);
}

.arrow-icon {
    font-size: 1.2rem;
}

/* Next Button - Inherits from nav-arrow-btn but ensures consistency */
.next-btn {
    font-weight: 600;
}

.next-btn:not(:disabled):hover {
    background-color: #534465 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(83, 68, 101, 0.6);
}

.next-btn:disabled {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.3);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Quiz Buttons - Light Mode Overrides */
body.light-mode .nav-arrow-btn {
    color: #dccbf2;
    /* Light Mode Static */
}

body.light-mode .nav-arrow-btn:hover {
    background-color: #dccbf2;
    /* Light Mode Hover Bg */
    color: #000000;
    /* Light Mode Hover Text */
    box-shadow: 0 4px 15px rgba(97, 57, 153, 0.3);
}

body.light-mode .next-btn:not(:disabled):hover {
    background-color: #dccbf2 !important;
    color: #000000 !important;
}

box-shadow: 0 4px 10px rgba(220, 203, 242, 0.3);
}

body.light-mode .next-btn:not(:disabled):hover {
    background-color: #613999 !important;
    /* Dark purple on hover */
    color: #ffffff !important;
    box-shadow: 0 6px 15px rgba(97, 57, 153, 0.5);
}

body.light-mode .next-btn:disabled {
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.3);
}

/* Result Screen */
.score-circle {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid var(--accent-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto 30px;
    background: rgba(255, 255, 255, 0.05);
}

.score-number {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
}

.score-total {
    font-size: 1rem;
    color: var(--text-secondary);
}

.result-title {
    font-size: 2rem;
    margin-bottom: 15px;
}

.result-description {
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.result-actions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: center;
}

.disclaimer-small {
    margin-top: 30px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    opacity: 0.7;
}

/* Risk Levels */
.low-risk .score-circle {
    border-color: #4caf50;
    color: #4caf50;
}

.low-risk .result-title {
    color: #4caf50;
}

.medium-risk .score-circle {
    border-color: #ff9800;
    color: #ff9800;
}

.medium-risk .result-title {
    color: #ff9800;
}

.high-risk .score-circle {
    border-color: #f44336;
    color: #f44336;
}

.high-risk .result-title {
    color: #f44336;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .quiz-wrapper {
        margin: 20px 0;
    }

    .quiz-card {
        padding: 25px;
    }

    .question-text {
        font-size: 1.2rem;
    }

    .options-container {
        flex-direction: row;
        /* Keep side-by-side on mobile for Yes/No */
        gap: 15px;
    }

    .option-btn {
        padding: 15px;
        font-size: 1rem;
    }
}

/* Light Mode Overrides */
body.light-mode .quiz-card {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body.light-mode .option-btn {
    background: rgba(255, 255, 255, 0.5);
    border-color: rgba(0, 0, 0, 0.1);
}

body.light-mode .option-btn:hover {
    background: rgba(255, 255, 255, 0.9);
    border-color: var(--accent-color);
}

body.light-mode .option-btn.selected {
    background: rgba(97, 57, 153, 0.1);
    border-color: var(--accent-color);
    color: #000;
}

body.light-mode .nav-arrow-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

body.light-mode .next-btn {
    background-color: #613999;
    color: #fff;
}

body.light-mode .next-btn:disabled {
    background-color: rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.3);
}

body.light-mode .download-item.pending {
    background-color: rgba(0, 0, 0, 0.02);
    border-color: #ddd;
}

.download-actions {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
}

.external-link-btn {
    color: #9184ab;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.external-link-btn:hover {
    color: #613999;
    text-decoration: underline;
}


body.light-mode .external-link-btn:hover {
    color: #7a4bb8;
}

/* Articles List Styles */
.articles-list {
    margin-top: 30px;
}

.article-preview {
    margin-bottom: 20px;
}

.article-link {
    display: block;
    padding: 25px;
    padding-bottom: 60px;
    /* Extra space for absolutely positioned tag */
    background-color: var(--card-background-color);
    border: 2px solid rgba(145, 132, 171, 0.3);
    border-radius: 8px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    /* For absolute positioning of child */
}

.article-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    border-color: #9184ab;
}

body.light-mode .article-link {
    border-color: rgba(97, 57, 153, 0.2);
}

body.light-mode .article-link:hover {
    border-color: #613999;
}

.article-category {
    display: inline-block;
    background-color: #534465;
    color: #ffffff;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Absolute positioning only for tags within article preview cards */
.article-link .article-category {
    position: absolute;
    bottom: 20px;
    left: 25px;
}

body.light-mode .article-category {
    background-color: #dccbf2;
    color: #000000;
}

.article-preview h2 {
    margin: 0;
    font-size: 1.5rem;
    line-height: 1.4;
    color: var(--text-color);
}

.article-link:hover h2 {
    color: #9184ab;
}

body.light-mode .article-link:hover h2 {
    color: #613999;
}

.article-preview p {
    margin-top: 10px;
    color: var(--text-color);
    opacity: 0.8;
    line-height: 1.6;
}

/* Topic Cards Styles (Pro Nemocné) */
.topic-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-top: 30px;
}

@media (min-width: 768px) {
    .topic-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

.card {
    display: block;
    background-color: #534465;
    color: #ffffff;
    padding: 30px;
    border-radius: 12px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
    background-color: #635475;
}

.card h3 {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
    color: #ffffff;
}

.card p {
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* Light Mode Card Styles */
body.light-mode .card {
    background-color: #dccbf2;
    color: #000000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.light-mode .card:hover {
    background-color: #c9b3e8;
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

body.light-mode .card h3 {
    color: #000000;
}

body.light-mode .card p {
    color: rgba(0, 0, 0, 0.8);
}

/* Custom Pill Theme Toggle */
.theme-toggle-pill {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 30px;
    border-radius: 15px;
    transition: background-color 0.3s ease;
    /* Default Dark Mode Style */
    background-color: #333;
    border: 1px solid #555;
    cursor: pointer;
    padding: 0;
}

#theme-toggle-btn {
    cursor: pointer;
    padding: 0;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    display: none;
    /* Hidden by default on mobile */
}

/* Desktop Theme Toggle Visibility and Style */
@media (min-width: 769px) {
    #theme-toggle-btn {
        display: block;
        /* Visible on desktop */
    }

    .theme-toggle-pill {
        width: 60px;
        height: 30px;
        border-radius: 15px;
        /* Match mobile style */
        border: 1px solid #555;
        background-color: #333;
    }

    body.light-mode .theme-toggle-pill {
        /* Match mobile style */
        border: 1px solid #ddd;
        background-color: #fff;
    }
}

/* Light Mode Style */
body.light-mode .theme-toggle-pill {
    background-color: #fff;
    border: 1px solid #ddd;
}

/* Toggle Thumb */
.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background-color: #fff;
    /* Dark mode thumb color */
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Light Mode Thumb Position & Color */
body.light-mode .toggle-thumb {
    transform: translateX(30px);
    background-color: #000;
    /* Light mode thumb color */
}

/* Icons */
.toggle-thumb .icon {
    width: 14px;
    height: 14px;
    position: absolute;
    transition: opacity 0.3s ease;
}

.toggle-thumb .icon.sun {
    opacity: 1;
    color: #333;
    /* Icon color inside white thumb */
}

.toggle-thumb .icon.moon {
    opacity: 0;
    color: #fff;
    /* Icon color inside black thumb */
}

/* Icon Visibility based on Mode */
body.light-mode .toggle-thumb .icon.sun {
    opacity: 0;
}

body.light-mode .toggle-thumb .icon.moon {
    opacity: 1;
}

/* Hover Effects */
.theme-toggle-pill:hover {
    transform: scale(1.05);
}

/* Hide header toggle on mobile */
#theme-toggle-btn {
    display: none;
}

/* Mobile Theme Toggle */
.mobile-toggle {
    margin-bottom: 10px;
    align-self: flex-end;
    /* Align to right */
    margin-right: 20px;
    /* Match padding */
}

/* Desktop Footer Styles */
.desktop-footer-content {
    display: none;
    /* Hidden by default (mobile) */
}

body.desktop-view .desktop-footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-bottom: 20px;
}

.desktop-divider {
    width: 90%;
    height: 1px;
    background-color: var(--text-color);
    opacity: 0.3;
    margin-top: 20px;
}

.ig-link-desktop {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 15px !important;
    text-decoration: none;
    color: var(--text-color);
    transition: opacity 0.3s ease;
    width: auto;
    /* Let it size to content */
    max-width: 100%;
}

.ig-link-desktop span {
    font-size: 0.8rem;
    /* Smaller text */
    font-weight: 500;
    text-align: left;
    /* Align text left relative to itself, next to logo */
    display: block;
    line-height: 1.1;
}

.ig-link-desktop:hover {
    opacity: 0.8;
}

.ig-link-desktop img {
    display: block !important;
    width: 32px !important;
    /* Slightly bigger */
    height: 32px !important;
    /* Slightly bigger */
    min-width: 32px !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: contain;
    filter: invert(1);
    border: none !important;
}

body.light-mode .ig-link-desktop img {
    filter: invert(0);
    /* Normal for light mode */
}

/* Mobile Menu Instagram Link */
.ig-link {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.ig-link img {
    width: 24px;
    height: 24px;
    filter: invert(1);
}

body.light-mode .ig-link img {
    filter: invert(0);
}

/* Desktop Adjustments - Keep it fixed bottom right for consistency */
/* Desktop Adjustments - Keep it fixed bottom right for consistency */
/* Desktop Adjustments - Keep it fixed bottom right for consistency */
/* body.desktop-view #theme-toggle-btn is now handled by media query above */

/* Homepage News Carousel */

/* Homepage News Carousel */
#news-carousel-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

#news-carousel-section h2 {
    margin-bottom: 30px;
    color: var(--text-color);
}

.carousel-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    /* Gap only on desktop */
}

@media (min-width: 769px) {
    .carousel-container {
        gap: 20px;
    }
}

.carousel-track-container {
    overflow: hidden;
    width: 100%;
    max-width: 800px;
    /* Adjust based on card width */
}

.carousel-track {
    display: flex;
    padding: 0;
    margin: 0;
    list-style: none;
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    min-width: 100%;
    /* Show one card at a time on mobile, adjust for desktop if needed */
    box-sizing: border-box;
    padding: 0 10px;
    display: flex;
    justify-content: center;
}

/* Carousel Card Styling */
.carousel-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 25px;
    text-align: left;
    text-decoration: none;
    color: var(--text-color);
    display: block;
    width: 100%;
    max-width: 600px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.carousel-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.carousel-card .article-category {
    display: inline-block;
    background: rgba(97, 57, 153, 0.1);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 600;
    margin-bottom: 15px;
}

.carousel-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: var(--text-color);
}

.carousel-card p {
    margin: 0;
    font-size: 0.95em;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Carousel Buttons */
.carousel-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #534465;
    /* Dark Mode Static */
    cursor: pointer;
    z-index: 10;
    opacity: 0.7;
    transition: opacity 0.3s ease, transform 0.2s, background-color 0.3s, box-shadow 0.3s;
    backdrop-filter: blur(5px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    /* Prevent squashing on mobile */
}

.mirror-icon {
    transform: scaleX(-1);
}

.carousel-btn:hover {
    opacity: 0.9;
    transform: scale(1.05);
    background-color: #534465;
    /* Dark Mode Hover Bg */
    color: #ffffff;
    /* Dark Mode Hover Text */
    box-shadow: 0 4px 15px rgba(83, 68, 101, 0.6);
}

/* Carousel Buttons - Light Mode Overrides */
body.light-mode .carousel-btn {
    color: #dccbf2;
    /* Light Mode Static */
}

body.light-mode .carousel-btn:hover {
    background-color: #dccbf2;
    /* Light Mode Hover Bg */
    color: #000000;
    /* Light Mode Hover Text */
    box-shadow: 0 4px 15px rgba(97, 57, 153, 0.3);
}

.carousel-btn:focus {
    outline: none;
}

/* Carousel Dots Navigation */
.carousel-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
    align-items: flex-end;
    /* Align to bottom to handle size difference */
    height: 20px;
    /* Fixed height container */
}

.carousel-indicator {
    border: none;
    border-radius: 50%;
    background: var(--text-muted);
    /* Desaturated */
    opacity: 0.3;
    width: 10px;
    height: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.current-slide {
    background: var(--primary-color);
    /* Purple */
    opacity: 1;
    width: 14px;
    height: 14px;
    transform: translateY(-2px);
    /* Slightly higher */
}

/* Responsive adjustments */
@media (min-width: 768px) {
    .carousel-slide {
        min-width: 50%;
        /* Show 2 cards on tablet */
    }
}

@media (min-width: 1024px) {
    .carousel-slide {
        min-width: 33.333%;
        /* Show 3 cards on desktop */
    }
}

/* Lightbox Styles */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    animation: fadeIn 0.3s forwards;
}

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

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    transition: transform 0.1s ease-out;
    user-select: none;
}

.lightbox-controls {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10001;
}

.lightbox-controls button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.2s;
}

.lightbox-controls button:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 3rem;
    cursor: pointer;
    padding: 20px;
    z-index: 10001;
    transition: color 0.2s;
}

.lightbox-nav:hover {
    color: white;
}

#lightbox-prev {
    left: 20px;
}

#lightbox-next {
    right: 20px;
}

/* Hide nav buttons on mobile if needed, or make them smaller */
@media (max-width: 768px) {
    .lightbox-nav {
        font-size: 2rem;
        padding: 10px;
    }

    #lightbox-prev {
        left: 5px;
    }

    #lightbox-next {
        right: 5px;
    }
}

/* Profile Section (O nás) */
.profile-section {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 40px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.profile-section:nth-child(even) {
    flex-direction: row-reverse;
}

.profile-image-container {
    flex-shrink: 0;
}

.profile-placeholder-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.05);
    border: 3px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Light mode adjustment for placeholder */
body.light-mode .profile-placeholder-circle {
    background-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.profile-img,
.profile-image-container img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--accent-color);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.05);
}

.profile-content {
    flex-grow: 1;
}

.profile-accordion {
    width: 100%;
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 100px;
    border: 1px solid var(--border-color);
    box-shadow: 0 5px 20px rgba(97, 57, 153, 0.2);
    overflow: hidden;
    transition: all 0.3s ease;
}

.profile-accordion[open] {
    background: rgba(255, 255, 255, 0.02);
}

.profile-accordion summary {
    padding: 10px 60px 10px 35px;
    cursor: pointer;
    list-style: none;
    /* Hide default marker */
    position: relative;
    transition: background-color 0.2s ease;
}

.profile-accordion summary::-webkit-details-marker {
    display: none;
}

.profile-accordion summary:hover {
    /* background-color: rgba(255, 255, 255, 0.05); Removed to avoid rectangle */
}

/* Custom indicator */
.profile-accordion summary::after {
    content: '+';
    position: absolute;
    right: 30px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    transition: transform 0.3s ease;
}

.profile-accordion[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.summary-content {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 15px;
}

.profile-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-color);
}

.profile-role {
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.profile-bio {
    padding: 0 20px 20px 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    animation: fadeIn 0.5s ease;
}

.profile-bio p {
    margin-bottom: 15px;
}

.profile-bio p:last-child {
    margin-bottom: 0;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {

    .profile-section,
    .profile-section.reverse {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 20px 0;
    }

    .profile-accordion {
        margin-top: 20px;
    }

    .profile-accordion summary {
        text-align: left;
        /* Keep accordion header left-aligned or center? Left is usually better for reading */
    }

    .summary-content {
        flex-direction: column;
        align-items: center;
        gap: 5px;
        /* Center text on mobile */
    }
}

/* Light Mode Adjustments */
body.light-mode .profile-section {
    background: transparent;
    border-color: transparent;
}

body.light-mode .profile-accordion {
    background: #fff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 5px 20px rgba(97, 57, 153, 0.3);
}

body.light-mode .profile-accordion[open] {
    background: #fff;
}

body.light-mode .profile-img {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

body.light-mode .profile-accordion summary:hover {
    background-color: transparent;
}

/* Patient Stories Section */
/* Patient Stories Section */
#patient-stories {
    background-color: #0a0a0a;
    /* Dark background by default (Dark Mode) */
    padding: 80px 20px;
    margin-top: 60px;
}

body.light-mode #patient-stories {
    background-color: #f8f9fa;
    /* Light gray for Light Mode */
}

.patient-stories-header {
    text-align: center;
    margin-bottom: 50px;
}

.patient-stories-header h2 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.patient-stories-header .subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    color: var(--text-muted);
}

.patient-stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.patient-card {
    background: var(--card-bg);
    padding: 40px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid transparent;
}

body.dark-mode .patient-card {
    background: #1a1a1a;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1px solid #333;
}

.patient-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.patient-avatar-container {
    position: relative;
    margin-bottom: 20px;
    width: 100px;
    height: 100px;
}

.patient-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    filter: grayscale(100%);
    box-shadow: 0 10px 20px rgba(97, 57, 153, 0.4);
    /* Purple shadow */
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /* Bouncy transition */
    position: relative;
    z-index: 1;
}

.patient-card:hover .patient-avatar {
    transform: scale(1.2);
    filter: grayscale(0%);
    box-shadow: none;
    /* Remove shadow on hover as requested */
}

.patient-info h3 {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: var(--text-color);
}

.patient-quote {
    font-weight: 700;
    /* Bold as requested */
    font-style: italic;
    margin-bottom: 25px;
    color: var(--text-color);
    line-height: 1.5;
    flex-grow: 1;
    /* Push button to bottom if quotes vary in length */
}

.patient-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
}

.patient-link:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Mobile Responsiveness for Patient Stories */
@media (max-width: 768px) {
    .patient-stories-grid {
        grid-template-columns: 1fr;
        padding: 0 20px;
    }

    .patient-stories-header h2 {
        font-size: 2rem;
    }
}

/* FAQ Accordion Styles */
.faq-section-accordion {
    margin-bottom: 40px;
}

.faq-section-summary {
    list-style: none;
    cursor: pointer;
    margin-bottom: 20px;
    position: relative;
    padding-right: 30px;
    /* Space for indicator */
}

.faq-section-summary::-webkit-details-marker {
    display: none;
}

.faq-section-summary::after {
    content: '+';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.faq-section-accordion[open] .faq-section-summary::after {
    content: '\2212';
    /* Minus sign */
    transform: translateY(-50%);
}

.faq-list {
    animation: fadeIn 0.5s ease;
}

.faq-item-accordion {
    background-color: var(--card-background-color);
    border-radius: 12px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item-accordion summary {
    padding: 20px 60px 20px 25px;
    /* Right padding for indicator */
    cursor: pointer;
    list-style: none;
    position: relative;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    transition: background-color 0.2s ease;
}

.faq-item-accordion summary::-webkit-details-marker {
    display: none;
}

.faq-item-accordion summary::after {
    content: '+';
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--primary-color);
    transition: transform 0.3s ease;
}

.faq-item-accordion[open] summary::after {
    content: '\2212';
    /* Minus sign */
    transform: translateY(-50%);
}

.faq-item-accordion[open] {
    background-color: rgba(255, 255, 255, 0.03);
    /* Subtle highlight when open */
}

body.light-mode .faq-item-accordion[open] {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.faq-content {
    padding: 0 25px 25px 25px;
    color: var(--text-color);
    line-height: 1.6;
    animation: fadeIn 0.3s ease;
}

.faq-content p {
    margin: 0;
}

/* Email Banner for Pro Lékaře */
.email-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--card-background-color);
    border: 1px solid var(--border-color);
    border-radius: 50px;
    padding: 15px 15px 15px 30px;
    margin: 20px auto 30px;
    max-width: 900px;
    gap: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

body.light-mode .email-banner {
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.email-banner-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
}

.email-banner-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.email-banner-input {
    flex: 1;
    padding: 10px 20px;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease;
}

body.light-mode .email-banner-input {
    background-color: #f5f5f5;
}

.email-banner-input:focus {
    border-color: var(--primary-color);
}

.email-banner-input::placeholder {
    color: var(--text-muted);
}

.email-banner-button {
    background-color: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    font-size: 1.2rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.email-banner-button:hover {
    background-color: var(--primary-color);
    filter: brightness(1.2);
    transform: scale(1.05);
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

.shake-animation {
    animation: shake 0.8s cubic-bezier(.36, .07, .19, .97) both;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .email-banner {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
        gap: 15px;
    }

    .email-banner-text {
        text-align: center;
        white-space: normal;
    }

    .email-banner-button {
        align-self: flex-end;
    }
}

/* Pro Lékaře Page Specific Styles */
body.pro-lekare-page {
    --h1-underline-color: #e03e68;
    /* Less saturated red */
}

/* Dark Mode (Default) */
body.pro-lekare-page .card {
    background-color: #1a3b34;
    /* Deep Teal (Low brightness, rich color) */
    border-color: #1a3b34;
    color: #fff;
}

body.pro-lekare-page .card:hover {
    background-color: #234f46;
    /* Slightly lighter Deep Teal */
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.3);
}

body.pro-lekare-page .card h3 {
    color: #fff;
}

body.pro-lekare-page .card p {
    color: rgba(255, 255, 255, 0.9);
}

/* Light Mode */
body.light-mode.pro-lekare-page .card {
    background-color: #d0fcf4;
    /* Saturated Icy Mint (Less light, more color) */
    border-color: #d0fcf4;
    color: #000;
}

body.light-mode.pro-lekare-page .card:hover {
    background-color: #ccf2e5;
    /* Subtle shift */
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

body.light-mode.pro-lekare-page .card h3 {
    color: #000;
}

body.light-mode.pro-lekare-page .card p {
    color: rgba(0, 0, 0, 0.8);
}

/* Button Styles - Dark Mode (Default) */
body.pro-lekare-page .email-banner-button {
    background-color: #358575;
    /* Darker Teal for Dark Mode */
    color: #fff;
    border: 1px solid #358575;
}

body.pro-lekare-page .email-banner-button:hover {
    background-color: #1a3b34;
    /* Inverts to Dark Card Static */
    color: #fff;
    /* Keep text white on dark background */
    filter: none;
    transform: scale(1.05);
    border-color: #358575;
}

/* Button Styles - Light Mode */
body.light-mode.pro-lekare-page .email-banner-button {
    background-color: #5cd1ba;
    /* Brighter Teal for Light Mode */
    color: #fff;
    border: 1px solid #5cd1ba;
}

body.light-mode.pro-lekare-page .email-banner-button:hover {
    background-color: #d0fcf4;
    /* Inverts to Light Card Static */
    color: #000;
    /* Text turns black */
    border-color: #5cd1ba;
}