/* Hide redundant reCAPTCHA badge (checkbox widget is used instead) */
.grecaptcha-badge { visibility: hidden !important; display: none !important; }

/* Paper texture background */
.bg-paper {
    background-color: #fdfbf7;
    background-image: radial-gradient(#e3e3e3 1px, transparent 1px);
    background-size: 20px 20px;
}

/* Sketchy borders for cards */
.guide-card, .comic-item, .gallery-item {
    border: 2px solid #333;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}

.guide-card:hover, .comic-item:hover, .gallery-item:hover {
    transform: translateY(-5px) rotate(-1deg);
    box-shadow: 8px 8px 0px rgba(0,0,0,0.15);
}

/* Buttons: playful "sticker" look with a tactile press interaction. */
.btn {
    border: 2px solid #333;
    box-shadow: 3px 3px 0 rgba(0,0,0,0.18);
    transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
    /* Uniform button width across the site (nav "Objednat" opts out via inline min-width:auto). */
    min-width: 220px;
    text-align: center;
}

/* Hover: subtle lift away from the shadow + slight brighten. */
.btn:hover {
    transform: translate(-1px, -1px);
    box-shadow: 4px 4px 0 rgba(0,0,0,0.2);
    filter: brightness(1.05);
}

/* Active: press the button down into its shadow (physical click feel). */
.btn:active {
    transform: translate(3px, 3px);
    box-shadow: 0 0 0 rgba(0,0,0,0.2);
    filter: brightness(0.97);
}

/* Keyboard accessibility: clear focus ring. */
.btn:focus-visible {
    outline: 3px solid var(--brand-gold);
    outline-offset: 3px;
}

/* Images in cards */
.guide-thumb-img, .comic-thumb-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 255px 15px 225px 15px / 15px 225px 15px 255px;
    margin-bottom: 1rem;
    border: 2px solid #333;
}

.comic-thumb-img {
    height: auto; /* Let comics be full height/aspect ratio */
    aspect-ratio: 1/1;
}

/* Guide Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    align-items: center;
    justify-content: center;
    overflow-y: hidden; /* Changed from auto to hidden to prevent background scroll interference */
    padding: 20px;
    overscroll-behavior: contain; /* Prevents scroll chaining to body */
}

