
@font-face {
    font-family: 'OpenSans';
    src: url('fonts/OpenSans.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    font-family: "OpenSans";
    margin: 0;
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
    width: 100%;
}

/* Top Menu */
.topMenu {
    display: flex;
    justify-content: center;
    align-items: center;       
    height: 80px;  
    width: 100%;
    background: #E4F1E7;
    margin: 0;
    padding: 0 20px;
}

.logo {
    height: 80px;
    max-width: 100%;
}

/* Main Content */
.main {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
    margin-bottom: 10%;
}

h1 {
    color: #AF843A;
    text-align: center;
   
    margin-bottom: 1rem;
}

h2, h3 {
    color: #333;
    
    margin-bottom: 0.8rem;
}

.fragebogenHeader {
    padding: 1em 0;
}

.fragebogenDesc {
    padding: 1em;
}

p {
    font-family: "OpenSans";
    color: #333;
    line-height: 1.5;
    font-size: 16px;
}

label {
    color: #333;
}

ul
{
    list-style: square;
    color: #333;
}

li::marker
{
    color: #AF843A;
}

li
{
    padding-bottom: 10px;
}

/* Question Styles */
.questionWrapper {
    width: 100%;
    background: #eee;
    padding: 1em;
    border-bottom: 1px solid white;
    display: flex;
    flex-direction: row;
}

.categoryWrapper
{
    width: 100%;
    padding: 1em;
    margin-top: 1em;
}

.categoryWrapper h3
{
    margin: 0;
}

.categoryWrapper h3
{
    font-weight: 600;
    color: #AF843A;
}

.questionWrapper p {
    width: 100%;
    font-size: 16px;
}

.questionInput {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
}

.questionInput label {
    padding-right: 1em;
    margin-bottom: 0.5em;
    display: flex;
    align-items: center;
    margin-right: 10px;
}

/* Radio & Checkbox Custom Styling */
@supports(-webkit-appearance: none) or (-moz-appearance: none) {
    input[type='checkbox'],
    input[type='radio'] {
      --active: #AF843A;
      --active-inner: #fff;
      --focus: 2px #AF843A;
      --border: #BBC1E1;
      --border-hover: #af843a81;
      --background: #fff;
      --disabled: #F6F8FF;
      --disabled-inner: #E1E6F9;
      -webkit-appearance: none;
      -moz-appearance: none;
      height: 21px;
      outline: none;
      display: inline-block;
      vertical-align: top;
      position: relative;
      margin: 0;
      cursor: pointer;
      border: 1px solid var(--bc, var(--border));
      background: var(--b, var(--background));
      transition: background .3s, border-color .3s, box-shadow .2s;
    }
    
    input[type='checkbox']:after,
    input[type='radio']:after {
      content: '';
      display: block;
      left: 0;
      top: 0;
      position: absolute;
      transition: transform var(--d-t, .3s) var(--d-t-e, ease), opacity var(--d-o, .2s);
    }
    
    input[type='checkbox']:checked,
    input[type='radio']:checked {
      --b: var(--active);
      --bc: var(--active);
      --d-o: .3s;
      --d-t: .6s;
      --d-t-e: cubic-bezier(.2, .85, .32, 1.2);
    }
    
    input[type='checkbox']:disabled,
    input[type='radio']:disabled {
      --b: var(--disabled);
      cursor: not-allowed;
      opacity: .9;
    }
    
    input[type='checkbox']:disabled:checked,
    input[type='radio']:disabled:checked {
      --b: var(--disabled-inner);
      --bc: var(--border);
    }
    
    input[type='checkbox']:disabled + label,
    input[type='radio']:disabled + label {
      cursor: not-allowed;
    }
    
    input[type='checkbox']:hover:not(:checked):not(:disabled),
    input[type='radio']:hover:not(:checked):not(:disabled) {
      --bc: var(--border-hover);
    }
    
    input[type='checkbox']:focus,
    input[type='radio']:focus {
      box-shadow: 0 0 0 var(--focus);
    }
    
    input[type='checkbox']:not(.switch),
    input[type='radio']:not(.switch) {
      width: 21px;
    }
    
    input[type='checkbox']:not(.switch):after,
    input[type='radio']:not(.switch):after {
      opacity: var(--o, 0);
    }
    
    input[type='checkbox']:not(.switch):checked,
    input[type='radio']:not(.switch):checked {
      --o: 1;
    }
    
    input[type='checkbox'] + label,
    input[type='radio'] + label {
      font-size: 14px;
      line-height: 21px;
      display: inline-block;
      vertical-align: top;
      cursor: pointer;
      margin-left: 4px;
    }
    
    input[type='checkbox']:not(.switch) {
      border-radius: 7px;
    }
    
    input[type='checkbox']:not(.switch):after {
      width: 5px;
      height: 9px;
      border: 2px solid var(--active-inner);
      border-top: 0;
      border-left: 0;
      left: 7px;
      top: 4px;
      transform: rotate(var(--r, 20deg));
    }
    
    input[type='checkbox']:not(.switch):checked {
      --r: 43deg;
    }
    
    input[type='checkbox'].switch {
      width: 38px;
      border-radius: 11px;
    }
    
    input[type='checkbox'].switch:after {
      left: 2px;
      top: 2px;
      border-radius: 50%;
      width: 15px;
      height: 15px;
      background: var(--ab, var(--border));
      transform: translateX(var(--x, 0));
    }
    
    input[type='checkbox'].switch:checked {
      --ab: var(--active-inner);
      --x: 17px;
    }
    
    input[type='checkbox'].switch:disabled:not(:checked):after {
      opacity: .6;
    }
    
    input[type='radio'] {
      border-radius: 50%;
    }
    
    input[type='radio']:after {
      width: 19px;
      height: 19px;
      border-radius: 50%;
      background: var(--active-inner);
      opacity: 0;
      transform: scale(var(--s, .7));
      position: absolute;
      top: 0;
      left: 0;
    }
    
    input[type='radio']:checked:after {
      opacity: 1;
      transform: scale(0.5);
    }
}

/* Button Styles */
.fragebogenButton {
    display: block;
    margin: 0 auto;
    margin-top: 1em;
    color: #AF843A;
    font-size: 18px;
    font-weight: 500;
    padding: .3em 1em;
    line-height: 1.7em !important;
    background-color: transparent;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    border: 2px solid;
    border-radius: 3px;
    -webkit-transition-duration: .2s;
    transition-duration: .2s;
    -webkit-transition-property: all !important;
    transition-property: all !important;
    cursor: pointer;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    padding: 10px;
    z-index: 1000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border-top: 1px solid #e0e0e0;
}

.progress-left {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
}

.progress-bar-wrapper {
    flex: 1;
    margin: 0 10px;
    min-width: 100px;
}

.progress-bar {
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.progress {
    height: 100%;
    background-color: #AF843A;
    width: 0%;
    border-radius: 5px;
    transition: width 0.5s ease, background-color 0.5s ease;
}

.progress-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin-top: 5px;
}

.progress-text {
    font-size: 14px;
    font-weight: bold;
    color: #444;
    white-space: nowrap;
}

.questions-count {
    font-size: 12px;
    color: #666;
    margin-left: 10px;
    margin-right: 10px;
    white-space: nowrap;
}

.submit-container {
    margin-left: 10px;
}

/* Submit Button in Sticky Footer */
.sticky-submit {
    display: block;
    color: #AF843A;
    font-size: 16px;
    font-weight: 500;
    padding: .3em 1em;
    line-height: 1.7em !important;
    background-color: transparent;
    background-size: cover;
    background-position: 50%;
    background-repeat: no-repeat;
    border: 2px solid;
    border-radius: 3px;
    -webkit-transition-duration: .2s;
    transition-duration: .2s;
    -webkit-transition-property: all !important;
    transition-property: all !important;
    cursor: pointer;
}

.sticky-submit[disabled] {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Question States */
.questionWrapper.answered {
    border-left: 3px solid #4caf50;
    background-color: #f8fff8;
}

.questionWrapper.unanswered {
    border-left: 3px solid #ff6b6b;
    background-color: #fff8f8;
    animation: pulse 1.5s infinite;
}

/* Scroll-to-Top Button */
#scrollToTop {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

#scrollToTop.visible {
    opacity: 1;
    visibility: visible;
}

#scrollToTop:hover {
    background-color: rgba(0, 0, 0, 0.7);
    transform: translateY(-3px);
}

