:root {
    /* Header and spacing variables */
    --headerSpace: 60px; /* space reserved at top for fixed header */
    --header-vertical: 14px; /* header vertical padding (top/bottom) */
    --header-vertical-scrolled: 10px; /* header vertical padding when scrolled */
    --header-horizontal: 40px; /* header horizontal padding (left/right) */
    --logo-height: 52px; /* default logo height (desktop slightly smaller) */
    --logo-height-scrolled: 40px; /* logo height when scrolled */

    --primary-color: #FFF;
    --dark-color: #005EAF; /* Dark blue */
    --very-dark-color: #063159; /* Very dark blue */
    --dark-color-lighter: #0071C8;
    --light-color: #D6EBFF; /* Sky blue */
    --very-light-color: #E9F4FF; /* Sky blue lighter */
    --grey-color: #718DA8;
    --light-grey-color: #e3e3e3;
    --green-color: rgb(29, 99, 29);
    --red-color: rgb(168, 32, 32);
    --paragraph-color: #063159;
    --border-color: #B9CDDF;
    --light-bg-gradient: linear-gradient(180deg, #FFFFFF 0%, #F4FBFF 100%); /* From white to light blue */
    --font: "Sofia Sans Condensed", sans-serif;
    --font-italic: "Sofia Sans Condensed Italic", sans-serif;
    --call-us-font-size: clamp(0.9375rem, 0.875rem + 0.2778vw, 1.125rem);
    --smaller-font: clamp(1rem, 0.9333rem + 0.2963vw, 1.2rem);
}


@media screen and (max-width:1399px) {
    :root {
        --headerSpace: 62px;
        --header-vertical: 14px;
        --header-horizontal: 32px;
        --logo-height: 48px;
        --logo-height-scrolled: 36px;
    }
}

/* Mobile: tidy and compact header */
@media screen and (max-width:767px) {
    :root {
        --headerSpace: 48px;
        --header-vertical: 12px;
        --header-vertical-scrolled: 8px;
        --header-horizontal: 16px;
        --logo-height: 22px;
        --logo-height-scrolled: 28px;
    }
}

// <weight > : Use a value from 1 to 1000
// <uniquifier > : Use a unique and descriptive class name

.sofia-sans-condensed-<uniquifier > {
    font-family: "Sofia Sans Condensed", sans-serif;
    font-optical-sizing: auto;
    font-weight: <weight>;
    font-style: normal;
}

body {
    font-size: 14px;
    line-height: 20px;
    font-family: var(--font);
    font-weight: 400;
    background-color: #FFFFFF;
    color: var(--primary-color);
    /* keep content aligned with header paddings */
    padding-top: var(--headerSpace);
    padding-left: var(--header-horizontal);
    padding-right: var(--header-horizontal);
    margin: 0;
    background: var(--light-bg-gradient);
    min-height: 100vh;
}

/* Fixed Header Styles */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--dark-color);
    z-index: 1000;
    padding: var(--header-vertical) var(--header-horizontal);
    transition: padding 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.fixed-header.scrolled {
    padding: var(--header-vertical-scrolled) var(--header-horizontal);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
}

/* Site container centers page content and keeps a tidy max width */
.site-container {
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

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

.header-nav .nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    opacity: 0.95;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background-color 0.18s ease, transform 0.18s ease, opacity 0.18s ease;
}

.header-nav .nav-link:hover {
    background-color: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}

/* Site title in header - right side, responsive like logo */
.header-title {
    color: var(--primary-color);
    font-family: var(--font);
    font-weight: 700;
    font-size: clamp(1rem, 0.8rem + 1vw, 1.5rem);
    letter-spacing: 0.03em;
    white-space: nowrap;
    margin-left: auto;
}

/* Main content area: a clean, centered card-like container */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    color: var(--very-dark-color);
    border-radius: 10px;
    padding: 2rem 0;
    display: flex;
    flex-direction: column;
}

