/* MCAD Tools — estilos locales (Manual de Marca 2026) */
:root {
    --mcad-red: #b11e32;
    --mcad-crimson: #e5083b;
    --mcad-slate: #496075;
    --mcad-light: #f6f6f6;
    --mcad-dark: #1d1d1b;
    --mcad-navy: #07223d;
    --mcad-blue: #3e4798;
    --mcad-orange: #f28c0b;
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Montserrat', system-ui, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--mcad-light);
    background: var(--mcad-dark);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

img { max-width: 100%; height: auto; display: block; }

.container {
    max-width: 72rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
.site-header {
    border-bottom: 1px solid rgba(73, 96, 117, 0.4);
    background: var(--mcad-navy);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 1rem;
    padding-bottom: 1rem;
    gap: 1.5rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-link img { height: 2.5rem; width: auto; }

.logo-link span {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.site-nav {
    display: flex;
    gap: 1.5rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.site-nav a {
    color: rgba(246, 246, 246, 0.8);
    transition: color 0.15s;
}

.site-nav a:hover { color: var(--mcad-crimson); }

.lang-switch {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.lang-switch a {
    color: rgba(246, 246, 246, 0.45);
    padding: 0.2rem 0.35rem;
    transition: color 0.15s;
}

.lang-switch a:hover,
.lang-switch a.is-active {
    color: var(--mcad-light);
}

.lang-switch .lang-sep {
    color: rgba(246, 246, 246, 0.25);
}

@media (max-width: 720px) {
    .site-header .container {
        flex-wrap: wrap;
    }

    .header-right {
        width: 100%;
        justify-content: space-between;
    }
}

/* Hero */
.hero {
    border-bottom: 1px solid rgba(73, 96, 117, 0.3);
    background: var(--mcad-navy);
    padding: 4rem 0;
}

@media (min-width: 1024px) {
    .hero { padding: 6rem 0; }
}

.hero-inner { max-width: 48rem; }

.eyebrow {
    margin: 0 0 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mcad-crimson);
}

h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
}

@media (min-width: 1024px) {
    h1 { font-size: 3rem; }
}

.lead {
    margin-top: 1.5rem;
    font-size: 1.125rem;
    color: rgba(246, 246, 246, 0.7);
}

.btn-row {
    margin-top: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.btn-primary {
    background: var(--mcad-crimson);
    color: #fff;
}

.btn-primary:hover { background: var(--mcad-red); }

.btn-outline {
    border: 1px solid var(--mcad-slate);
    color: var(--mcad-light);
}

.btn-outline:hover {
    border-color: var(--mcad-crimson);
    color: var(--mcad-crimson);
}

/* Sections */
.section { padding: 4rem 0; }

.section-muted {
    border-top: 1px solid rgba(73, 96, 117, 0.3);
    background: rgba(7, 34, 61, 0.5);
}

.section-header { margin-bottom: 2.5rem; }

h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
}

.section-desc {
    margin-top: 0.5rem;
    color: rgba(246, 246, 246, 0.6);
}

/* Grid */
.grid-3 {
    display: grid;
    gap: 1.5rem;
}

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

.grid-2 {
    display: grid;
    gap: 1.5rem;
}

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

/* Cards */
.card {
    border: 1px solid rgba(73, 96, 117, 0.4);
    background: var(--mcad-navy);
    padding: 1.5rem;
}

.card-dark { background: var(--mcad-dark); }

.card-muted { opacity: 0.7; }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.card-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
}

.badge {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-soon {
    background: rgba(242, 140, 11, 0.2);
    color: var(--mcad-orange);
}

.badge-active {
    background: rgba(229, 8, 59, 0.2);
    color: var(--mcad-crimson);
}

.card-body {
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: rgba(246, 246, 246, 0.6);
}

.link-accent {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--mcad-crimson);
    transition: color 0.15s;
}

.link-accent:hover { color: var(--mcad-light); }

.text-muted { color: rgba(246, 246, 246, 0.4); }

.text-meta {
    font-size: 0.75rem;
    color: rgba(246, 246, 246, 0.4);
}

.category-label {
    margin-bottom: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--mcad-slate);
}

/* Catalog filters */
.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid var(--mcad-slate);
    color: rgba(246, 246, 246, 0.7);
    transition: all 0.15s;
}

.filter-btn:hover { border-color: var(--mcad-crimson); }

.filter-btn.active {
    background: var(--mcad-crimson);
    border-color: var(--mcad-crimson);
    color: #fff;
}

/* Tool list row */
.tool-row {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgba(73, 96, 117, 0.4);
    background: var(--mcad-navy);
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .tool-row {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.empty-state {
    border: 1px solid rgba(73, 96, 117, 0.4);
    background: var(--mcad-navy);
    padding: 2.5rem;
    text-align: center;
}

/* Detail layout */
.detail-grid {
    display: grid;
    gap: 2.5rem;
}

@media (min-width: 1024px) {
    .detail-grid { grid-template-columns: 2fr 1fr; }
}

.detail-main > * + * { margin-top: 2.5rem; }

.requirements {
    list-style: none;
    padding: 0;
    margin: 0;
}

.requirements li {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: rgba(246, 246, 246, 0.7);
}

.requirements li::before {
    content: "▸";
    color: var(--mcad-crimson);
}

/* Table */
.table-wrap {
    overflow-x: auto;
    border: 1px solid rgba(73, 96, 117, 0.4);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

thead {
    background: var(--mcad-navy);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: rgba(246, 246, 246, 0.6);
}

th, td { padding: 0.75rem 1rem; }

tbody tr {
    border-top: 1px solid rgba(73, 96, 117, 0.3);
    background: rgba(29, 29, 27, 0.5);
}

/* Sidebar */
.sidebar > * + * { margin-top: 1.5rem; }

.download-box .version {
    margin-top: 0.25rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--mcad-crimson);
}

.alert {
    margin-top: 1.5rem;
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border: 1px solid rgba(242, 140, 11, 0.4);
    background: rgba(242, 140, 11, 0.1);
    color: var(--mcad-orange);
}

.btn-block {
    display: block;
    width: 100%;
    margin-top: 1.5rem;
    text-align: center;
}

.steps {
    list-style: none;
    padding: 0;
    margin: 0;
}

.steps li {
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: rgba(246, 246, 246, 0.6);
}

.api-url {
    font-size: 0.75rem;
    color: rgba(246, 246, 246, 0.5);
    word-break: break-all;
}

.sidebar-title {
    margin: 0 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
    margin-top: auto;
    border-top: 1px solid rgba(73, 96, 117, 0.4);
    background: var(--mcad-navy);
}

.site-footer .container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 2rem;
    padding-bottom: 2rem;
    font-size: 0.875rem;
    color: rgba(246, 246, 246, 0.6);
}

@media (min-width: 640px) {
    .site-footer .container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* 404 */
.page-center {
    padding: 6rem 0;
    text-align: center;
}

.page-center h1 { margin-top: 1rem; }

.page-center p { margin-top: 1rem; color: rgba(246, 246, 246, 0.6); }

.page-center .btn { margin-top: 2rem; }

.section-header-row {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.5rem;
}

/* Documentation */
.docs-shell {
    border-top: 1px solid rgba(73, 96, 117, 0.3);
    background: var(--mcad-dark);
    min-height: calc(100vh - 12rem);
}

.docs-layout {
    display: grid;
    gap: 0;
    max-width: 90rem;
    margin: 0 auto;
    padding: 0;
}

@media (min-width: 1024px) {
    .docs-layout {
        grid-template-columns: 16rem minmax(0, 1fr) 14rem;
    }
}

.docs-sidebar {
    border-bottom: 1px solid rgba(73, 96, 117, 0.3);
    background: var(--mcad-navy);
    padding: 1.5rem 1rem;
}

@media (min-width: 1024px) {
    .docs-sidebar {
        position: sticky;
        top: 0;
        align-self: start;
        max-height: 100vh;
        overflow-y: auto;
        border-bottom: none;
        border-right: 1px solid rgba(73, 96, 117, 0.3);
        padding: 2rem 1rem 2rem 1.5rem;
    }
}

.docs-nav-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(73, 96, 117, 0.3);
}

.docs-nav-back {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(246, 246, 246, 0.5);
    transition: color 0.15s;
}

.docs-nav-back:hover { color: var(--mcad-crimson); }

.docs-nav-product {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--mcad-light);
}

.docs-nav-group {
    margin-bottom: 0.5rem;
}

.docs-nav-group-title {
    cursor: pointer;
    list-style: none;
    padding: 0.5rem 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(246, 246, 246, 0.55);
}

.docs-nav-group-title::-webkit-details-marker { display: none; }

.docs-nav-group[open] .docs-nav-group-title {
    color: var(--mcad-light);
}

.docs-nav-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0.75rem 0.5rem;
}

