:root {
    --OGLblue: #00417a;
    --OGLgray: #DDD;
    --OGLgraydark: #898e9d;

    --H1color: #000;
    --H2color: #000;
    --H3color: #00417a;
    --H4color: #00417a;
    --Pcolor: #333;
    --LIcolor: #000;
    --Acolor: #00417a;

    --NAVItxt: #000;
    --NAVItxthover: #00417a;
    --NAVInexthover: #002c54;
    --NAVItxtselected: #00417a;

    --SubNAVItxt: #FFF;
    --SubNAVItxthover: #FFF;
    --SubNAVItxtselected: #FFF;
    --SubNAVIbck: #00417a;
    --SubNAVIbckhover: #000;
    --SubNAVIbckselected: #000;
    --SubNAVIwidth: 200px;

    --FTRtitle: #FFF;
    --FTRtxt: #FFF;
    --FTRa: #FFF;
    --FTRahover: #FFF;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "EB Garamond", Times, "serif";
    font-size: 1.2em;
    height: 100vh;
    overflow-x: hidden;
    font-weight: 300;
}

h3 {
    color: var(--H3color);
    font-size: 1.8em;
    font-weight: normal;
    line-height: 1.1;
    margin-bottom: 26pt;
}

button {
    font-family: "EB Garamond", Times, "serif";
    box-shadow: none;
    font-size: 1.1em;
    width: max-content;
    border-radius: 5px;
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #2c3e50;
    padding: 15px;
    z-index: 1000;
    align-items: center;
}

.mobile-header .hamburger-btn {
    color: white;
    font-size: 1.5em;
    background: none;
    border: none;
    cursor: pointer;
    margin-right: 15px;
}

.sidebar-title {
    color: white;
    font-size: 1.2em;
}

/* Sidebar */
#sidebar {
    width: 300px;
    background-color: #f5f5f5;
    border-right: 1px solid #ddd;
    transition: transform 0.3s ease;
    position: fixed;
    top: 0;
    bottom: 0;
    z-index: 1000;
    overflow-y: auto;
}

#sidebar.active {
    transform: translateX(300px);
}

.sidebar-content {
    padding: 20px;
    padding-top: 60px;
    height: auto;
}

.mobile-header {
    z-index: 1001;
}

.desktop-header {
    z-index: 1001;
}

/* Main Content */
#main-content {
    margin-left: 0;
    padding: 20px;
    min-height: 100vh;
    background: white;
}

/* Questions Container */
.questions-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 0;
    scroll-behavior: smooth;
    scroll-snap-type: y mandatory;
}

/* Question Styles */
.question-palette {
    width: 70%;
    margin: 35% auto;
    /* Center horizontally */
    padding: 3rem 1.25rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0.3;
    transform: scale(0.95);
    height: auto;
    min-height: 350px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    scroll-snap-align: center;
}

.question-palette.active {
    opacity: 1;
    transform: scale(1);
    margin: 35% auto;
    /* Keep centered when active */
    height: auto;
    /* Maintain content-based height */
}

/* Navigation Buttons */
.nav-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    justify-content: space-between;
    margin-top: 25px;
}

button {
    flex-direction: column;
    padding: 10px 20px;
    display: flex;
    width: stretch;
    width: -webkit-fill-available;
    text-align: center;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    background-color: #3498db;
    color: white;
    transition: background-color 0.2s;
}

button:hover {
    background-color: #2980b9;
}

/* Desktop Styles */
@media (min-width: 769px) {
    body {
        display: flex;
    }

    #sidebar {
        left: 0 !important;
        transform: none !important;
    }

    #main-content {
        margin-left: 300px;
        width: 100%;
    }

    .mobile-header {
        display: none !important;
    }

    .desktop-header {
        display: block;
        padding: 20px 20px 0 20px;
    }

    .sidebar-content {
        padding-top: 20px;
    }

    .sidebar-title {
        color: black;
    }
}

/* Mobile Styles */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .desktop-header {
        display: none !important;
    }

    #main-content {
        padding-top: 70px;
    }

    .question-palette {
        width: 90%;
        /* More width on mobile */
        margin: 20px auto;
        padding: 3rem 1.25rem;
    }

    .question-palette.active {
        margin: 20px auto;
        padding: 3rem 1.25rem;
    }

    #sidebar {
        left: -300px;
        margin-top: 25px;
    }

    #sidebar.active {
        transform: translateX(300px);
    }
}

/* Section Styles */
.section-title {
    font-weight: bold;
    margin: 15px 0 10px 0;
    color: #2c3e50;
}

