/* CDU-Fraktion – LimeSurvey 7.x – Child-Theme Fruity TwentyThree */

/* === LOCAL FONTS ===
   CSS lives in /css; ../files/ therefore points to the theme's /files directory.
   Add the five matching TTF files there (see README). */
@font-face {
    font-family: 'Inter';
    src: url('../files/Inter-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../files/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../files/Inter-ExtraBold.ttf') format('truetype');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Serif';
    src: url('../files/IBMPlexSerif-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'IBM Plex Serif';
    src: url('../files/IBMPlexSerif-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* CDU Corporate Design Manual 2026 */
:root {
    --cdu-turquoise: #52b7c1; /* Cadenabbia-Türkis */
    --cdu-blue: #2d3c4b;      /* Rhöndorf-Blau */
    --cdu-black: #1b191d;     /* Union-Schwarz */
    --cdu-red: #bf111b;       /* Union-Rot */
    --cdu-gold: #ffa600;      /* Union-Gold */
    --cdu-turquoise-10: #f2f8fa;
    --cdu-turquoise-25: #ddeef1;
    --cdu-border: #dce5e8;
    --cdu-page: #f7fafb;
    --cdu-radius: 13px;
    --cdu-shadow: 0 7px 24px rgba(45, 60, 75, .075);

    /* Bootstrap 5 variables: set these as well as body to avoid framework fallback. */
    --bs-body-font-family: 'IBM Plex Serif', Georgia, serif;
    --bs-body-color: var(--cdu-black);
    --bs-heading-color: var(--cdu-blue);
    --bs-primary: var(--cdu-blue);
    --bs-link-color: #176c78;
    --bs-link-hover-color: var(--cdu-blue);
    --bs-font-sans-serif: 'Inter', Arial, sans-serif;
    --bs-body-font-weight: 400;
}

/* Base copy uses IBM Plex Serif as specified in the manual. */
html, body,
body, p, li, dd, dt, label, legend,
.survey-description, .survey-welcome,
.question-text, .answer-container,
.help-block, .form-text, .text-muted,
.alert, .modal-body, .dropdown-menu {
    font-family: 'IBM Plex Serif', Georgia, serif !important;
    font-weight: 400;
}
body {
    min-height: 100%;
    background: var(--cdu-page);
    color: var(--cdu-black);
    font-size: 1rem;
    line-height: 1.62;
    -webkit-font-smoothing: antialiased;
}

/* Headlines: Inter Extrabold; avoid forced uppercase. */
h1, h2, h3, h4, h5, h6,
.survey-name, .question-title-container,
.group-title, .group-description,
.section-title, .welcome-text h1,
#welcome-container h1, #welcome-container h2 {
    font-family: 'Inter', Arial, sans-serif !important;
    font-weight: 800 !important;
    color: var(--cdu-blue);
    letter-spacing: -.01em;
    text-transform: none;
}
.survey-name { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.14; }
.question-title-container { font-size: 1.15rem; line-height: 1.42; }

/* UI controls use Inter; body copy remains IBM Plex Serif. */
button, .btn, input, select, textarea,
.form-control, .form-select,
.navbar, .progress, .pagination,
.tooltip, .popover, .modal-title {
    font-family: 'Inter', Arial, sans-serif !important;
}
.btn, button { font-weight: 700; }

/* Header and compact logo on question pages. */
#survey-nav, #survey-nav .navbar, .navbar, .top-container {
    background: #fff;
}
#survey-nav {
    border-bottom: 4px solid var(--cdu-turquoise);
    box-shadow: 0 2px 12px rgba(45, 60, 75, .045);
}
#survey-nav .logo-container img,
#survey-nav .navbar-brand img,
#survey-nav img {
    display: block;
    width: auto;
    max-width: min(100%, 280px);
    max-height: 54px;
    height: auto;
    object-fit: contain;
    object-position: left center;
}
#survey-content { max-width: 1000px; margin-inline: auto; }
.survey-description, .survey-welcome, #welcome-container {
    color: var(--cdu-blue);
    font-size: 1.08rem;
}

/* Intro panel and large logo. Add the logo HTML from README to the welcome text. */
#welcome-container, .survey-welcome {
    background: var(--cdu-turquoise-10);
    border-radius: 16px;
    padding: clamp(1.2rem, 3vw, 2rem);
}
.cdu-welcome-logo {
    display: block;
    width: min(100%, 560px);
    max-height: 180px;
    height: auto;
    object-fit: contain;
    object-position: left center;
    margin: 0 0 1.5rem;
}

/* Question cards */
.question-container {
    background: #fff;
    border: 1px solid var(--cdu-border);
    border-radius: var(--cdu-radius);
    box-shadow: var(--cdu-shadow);
    margin-bottom: 1.25rem;
    padding: clamp(1rem, 2.5vw, 1.7rem);
}

/* Fields */
.form-control, .form-select,
input[type='text'], input[type='email'], input[type='number'],
textarea, select {
    min-height: 46px;
    border: 1px solid #b9c9cf;
    border-radius: 8px;
    color: var(--cdu-black);
    background: #fff;
}
textarea.form-control { min-height: 124px; }
.form-control:focus, .form-select:focus,
input:focus, textarea:focus, select:focus {
    border-color: var(--cdu-turquoise);
    box-shadow: 0 0 0 .22rem rgba(82, 183, 193, .22);
    outline: 0;
}

/* Buttons */
.btn-primary, button.btn-primary {
    min-height: 48px;
    padding: .72rem 1.4rem;
    border: 1px solid var(--cdu-blue);
    border-radius: 8px;
    background: var(--cdu-blue);
    color: #fff;
    font-weight: 700;
    transition: background-color .15s ease, border-color .15s ease;
}
.btn-primary:hover, button.btn-primary:hover {
    background: var(--cdu-black);
    border-color: var(--cdu-black);
    color: #fff;
}
.btn-secondary, .btn-outline-secondary { min-height: 46px; border-radius: 8px; }

/* Progress indicator */
.progress { height: 9px; border-radius: 999px; overflow: hidden; background: var(--cdu-turquoise-25); }
.progress-bar { background: var(--cdu-turquoise); border-radius: 999px; }

/* Selection states */
.radio-item input[type=radio]:checked + label::before,
.checkbox-item input[type=checkbox]:checked + label::before { border-color: var(--cdu-turquoise); }
.radio-item input[type=radio]:checked + label::after { background-color: var(--cdu-turquoise); }
.checkbox-item input[type=checkbox]:checked + label::after { color: var(--cdu-turquoise); }
.radio-item input[type=radio]:checked + label,
.checkbox-item input[type=checkbox]:checked + label { color: var(--cdu-blue); }

a { color: #176c78; text-underline-offset: .16em; }
a:hover { color: var(--cdu-blue); }
.alert { border-radius: 10px; }
:focus-visible { outline: 3px solid var(--cdu-turquoise); outline-offset: 3px; }
footer, #survey-footer { color: #566675; font-size: .9rem; }

@media (max-width: 767.98px) {
    body { font-size: 1rem; }
    #survey-content { padding-inline: .75rem; }
    .question-container { margin-bottom: .9rem; padding: 1rem; border-radius: 10px; }
    .survey-name { font-size: 1.85rem; }
    #survey-nav .logo-container img,
    #survey-nav .navbar-brand img,
    #survey-nav img { max-width: min(100%, 210px); max-height: 46px; }
    .cdu-welcome-logo { width: min(100%, 440px); max-height: 135px; }
    .btn-primary, button.btn-primary, .btn-secondary, .btn-outline-secondary { min-height: 49px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}