/* ============================================================
   Tailândia 2026 — Custom Theme CSS
   Fase 1: Tema Escuro + Carrossel + Cover Page
   ============================================================ */

/* ===== CSS Variables — Light Theme (Default) ===== */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f6f6f6;
    --bg-tertiary: #fafafa;
    --text-primary: #2c3e50;
    --text-secondary: #6a737d;
    --text-muted: #999;
    --accent: #FF5722;
    --accent-light: #FF8A65;
    --accent-dark: #E64A19;
    --accent-bg: rgba(255, 87, 34, 0.08);
    --link-color: #FF5722;
    --link-hover: #E64A19;
    --sidebar-bg: #fff;
    --sidebar-text: #505d6b;
    --sidebar-active: #FF5722;
    --sidebar-border: #e8e8e8;
    --border-color: #eaecef;
    --code-bg: #f5f5f5;
    --code-text: #e83e8c;
    --blockquote-border: #FF5722;
    --blockquote-bg: #fff8f5;
    --blockquote-text: #666;
    --table-head-bg: #f8f8f8;
    --table-stripe: #fafafa;
    --table-border: #e8e8e8;
    --card-bg: #ffffff;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --card-hover-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    --scrollbar-track: #f1f1f1;
    --scrollbar-thumb: #c1c1c1;
    --img-brightness: 1;
    --cover-overlay: rgba(0, 0, 0, 0.45);
}

/* ===== CSS Variables — Dark Theme ===== */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #1e1e3a;
    --text-primary: #e0e0e0;
    --text-secondary: #a8a8b3;
    --text-muted: #6c6c80;
    --accent: #FFB74D;
    --accent-light: #FFCC80;
    --accent-dark: #FFA726;
    --accent-bg: rgba(255, 183, 77, 0.1);
    --link-color: #FFB74D;
    --link-hover: #FFCC80;
    --sidebar-bg: #16213e;
    --sidebar-text: #a8a8b3;
    --sidebar-active: #FFB74D;
    --sidebar-border: #2a2a4a;
    --border-color: #2a2a4a;
    --code-bg: #0f3460;
    --code-text: #FFB74D;
    --blockquote-border: #FFB74D;
    --blockquote-bg: rgba(255, 183, 77, 0.05);
    --blockquote-text: #a8a8b3;
    --table-head-bg: #16213e;
    --table-stripe: #1a1a3e;
    --table-border: #2a2a4a;
    --card-bg: #16213e;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    --card-hover-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    --scrollbar-track: #1a1a2e;
    --scrollbar-thumb: #2a2a4a;
    --img-brightness: 0.85;
    --cover-overlay: rgba(0, 0, 0, 0.6);
}

/* ===== Animated Loading Screen ===== */
.loading-screen {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: 16px;
}

.loading-plane {
    font-size: 3em;
    animation: loadingFly 2s ease-in-out infinite;
}

@keyframes loadingFly {

    0%,
    100% {
        transform: translateX(-30px) translateY(0) rotate(-5deg);
    }

    50% {
        transform: translateX(30px) translateY(-12px) rotate(5deg);
    }
}

.loading-text {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent, #FF5722);
}

.loading-bar {
    width: 200px;
    height: 4px;
    background: var(--bg-secondary, #f6f6f6);
    border-radius: 4px;
    overflow: hidden;
}

.loading-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--accent, #FF5722), var(--accent-light, #FF8A65));
    border-radius: 4px;
    animation: loadingProgress 1.5s ease-in-out infinite;
}

@keyframes loadingProgress {
    0% {
        width: 0%;
        margin-left: 0;
    }

    50% {
        width: 60%;
        margin-left: 20%;
    }

    100% {
        width: 0%;
        margin-left: 100%;
    }
}

/* ===== Back to Top Button ===== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    /* Fica logo após o sidebar (300px) na borda da área de conteúdo */
    left: calc(300px + 16px);
    right: auto;
    z-index: 9998;
    width: 44px;
    height: 44px;
    background: var(--accent);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.back-to-top:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

/* ===== Smooth Scroll Behavior ===== */
html {
    scroll-behavior: smooth;
}

