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

:root {
    --ts-header-purple: #9900CC;
    --ts-header-pink: #FF0066;
    --ts-header-orange: #FF9966;
    --ts-header-yellow: #FFCC00;
    --primary-50: #f0fdf4;
    --primary-100: #dcfce7;
    --primary-200: #bbf7d0;
    --primary-500: #22c55e;
    --primary-600: #16a34a;
    --primary-700: #15803d;
    --primary-800: #166534;
    --emerald-500: #10b981;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1e293b;
    --slate-900: #0f172a;
    --green-100: #dcfce7;
    --green-700: #15803d;
    --amber-100: #fef3c7;
    --amber-700: #b45309;
    --red-100: #fee2e2;
    --red-700: #b91c1c;
    --purple-100: #f3e8ff;
    --purple-700: #7e22ce;
    --blue-100: #dbeafe;
    --blue-700: #1d4ed8;
    --sidebar-width: 280px;
    --toc-width: 230px;
    --header-height: 68px;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background: #fff;
    color: var(--slate-800);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

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

a:hover {
    color: var(--primary-700);
    text-decoration: underline;
}

/* ============ HEADER OFICIAL TURISONE COM LINHA DEGRADÊ ============ */
.docs-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    height: var(--header-height);
    background: rgba(34, 34, 34, 0.96);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #333333;
    display: flex;
    align-items: center;
    padding: 0 1.5rem;
}

.docs-header .brand-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.docs-header .brand-wrap img {
    height: 34px;
    width: auto;
    display: block;
}

.docs-header .logo {
    font-size: 1.35rem;
    font-weight: 800;
    color: #ffffff;
    letter-spacing: -0.02em;
    text-decoration: none;
    white-space: nowrap;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 8px;
}

.docs-header .logo:hover {
    text-decoration: none;
}

.docs-header .logo span {
    color: #4ade80;
}

.docs-header .badge-module {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
    border: 1px solid rgba(34, 197, 94, 0.4);
    font-size: 10.5px;
    font-weight: 800;
    padding: 3px 9px;
    border-radius: 9999px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.docs-header nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.docs-header nav a.nav-link {
    font-size: 0.78rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: color 0.15s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-header nav a.nav-link:hover {
    color: #4ade80;
    text-decoration: none;
}

.docs-header .btn-primary {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    color: #fff;
    padding: 0.6rem 1.4rem;
    border-radius: 99px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    text-decoration: none;
    transition: all 0.15s;
    box-shadow: 0 4px 14px rgba(22, 163, 74, 0.35);
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
}

.docs-header .btn-primary:hover {
    background: linear-gradient(135deg, #15803d 0%, #166534 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.45);
    text-decoration: none;
}

/* Linha degradê girando no rodapé do header */
.ts-animated-border {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--ts-header-purple), var(--ts-header-pink), var(--ts-header-orange), var(--ts-header-yellow), var(--ts-header-purple));
    background-size: 200% 100%;
    animation: ts-gradient-slide 3s linear infinite;
}

@keyframes ts-gradient-slide {
    0% { background-position: 0 50%; }
    100% { background-position: 200% 50%; }
}

/* ============ LAYOUT ============ */
.docs-layout {
    display: flex;
    min-height: 100vh;
    padding-top: var(--header-height);
}

/* ============ LEFT SIDEBAR ============ */
.docs-sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0;
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    border-right: 1px solid var(--slate-200);
    background: var(--slate-50);
    padding: 1.5rem 0;
    scrollbar-width: thin;
    scrollbar-color: var(--slate-300) transparent;
}

.docs-sidebar::-webkit-scrollbar {
    width: 4px;
}

.docs-sidebar::-webkit-scrollbar-thumb {
    background: var(--slate-300);
    border-radius: 4px;
}

.nav-section {
    margin-bottom: 0.35rem;
}

.nav-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.55rem 1.5rem;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-500);
    cursor: pointer;
    user-select: none;
    transition: color 0.15s ease;
}

.nav-section-header:hover {
    color: var(--slate-800);
}

.nav-section-header .chevron {
    transition: transform 0.2s;
    font-size: 0.6rem;
    color: var(--slate-400);
}

.nav-section.open .chevron {
    transform: rotate(90deg);
}

.nav-items {
    display: none;
}

.nav-section.open .nav-items {
    display: block;
}

.nav-item {
    display: block;
    padding: 0.42rem 1.5rem 0.42rem 2rem;
    font-size: 0.83rem;
    font-weight: 500;
    color: var(--slate-600);
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    line-height: 1.4;
}