.subsection-item {
    padding: 8px 15px;
    cursor: pointer;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.subsection-item.active {
    background-color: #3498db20;
    border-left-color: var(--OGLblue);
}

.subsection-item:hover {
    background-color: #e8e8e8;
    border-left-color: var(--OGLblue);
}

input,
textarea,
select {
    font-family: "EB Garamond", Times, "serif";
    color: var(--OGLblue);
    font-size: 14pt;
    background-color: #EEE;
    padding: 10px;
    width: 100%;
    box-sizing: border-box;
    display: inline-block;
    border: solid 1px #DDD;
    margin: 0 0 10px 0;
    font-weight: 100;
}

textarea {
    resize: vertical;
}

small {
    display: block;
    margin-top: 5px;
    margin-bottom: 10px;
    color: #666;
    font-size: 0.9em;
}

.valid {
    border-color: #2ecc71 !important;
    box-shadow: 0 0 5px #2ecc7755;
}

.invalid {
    border-color: #e74c3c !important;
    box-shadow: 0 0 5px #e74c3c55;
}

.sidebar-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-left: auto;
}

.valid .sidebar-status {
    background: #2ecc71;
}

.invalid .sidebar-status {
    background: #e74c3c;
}

.btn-save {
    background-color: #95a5a6 !important;
}

.btn-save:hover {
    background-color: #7f8c8d !important;
}

.btn-submit {
    background-color: var(--NAVItxt) !important;
}

.btn-submit:hover {
    background-color: var(--NAVItxthover) !important;
}

.btn-next {
    background-color: var(--SubNAVIbck) !important;
}

.btn-next:hover {
    background-color: var(--NAVInexthover) !important;
}

#form-summary {
    min-height: 500px;
    background: #f8f9fa;
}

.summary-section {
    text-align: center;
    padding: 30px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.summary-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2c3e50;
}

.summary-label {
    color: #7f8c8d;
    margin-top: 10px;
}

#final-submit {
    background: #2ecc71;
    padding: 15px 40px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

#submit-without-validation {
    background: var(--NAVItxthover);
    padding: 15px 40px;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

#final-submit:disabled, #submit-without-validation:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    opacity: 0.7;
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
}

input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

.btn-add-sidebar {
    width: 100%;
    margin: 10px 0;
    padding: 8px;
    background: var(--OGLblue) !important;
}

.section-inc-nav .subsection-item {
    padding-left: 25px;
    font-size: 1.1em;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}


.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.0);
    z-index: 1000;
}

.popup-content {
    position: relative;
    background: white;
    max-width: 400px;
    margin: 8% auto auto 47%;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    animation: slideIn 0.3s ease-out;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .popup-content {
        margin: 15% auto;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.close {
    position: absolute;
    right: 15px;
    top: 10px;
    font-size: 24px;
    cursor: pointer;
}

.hidden-palette {
    display: none;
}

.address-grid {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.grid-row {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.grid-col {
    flex: 1;
    min-width: 150px;
}

.dual-input {
    display: grid;
    grid-template-columns: 1fr 100px;
    gap: 10px;
}

.dual-input input[type="number"] {
    text-align: center;
}

.form-row {
    margin-bottom: 1.5rem;
    align-items: end;
}

.flex-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}
.dual-input,
.triple-input {
    display: grid;
    gap: 1rem;
}

.dual-input {
    grid-template-columns: repeat(2, 1fr);
}

.triple-input {
    grid-template-columns: repeat(3, 1fr);
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (max-width: 768px) {

    .dual-input,
    .triple-input {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .grid-row {
        flex-wrap: wrap;
    }

    .grid-col {
        flex: 0 0 100%;
    }
}

#confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
}

.quad-input {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.conditional {
    display: none;
}

.conditional.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.info-message {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
}

.required-asterisk {
    color: #e74c3c;
    margin-left: 3px;
    font-size: 1.2em;
    vertical-align: super;
}

.file-upload-section {
    margin: 15px 0;
    border: 2px dashed #ddd;
    padding: 20px;
    border-radius: 8px;
}

.file-upload-label {
    display: block;
    cursor: pointer;
}

.file-input {
    display: none;
}

.upload-button {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 8px 15px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.upload-button:hover {
    background: #2980b9;
}

.upload-hint {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin: 5px 0;
}

.file-name {
    flex-grow: 1;
    margin: 0 10px;
}

.file-size {
    color: #666;
    font-size: 0.9em;
}

.remove-file {
    color: #e74c3c;
    cursor: pointer;
    margin-left: 10px;
}

.flex-grid.conditional-container {
    gap: 0em;
}

h4 {
    color: var(--H3color);
}

.back-button {
    display: inline-block;
    background-color: white;
    color: var(--OGLblue);
    padding: 10px 20px;
    border: 2px solid var(--OGLblue);
    border-radius: 5px;
    text-decoration: none;
    font-size: 16px;
    text-align: center;
    width: 50%;
    text-align: center;
    margin-bottom: 25px;
}