/* ===== Smooth Transitions for Theme Switch ===== */
body,
.sidebar,
.content,
.markdown-section,
.app-nav,
.search,
.sidebar-nav,
.sidebar-toggle {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* ===== Base Styles ===== */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== Typography ===== */
.markdown-section h1,
.markdown-section h2,
.markdown-section h3,
.markdown-section h4,
.markdown-section h5,
.markdown-section h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    color: var(--text-primary);
    font-weight: 600;
}

.markdown-section h1 {
    font-size: 2em;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 0.3em;
}

.markdown-section h2 {
    font-size: 1.5em;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.3em;
}

.markdown-section p,
.markdown-section li {
    color: var(--text-primary);
    line-height: 1.75;
}

.markdown-section strong {
    color: var(--text-primary);
}

.markdown-section em {
    color: var(--text-secondary);
}

/* ===== Links ===== */
.markdown-section a {
    color: var(--link-color);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.markdown-section a:hover {
    color: var(--link-hover);
    border-bottom-color: var(--link-hover);
}

/* ===== Sidebar ===== */
.sidebar {
    background-color: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border);
    color: var(--sidebar-text);
}

.sidebar-nav a {
    color: var(--sidebar-text) !important;
    transition: color 0.2s;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--sidebar-active) !important;
}

.sidebar-nav li.active>a {
    color: var(--sidebar-active) !important;
    font-weight: 600;
    border-right: 3px solid var(--sidebar-active);
}

.sidebar-toggle {
    background-color: var(--sidebar-bg) !important;
}

.sidebar-toggle span {
    background-color: var(--sidebar-active) !important;
}

.app-name-link {
    color: var(--text-primary) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
}

/* ===== Content Area ===== */
.content {
    background-color: var(--bg-primary) !important;
}

.markdown-section {
    color: var(--text-primary);
}

/* ===== Blockquotes ===== */
.markdown-section blockquote {
    border-left: 4px solid var(--blockquote-border);
    background-color: var(--blockquote-bg);
    color: var(--blockquote-text);
    padding: 1em 1.5em;
    margin: 1.5em 0;
    border-radius: 0 8px 8px 0;
}

.markdown-section blockquote p {
    color: var(--blockquote-text) !important;
}

/* ===== Code Blocks ===== */
.markdown-section code {
    background-color: var(--code-bg);
    color: var(--code-text);
    border-radius: 4px;
    padding: 2px 6px;
}

