/* CSS Variables for consistent theming based on AlpineAI palette */
:root {
    --primary-red: #E3000F;      /* Primary Red */
    --hover-red: #C4000C;
    --dark-text: #1C1C1C;
    --light-text: #606060;
    --border-col: #D1D1D1;
    --focus-border: #E3000F;
    --bg-white: #FFFFFF;
    --input-bg: #F9F9F9;
    --header-bg: rgba(255, 255, 255, 0.98);
    
    --success-col: #008a3e;
    --error-col: #E3000F;
    
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--dark-text);
    background-color: var(--bg-white);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* -------------------------------- */
/* Header                           */
/* -------------------------------- */
.main-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    background: var(--header-bg);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-col);
}

.header-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container a {
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-logo {
    height: 32px;
    width: auto;
}

.brand-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-text);
    letter-spacing: -0.5px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-text);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-red);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -24px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-red);
    border-radius: 2px 2px 0 0;
}

/* -------------------------------- */
/* Hero Video Background            */
/* -------------------------------- */
.hero-video-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    z-index: 1;
}

.hero-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay-gradient {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0) 0%, rgba(0,0,0,0.1) 70%, var(--bg-white) 100%);
    pointer-events: none;
}

/* -------------------------------- */
/* Registration Card Widget         */
/* -------------------------------- */
.content-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1240px;
    margin: 40vh auto 60px; /* Overlaps hero video */
    padding: 0 24px;
}