/* Results Styles */
#resultsWrapper {
    display: none;
    margin-top: 2em;
}

.resultWrapper {
    width: 100%;
    background: #eee;
    padding: 1em;
    border-bottom: 1px solid white;
}

.resultWrapper p
{
    font-size: 14px;
}

.emailInputWrapper {
    width: 100%;
    padding: 1em;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 1em;
    border: 1px solid #AF843A;
}

.form-columns
{
    width: 50%;
}

.inputGroup
{
    width: 100%;
    display: flex;
    align-items: center;
    padding-bottom: 20px;
}

.inputGroup label
{
    min-width: 150px;
    width: 120px;
    text-align: left;
}

.inputGroup button
{
    margin-left: 120px;
}

.inputRow
{
    display: flex;
    gap: 30px;
    margin-bottom: 20px;
}

.inputText {
    background-color: #E4F1E7;
    color: #AF843A;
    padding: 12px;
    font-size: 14px;
    border: 0;
    width: 100%;
    max-width: 300px;
}

.inputText:focus-visible {
    outline: 0;
}

#emailError
{
    color: #333;
}

.conversionText
{
    text-align: center;
    margin-top: 2em;
}

/* Success Animation */
.success-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
    perspective: 1000px;
}

.success-animation.show {
    opacity: 1;
    pointer-events: auto;
    cursor: pointer;
}