.markdown-section pre {
    background-color: var(--code-bg) !important;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.markdown-section pre code {
    color: var(--text-primary);
}

/* ===== Tables ===== */
.markdown-section table {
    border-collapse: collapse;
    width: 100%;
    margin: 1em 0;
    border-radius: 8px;
    overflow: hidden;
}

.markdown-section table th {
    background-color: var(--table-head-bg);
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    border: 1px solid var(--table-border);
    padding: 10px 14px;
}

.markdown-section table td {
    border: 1px solid var(--table-border);
    padding: 8px 14px;
    color: var(--text-primary);
}

.markdown-section table tr:nth-child(even) {
    background-color: var(--table-stripe);
}

.markdown-section table tr:hover {
    background-color: var(--accent-bg);
}

/* ===== Search ===== */
.search {
    background-color: var(--sidebar-bg) !important;
    border-bottom: 1px solid var(--sidebar-border) !important;
}

.search input {
    background-color: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 8px;
    padding: 8px 12px;
}

.search input::placeholder {
    color: var(--text-muted) !important;
}

.search .results-panel {
    background-color: var(--sidebar-bg) !important;
}

.search .matching-post {
    border-bottom: 1px solid var(--border-color) !important;
}

.search .matching-post .search-keyword {
    color: var(--accent) !important;
}

.search a {
    color: var(--link-color) !important;
}

/* ===== HR ===== */
.markdown-section hr {
    border: none;
    border-top: 2px solid var(--border-color);
    margin: 2em 0;
}

/* ===== Theme Toggle Button ===== */
.theme-toggle {
    position: fixed;
    top: 16px;
    right: 20px;
    z-index: 9999;
    background: var(--card-bg);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    padding: 0;
    line-height: 1;
    overflow: hidden;
}

.theme-toggle:hover {
    box-shadow: var(--card-hover-shadow);
    transform: scale(1.1);
    border-color: var(--accent);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon {
    transition: opacity 0.3s ease, transform 0.3s ease;
    position: absolute;
}

/* Light mode: show moon (to switch to dark) */
.theme-toggle .icon-sun {
    opacity: 0;
    transform: rotate(90deg) scale(0.5);
}

.theme-toggle .icon-moon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Dark mode: show sun (to switch to light) */
[data-theme="dark"] .theme-toggle .icon-sun {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

[data-theme="dark"] .theme-toggle .icon-moon {
    opacity: 0;
    transform: rotate(-90deg) scale(0.5);
}

/* ===== Image Gallery / Swiper Carousel ===== */
.gallery {
    margin: 1.5em 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: box-shadow 0.3s ease;
}

.gallery:hover {
    box-shadow: var(--card-hover-shadow);
}

.gallery-swiper {
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-secondary);
}

.gallery-swiper .swiper-slide {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.gallery-swiper .swiper-slide .slide-img-wrapper {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 70vh;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
}

.gallery-swiper .swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    cursor: zoom-in;
    filter: brightness(var(--img-brightness));
    transition: filter 0.3s ease, transform 0.4s ease;
    display: block;
}

.gallery-swiper .swiper-slide img:hover {
    transform: scale(1.03);
}

.gallery-swiper .slide-caption {
    padding: 10px 16px;
    text-align: center;
    font-size: 0.9em;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    background: var(--bg-secondary);
    width: 100%;
    box-sizing: border-box;
}

/* Carousel Navigation Arrows */
.gallery-swiper .swiper-button-prev,
.gallery-swiper .swiper-button-next {
    color: #fff !important;
    background: rgba(0, 0, 0, 0.35);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: background 0.3s;
}

.gallery-swiper .swiper-button-prev:hover,
.gallery-swiper .swiper-button-next:hover {
    background: rgba(0, 0, 0, 0.6);
}

.gallery-swiper .swiper-button-prev::after,
.gallery-swiper .swiper-button-next::after {
    font-size: 18px;
}

/* Carousel Pagination Dots */
.gallery-swiper .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.gallery-swiper .swiper-pagination-bullet-active {
    background: var(--accent);
    opacity: 1;
}

/* Single image gallery (no carousel controls) */
.gallery-single .swiper-slide img {
    border-radius: 0;
}

/* Fallback: images inside .gallery before JS processes them */
.gallery>p {
    margin: 0;
    line-height: 0;
}

.gallery>p>img {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 70vh;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* ===== Lightbox ===== */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    cursor: zoom-out;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.lightbox-overlay img {
    max-width: 92%;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    transition: transform 0.3s ease;
}

.lightbox-overlay.active img {
    transform: scale(1);
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 44px;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
    font-family: sans-serif;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

/* ===== Cover Page ===== */
section.cover {
    background-color: var(--bg-primary) !important;
    background-attachment: fixed !important;
    background-size: cover !important;
    background-position: center center !important;
    will-change: background-position;
}

section.cover .cover-main {
    text-align: center;
    transition: opacity 0.1s ease, transform 0.1s ease;
    will-change: opacity, transform;
}

section.cover h1 {
    font-family: 'Poppins', sans-serif !important;
    font-size: 3.2em;
    font-weight: 700;
    color: #fff !important;
    text-shadow: 2px 4px 16px rgba(0, 0, 0, 0.6);
    margin-bottom: 0.1em;
    border-bottom: none !important;
}

section.cover h2 {
    font-family: 'Poppins', sans-serif !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 400;
    font-size: 1.3em;
    text-shadow: 1px 2px 8px rgba(0, 0, 0, 0.5);
    border-bottom: none !important;
}

section.cover p {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 1.1em;
    text-shadow: 1px 2px 6px rgba(0, 0, 0, 0.4);
}

section.cover blockquote {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    margin: 0.5em 0 !important;
}

section.cover blockquote p {
    color: rgba(255, 255, 255, 0.92) !important;
    font-size: 1.5em !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    text-shadow: 1px 3px 10px rgba(0, 0, 0, 0.5);
}

/* CTA Buttons */
section.cover .cover-main>p:last-child a {
    display: inline-block;
    padding: 14px 44px;
    background: linear-gradient(135deg, #FF5722, #FF9800);
    color: #fff !important;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.15em;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 4px 24px rgba(255, 87, 34, 0.45);
    transition: all 0.3s ease;
    text-shadow: none;
}

section.cover .cover-main>p:last-child a:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 32px rgba(255, 87, 34, 0.55);
    background: linear-gradient(135deg, #FF6B3A, #FFA726);
}

/* Cover background mask overlay */
section.cover .mask {
    background-color: var(--cover-overlay) !important;
}

/* ============================================================
   Fase 2: Countdown, Checklist, Pagination, Tabs
   ============================================================ */

/* ===== Countdown ===== */
.countdown-container {
    text-align: center;
    padding: 24px 16px;
    margin: 0 0 24px 0;
    background: linear-gradient(135deg, var(--accent-bg), transparent);
    border-radius: 16px;
    border: 1px solid var(--border-color);
}

.countdown-message {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2em;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 16px;
}

.countdown-cards {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.countdown-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 12px 16px;
    min-width: 72px;
    box-shadow: var(--card-shadow);
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.countdown-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--card-hover-shadow);
}

.countdown-value {
    font-family: 'Poppins', sans-serif;
    font-size: 2em;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}

.countdown-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75em;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 4px;
}

.countdown-separator {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8em;
    font-weight: 700;
    color: var(--text-muted);
    line-height: 1;
    padding-bottom: 14px;
}

.countdown-past {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    color: var(--accent);
    margin-top: 12px;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.6;
    }
}

/* ===== Checklist Progress ===== */
.checklist-progress {
    margin: 16px 0 24px 0;
    padding: 16px 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.checklist-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.checklist-progress-text {
    font-family: 'Poppins', sans-serif;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--text-primary);
}

.checklist-reset-btn {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 6px 14px;
    font-size: 0.8em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.checklist-reset-btn:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

.checklist-progress-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-secondary);
    border-radius: 6px;
    overflow: hidden;
}

.checklist-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: 6px;
    transition: width 0.4s ease, background 0.4s ease;
    width: 0%;
}

