/* Custom Styles - Bootstrap Overrides and Additions */

/* Apply Rubik font globally */
body {
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    background-color: #f5f5f5;
}

.weight-200 {
    font-weight: 200;
}

/* Custom button styles if needed */
.btn {
    font-family: "Rubik", sans-serif;
}

/* Use square corners app-wide, except buttons and their children. */
*:not(.btn):not(.btn *),
*:not(.btn):not(.btn *)::before,
*:not(.btn):not(.btn *)::after {
    border-radius: 0 !important;
}

/* Remove shadows globally for flat surfaces. */
*,
*::before,
*::after {
    box-shadow: none !important;
}

/* Navigation — width, padding, and link spacing inspired by modul-o-box.com */
.navbar {
    /* Horizontal gap between nav links; space after the logo is 2× this. */
    --navbar-link-gap: 1.25rem;
    font-family: "Rubik", sans-serif;
    font-weight: 400;
    background-color: #f5f5f5 !important;
    border: none !important;
    border-bottom: none !important;
    padding: 1.25rem 0;
    box-shadow: none;
}

.navbar .container-fluid {
    max-width: 100%;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.navbar-brand {
    border: none !important;
    padding: 0;
    margin: 0;
    font-family: "Rubik", sans-serif;
}

.logo-text {
    color: #dc3545;
    font-weight: 400;
    font-size: 2rem;
    text-decoration: none;
    font-family: "Rubik", sans-serif;
}

.navbar-nav {
    border: none;
    align-items: center;
    gap: 0.5rem var(--navbar-link-gap);
}

.navbar-nav .nav-item {
    border: none;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 400;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    line-height: 1.4;
    padding: 0.4rem 0;
    border: none !important;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #dc3545;
}

.navbar-nav .nav-link:focus {
    border: none !important;
    box-shadow: none;
}

.navbar-toggler {
    border: none !important;
    padding: 0.25rem 0.5rem;
    box-shadow: none;
}

.navbar-toggler:focus {
    box-shadow: none !important;
    border: none !important;
    outline: none;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%2833, 37, 41, 0.75%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-collapse {
    border: none;
}

@media (min-width: 992px) {
    .navbar-expand-lg .navbar-brand {
        margin-right: calc(2 * var(--navbar-link-gap));
    }
}

/* Responsive Typography */
/* Ensure display classes scale properly on mobile */
@media (max-width: 767.98px) {
    .display-4 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .lead {
        font-size: 1rem;
    }
}

/* Ensure proper spacing on mobile */
@media (max-width: 575.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .navbar .container-fluid {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }
}

/* Smooth transitions for responsive elements */
h1, h2, h3, p {
    transition: font-size 0.3s ease;
}

/* Add any custom styles here that extend Bootstrap */

.stl-viewer-card {
    border: none;
    background-color: transparent;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1.25rem rgba(17, 24, 39, 0.08);
}

.stl-viewer-card--bordered {
    border: 1px solid #e5e7eb;
}

.stl-viewer-card--white {
    background-color: #ffffff;
}

.stl-viewer {
    width: 100%;
    height: min(68vh, 560px);
    min-height: 360px;
    border-radius: 0.5rem;
    overflow: hidden;
    border: none;
}

.hero-model-viewer {
    width: 100%;
    aspect-ratio: 2000 / 892;
    overflow: hidden;
    display: block;
    margin: 0 auto;
}

.doc-menu-bord {
    border-bottom: 1px solid #e5e7eb;
}
.doc-menu-bord-r {
    border-right: 1px solid #e5e7eb;
}

.site-footer {
    padding: 1rem 1.5rem;
    margin-top: 2rem;
}

.site-footer__inner {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem 1rem;
    color: #555;
    font-size: 0.875rem;
    white-space: nowrap;
}

.site-footer__copy {
    color: #555;
}

.site-footer__links {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.site-footer__links a {
    color: #555;
    text-decoration: none;
}

.site-footer__links a:hover {
    color: #dc3545;
}

@media (max-width: 575.98px) {
    .site-footer__inner {
        white-space: normal;
        flex-wrap: wrap;
    }
}

.docs-page {
    min-height: calc(100vh - 200px);
}

.docs-layout {
    display: grid;
    grid-template-columns: 220px 220px minmax(0, 1fr);
    background-color: #fff;
    border: 1px solid #e5e7eb;
    min-height: 70vh;
}

.docs-sections,
.docs-subtopics,
.docs-content {
    min-width: 0;
}

.docs-menu-title {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.06em;
    color: #666;
    margin: 0;
    padding: 0.85rem 1rem;
}

.docs-nav {
    display: flex;
    flex-direction: column;
    padding: 0.5rem 0;
}

.docs-nav-link {
    color: #222;
    text-decoration: none;
    font-size: 0.9rem;
    padding: 0.55rem 1rem;
    border-left: 2px solid transparent;
}

.docs-nav-link:hover {
    color: #dc3545;
    background-color: #fafafa;
}

.docs-nav-link.is-active {
    color: #dc3545;
    border-left-color: #dc3545;
    background-color: #fff5f5;
}

.docs-content-header {
    padding: 0;
}

.docs-error-message {
    color: #b42318;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
    padding: 0.35rem 1rem 0.75rem;
}

.docs-content-body {
    padding: 1.25rem 1.5rem;
}

.docs-content-body h1,
.docs-content-body h2,
.docs-content-body h3 {
    margin-top: 1.2rem;
    margin-bottom: 0.8rem;
}

.docs-content-body p,
.docs-content-body li {
    color: #2b2b2b;
    line-height: 1.65;
}

.docs-empty-message {
    margin: 0;
    padding: 0.5rem 1rem;
    color: #777;
    font-size: 0.9rem;
}

.docs-content-body img {
    max-width: 100%;
    height: auto;
    display: block;
}

.docs-content-body .md-text-center {
    text-align: center;
}

.docs-content-body .md-text-center img {
    margin-left: auto;
    margin-right: auto;
}

.docs-content-body table {
    width: 100%;
    table-layout: auto;
    border-collapse: collapse;
    margin: 0.75rem 0 1rem;
    font-size: 0.95rem;
    display: table;
    white-space: normal;
}

.docs-content-body th,
.docs-content-body td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.65rem;
    text-align: left;
    vertical-align: top;
}

.docs-content-body th:not(:last-child),
.docs-content-body td:not(:last-child) {
    white-space: nowrap;
    width: 1%;
}

.docs-content-body th:last-child,
.docs-content-body td:last-child {
    width: 100%;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.docs-content-body th:first-child,
.docs-content-body td:first-child {
    min-width: 150px;
    width: 150px;
    white-space: normal;
}

.docs-content-body td:first-child img {
    width: 150px;
    max-width: 150px;
    height: auto;
}

.docs-content-body th {
    background-color: #f8fafc;
    font-weight: 500;
}

.docs-content-body tr:nth-child(even) td {
    background-color: #fcfcfd;
}

.docs-3d-viewer {
    width: 100%;
    height: min(56vh, 460px);
    min-height: 260px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    margin-bottom: 1rem;
}

.docs-3d-box {
    background-color: #adc7e2;
    padding: 0.5rem 0.65rem;
}

.docs-3d-box-grey {
    background-color: #e5e7eb;
    padding: 0.5rem 0.65rem;
}

@media (max-width: 991.98px) {
    .docs-layout {
        grid-template-columns: 1fr;
    }

    .docs-sections,
    .docs-subtopics {
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb;
    }
}

.todo-page {
    min-height: calc(100vh - 220px);
}

.todo-hero {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 1rem 1.5rem;
    border: 1px solid #e5e7eb;
    background: linear-gradient(125deg, #ffffff 0%, #f7fbff 65%, #fef5f5 100%);
    padding: 1.25rem 1.5rem;
}

.todo-kicker {
    font-size: 0.75rem;
    letter-spacing: 0.18em;
    color: #5b6472;
}

.todo-title {
    font-size: clamp(1.6rem, 2.8vw, 2.2rem);
    font-weight: 500;
}

.todo-subtitle {
    color: #586174;
    max-width: 60ch;
}

.todo-hero__meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(145px, 1fr));
    gap: 0.75rem;
    width: min(100%, 360px);
}

.todo-meta-card {
    border: 1px solid #dce5ef;
    background-color: #fff;
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.todo-meta-card__label {
    font-size: 0.76rem;
    color: #6a7280;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.todo-meta-card__value {
    font-size: 1.15rem;
    font-weight: 500;
    color: #101827;
}

.todo-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.todo-block {
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 1rem;
}

.todo-block__header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 0.6rem;
}

.todo-block__header h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
}

.todo-block__header span {
    font-size: 0.88rem;
    color: #5f6979;
}

.todo-progress {
    height: 16px;
    background-color: #eef2f7;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.todo-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #60a5fa 0%, #3b82f6 50%, #2563eb 100%);
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 0.5rem;
}

.todo-list li {
    display: grid;
    gap: 0.35rem;
    border-top: 1px dashed #edf1f6;
    padding-top: 0.5rem;
}

.todo-list li:first-child {
    border-top: none;
    padding-top: 0;
}

.todo-list span {
    color: #111827;
    font-size: 0.95rem;
}

.todo-topic-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px dashed transparent;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.todo-topic-link:hover {
    color: #0f3f8f;
    border-bottom-color: #93c5fd;
}

.todo-item-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.todo-start-arrow {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.78rem;
    font-weight: 500;
    color: #713f12;
    background-color: #fde68a;
    border: 1px solid #facc15;
    white-space: nowrap;
}

.todo-item__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.todo-list time {
    color: #6c7383;
    font-size: 0.78rem;
    white-space: nowrap;
}

.todo-item-progress {
    height: 6px;
    background-color: #eaf4ee;
    overflow: hidden;
}

.todo-item-progress span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #34d399 0%, #22c55e 50%, #16a34a 100%);
}