@media screen and (max-width: 768px) {
    .main-content {
        padding: 1rem 0;
    }
}

.container.mt-4 {
    display: flex;
    flex-direction: column;
    max-width: 100%;
}

.card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Minimal typographic scale for clean appearance */
.main-content p {
    color: rgba(6,49,89,0.9);
    line-height: 1.6;
}

/* Utility: small centered container for narrow content */
.container--narrow {
    max-width: 760px;
    margin: 0 auto;
}

/* Tidy error UI */
.blazor-error-boundary {
    background: transparent;
    padding: 0;
    color: var(--primary-color);
}

.header-logo {
    display: flex;
    align-items: center;
}

.logo-img {
    height: 30px;
    width: 100%;
    transition: height 0.25s ease, transform 0.25s ease;
    display: block;
}

@media screen and (max-width: 768px) {
    .logo-img {
        height: 20px;
    }
}

.fixed-header.scrolled .logo-img {
    height: var(--logo-height-scrolled);
}

/* Ensure header contents align nicely on very small screens */
@media screen and (max-width:480px) {
    .fixed-header {
        padding: var(--header-vertical) 12px;
    }
    body {
        padding-left: 12px;
        padding-right: 12px;
    }
}

h1, h2, h3, h4 {
    font-weight: 700;
    margin: 0;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

h1 {
    font-size: clamp(2rem, 1.2667rem + 3.2593vw, 3.0rem);
    line-height: 1.5em;
    margin:0;
}

h2 {
    line-height: 1.2em;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

h3 {
    font-size: clamp(1.35rem, 1.0667rem + 0.8148vw, 1.8rem);
    line-height: 1.25em;
}

* {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PS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LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* paremeters overall */
.parameters {
    display: flex;
    flex-direction: column;
    max-width: 400px;
}

/* Responsive layout wrapper using flexbox */
.content-wrapper {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Input section - left side with responsive sizing */
.input-section {
    flex: 1 1 calc(50% - 1rem);
    max-width: 100%;
}

/* Results section - right side with responsive sizing */
.results-section {
flex: 1 1 calc(50% - 1rem);
    max-width: 100%;
    border-radius: 15px;
    box-shadow: 0px 2px 3px 3px #005eaf0d;
    overflow: hidden;
    transform: translateZ(0);
    isolation: isolate;
    padding: 1rem;
    border: 1px solid #e0e0e0;
}

/* Card - natural responsive sizing */
.card {
    width: 100%;
}

/* Card header - allow content to wrap naturally */
.card-header {
    display: block;
}

/* Card header with image side by side */
.card-header-inner {
    display: flex;
    align-items: center;
    gap: 1rem;
}

    .card-header-inner h2 {
        flex: 1;
        margin: 0;
        font-size: 38px;
        line-height: 1em;
    }

@media screen and (max-width:768px) {
    .card-header-inner h2 {
        flex: 1;
        margin: 0;
        font-size: 22px;
    }
}

.card-header-img {
    width: 80px;
    height: auto;
    flex-shrink: 0;
    display: block;
}

/* Mobile: stack sections vertically */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
        gap: 1.5rem;
    }

    .input-section, .results-section {
        display: flex;
        width: 100%;
    }
}
@media (max-width: 512px) {
    option {
        font-size: 12px;
    }
}

/* Clean form control styles - input and select */
.form-control,
.form-select {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--dark-color);
    outline: none;
    box-shadow: none;
}

.form-control,
.form-select {
    box-shadow: none;
}

.parameter {
    flex-direction: column;
    display: flex;
}

input#angle {
    max-width: 80px;
}

.measures input {margin-right: 5px;}

.modal-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
    padding-top: 2rem;
}

/* Modal close icon - top right corner */
.modal-close-btn {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 10;
    line-height: 0;
}

    .modal-close-btn img {
        width: 42px;
        height: 42px;
        display: block;
        opacity: 0.6;
        transition: opacity 0.15s ease;
    }

.modal-close-btn:hover img {
    opacity: 1;
}

