/*
 * Cubevo CRM — site styles on top of the base theme (blue.css).
 * Colour roles follow Material Design 3 (Material Color Utilities,
 * Fidelity scheme, seed #3F78E0) — see audit section 8.2.
 */

:root {
    --md-sys-color-primary: #0c57be;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #3671d9;
    --md-sys-color-on-primary-container: #fefcff;
    --md-sys-color-secondary: #4c5e86;
    --md-sys-color-secondary-container: #bccefd;
    --md-sys-color-on-secondary-container: #46577f;
    --md-sys-color-tertiary-container: #b25f00;
    --md-sys-color-on-tertiary-container: #fffbff;
    --md-sys-color-error: #ba1a1a;
    --md-sys-color-surface: #faf9ff;
    --md-sys-color-surface-container-low: #f3f3fc;
    --md-sys-color-surface-container: #ededf6;
    --md-sys-color-surface-container-high: #e7e7f1;
    --md-sys-color-on-surface: #191b22;
    --md-sys-color-on-surface-variant: #424753;
    --md-sys-color-outline: #737784;
    --md-sys-color-outline-variant: #c2c6d5;
    --md-whatsapp: #25d366;
    --md-on-whatsapp: #0b3d20;

    --md-shape-full: 999px;
    --md-shape-large: 16px;
    --md-shape-extra-large: 28px;
    --md-target: 48px;

    --bs-primary: #0c57be;
    --bs-blue: #0c57be;
    --bs-font-sans-serif: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Dark-scheme tokens (opt-in via <html data-theme="dark">; not enabled by
   default until every page has been reviewed in dark mode). */
[data-theme="dark"] {
    --md-sys-color-primary: #afc6ff;
    --md-sys-color-on-primary: #002d6c;
    --md-sys-color-primary-container: #588ef7;
    --md-sys-color-secondary: #b4c6f4;
    --md-sys-color-secondary-container: #34466d;
    --md-sys-color-on-secondary-container: #a3b5e2;
    --md-sys-color-tertiary-container: #d7791e;
    --md-sys-color-on-tertiary-container: #1c0a00;
    --md-sys-color-error: #ffb4ab;
    --md-sys-color-surface: #11131a;
    --md-sys-color-surface-container-low: #191b22;
    --md-sys-color-surface-container: #1d1f26;
    --md-sys-color-surface-container-high: #282a31;
    --md-sys-color-on-surface: #e1e2eb;
    --md-sys-color-on-surface-variant: #c2c6d5;
    --md-sys-color-outline: #8c909e;
    --md-sys-color-outline-variant: #424753;
}

/* ---------- Base ---------- */
html, body {
    overflow-x: clip; /* safety net only; layouts below are reflow-safe */
}

body {
    font-family: var(--bs-font-sans-serif);
    color: var(--md-sys-color-on-surface-variant);
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6,
.display-1, .display-2, .display-3, .display-4, .display-5, .display-6 {
    font-family: var(--bs-font-sans-serif);
    color: var(--md-sys-color-on-surface);
    letter-spacing: -0.01em;
}

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

a {
    color: var(--md-sys-color-primary);
}

p, li {
    text-align: left;
}

.text-muted, .eyebrow {
    color: var(--md-sys-color-on-surface-variant) !important;
}

.skip-link {
    position: absolute;
    left: 1rem;
    top: -4rem;
    z-index: 10000;
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    padding: 0.75rem 1rem;
    border-radius: var(--md-shape-large);
}

.skip-link:focus {
    top: 1rem;
    color: var(--md-sys-color-on-primary);
}

:focus-visible {
    outline: 2px solid var(--md-sys-color-primary);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---------- M3 type scale ---------- */
.display-hero {
    font-size: 36px;
    line-height: 44px;
    font-weight: 800;
}

@media (min-width: 992px) {
    .display-hero {
        font-size: 57px;
        line-height: 64px;
    }
}

.page-title {
    font-size: 32px;
    line-height: 40px;
    font-weight: 800;
}

@media (min-width: 992px) {
    .page-title {
        font-size: 45px;
        line-height: 52px;
    }
}

.section-title {
    font-size: 24px;
    line-height: 32px;
    font-weight: 700;
}

@media (min-width: 992px) {
    .section-title {
        font-size: 32px;
        line-height: 40px;
    }
}

.card-title-lg {
    font-size: 22px;
    line-height: 28px;
    font-weight: 700;
}

.eyebrow {
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 0.75rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 32px;
    padding: 0.25rem 0.875rem;
    border-radius: var(--md-shape-full);
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-size: 14px;
    font-weight: 700;
}

.lead {
    color: var(--md-sys-color-on-surface-variant);
}

/* ---------- Buttons (M3: filled / tonal / text; full shape; 48px) ---------- */
.btn {
    text-transform: none;
    letter-spacing: 0;
    font-size: 14px;
    font-weight: 700;
    min-height: var(--md-target);
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: var(--md-shape-full) !important;
}

.navbar .btn-sm {
    min-height: 40px;
    padding: 0.5rem 1.25rem;
}

.btn-primary,
.btn-primary:disabled {
    background-color: var(--md-sys-color-primary) !important;
    border-color: var(--md-sys-color-primary) !important;
    color: var(--md-sys-color-on-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: #0a4aa2 !important;
    border-color: #0a4aa2 !important;
    color: var(--md-sys-color-on-primary) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.btn-tonal {
    background-color: var(--md-sys-color-secondary-container);
    border: 0;
    color: #2b3a5c;
}

.btn-tonal:hover,
.btn-tonal:focus {
    background-color: #a9bdf5;
    color: #1f2c49;
}

.btn-text {
    background: transparent;
    border: 0;
    color: var(--md-sys-color-primary);
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.btn-text:hover {
    background: rgba(12, 87, 190, 0.08);
    color: var(--md-sys-color-primary);
}

/* ---------- Header ---------- */
.topbar {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
    font-size: 14px;
}

.topbar a,
.topbar span {
    color: var(--md-sys-color-on-primary);
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
}

.topbar a:hover {
    color: var(--md-sys-color-on-primary);
    text-decoration: underline;
}

.navbar .logo {
    width: 150px;
    height: auto;
}

.navbar .nav-link,
.navbar .dropdown-item {
    min-height: var(--md-target);
    display: flex;
    align-items: center;
}

.navbar .dropdown-menu {
    min-width: 15rem;
    padding: 0.5rem 0;
    border-radius: var(--md-shape-large);
}

.navbar .dropdown-menu .dropdown-item {
    padding: 0.5rem 1.25rem;
    white-space: normal;
    line-height: 1.4;
}

.navbar [aria-current="page"] {
    color: var(--md-sys-color-primary) !important;
}

.header-login {
    font-weight: 700;
}

.navbar-hamburger .hamburger {
    width: var(--md-target);
    height: var(--md-target);
}

/* ---------- Sections & cards ---------- */
.section {
    padding-top: 56px;
    padding-bottom: 56px;
}

@media (min-width: 992px) {
    .section {
        padding-top: 96px;
        padding-bottom: 96px;
    }
}

.surface-low {
    background: var(--md-sys-color-surface-container-low);
}

.surface-brand {
    background: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.surface-brand h1, .surface-brand h2, .surface-brand p, .surface-brand a:not(.btn), .surface-brand li {
    color: var(--md-sys-color-on-primary);
}

.surface-brand .breadcrumb-item + .breadcrumb-item::before,
.surface-brand .breadcrumb-item.active {
    color: rgba(255, 255, 255, 0.9);
}

.m3-card {
    background: #fff;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-large);
    padding: 24px;
    height: 100%;
}

.m3-card h3 {
    font-size: 20px;
    line-height: 28px;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.m3-card .icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-size: 24px;
    margin-bottom: 1rem;
}

.m3-card .card-link {
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    min-height: var(--md-target);
}

.page-hero {
    padding-top: 48px;
    padding-bottom: 48px;
}

.page-hero .breadcrumb {
    margin-bottom: 1rem;
    justify-content: center;
}

.check-list {
    list-style: none;
    padding-left: 0;
}

.check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 0.75rem;
}

.check-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.3rem;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: var(--md-sys-color-primary) url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23fff' stroke-width='2' d='M4 8.5l2.5 2.5L12 5.5'/%3e%3c/svg%3e") center / 100% no-repeat;
}

.steps {
    counter-reset: step;
    list-style: none;
    padding-left: 0;
}

.steps li {
    counter-increment: step;
    position: relative;
    padding-left: 3.5rem;
    margin-bottom: 1.5rem;
}

.steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-strip img {
    max-height: 56px;
    width: auto;
    object-fit: contain;
}

.cta-band {
    border-radius: var(--md-shape-extra-large);
}

/* ---------- FAQ accordion (theme accordion + Bootstrap collapse) ---------- */
.faq .card {
    border-radius: var(--md-shape-large) !important;
    border: 1px solid var(--md-sys-color-outline-variant);
    box-shadow: none !important;
    margin-bottom: 0.75rem;
}

.faq .card-header h3 {
    margin: 0;
    font-size: inherit;
}

.faq .card-header button {
    min-height: var(--md-target);
    font-size: 16px;
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
    text-align: left;
}

.faq .card-header button:not(.collapsed) {
    color: var(--md-sys-color-primary);
}

.faq .card-body p:last-child {
    margin-bottom: 0;
}

/* ---------- Pricing ---------- */
.segmented {
    display: inline-flex;
    border: 1px solid var(--md-sys-color-outline);
    border-radius: var(--md-shape-full);
    overflow: hidden;
}

.segmented button {
    min-height: 40px;
    min-width: 120px;
    padding: 0.5rem 1.25rem;
    border: 0;
    background: transparent;
    color: var(--md-sys-color-on-surface);
    font-weight: 700;
    font-size: 14px;
}

.segmented button + button {
    border-left: 1px solid var(--md-sys-color-outline);
}

.segmented button[aria-pressed="true"] {
    background: var(--md-sys-color-secondary-container);
    color: #1f2c49;
}

.plan-card {
    background: #fff;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-large);
    padding: 28px 24px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.plan-card.is-recommended {
    border: 2px solid var(--md-sys-color-primary);
    border-radius: var(--md-shape-extra-large);
}

.plan-card .badge-recommended {
    align-self: flex-start;
    margin-bottom: 0.75rem;
}

.plan-price {
    font-size: 32px;
    line-height: 40px;
    font-weight: 800;
    color: var(--md-sys-color-on-surface);
}

.plan-price small {
    font-size: 14px;
    font-weight: 500;
    color: var(--md-sys-color-on-surface-variant);
}

.compare-table th,
.compare-table td {
    padding: 0.75rem;
    vertical-align: middle;
}

.compare-table thead th {
    position: sticky;
    top: 0;
    background: #fff;
}

.compare-table .yes {
    color: var(--md-sys-color-primary);
    font-weight: 800;
}

.compare-table .no {
    color: var(--md-sys-color-outline);
}

/* ---------- Forms (M3 outlined text fields, persistent labels) ---------- */
.m3-form label,
.form-label {
    display: block;
    font-weight: 700;
    font-size: 14px;
    color: var(--md-sys-color-on-surface);
    margin-bottom: 0.375rem;
}

.m3-form .form-control,
.m3-form .form-select {
    min-height: var(--md-target);
    border: 1px solid var(--md-sys-color-outline);
    border-radius: 8px;
    color: var(--md-sys-color-on-surface);
    background-color: #fff;
}

.m3-form .form-control:focus,
.m3-form .form-select:focus {
    border-color: var(--md-sys-color-primary);
    box-shadow: 0 0 0 1px var(--md-sys-color-primary);
}

.m3-form textarea.form-control {
    min-height: 140px;
    resize: vertical;
}

.form-hint,
.form-privacy-note {
    font-size: 14px;
    color: var(--md-sys-color-on-surface-variant);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--md-sys-color-error) !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 14px;
    color: var(--md-sys-color-error);
}

.hp-field {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert-form-feedback {
    border-radius: var(--md-shape-large);
}

.btn-spinner {
    width: 1rem;
    height: 1rem;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    display: inline-block;
    animation: cubevo-spin 0.75s linear infinite;
}

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

.map-placeholder {
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 1rem;
    background: var(--md-sys-color-surface-container);
    border-radius: var(--md-shape-large);
    text-align: center;
    padding: 24px;
}

.map-placeholder iframe {
    width: 100%;
    min-height: 360px;
    border: 0;
    border-radius: var(--md-shape-large);
}

/* ---------- Footer ---------- */
.site-footer {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a,
.site-footer address,
.site-footer p {
    color: rgba(255, 255, 255, 0.85);
}

.site-footer a:hover {
    color: #fff;
}

.footer-links li a,
.btn-link-footer {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
}

.btn-link-footer {
    background: none;
    border: 0;
    padding: 0;
    color: rgba(255, 255, 255, 0.85);
    font: inherit;
}

.btn-link-footer:hover {
    color: #fff;
    text-decoration: underline;
}

.site-footer .social a {
    width: var(--md-target);
    height: var(--md-target);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    margin: 0 0.25rem 0 0 !important;
    border-radius: 50%;
}

.site-footer .social a i {
    font-size: 1.25rem !important;
}

.site-footer .footer-legal {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 2rem;
    padding-top: 1.25rem;
    font-size: 14px;
}

/* ---------- WhatsApp FAB (M3 FAB, bottom-right, 16px margin) ---------- */
.whatsapp-fab {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 1030;
    min-width: 56px;
    height: 56px;
    padding: 0 14px;
    border-radius: 16px;
    background: var(--md-whatsapp);
    color: var(--md-on-whatsapp);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 700;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.whatsapp-fab:hover,
.whatsapp-fab:focus {
    color: var(--md-on-whatsapp);
    background: #3ee07b;
}

.whatsapp-fab-label {
    display: none;
}

@media (min-width: 992px) {
    .whatsapp-fab-label {
        display: inline;
    }
}

/* Theme "back to top" control is not used. */
.progress-wrap {
    display: none !important;
}

/* ---------- Cookie banner ---------- */
.cookie-banner {
    position: fixed;
    left: 16px;
    bottom: 16px;
    right: 16px;
    z-index: 1040;
    max-width: 560px;
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
    border-radius: var(--md-shape-extra-large);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.2);
}

.cookie-banner-inner {
    padding: 24px;
}

.cookie-banner p {
    color: var(--md-sys-color-on-surface);
}

/* ---------- Legal / article pages ---------- */
.prose {
    max-width: 760px;
    margin: 0 auto;
}

.prose h2 {
    font-size: 24px;
    line-height: 32px;
    margin-top: 2.5rem;
}

.prose h3 {
    font-size: 18px;
    line-height: 26px;
    margin-top: 1.5rem;
}

.prose p,
.prose li {
    font-size: 16px;
    line-height: 26px;
}

.prose img {
    border-radius: var(--md-shape-large);
}

.blog-card img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: var(--md-shape-large) var(--md-shape-large) 0 0;
}

.contact-social {
    width: var(--md-target);
    height: var(--md-target);
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--md-sys-color-secondary-container);
    color: #1f2c49 !important;
    margin-right: 0.5rem !important;
}

.contact-social i {
    font-size: 1.25rem !important;
}

dl dt {
    font-weight: 700;
    color: var(--md-sys-color-on-surface);
}

dl dd {
    margin-bottom: 1rem;
}

/* Contain visually-hidden table text inside the scroll container (prevents page-level horizontal overflow). */
.table-responsive {
    position: relative;
}

.navbar-brand a {
    display: inline-block;
    min-height: var(--md-target);
    padding: 3px 0;
}

@media (max-width: 991.98px) {
    .offcanvas-nav [aria-current="page"] {
        color: #afc6ff !important;
    }
}