/* Checklist Interactive Styling */
.markdown-section input[type="checkbox"] {
    accent-color: var(--accent);
    margin-right: 8px;
    transform: scale(1.2);
    cursor: pointer !important;
    vertical-align: middle;
}

.markdown-section li:has(input[type="checkbox"]:checked) {
    opacity: 0.65;
    text-decoration: line-through;
    text-decoration-color: var(--text-muted);
}

/* Celebration Toast */
.checklist-celebration {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: #fff;
    padding: 16px 32px;
    border-radius: 16px;
    font-family: 'Poppins', sans-serif;
    font-size: 1.1em;
    font-weight: 600;
    box-shadow: 0 8px 32px rgba(76, 175, 80, 0.4);
    z-index: 99999;
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
}

.checklist-celebration.active {
    transform: translateX(-50%) translateY(0);
}

/* ===== Pagination (docsify-pagination) ===== */
.docsify-pagination-container {
    border-top: 2px solid var(--border-color) !important;
    margin-top: 3em !important;
    padding-top: 1.5em !important;
    display: flex !important;
    justify-content: space-between !important;
    gap: 16px;
}

.pagination-item {
    flex: 1;
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--card-shadow) !important;
    text-decoration: none !important;
}

.pagination-item:hover {
    border-color: var(--accent) !important;
    box-shadow: var(--card-hover-shadow) !important;
    transform: translateY(-2px);
}

.pagination-item-label {
    font-family: 'Inter', sans-serif !important;
    font-size: 0.8em !important;
    color: var(--text-muted) !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.pagination-item-title {
    font-family: 'Poppins', sans-serif !important;
    font-size: 1.05em !important;
    font-weight: 600 !important;
    color: var(--accent) !important;
}

.pagination-item-label>span {
    color: var(--text-muted) !important;
}

.pagination-item--previous .pagination-item-label::before {
    content: '← ';
}

.pagination-item--next {
    text-align: right;
}

.pagination-item--next .pagination-item-label::after {
    content: ' →';
}

/* ===== Tabs (docsify-tabs) ===== */
.docsify-tabs {
    margin: 1.5em 0 !important;
}

.docsify-tabs__tab {
    background: var(--bg-secondary) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-color) !important;
    border-bottom: none !important;
    border-radius: 10px 10px 0 0 !important;
    padding: 10px 20px !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.95em !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    margin-right: 4px !important;
}