.todo-topic-page {
    min-height: calc(100vh - 220px);
}

.todo-topic-hero {
    border: 1px solid #e5e7eb;
    background: #fff;
    padding: 1.2rem 1.4rem;
}

.todo-topic-back {
    font-size: 0.9rem;
    color: #0f3f8f;
    text-decoration: none;
}

.todo-topic-back:hover {
    text-decoration: underline;
}

.todo-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.todo-topic-card {
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 1rem;
    min-height: 148px;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: space-between;
}

.todo-topic-card__link {
    color: inherit;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    justify-content: space-between;
    min-height: 100%;
}

.todo-topic-card--done {
    border-color: #86efac;
    background: linear-gradient(135deg, #ecfdf3 0%, #dcfce7 100%);
}

.todo-topic-card--skipped {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.todo-topic-card__title {
    margin: 0;
    font-size: 1rem;
    line-height: 1.4;
    color: #111827;
}

.todo-topic-card__date {
    margin: 0;
    color: #6b7280;
    font-size: 0.84rem;
}

.todo-topic-card__status {
    align-self: flex-start;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    font-weight: 600;
    color: #6b7280;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    padding: 0.2rem 0.45rem;
}

.todo-topic-card__status.is-done {
    color: #14532d;
    background-color: #bbf7d0;
    border-color: #86efac;
}

.todo-topic-card__status.is-skipped {
    color: #991b1b;
    background-color: #fecaca;
    border-color: #fca5a5;
}

.todo-task-page {
    min-height: calc(100vh - 220px);
}

.todo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
    color: #6b7280;
}

.todo-task-box {
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 1rem;
}

.todo-task-panel {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.todo-task-topic {
    color: #6b7280;
    font-size: 0.9rem;
}

.todo-task-last-action {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.2rem;
}

.todo-task-checks {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    flex-wrap: wrap;
}

.todo-task-check {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #374151;
    border: 1px solid #e5e7eb;
    background-color: #f9fafb;
    padding: 0.25rem 0.5rem;
}

.todo-task-content {
    display: grid;
    gap: 1rem;
}

.todo-task-block {
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 1rem;
}

.todo-task-block--skipped {
    border-color: #fecaca;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
}

.todo-task-block h2 {
    margin: 0 0 0.45rem;
    font-size: 1rem;
}

.todo-task-block p {
    margin: 0;
    color: #4b5563;
}

@media (max-width: 991.98px) {
    .todo-hero {
        flex-direction: column;
        align-items: stretch;
    }

    .todo-hero__meta {
        width: 100%;
    }

    .todo-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .todo-meta-card__value {
        font-size: 1rem;
    }

    .todo-item__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .todo-task-panel {
        flex-direction: column;
    }
}

.pricing-page {
    min-height: calc(100vh - 220px);
}

.pricing-tier {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    border: 1px solid #e5e7eb;
    background-color: #fff;
    padding: 1.2rem;
}

.pricing-tier--featured {
    border-color: #f5c2c7;
    background: linear-gradient(135deg, #fff 0%, #fff4f5 100%);
}

.pricing-tier__name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.pricing-tier__price {
    margin: 0;
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.1;
}

.pricing-tier__price span {
    font-size: 0.95rem;
    color: #6b7280;
    margin-left: 0.25rem;
}

.pricing-tier__features {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.45rem;
    color: #293241;
}