.docs-nav-link {
    display: block;
    padding: 0.45rem 0.75rem;
    border-left: 2px solid transparent;
    font-size: 0.875rem;
    color: rgba(246, 246, 246, 0.72);
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.docs-nav-link:hover {
    color: var(--mcad-light);
    background: rgba(229, 8, 59, 0.08);
}

.docs-nav-link.is-active {
    border-left-color: var(--mcad-crimson);
    color: var(--mcad-light);
    font-weight: 600;
    background: rgba(229, 8, 59, 0.12);
}

.docs-nav-link-disabled {
    display: block;
    padding: 0.45rem 0.75rem;
    font-size: 0.875rem;
    color: rgba(246, 246, 246, 0.28);
    cursor: not-allowed;
}

.docs-main {
    min-width: 0;
    padding: 2rem 1.5rem 3rem;
}

@media (min-width: 1024px) {
    .docs-main { padding: 2.5rem 2.5rem 4rem; }
}

.docs-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 1.75rem;
    font-size: 0.8125rem;
    color: rgba(246, 246, 246, 0.5);
}

.docs-breadcrumb a {
    color: rgba(246, 246, 246, 0.65);
    transition: color 0.15s;
}

.docs-breadcrumb a:hover { color: var(--mcad-crimson); }

.docs-breadcrumb-sep { color: rgba(246, 246, 246, 0.25); }