.docsify-tabs__tab:hover {
    background: var(--accent-bg) !important;
    color: var(--accent) !important;
}

.docsify-tabs__tab--active {
    background: var(--card-bg) !important;
    color: var(--accent) !important;
    border-color: var(--accent) !important;
    border-bottom: 2px solid var(--card-bg) !important;
    font-weight: 600 !important;
    position: relative;
    z-index: 1;
    margin-bottom: -1px !important;
}

.docsify-tabs__content {
    background: var(--card-bg) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0 12px 12px 12px !important;
    padding: 20px 24px !important;
    box-shadow: var(--card-shadow) !important;
    animation: tabFadeIn 0.3s ease !important;
}

@keyframes tabFadeIn {
    from {
        opacity: 0;
        transform: translateY(6px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tabs active border coloring */
.docsify-tabs__tab--active[data-tab*="Econômica"],
.docsify-tabs__tab--active[data-tab*="Economica"] {
    border-color: #4CAF50 !important;
    color: #4CAF50 !important;
}

.docsify-tabs__tab--active[data-tab*="Conforto"] {
    border-color: #2196F3 !important;
    color: #2196F3 !important;
}

.docsify-tabs__tab--active[data-tab*="Luxo"] {
    border-color: #FF9800 !important;
    color: #FF9800 !important;
}

/* ===== Floating Navigation Buttons ===== */
.floating-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9990;
    transition: opacity 0.3s ease;
}

.floating-nav-hidden {
    opacity: 0;
    pointer-events: none !important;
}

.floating-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: all;
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 6px;
    cursor: pointer;
    text-decoration: none !important;
    box-shadow: var(--card-shadow);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-width: 48px;
    overflow: hidden;
    white-space: nowrap;
}

.floating-nav-btn:hover {
    max-width: 220px;
    padding: 10px 14px;
    border-color: var(--accent);
    box-shadow: var(--card-hover-shadow);
}

.floating-nav-prev {
    left: 300px;
    flex-direction: row;
    border-radius: 0 12px 12px 0;
    border-left: 3px solid var(--accent);
}

.floating-nav-next {
    right: 8px;
    flex-direction: row;
    border-radius: 12px 0 0 12px;
    border-right: 3px solid var(--accent);
}

.floating-nav-arrow {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--accent);
    line-height: 1;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}

.floating-nav-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8em;
    font-weight: 500;
    color: var(--text-primary);
    opacity: 0;
    transition: opacity 0.25s ease 0.05s;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.floating-nav-btn:hover .floating-nav-label {
    opacity: 1;
}

/* When sidebar is collapsed (Docsify adds .close to body) */
body.close .floating-nav-prev {
    left: 8px;
    transition: left 0.3s ease, max-width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), padding 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Smooth transition when sidebar opens/closes */
.floating-nav-prev {
    transition: left 0.3s ease, max-width 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), padding 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

/* ===== Print Button ===== */
.print-btn {
    display: block;
    width: fit-content;
    margin: 2.5em auto 0.5em;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 24px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.print-btn::before {
    content: '';
    display: block;
    position: absolute;
    top: -1.5em;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 1px;
    background: var(--border-color);
}

.print-btn:hover {
    background: var(--accent-bg);
    color: var(--accent);
    border-color: var(--accent);
}

/* ===== Charts (Chart.js) ===== */
.chart-container {
    margin: 1.5em 0;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    max-width: 600px;
}

.chart-container canvas {
    max-height: 350px !important;
}

/* ===== Maps (Leaflet) ===== */
.map-container {
    margin: 1.5em 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
}

.map-container .leaflet-container {
    border-radius: 12px;
    font-family: 'Inter', sans-serif;
}

.map-container .leaflet-popup-content-wrapper {
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.map-container .leaflet-popup-content {
    font-family: 'Inter', sans-serif;
    font-size: 0.9em;
    line-height: 1.5;
}

.map-container .leaflet-popup-content a {
    color: var(--accent);
}

/* ===== Currency Converter Widget ===== */
.currency-widget {
    position: fixed;
    bottom: calc(30px + 44px + 16px); /* acima do back-to-top */
    left: calc(300px + 16px);
    right: auto;
    z-index: 9997;
}

.currency-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(76, 175, 80, 0.35);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.currency-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(76, 175, 80, 0.45);
}

.currency-panel {
    position: absolute;
    bottom: 60px;
    left: 0;   /* abre para a direita, já que o widget está à esquerda */
    right: auto;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    overflow: hidden;
}

.currency-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

[data-theme="dark"] .currency-panel {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.currency-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #4CAF50, #66BB6A);
    color: #fff;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
}

.currency-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4em;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;
    line-height: 1;
}