.nav-item:hover {
    color: var(--primary-700);
    background: var(--primary-50);
    text-decoration: none;
}

.nav-item.active {
    color: var(--primary-800);
    font-weight: 700;
    border-left-color: var(--primary-600);
    background: var(--primary-50);
}

/* ============ MAIN CONTENT ============ */
.docs-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    margin-right: var(--toc-width);
    min-width: 0;
    padding: 3rem 3.5rem;
    max-width: 920px;
}

/* ============ RIGHT TOC ============ */
.docs-toc {
    width: var(--toc-width);
    flex-shrink: 0;
    position: fixed;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    overflow-y: auto;
    padding: 2rem 1rem 2rem 1rem;
    border-left: 1px solid var(--slate-200);
    scrollbar-width: thin;
    scrollbar-color: var(--slate-200) transparent;
}

.docs-toc::-webkit-scrollbar {
    width: 3px;
}

.docs-toc::-webkit-scrollbar-thumb {
    background: var(--slate-200);
}

.docs-toc h4 {
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--slate-400);
    margin-bottom: 0.75rem;
}

.toc-link {
    display: block;
    padding: 0.3rem 0.5rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--slate-500);
    text-decoration: none;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1.4;
}

.toc-link:hover {
    color: var(--primary-600);
    text-decoration: none;
}

.toc-link.active {
    color: var(--primary-700);
    font-weight: 700;
    border-left-color: var(--primary-600);
}

.toc-link.sub {
    padding-left: 1.25rem;
    font-size: 0.74rem;
}

/* ============ CONTENT TYPOGRAPHY ============ */
.content h1 {
    font-size: 2.1rem;
    font-weight: 900;
    color: var(--slate-900);
    letter-spacing: -0.04em;
    margin-bottom: 0.75rem;
    line-height: 1.18;
}

.content .lead {
    font-size: 1.05rem;
    color: var(--slate-500);
    margin-bottom: 2.5rem;
    line-height: 1.7;
    max-width: 720px;
}

.content h2 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.03em;
    margin-top: 3rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--slate-200);
}

.content h3 {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--slate-800);
    letter-spacing: -0.02em;
    margin-top: 2rem;
    margin-bottom: 0.6rem;
}

.content h4 {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--slate-700);
    margin-top: 1.5rem;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.content p {
    color: var(--slate-600);
    margin-bottom: 1rem;
    line-height: 1.75;
    font-size: 0.95rem;
}

.content ul,
.content ol {
    color: var(--slate-600);
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
    line-height: 1.75;
    font-size: 0.95rem;
}

.content li {
    margin-bottom: 0.45rem;
}

.content li strong {
    color: var(--slate-800);
}

.content code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.84em;
    background: var(--slate-100);
    color: var(--primary-700);
    padding: 0.15em 0.45em;
    border-radius: 4px;
    border: 1px solid var(--slate-200);
}

.content pre {
    background: var(--slate-900);
    color: #e2e8f0;
    border-radius: 10px;
    padding: 1.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
    font-size: 0.85rem;
    line-height: 1.65;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    border: 1px solid var(--slate-800);
}

.content pre code {
    background: none;
    border: none;
    color: inherit;
    padding: 0;
    font-size: inherit;
}

/* ============ CARDS GRID ============ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.card {
    border: 1px solid var(--slate-200);
    border-radius: 14px;
    padding: 1.35rem;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    background: #ffffff;
}

.card:hover {
    border-color: var(--primary-500);
    box-shadow: 0 10px 25px -5px rgba(22, 163, 74, 0.12);
    transform: translateY(-2px);
    text-decoration: none;
    color: inherit;
}

.card .card-icon {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    display: block;
}

.card .card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--slate-900);
}

.card .card-desc {
    font-size: 0.82rem;
    color: var(--slate-500);
    line-height: 1.5;
}

/* ============ ALERTS ============ */
.alert {
    border-radius: 10px;
    padding: 1.1rem 1.35rem;
    margin: 1.5rem 0;
    display: flex;
    gap: 0.85rem;
    font-size: 0.885rem;
    line-height: 1.65;
}