.modal-content {
    background-color: #fff;
    background-image: radial-gradient(#e3e3e3 1px, transparent 1px);
    background-size: 20px 20px;
    margin: auto;
    padding: 0;
    border-radius: 20px;
    width: 100%;
    max-width: 800px;
    position: relative;
    animation: slideUp 0.3s ease;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    border: 4px solid #333;
    box-shadow: 10px 10px 0px rgba(0,0,0,0.2);
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    padding: 20px;
    border-bottom: 2px dashed #ccc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-radius: 16px 16px 0 0;
}

.modal-header h2 {
    margin: 0;
    color: var(--primary-color);
    font-family: 'Mali', cursive;
}

.close-modal {
    font-size: 32px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    line-height: 1;
}

.close-modal:hover {
    color: #e74c3c;
}

.guide-steps-container {
    padding: 30px;
    overflow-y: auto;
    flex: 1; /* Ensures it fills available space for scrolling */
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.guide-step {
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
    align-items: flex-start;
    position: relative;
    background: white;
    padding: 20px;
    border-radius: 15px;
    border: 2px solid #eee;
    box-shadow: 5px 5px 0px rgba(0,0,0,0.05);
}

.guide-step:last-child {
    margin-bottom: 0;
}

.step-number {
    background-color: var(--primary-color); /* Updated from broken --brand-teal */
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.5rem;
    flex-shrink: 0;
    border: 2px solid #333;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.2);
}

.step-image-container {
    flex: 1;
    max-width: 350px;
}

.step-image-container img {
    width: 100%;
    border-radius: 10px;
    border: 2px solid #333;
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
}

.step-content {
    flex: 1;
    padding-top: 5px;
}

.step-content h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    font-size: 1.4rem;
}

.step-content p {
    font-size: 1.1rem;
}

@media (max-width: 600px) {
    .guide-steps-container {
        padding: 15px; /* More screen space */
    }

    .guide-step {
        flex-direction: column;
        gap: 15px;
        margin-bottom: 30px;
        padding: 10px; /* Reduced padding on mobile */
        position: relative;
    }
    
    .step-number {
        display: none !important; /* Hide step numbers on mobile as requested - FORCE HIDE */
    }

    .step-image-container {
        max-width: 100%;
        width: 100%;
    }
    
    .step-content {
        width: 100%;
        padding-top: 0;
        text-align: center; /* Center text on mobile */
    }
}

/* Blog article body: restore flowing-text typography. The global reset
   (* { margin:0 }, ul { list-style:none }, a { color:inherit; text-decoration:none })
   is tuned for landing-page components and collapses Markdown prose into an
   unspaced wall of text with no bullets and invisible links. Scope these rules
   to .blog-body so nav/footer/buttons stay untouched. */
.blog-body {
    line-height: 1.75;
}

.blog-body p {
    margin-bottom: 1.1rem;
}

.blog-body h2 {
    margin: 2.2rem 0 0.8rem;
}

.blog-body h3 {
    margin: 1.8rem 0 0.6rem;
}

.blog-body h4 {
    margin: 1.4rem 0 0.5rem;
}

.blog-body ul,
.blog-body ol {
    margin: 0 0 1.1rem 1.5rem;
}

.blog-body ul {
    list-style: disc;
}

.blog-body ol {
    list-style: decimal;
}

.blog-body li {
    margin-bottom: 0.4rem;
}

.blog-body a {
    color: var(--brand-purple);
    text-decoration: underline;
}

.blog-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 1rem 0;
}

/* Character portraits float beside their description; each heading clears the previous float. */
.blog-body img[src*="/blog/characters/"] {
    float: left;
    width: 150px;
    height: auto;
    margin: 0.25rem 1.25rem 0.75rem 0;
}

.blog-body h2 {
    clear: both;
}

@media (max-width: 480px) {
    .blog-body img[src*="/blog/characters/"] {
        float: none;
        display: block;
        width: 60%;
        margin: 1rem auto;
    }
}

.blog-body blockquote {
    margin: 0 0 1.1rem;
    padding: 0.5rem 0 0.5rem 1rem;
    border-left: 4px solid var(--brand-beige);
    color: #555;
    font-style: italic;
}

/* Legal / info document pages: readable spacing (the global `* { margin: 0 }` reset otherwise
   crams headings and paragraphs together). */
.doc-page {
    line-height: 1.7;
}

.doc-page h1 {
    margin-bottom: 1.5rem;
}

.doc-page h2 {
    font-size: 1.4rem;
    margin: 2.25rem 0 0.6rem;
}

.doc-page h2:first-of-type {
    margin-top: 1rem;
}

.doc-page h3 {
    font-size: 1.15rem;
    margin: 1.6rem 0 0.5rem;
}

.doc-page p {
    margin: 0 0 1.15rem;
    line-height: 1.7;
}

.doc-page ul,
.doc-page ol {
    margin: 0 0 1.15rem;
    padding-left: 1.4rem;
    line-height: 1.7;
}

.doc-page li {
    margin-bottom: 0.4rem;
}

.doc-page a {
    color: var(--brand-purple);
}

/* Inline button spinner for async submit states (order, withdrawal). */
.btn-spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    margin-right: 0.5em;
    border: 2px solid rgba(255, 255, 255, 0.45);
    border-top-color: #fff;
    border-radius: 50%;
    vertical-align: -0.15em;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Google reCAPTCHA ToS disclosure near protected forms (required because the badge is hidden). */
.recaptcha-disclosure {
    font-size: 0.78rem;
    line-height: 1.5;
    color: #888;
    margin: 0.75rem 0 0;
}

.recaptcha-disclosure a {
    color: inherit;
    text-decoration: underline;
}