.currency-close:hover {
    opacity: 1;
}

.currency-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.currency-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.currency-row label {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.9em;
    color: var(--text-primary);
    min-width: 65px;
}

.currency-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95em;
    transition: border-color 0.2s;
    outline: none;
    width: 100%;
    min-width: 0;
}

.currency-row input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.15);
}

/* Hide number input spinners */
.currency-row input[type="number"]::-webkit-outer-spin-button,
.currency-row input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.currency-row input[type="number"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.currency-footer {
    padding: 8px 16px 12px;
    text-align: center;
}

.currency-footer small {
    font-family: 'Inter', sans-serif;
    font-size: 0.72em;
    color: var(--text-muted);
}

/* ===== Flexible Alerts (docsify-plugin-flexible-alerts) ===== */
.alert {
    border-radius: 10px !important;
    padding: 16px 20px !important;
    margin: 16px 0 !important;
    border-left: 4px solid !important;
    background: var(--card-bg) !important;
    box-shadow: var(--card-shadow) !important;
    position: relative;
}

.alert::before {
    font-size: 1.1em;
    margin-right: 6px;
}

.alert p {
    color: var(--text-primary) !important;
    margin: 4px 0 !important;
}

.alert .title {
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 1em !important;
}

/* Tip - green */
.alert.callout.tip {
    border-left-color: #4CAF50 !important;
    background: rgba(76, 175, 80, 0.06) !important;
}

.alert.callout.tip .title {
    color: #4CAF50 !important;
}

[data-theme="dark"] .alert.callout.tip {
    background: rgba(76, 175, 80, 0.08) !important;
}

/* Warning - amber */
.alert.callout.warning {
    border-left-color: #FF9800 !important;
    background: rgba(255, 152, 0, 0.06) !important;
}

.alert.callout.warning .title {
    color: #FF9800 !important;
}

[data-theme="dark"] .alert.callout.warning {
    background: rgba(255, 152, 0, 0.08) !important;
}

/* Attention - red */
.alert.callout.attention {
    border-left-color: #F44336 !important;
    background: rgba(244, 67, 54, 0.06) !important;
}

.alert.callout.attention .title {
    color: #F44336 !important;
}

[data-theme="dark"] .alert.callout.attention {
    background: rgba(244, 67, 54, 0.08) !important;
}

/* Note/Info - blue */
.alert.callout.info,
.alert.callout.note {
    border-left-color: #2196F3 !important;
    background: rgba(33, 150, 243, 0.06) !important;
}

.alert.callout.info .title,
.alert.callout.note .title {
    color: #2196F3 !important;
}

[data-theme="dark"] .alert.callout.info,
[data-theme="dark"] .alert.callout.note {
    background: rgba(33, 150, 243, 0.08) !important;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
}

::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent);
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .gallery-swiper .swiper-slide .slide-img-wrapper {
        max-height: 65vh;
    }
}

