/* ISG Cybersecurity — CMMC Assessment Styles
   Brand colors from ISG WebsiteStyleSheet_Mountain.pdf
   -------------------------------------------------- */

/* ---- Brand Variables ---- */
:root {
    --isg-deep-navy:   #150E2C;   /* H1, body copy, quotes */
    --isg-dark-navy:   #021D49;   /* Dark backgrounds, header, buttons */
    --isg-medium-blue: #1E467E;   /* H2, footer nav, footer text */
    --isg-cyan:        #07D0E5;   /* H4, links, accent, progress */
    --isg-light-gray:  #EAEAEA;   /* Page background */
    --isg-white:       #FFFFFF;

    /* Override Bootstrap primary with ISG brand */
    --bs-primary:        #021D49;
    --bs-primary-rgb:    2, 29, 73;
    --bs-link-color:     #07D0E5;
    --bs-link-hover-color: #1E467E;
}

/* ---- Base ---- */
body {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    background-color: var(--isg-light-gray);
    color: var(--isg-deep-navy);
}

/* ---- Typography ---- */
h1, .h1 {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    color: var(--isg-deep-navy);
}

h2, .h2 {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    color: var(--isg-medium-blue);
}

h3, .h3 {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    color: var(--isg-white);
}

h4, .h4 {
    font-family: 'Roboto Slab', serif;
    font-weight: 300;
    color: var(--isg-cyan);
}

h5, .h5, h6, .h6 {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    color: var(--isg-medium-blue);
}

a {
    color: var(--isg-cyan);
    font-family: 'Roboto Slab', serif;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.05em;
}

a:hover {
    color: var(--isg-medium-blue);
    text-decoration: underline;
}

/* ---- Header ---- */
.isg-header {
    background: linear-gradient(135deg, #021D49 0%, #0d2d5e 40%, #1a4580 70%, #1E467E 100%) !important;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid var(--isg-cyan);
}

.isg-header h1,
.isg-header .h1,
.isg-header .h3 {
    color: var(--isg-white);
    font-family: 'Roboto Slab', serif;
}

.isg-header a {
    color: var(--isg-white);
    text-transform: none;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 1rem;
    letter-spacing: 0;
}

.isg-header a:hover {
    color: var(--isg-cyan);
    text-decoration: none;
}

.isg-header .badge {
    background-color: var(--isg-cyan) !important;
    color: var(--isg-dark-navy) !important;
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.isg-header .site-link {
    color: var(--isg-cyan);
    font-family: 'Roboto', sans-serif;
    font-size: 0.8rem;
    text-transform: none;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 0.9;
}

/* ---- Progress Bar ---- */
.progress {
    height: 25px;
    border-radius: 15px;
    background-color: rgba(21, 14, 44, 0.15);
}

.progress-bar {
    background-color: var(--isg-cyan);
    color: var(--isg-dark-navy);
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    font-size: 0.85rem;
}

/* ---- Cards ---- */
.card {
    border: none;
    border-radius: 10px;
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    background-color: var(--isg-white);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 29, 73, 0.15);
}

.card-title {
    font-family: 'Roboto Slab', serif;
    font-weight: 500;
    color: var(--isg-medium-blue);
}

/* Dark card variant */
.card-dark {
    background-color: var(--isg-dark-navy);
    color: var(--isg-white);
}

.card-dark .card-title {
    color: var(--isg-cyan);
}

/* ---- Buttons ---- */
.btn-primary {
    background-color: var(--isg-dark-navy);
    border-color: var(--isg-dark-navy);
    color: var(--isg-cyan);
    font-family: 'Roboto Slab', serif;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: var(--isg-medium-blue);
    border-color: var(--isg-medium-blue);
    color: var(--isg-white);
}

.btn-outline-primary {
    color: var(--isg-dark-navy);
    border-color: var(--isg-dark-navy);
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-outline-primary:hover {
    background-color: var(--isg-dark-navy);
    color: var(--isg-cyan);
}

.btn-outline-info {
    color: var(--isg-cyan);
    border-color: var(--isg-cyan);
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-outline-info:hover {
    background-color: var(--isg-cyan);
    color: var(--isg-dark-navy);
    border-color: var(--isg-cyan);
}

.btn-success {
    background-color: var(--isg-medium-blue);
    border-color: var(--isg-medium-blue);
    color: var(--isg-white);
    font-family: 'Roboto Slab', serif;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.btn-success:hover {
    background-color: var(--isg-deep-navy);
    border-color: var(--isg-deep-navy);
}

.btn-outline-secondary {
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--isg-medium-blue);
    border-color: var(--isg-medium-blue);
}

.btn-outline-secondary:hover {
    background-color: var(--isg-medium-blue);
    color: var(--isg-white);
}

/* ---- Form Controls ---- */
.form-check-input:checked {
    background-color: var(--isg-dark-navy);
    border-color: var(--isg-cyan);
}

.form-label {
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    color: var(--isg-deep-navy);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--isg-cyan);
    box-shadow: 0 0 0 0.2rem rgba(7, 208, 229, 0.25);
}

/* ---- Score Circle ---- */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background-color: var(--isg-medium-blue);
    color: var(--isg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 4px solid var(--isg-cyan);
}

.checkmark-circle {
    width: 80px;
    height: 80px;
    color: var(--isg-cyan);
    margin: 0 auto;
}

/* ---- Alerts ---- */
.alert-info {
    border-left: 4px solid var(--isg-cyan);
    background-color: rgba(7, 208, 229, 0.08);
    color: var(--isg-deep-navy);
}

.alert-warning {
    border-left: 4px solid #ffc107;
}

.alert-success {
    border-left: 4px solid var(--isg-medium-blue);
    background-color: rgba(30, 70, 126, 0.08);
    color: var(--isg-deep-navy);
}

.alert-danger {
    border-left: 4px solid #dc3545;
}

/* ---- Tables ---- */
.table thead th {
    background-color: var(--isg-dark-navy);
    color: var(--isg-cyan);
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.08em;
    border-color: var(--isg-medium-blue);
}

.table-light thead th {
    background-color: var(--isg-dark-navy);
    color: var(--isg-cyan);
}

.table-hover tbody tr:hover {
    background-color: rgba(7, 208, 229, 0.06);
}

/* ---- Badges ---- */
.badge.bg-info {
    background-color: var(--isg-cyan) !important;
    color: var(--isg-dark-navy) !important;
}

/* ---- Mountain Page Background ---- */
.mountain-page-bg {
    position: relative;
    min-height: calc(100vh - 200px);
}

.mountain-page-bg::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/cmmc/static/images/mountain-hiker-horizon.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.13;
    z-index: -1;
    pointer-events: none;
}

/* ---- Welcome Hero ---- */
.isg-hero {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    max-height: 340px;
    display: flex;
    align-items: flex-end;
}

.isg-hero img {
    width: 100%;
    object-fit: cover;
    max-height: 340px;
    display: block;
}

.isg-hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1.5rem 2rem;
    background: linear-gradient(to top, rgba(2, 29, 73, 0.92) 0%, transparent 100%);
    color: var(--isg-white);
}