/* Result rows */
.result-row {
    display: flex;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #ffffff1c;
    justify-content: center;
}

.result-row:last-child {
    border-bottom: none;
}

.result-direction {
    font-weight: 400;
    color: var(--primary-color);
    min-width: 110px;
    text-align: right;
    font-size: 16px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.icon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 7px;
    border-radius: 4px;
    width: 14px;
    height: 14px;
}

.result-direction-icon {
    width: 1em;
    height: 1em;
    vertical-align: middle;
    
}

.results-section h2 {
    text-align: center;
}

.results-section .card-body {
    gap: 0;
}

.result-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-color);
    flex: 1;
    width: 100%;
    max-width: 100px;
    background-color: var(--primary-color);
    text-align: center;
    padding: 6px;
    border-radius: 4px;
}

.result-label {
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Angle icon in input group */
.angle-input-icon {
    background: var(--very-light-color);
    border: 1px solid var(--border-color);
    border-right: none;
    color: var(--dark-color);
    padding: 0.4rem 0.6rem;
    display: flex;
    align-items: center;
}

/* Apple icon inside button */

    .apple-icon {
        width: 1.1em;
        height: 1.1em;
        vertical-align: middle;
        margin-left: 0.3em;
        filter: invert(1);
        top: -0.14rem;
        position: relative;
    }


/* Input validation warning */
.input-warning {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.75rem;
    border-left: 3px solid var(--red-color);
    color: var(--red-color);
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

/* Standard button style */
.btn {
font-size: 16px;
    line-height: 1.25em;
    color: var(--primary-color);
    background: var(--dark-color);
    padding: 0.45rem 0.75rem;
    /* margin: 6px 8px 2px 0; */
    display: inline-block;
    border-radius: 3px;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--dark-color-lighter);
    color: var(--primary-color);
}

.btn-outline-secondary {
    /*    background: transparent;
    color: var(--dark-color);*/
    border: 1px solid var(--border-color);
}

.btn-outline-secondary:hover {
    cursor: pointer;
}

.btn-success {
    background: var(--green-color);
}

.btn-success:hover {
    background: rgb(22, 78, 22);
}

/* Modal fade animation */
@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes modalFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; }
}

.modal-animate-in {
    animation: modalFadeIn 0.3s ease forwards;
}

.modal-animate-out {
    animation: modalFadeOut 0.3s ease forwards;
}

/* Angle gauge */
.angle-gauge {
    width: 100%;
    max-width: 280px;
    max-height: 280px;
    display: flex;
    justify-content: flex-start;
    flex-direction: column;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.gauge-needle {
    stroke: var(--dark-color);
    stroke-width: 3;
    stroke-linecap: round;
    transform-origin: 0px 0px;
    transition: transform 80ms linear;
}

.gauge-label {
    font-size: 6px;
    fill: var(--grey-color);
    font-family: var(--font);
}

.angle-readout {
    text-align: center;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--very-dark-color);
    margin: 0.25rem 0 0.5rem;
}


.modal.fade.show.d-block {
    position: fixed;
    display: flex;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: white;
    z-index: 2;
}

.modal-dialog {
    background-color: white;
    padding-top: var(--headerSpace);
    width: 100%;
    height: 100%;
}

.modal-content {
    position: relative;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-content {
    padding: 1rem;
}

img.card-header-img {
    width: 250px;
}

@media screen and (max-width: 768px) {
img.card-header-img {
    width: 120px;
    }
}   

label.form-label {
    font-size: 15px;
    font-weight: 600;
}

.results-section {
    display: flex;
    flex-direction: column;
    background-color: var(--dark-color);
    color: #ffffff;
}

.forward img, .backwards img {
    width: .8em;
    height: .9em;
}

.icon.backwards img {
    transform: rotate(180deg);
}

.Promotion {
    font-size: 16px;
}

    .Promotion a {
        color: var(--dark-color);
    }

    .Promotion a:hover {
        cursor: pointer;
    }