.docs-content {
    max-width: 48rem;
    color: rgba(246, 246, 246, 0.85);
}

.docs-content > :first-child { margin-top: 0; }

.docs-content h1 {
    margin: 0 0 1rem;
    font-size: 2rem;
    line-height: 1.25;
    color: var(--mcad-light);
}

.docs-content h2 {
    margin: 2.5rem 0 1rem;
    padding-top: 0.5rem;
    font-size: 1.375rem;
    color: var(--mcad-light);
    border-top: 1px solid rgba(73, 96, 117, 0.25);
}

.docs-content h3 {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.05rem;
    color: var(--mcad-light);
}

.docs-content p,
.docs-content li {
    font-size: 0.9375rem;
    line-height: 1.75;
}

.docs-content ul,
.docs-content ol {
    margin: 0.75rem 0 1rem;
    padding-left: 1.25rem;
}

.docs-content li { margin-bottom: 0.35rem; }

.docs-content a {
    color: var(--mcad-crimson);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.docs-content a:hover { color: var(--mcad-light); }

.docs-content code {
    padding: 0.15rem 0.4rem;
    border-radius: 0.2rem;
    font-size: 0.85em;
    background: rgba(7, 34, 61, 0.9);
    color: #f0c674;
}

.docs-content pre {
    overflow-x: auto;
    margin: 1rem 0 1.25rem;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(73, 96, 117, 0.4);
    border-radius: 0.25rem;
    background: var(--mcad-navy);
}

.docs-content pre code {
    padding: 0;
    background: transparent;
    color: inherit;
}

.docs-content blockquote,
.docs-content .admonition {
    margin: 1.25rem 0;
    padding: 0.9rem 1rem;
    border-left: 3px solid var(--mcad-orange);
    background: rgba(242, 140, 11, 0.08);
    color: rgba(246, 246, 246, 0.82);
}

.docs-content .table-wrap {
    margin: 1rem 0 1.5rem;
}

.docs-content table {
    font-size: 0.875rem;
}

.docs-content img {
    margin: 1.25rem 0;
    border: 1px solid rgba(73, 96, 117, 0.4);
    border-radius: 0.25rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.docs-figure {
    margin: 1.25rem 0 1.5rem;
    padding: 1.25rem;
    border: 1px dashed rgba(73, 96, 117, 0.55);
    border-radius: 0.25rem;
    background: rgba(7, 34, 61, 0.45);
    text-align: center;
    color: rgba(246, 246, 246, 0.45);
    font-size: 0.8125rem;
}

.docs-figure img {
    margin: 0 auto 0.75rem;
    border: 1px solid rgba(73, 96, 117, 0.4);
    border-radius: 0.25rem;
}

.docs-toc-wrap {
    display: none;
}

@media (min-width: 1024px) {
    .docs-toc-wrap {
        display: block;
        position: sticky;
        top: 0;
        align-self: start;
        max-height: 100vh;
        overflow-y: auto;
        padding: 2.5rem 1.5rem 2rem 0.5rem;
        border-left: 1px solid rgba(73, 96, 117, 0.3);
    }
}

.docs-toc-title {
    margin: 0 0 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(246, 246, 246, 0.55);
}

.docs-toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.docs-toc li {
    margin-bottom: 0.35rem;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.docs-toc a {
    color: rgba(246, 246, 246, 0.55);
    transition: color 0.15s;
}

.docs-toc a:hover { color: var(--mcad-crimson); }

.docs-toc ul ul {
    margin-top: 0.35rem;
    padding-left: 0.75rem;
    border-left: 1px solid rgba(73, 96, 117, 0.25);
}

.docs-pager {
    display: grid;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(73, 96, 117, 0.3);
}

@media (min-width: 640px) {
    .docs-pager {
        grid-template-columns: 1fr 1fr;
    }
}

.docs-pager-link {
    display: block;
    padding: 1rem 1.1rem;
    border: 1px solid rgba(73, 96, 117, 0.4);
    background: rgba(7, 34, 61, 0.45);
    transition: border-color 0.15s, background 0.15s;
}

.docs-pager-link:hover {
    border-color: var(--mcad-crimson);
    background: rgba(229, 8, 59, 0.08);
}

.docs-pager-next { text-align: right; }

.docs-pager-label {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(246, 246, 246, 0.45);
}

.docs-pager-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--mcad-light);
}