@media (max-width: 768px) {
    .theme-toggle {
        top: 10px;
        right: 10px;
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    .gallery-swiper .swiper-slide .slide-img-wrapper {
        aspect-ratio: 4 / 3;
        max-height: 55vh;
    }

    section.cover h1 {
        font-size: 2.2em !important;
    }

    section.cover blockquote p {
        font-size: 1.15em !important;
    }

    .gallery-swiper .swiper-button-prev,
    .gallery-swiper .swiper-button-next {
        width: 32px;
        height: 32px;
    }

    .gallery-swiper .swiper-button-prev::after,
    .gallery-swiper .swiper-button-next::after {
        font-size: 14px;
    }

    /* Countdown responsive */
    .countdown-value {
        font-size: 1.5em;
    }

    .countdown-card {
        min-width: 60px;
        padding: 8px 12px;
    }

    .countdown-separator {
        font-size: 1.4em;
        padding-bottom: 10px;
    }

    .countdown-message {
        font-size: 1em;
    }

    /* Pagination responsive */
    .docsify-pagination-container {
        flex-direction: column !important;
        gap: 10px;
    }

    .pagination-item--next {
        text-align: left;
    }

    /* Tabs responsive */
    .docsify-tabs__tab {
        padding: 8px 14px !important;
        font-size: 0.85em !important;
    }

    .docsify-tabs__content {
        padding: 14px 16px !important;
    }

    /* Checklist celebration */
    .checklist-celebration {
        font-size: 0.9em;
        padding: 12px 20px;
        white-space: normal;
        text-align: center;
        max-width: 90vw;
    }

    /* Floating nav - hide on mobile (use bottom pagination instead) */
    .floating-nav {
        display: none;
    }

    /* Back to top - menor e reposicionado no mobile (sem sidebar) */
    .back-to-top {
        bottom: 20px;
        left: auto;
        right: 16px;
        width: 38px;
        height: 38px;
        font-size: 17px;
    }

    /* Currency widget - canto direito no mobile */
    .currency-widget {
        bottom: calc(20px + 38px + 12px);
        left: auto;
        right: 16px;
    }

    /* Painel de moedas: no mobile abre para a esquerda */
    .currency-panel {
        left: auto;
        right: 0;
    }
}

@media (max-width: 480px) {
    section.cover h1 {
        font-size: 1.8em !important;
    }

    .gallery-swiper .swiper-slide .slide-img-wrapper {
        aspect-ratio: 4 / 3;
        max-height: 50vh;
    }

    .countdown-cards {
        gap: 4px;
    }

    .countdown-card {
        min-width: 52px;
        padding: 6px 8px;
    }

    .countdown-value {
        font-size: 1.3em;
    }

    .countdown-separator {
        font-size: 1.1em;
    }
}

/* ===== Print Styles ===== */
@media print {

    /* Hide UI elements */
    .sidebar,
    .sidebar-toggle,
    .theme-toggle,
    .back-to-top,
    .currency-widget,
    .floating-nav,
    .docsify-pagination-container,
    .search,
    .app-nav,
    .lightbox-overlay,
    .checklist-reset-btn,
    .checklist-celebration,
    section.cover,
    .print-btn,
    .swiper-button-prev,
    .swiper-button-next,
    .swiper-pagination {
        display: none !important;
    }

    /* Full width content */
    body {
        background: #fff !important;
        color: #000 !important;
        font-size: 11pt;
    }

    .content {
        margin-left: 0 !important;
        padding: 0 !important;
        max-width: 100% !important;
    }

    .markdown-section {
        max-width: 100% !important;
        padding: 0 !important;
        color: #000 !important;
    }

    /* Typography for print */
    .markdown-section h1,
    .markdown-section h2,
    .markdown-section h3 {
        color: #000 !important;
        page-break-after: avoid;
    }

    .markdown-section h1 {
        font-size: 18pt;
        border-bottom: 2px solid #333;
    }

    .markdown-section h2 {
        font-size: 14pt;
        border-bottom: 1px solid #666;
    }

    .markdown-section p,
    .markdown-section li {
        color: #333 !important;
        line-height: 1.6;
    }

    /* Tables */
    .markdown-section table {
        page-break-inside: avoid;
    }

    .markdown-section table th {
        background: #eee !important;
        color: #000 !important;
    }

    .markdown-section table td {
        color: #333 !important;
    }

    /* Images */
    .gallery,
    .gallery-swiper {
        max-height: 300px;
        page-break-inside: avoid;
    }

    .gallery-swiper .swiper-slide img {
        filter: none !important;
    }

    /* Alerts */
    .alert {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        page-break-inside: avoid;
    }

    /* Maps and Charts - show but don't break */
    .map-container,
    .chart-container {
        page-break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    /* Links */
    .markdown-section a {
        color: #333 !important;
        text-decoration: underline;
    }

    .markdown-section a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666;
    }

    /* Page breaks */
    h1 {
        page-break-before: always;
    }

    h1:first-child {
        page-break-before: avoid;
    }
}