.success-card {
    background: linear-gradient(135deg, #43c6ac, #40a9ff);
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
    max-width: 320px;
    width: 90%;
    color: white;
    text-align: center;
    transform: rotateX(-20deg) scale(0.8);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-animation.show .success-card {
    transform: rotateX(0) scale(1);
    opacity: 1;
}

.success-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    margin: 0 auto 20px;
    position: relative;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
}

.success-icon:before {
    content: '';
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: white;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.success-animation.show .success-icon:before {
    animation: pulse 1s ease forwards;
}

.checkmark-path {
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    stroke: #43c6ac;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transform: scale(0);
    opacity: 0;
}

.success-animation.show .checkmark-path {
    animation: dash 0.8s ease-in-out 0.3s forwards, scale 0.5s ease-in-out 0.3s forwards;
}

.success-title {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 10px;
    transform: translateY(20px);
    opacity: 0;
}

.success-animation.show .success-title {
    animation: slideUp 0.6s ease-out 0.7s forwards;
}

.success-message {
    font-size: 16px;
    opacity: 0;
    transform: translateY(20px);
    line-height: 1.5;
}

.success-animation.show .success-message {
    animation: slideUp 0.6s ease-out 0.9s forwards;
}

.success-continue {
    margin-top: 20px;
    background-color: rgba(255, 255, 255, 0.25);
    border: none;
    color: white;
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    opacity: 0;
    transform: translateY(20px);
    font-size: 16px;
}

.success-animation.show .success-continue {
    animation: slideUp 0.6s ease-out 1.1s forwards;
}

.success-continue:hover {
    background-color: rgba(255, 255, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 7px 15px rgba(0, 0, 0, 0.1);
}

/* Animation Keyframes */
@keyframes pulse {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    60% {
        width: 120%;
        height: 120%;
        opacity: 1;
    }
    100% {
        width: 100%;
        height: 100%;
        opacity: 1;
    }
}

@keyframes dash {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes scale {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes slideUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: white;
    border-radius: 50%;
    opacity: 0;
}

.success-animation.show .particle {
    animation: particleFade 1.5s ease forwards;
}


/* Tab Navigation Styles */
.tab-container {
    margin-bottom: 2rem;
    margin-top: 2rem;
    border-radius: 10px;
    overflow: hidden;
    background: white;
}

.tab-navigation {
    display: flex;
    border-bottom: 3px solid #AF843A;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.tab-navigation::-webkit-scrollbar {
    display: none;
}

.tab-button {
    flex: 1;
    min-width: 150px;
    padding: 15px 20px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}

.tab-button:hover {
    background: rgba(175, 132, 58, 0.1);
    color: #AF843A;
}

.tab-button.active {
    background: #AF843A;
    color: white;
    box-shadow: 0 4px 15px rgba(175, 132, 58, 0.3);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 3px;
    background: white;
    border-radius: 2px;
}

/* Tab Content */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease-in-out;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer {
    background-color: #E4F1E7;
    padding: 20px 0;
    text-align: center;
    font-size: 14px;
    color: #333;
    position: relative;
    bottom: 0;
    width: 100%;
}

.footerContent a {
    color: #333;
    text-decoration: none;
    margin: 0 10px;
    transition: color 0.3s ease;
    font-size: 16px;
}


/* Responsive Media Queries */
@media screen and (max-width: 768px) {
    .main {
        width: 95%;
        padding: 0.5rem;
    }
    
    .topMenu {
        height: 60px;
    }
    
    .logo {
        height: 50px;
    }
    
    .fragebogenButton,
    .sticky-submit {
        font-size: 16px;
        padding: .2em .8em;
    }
    
    .progress-container {
        flex-direction: column;
        padding: 10px;
    }
    
    .progress-left {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .progress-right {
        width: 100%;
        justify-content: space-between;
    }
    
    .submit-container {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    
    #scrollToTop {
        bottom: 100px;
        right: 10px;
        width: 35px;
        height: 35px;
    }
    
    .emailInputWrapper {
        flex-direction: column;
        align-items: flex-start;
    }

    .inputGroup
    {
        flex-direction: column;
        align-items: stretch;
    }

    .inputGroup label
    {
        width: auto;
        min-width: auto;
        text-align: left;
        margin-bottom: 5px;
    }

    .inputGroup input
    {
        max-width: none;
    }

    .inputGroup textarea
    {
        max-width: none;
    }

    .inputGroup button
    {
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
    }
    
    .success-card {
        padding: 20px;
        max-width: 280px;
    }
    
    .success-icon {
        width: 60px;
        height: 60px;
    }
    
    .success-title {
        font-size: 20px;
    }
    
    .success-message {
        font-size: 14px;
    }
    
    /* Improve question display */
    .questionWrapper {
        padding: 15px 12px;
        flex-direction: column;
    }
    
    .questionWrapper p {
        font-size: 15px;
        line-height: 1.5;
        margin-bottom: 12px;
    }
    
    .questionInput {
        display: flex;
        justify-content: flex-start;
    }
    
    .questionInput input[type='radio'] {
        margin-right: 5px;
    }
    
    .questionInput label {
        margin-right: 15px;
    }


}

@media screen and (max-width: 480px) {
    
    .questionWrapper {
        padding: 15px 10px;
    }
    
    .questionWrapper p {
        font-size: 14px;
        line-height: 1.4;
    }
    
    .questionInput {
        display: flex;
        justify-content: flex-start;
        margin-top: 5px;
    }
    
    /* Reset radio button position and size for mobile */
    .questionInput input[type='radio'] {
        width: 20px;
        height: 20px;
        position: relative;
    }
    
    /* Style the radio button dot for mobile */
    .questionInput input[type='radio']:checked:after {
        opacity: 1;
        transform: scale(0.5);
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        margin: auto;
        width: 20px;
        height: 20px;
    }
    
    .questionInput label {
        padding-right: 0.5em;
        margin-right: 15px;
        font-size: 14px;
    }
    
    .fragebogenButton,
    .sticky-submit {
        font-size: 14px;
        width: 100%;
    }
    
    .inputText {
        padding: 10px;
        font-size: 13px;
    }
    
    .progress-text {
        font-size: 12px;
    }
    
    .questions-count {
        font-size: 10px;
    }
    
    .success-card {
        padding: 15px;
        max-width: 250px;
    }
    
    .success-icon {
        width: 50px;
        height: 50px;
        margin-bottom: 15px;
    }
    
    .success-title {
        font-size: 18px;
    }
    
    .success-message {
        font-size: 13px;
    }
    
    .success-continue {
        font-size: 14px;
        padding: 6px 16px;
    }
    
    .fragebogenHeader {
        padding: 0.5em 0;
    }
    
    .fragebogenDesc {
        padding: 0.5em 0;
        font-size: 16px;
    }

    .tab-navigation
    {
        flex-wrap: wrap;
    }

    .tab-button
    {
        min-width: auto;
    }

    .form-columns
    {
        width: 100%;
    }
}