.alert-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.alert strong {
    display: block;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.alert-info {
    background: var(--blue-100);
    border: 1px solid #bfdbfe;
    color: var(--blue-700);
}

.alert-tip {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.alert-warn {
    background: var(--amber-100);
    border: 1px solid #fcd34d;
    color: var(--amber-700);
}

.alert-danger {
    background: var(--red-100);
    border: 1px solid #fca5a5;
    color: var(--red-700);
}

/* ============ STEPS ============ */
.steps {
    counter-reset: step;
    margin: 1.5rem 0;
}

.step {
    display: flex;
    gap: 1.1rem;
    margin-bottom: 1.5rem;
    counter-increment: step;
}

.step::before {
    content: counter(step);
    flex-shrink: 0;
    width: 2.2rem;
    height: 2.2rem;
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.9rem;
    box-shadow: 0 4px 10px rgba(22, 163, 74, 0.25);
}

.step-body {
    flex: 1;
}

.step-body strong {
    display: block;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.step-body p {
    margin: 0;
    font-size: 0.885rem;
    color: var(--slate-500);
    line-height: 1.6;
}

/* ============ TABLE ============ */
.content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.885rem;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--slate-200);
}

.content th {
    background: var(--slate-50);
    text-align: left;
    padding: 0.75rem 1rem;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-600);
    border-bottom: 2px solid var(--slate-200);
}

.content td {
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--slate-100);
    color: var(--slate-600);
    vertical-align: top;
}

.content tr:hover td {
    background: var(--slate-50);
}

/* ============ BADGE ============ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.22em 0.7em;
    border-radius: 99px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-green {
    background: var(--green-100);
    color: var(--green-700);
}

.badge-blue {
    background: var(--blue-100);
    color: var(--blue-700);
}

.badge-amber {
    background: var(--amber-100);
    color: var(--amber-700);
}

.badge-purple {
    background: var(--purple-100);
    color: var(--purple-700);
}

.badge-red {
    background: var(--red-100);
    color: var(--red-700);
}

/* ============ PAGE NAV ============ */
.page-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--slate-200);
}

.page-nav-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    text-decoration: none;
    color: inherit;
    max-width: 48%;
}

.page-nav-item:hover {
    text-decoration: none;
}

.page-nav-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--slate-400);
}

.page-nav-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--primary-600);
}

.page-nav-item.next {
    text-align: right;
}

/* ============ HOME HERO ============ */
.hero {
    background: radial-gradient(100% 100% at 50% 0%, #1e293b 0%, #0f172a 100%);
    border-radius: 18px;
    padding: 2.75rem 2.5rem;
    color: #fff;
    margin-bottom: 2.5rem;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    right: -40px;
    width: 320px;
    height: 320px;
    background: rgba(34, 197, 94, 0.18);
    filter: blur(80px);
    border-radius: 50%;
    pointer-events: none;
}

.hero h1 {
    color: #fff;
    font-size: 2.3rem;
    margin-bottom: 0.5rem;
    border: none;
    position: relative;
}

.hero p {
    color: #94a3b8;
    font-size: 1.05rem;
    margin: 0;
    position: relative;
    max-width: 680px;
}

.hero .badge-hero {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.3);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.35em 0.9em;
    border-radius: 99px;
    display: inline-block;
    margin-bottom: 1.1rem;
    position: relative;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1120px) {
    .docs-toc {
        display: none;
    }

    .docs-main {
        margin-right: 0;
    }
}

@media (max-width: 768px) {
    .docs-sidebar {
        display: none;
    }

    .docs-main {
        margin-left: 0;
        padding: 2rem 1.25rem;
    }

    .docs-header nav {
        gap: 0.75rem;
    }

    .docs-header .btn-primary {
        padding: 0.5rem 1rem;
        font-size: 0.72rem;
    }

    .docs-header .badge-module {
        display: none;
    }
}

/* ==========================================================================
   NAVEGAÇÃO POR BREADCRUMBS HIERÁRQUICOS (SEO E ACESSIBILIDADE)
   ========================================================================== */
.docs-breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--slate-500);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    line-height: 1.4;
}

.docs-breadcrumbs a {
    color: var(--slate-600);
    text-decoration: none;
    transition: color 0.15s ease;
}

.docs-breadcrumbs a:hover {
    color: var(--primary-600);
    text-decoration: underline;
}

.docs-breadcrumbs .sep {
    color: var(--slate-400);
    user-select: none;
    font-size: 0.75rem;
}

.docs-breadcrumbs .current {
    color: var(--slate-900);
    font-weight: 600;
}

/* ==========================================================================
   YOUTUBE SHORTS EMBED (FORMATO VERTICAL 9:16 RESPONSIVO)
   ========================================================================== */
.shorts-video-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 2rem auto 2.5rem auto;
    width: 100%;
}

.shorts-video-frame {
    width: 100%;
    max-width: 340px;
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    overflow: hidden;
    background: var(--slate-900);
    border: 1px solid var(--slate-200);
    box-shadow: 0 14px 32px -8px rgba(15, 23, 42, 0.18);
    position: relative;
}

.shorts-video-frame iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}