.isg-hero-overlay h3 {
    font-size: 1.6rem;
    margin-bottom: 0.25rem;
    color: var(--isg-white);
}

.isg-hero-overlay p {
    color: var(--isg-cyan);
    margin-bottom: 0;
    font-size: 0.95rem;
    font-family: 'Roboto', sans-serif;
}

/* ---- Footer ---- */
footer.isg-footer {
    background-color: var(--isg-white);
    border-top: 2px solid var(--isg-cyan);
}

footer.isg-footer strong,
footer.isg-footer a {
    color: var(--isg-medium-blue);
    text-transform: uppercase;
    font-family: 'Roboto', sans-serif;
    font-weight: 400;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
}

footer.isg-footer a:hover {
    color: var(--isg-cyan);
    text-decoration: none;
}

footer.isg-footer .text-muted {
    color: var(--isg-medium-blue) !important;
    font-family: 'Roboto', sans-serif;
    font-size: 0.78rem;
}

/* ---- Slider Styles ---- */
.slider-container {
    padding: 10px 0;
}

.form-range.slider-rating {
    height: 8px;
    cursor: pointer;
}

.form-range.slider-rating::-webkit-slider-runnable-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #dc3545, #ffc107, #07D0E5);
}

.form-range.slider-rating::-moz-range-track {
    height: 8px;
    border-radius: 4px;
    background: linear-gradient(to right, #dc3545, #ffc107, #07D0E5);
}

.form-range.slider-rating::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--isg-dark-navy);
    border: 3px solid var(--isg-cyan);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    margin-top: -8px;
    cursor: grab;
}

.form-range.slider-rating::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--isg-dark-navy);
    border: 3px solid var(--isg-cyan);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    cursor: grab;
}

.form-range.slider-rating:active::-webkit-slider-thumb {
    cursor: grabbing;
    box-shadow: 0 2px 8px rgba(7, 208, 229, 0.4);
}

.form-range.slider-rating:active::-moz-range-thumb {
    cursor: grabbing;
    box-shadow: 0 2px 8px rgba(7, 208, 229, 0.4);
}

.slider-value-display {
    min-width: 40px;
    display: inline-block;
    color: var(--isg-cyan);
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
}

/* ---- Question text: deep navy, bold, fixed size ---- */
.card-body h4 {
    color: var(--isg-deep-navy);
    font-weight: 700;
    font-size: 1.5rem;
    line-height: 1.5;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }

    .score-circle {
        width: 120px;
        height: 120px;
    }

    .isg-hero {
        max-height: 220px;
    }

    .isg-hero img {
        max-height: 220px;
    }
}