.registration-card {
    display: flex;
    background-color: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* -------------------------------- */
/* Left Side: Info Features         */
/* -------------------------------- */
.card-info-side {
    flex: 0 0 42%;
    background-color: var(--primary-red);
    color: var(--bg-white);
    padding: 64px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.info-headline {
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 48px;
    letter-spacing: -0.5px;
}

.info-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.info-features li {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.info-icon {
    flex-shrink: 0;
    color: var(--bg-white);
}

.info-features p {
    font-size: 1.05rem;
    line-height: 1.5;
    opacity: 0.95;
    margin-top: 2px;
}

/* -------------------------------- */
/* Right Side: Form                 */
/* -------------------------------- */
.card-form-side {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    background-color: var(--bg-white);
    padding: 24px 32px;
    border-bottom: 1px solid var(--border-col);
}

.card-header h2 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark-text);
}

.header-icon {
    color: var(--primary-red);
}

/* -------------------------------- */
/* Forms                            */
/* -------------------------------- */
.registration-form {
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.form-row {
    display: flex;
    gap: 24px;
}

.form-row > * {
    flex: 1;
}

.name-row {
    flex-direction: row;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative; /* crucial for dynamic popup alignment */
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-text);
}

input[type="text"],
input[type="email"],
input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background-color: var(--input-bg);
    border: 1px solid var(--border-col);
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

input:focus {
    outline: none;
    background-color: var(--bg-white);
    border-color: var(--focus-border);
    box-shadow: 0 0 0 2px rgba(227, 0, 15, 0.1);
}

input::placeholder {
    color: #A0A0A0;
}

/* Password Group Specifics */
.password-action-row {
    display: flex;
    align-items: flex-start;
    gap: 24px;
}

.password-group {
    position: relative;
}

.password-input-wrapper {
    position: relative;
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    padding: 4px;
}

.password-toggle:focus {
    outline: none;
}

.password-input-wrapper input {
    padding-right: 48px;
}

/* Password Rules / Feedback */
.password-rules {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    font-size: 0.85rem;
    color: var(--light-text);
}

.rule {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.rule-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background-color: #E0E0E0;
    position: relative;
}

.rule.valid {
    color: var(--success-col);
}

.rule.valid .rule-icon {
    background-color: var(--success-col);
}

/* Checkmark effect for valid */
.rule.valid .rule-icon::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 2px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Button */
.action-group {
    display: flex;
    align-items: flex-start;
    padding-top: 30px; /* Align with input by clearing the label height */
}

.btn-submit {
    width: 100%;
    height: 48px;
    background-color: var(--primary-red);
    color: var(--bg-white);
    border: none;
    border-radius: 4px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.btn-submit:hover:not(:disabled) {
    background-color: var(--hover-red);
    transform: translateY(-1px);
}

.btn-submit:active:not(:disabled) {
    transform: translateY(0);
}

.btn-submit:disabled {
    background-color: #f1999f;
    cursor: not-allowed;
}

/* Loader */
.spinner {
    animation: rotate 2s linear infinite;
    width: 24px;
    height: 24px;
}
.spinner .path {
    stroke: #ffffff;
    stroke-linecap: round;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
    100% { transform: rotate(360deg); }
}
@keyframes dash {
    0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
    50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
    100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* Feedback Message */
.submit-feedback {
    padding: 16px;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 500;
}

.submit-feedback.success {
    background-color: #E8F5E9;
    color: var(--success-col);
    border-left: 4px solid var(--success-col);
}

.submit-feedback.error {
    background-color: #FFEBEE;
    color: var(--error-col);
    border-left: 4px solid var(--error-col);
}

/* -------------------------------- */
/* Trust Section (Press & Partners) */
/* -------------------------------- */

.trust-section {
    padding: 60px 24px;
    background-color: var(--bg-white);
    display: flex;
    justify-content: center;
    border-top: 1px solid #eaeaea;
}

.trust-container {
    max-width: 950px; /* Narrower container to prevent wide stretching */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 50px;
}

.press-feature {
    display: flex;
    justify-content: center;
}

/* -------------------------------- */
/* Bekannt aus: Press Ribbon        */
/* -------------------------------- */

.press-feature {
    display: flex;
    justify-content: center;
    width: 100%;
}

.press-ribbon {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background-color: #fafafa;
    padding: 20px 24px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
    width: 100%;
}

.press-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.press-logos-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px; /* More breathing room */
}

.press-logo {
    height: 32px; /* Nicer baseline scaling */
    width: auto;
    object-fit: contain;
    filter: grayscale(100%);
    opacity: 0.55;
    transition: var(--transition);
}

.press-logo.ta-logo { height: 36px; }
.press-logo.nzz-logo { height: 25px; }
.press-logo.hb-logo { height: 25px; }

.press-logo:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.partners-wrapper {
    width: 100%;
    text-align: center;
}

.partners-title {
    font-size: 1.8rem;
    color: var(--dark-text);
    margin-bottom: 40px;
    font-weight: 700;
}

.partners-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Force exact 4-columns layout */
    gap: 45px 30px;
    align-items: center;
    justify-items: center;
}

.partner-logo {
    max-width: 140px;
    max-height: 55px;
    width: auto;
    height: auto;
    object-fit: contain;
    transition: var(--transition);
}

.partner-logo:hover {
    transform: scale(1.1) translateY(-4px); /* Noticeable pop up and lift */
    opacity: 0.8; /* Dimming effect to confirm hover target */
    cursor: pointer;
}

/* Responsive constraints */
@media (max-width: 992px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 16px;
        gap: 16px;
    }

    .main-nav ul {
        flex-wrap: wrap;
        gap: 16px;
        justify-content: center;
    }

    .registration-card {
        flex-direction: column;
    }
    
    .card-info-side {
        order: 2;
        padding: 40px 24px;
        flex: auto;
    }

    .card-form-side {
        order: 1;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }
    
    .password-action-row {
        flex-direction: column;
    }

    .action-group {
        width: 100%;
        margin-top: 16px;
    }

    .action-group {
        width: 100%;
        margin-top: 16px;
        padding-top: 0;
    }

    .content-wrapper {
        margin-top: 35vh;
    }
    
    /* Mobile handling for the grid */
    .partners-grid {
        grid-template-columns: repeat(2, 1fr); /* 2 columns on mobile */
        gap: 30px 20px;
    }
}

/* -------------------------------- */
/* Custom Validation Tooltip        */
/* -------------------------------- */
.custom-tooltip {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #ffffff;
    border: 1px solid #d9d9d9;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    padding: 8px 12px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #333;
    z-index: 9999;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(5px);
    width: max-content;
    max-width: 250px;
}

.custom-tooltip.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-tooltip .tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background-color: var(--primary-red);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 3px;
    font-family: monospace;
}

/* The tooltip 'Speech Bubble' little arrow pointing UP */
.custom-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #ccc transparent;
}
.custom-tooltip::after {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent #fff transparent;
}
