* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #004393;
    --accent-red: #e20020;
    --accent-yellow: #ffec00;
    --accent-green: #007d3f;
    --sand-beige: #F1F4F6;
    --ocean-blue: #31556F;
    --light-blue: #7FA9C4;
    --wave-blue: #DCEAF2;
    --white: #FFFFFF;
    --dark-text: #2C3E50;
    --light-gray: #ECF0F1;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(180deg, var(--wave-blue) 0%, var(--sand-beige) 100%);
    color: var(--dark-text);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Alpiner Hintergrund */
.waves-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: 
        linear-gradient(180deg, 
            rgba(220, 234, 242, 0.45) 0%,
            rgba(241, 244, 246, 0.75) 60%,
            rgba(255, 255, 255, 0.95) 100%);
}

.waves-background::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 0;
    width: 100%;
    height: 200px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 180"><path d="M0 180 L0 125 L170 42 L285 118 L430 25 L610 142 L780 55 L930 125 L1060 36 L1200 115 L1200 180 Z" fill="%237FA9C4" opacity="0.28"/><path d="M125 64 L170 42 L207 67 L185 61 L170 70 L156 59 Z M391 58 L430 25 L469 63 L444 54 L430 68 L414 51 Z M1024 62 L1060 36 L1090 66 L1070 57 L1060 70 L1048 55 Z" fill="white" opacity="0.9"/></svg>');
    background-size: cover;
    animation: wave 8s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, var(--primary-red) 0%, #002b60 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

header::before {
    content: '🏔️';
    position: absolute;
    font-size: 100px;
    opacity: 0.1;
    top: -20px;
    left: 10%;
    animation: float 6s ease-in-out infinite;
}

header::after {
    content: '❄️';
    position: absolute;
    font-size: 80px;
    opacity: 0.1;
    bottom: -10px;
    right: 15%;
    animation: float 7s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(5deg); }
}

header h1 {
    font-size: 3em;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    line-height: 1.3;
}

header h1 .subtitle-text {
    display: block;
    font-size: 0.6em;
    font-weight: 300;
    margin-top: 8px;
    opacity: 0.95;
}

header .subtitle {
    font-size: 1.3em;
    font-weight: 300;
}

/* Main Content */
main {
    padding: 40px 20px;
}

/* Party Details Section */
.party-details-section {
    margin-bottom: 50px;
}

.party-info-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
    margin-bottom: 20px;
}

.party-detail-card {
    background: var(--white);
    border-radius: 15px;
    padding: 35px 25px;
    text-align: center;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.party-detail-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: var(--primary-red);
}

.party-detail-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(0, 67, 147, 0.25);
}

.card-icon {
    font-size: 4em;
    margin-bottom: 15px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.party-detail-card h3 {
    color: var(--primary-red);
    font-size: 1.6em;
    margin-bottom: 15px;
    font-weight: bold;
}

.party-detail-card p {
    margin: 8px 0;
    font-size: 1.1em;
    line-height: 1.6;
}

.party-detail-card .highlight {
    font-size: 1.4em;
    font-weight: bold;
    color: var(--primary-red);
    margin: 12px 0;
}

.party-detail-card a {
    color: var(--ocean-blue);
    text-decoration: none;
    font-weight: bold;
    font-size: 1.2em;
}

.party-detail-card a:hover {
    text-decoration: underline;
    color: var(--primary-red);
}

.location-card {
    border-top: 6px solid var(--primary-red);
}

.date-card {
    border-top: 6px solid var(--ocean-blue);
}

.contact-card {
    border-top: 6px solid var(--light-blue);
}

/* Info Section */
.info-section {
    margin-bottom: 40px;
}

.island-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--primary-red);
}

.island-card h2 {
    color: var(--primary-red);
    margin-bottom: 15px;
    font-size: 2em;
}

.island-card p {
    font-size: 1.1em;
    line-height: 1.6;
}

/* Ferry Section */
.ferry-section {
    margin-bottom: 40px;
}

.ferry-section h2 {
    color: var(--primary-red);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.2em;
}

.ferry-schedule {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.ferry-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border-top: 4px solid var(--ocean-blue);
}

.ferry-card h3 {
    color: var(--ocean-blue);
    margin-bottom: 20px;
    font-size: 1.5em;
}

.ferry-card table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
}

.ferry-card table thead {
    background: var(--ocean-blue);
    color: var(--white);
}

.ferry-card table th,
.ferry-card table td {
    padding: 12px;
    text-align: center;
}

.ferry-card table tbody tr:nth-child(even) {
    background: var(--light-gray);
}

.ferry-card table tbody tr:hover {
    background: var(--wave-blue);
    cursor: pointer;
    transition: background 0.3s ease;
}

.ferry-note {
    font-size: 0.9em;
    color: #666;
    margin-top: 15px;
    padding: 10px;
    background: #FFF3CD;
    border-radius: 5px;
}

.ferry-note a {
    color: var(--ocean-blue);
    font-weight: bold;
}

/* Registration Section */
.registration-section {
    background: var(--white);
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-top: 6px solid var(--primary-red);
    margin-bottom: 40px;
}

.registration-section h3 {
    color: var(--primary-red);
    text-align: center;
    margin: 0 0 6px;
    font-weight: 600;
}

.registration-section h2 {
    color: var(--primary-red);
    text-align: center;
    margin-top: 2px;
    margin-bottom: 15px;
    font-size: 2.2em;
}

.form-intro {
    text-align: center;
    font-size: 1.1em;
    margin-bottom: 30px;
    color: #555;
}

.registration-form {
    max-width: 800px;
    margin: 0 auto;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--dark-text);
    font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s ease;
}

.form-group input[type="date"] {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
    opacity: 1;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Segmented radio group (toggle-style) */
.radio-group {
    position: relative;
    display: flex;
    width: 100%;
    border: 2px solid var(--primary-red);
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    isolation: isolate;
}

.radio-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 33.3333%;
    height: 100%;
    background: var(--primary-red);
    border-radius: 8px;
    transform: translateX(0%);
    transition: transform 180ms ease-in-out;
    z-index: 0;
}

.radio-group label {
    position: relative;
    cursor: pointer;
    flex: 1 1 33.3333%;
    text-align: center;
}

.radio-group label + label span {
    border-left: 1px solid rgba(0, 67, 147, 0.25);
}

.radio-group input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.radio-group span {
    position: relative;
    display: block;
    padding: 10px 16px;
    color: var(--primary-red);
    font-weight: 600;
    transition: color 180ms ease-in-out;
    user-select: none;
    z-index: 1;
}

/* Active side text color */
.radio-group label:first-child input[type="radio"]:checked + span { color: #fff; }
.radio-group label:nth-child(2) input[type="radio"]:checked + span { color: #fff; }
.radio-group label:nth-child(3) input[type="radio"]:checked + span { color: #fff; }

/* Slide indicator to the selected option */
.radio-group:has(label:nth-child(2) input[type="radio"]:checked)::before {
    transform: translateX(100%);
}

.radio-group:has(label:nth-child(3) input[type="radio"]:checked)::before {
    transform: translateX(200%);
}

.radio-group input[type="radio"]:focus-visible + span {
    outline: 2px solid var(--ocean-blue);
    outline-offset: -2px;
}

/* If nothing is selected (older data or initial state), show left text as active */
.radio-group:not(:has(input[type="radio"]:checked)) label:first-child span {
    color: #fff;
}

.checkbox-group {
    display: flex;
    align-items: center;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    margin-right: 10px;
    cursor: pointer;
}

.submit-btn {
    width: 100%;
    background: var(--primary-red);
    color: var(--white);
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 1.3em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 67, 147, 0.3);
}

.submit-btn:hover {
    background: #003474;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 67, 147, 0.4);
}

.submit-btn:active {
    transform: translateY(0);
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    display: none;
}

.form-message.success {
    background: rgba(0, 125, 63, 0.12);
    color: #005b2e;
    border: 1px solid #007d3f;
    display: block;
}

.form-message.error {
    background: rgba(226, 0, 32, 0.1);
    color: #a50017;
    border: 1px solid #e20020;
    display: block;
}

/* Footer */
footer {
    background: var(--dark-text);
    color: var(--white);
    padding: 30px 20px;
    text-align: center;
    margin-top: 60px;
}

footer p {
    margin: 5px 0;
}

footer a {
    color: var(--wave-blue);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .ferry-schedule {
        grid-template-columns: 1fr;
    }

    .party-info-cards {
        grid-template-columns: 1fr;
    }

    .registration-section {
        padding: 20px;
    }
}

/* Snow Effect */
.snow-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.snowflake {
    position: absolute;
    width: 40px;
    height: 40px;
    user-select: none;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
}

.snowflake svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 2px rgba(176, 224, 255, 0.8));
}

/* Ride Offers & Bookings Cards */
.card {
    background: var(--white);
    padding: 16px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin: 12px 0;
    border-left: 4px solid var(--primary-red);
}

/* Button styling for ride.js */
button {
    background: var(--primary-red);
    color: var(--white);
    border: none;
    border-radius: 6px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: all 0.3s ease;
}

button:hover {
    background: #003474;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 67, 147, 0.2);
}

button:active {
    transform: translateY(0);
}

button.secondary {
    background: #555 !important;
}

button.secondary:hover {
    background: #444 !important;
}

/* Ride Portal Utilities */
.text-center {
    text-align: center;
}

.padding-xl {
    padding: 40px 20px;
}

.padding-md {
    padding: 20px;
}

.fs-lg {
    font-size: 1.2em;
}

.fs-md {
    font-size: 1.1em;
}

.mb-lg {
    margin-bottom: 20px;
}

.mb-md {
    margin-bottom: 30px;
}

.mt-md {
    margin-top: 15px;
}

.mt-sm {
    margin-top: 8px;
}

.mt-xs {
    margin-top: 4px;
}

.flex-row {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.button-wide {
    min-width: 200px;
    padding: 20px;
}

.text-muted {
    color: #666;
    font-size: 0.9em;
}

.text-hint {
    color: #666;
    font-size: 0.85em;
    display: block;
}

.text-required {
    color: var(--accent-red);
}

.max-width-120 {
    max-width: 120px;
}

.section-divider {
    border-top: 1px solid #ddd;
    padding-top: 20px;
    margin-top: 20px;
}

.section-title {
    margin-bottom: 15px;
}

.full-width-btn {
    width: 100%;
    margin: 0;
}

.label-hidden {
    visibility: hidden;
}

/* Alpine visual theme */
:root {
    --alpine-night: #173244;
    --alpine-blue: #315d74;
    --alpine-sky: #b9d8e8;
    --alpine-snow: #f7fbfd;
    --alpine-pine: #007d3f;
    --alpine-wood: #8b5b3e;
    --alpine-gold: #ffec00;
}

body {
    background:
        linear-gradient(180deg, #a9d0e4 0, #dceaf1 32rem, #eef4f5 70rem, #f7f4ee 100%);
}

.waves-background {
    background:
        radial-gradient(circle at 78% 10%, rgba(255, 242, 184, 0.72) 0 4rem, transparent 4.2rem),
        linear-gradient(180deg, rgba(114, 172, 204, 0.2), rgba(247, 251, 253, 0.86));
}

.waves-background::before {
    top: auto;
    bottom: 0;
    height: 72vh;
    min-height: 520px;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 700" preserveAspectRatio="none"><path d="M0 700V420L190 260l125 112L510 105l205 285 145-155 155 170 190-270 235 280v285Z" fill="%237fa9c4" opacity=".32"/><path d="m391 268 119-163 116 161-70-60-46 61-39-49Z M1117 260l88-125 104 124-64-50-40 52-31-40Z" fill="%23fff" opacity=".92"/><path d="M0 700V540l180-115 120 77 205-152 175 154 162-110 180 131 205-170 213 165v180Z" fill="%233f6b66" opacity=".3"/><path d="M0 700V610l160-84 108 57 177-101 132 92 176-79 150 91 172-105 158 91 207-76v204Z" fill="%23274e45" opacity=".28"/></svg>');
    background-position: center bottom;
    background-size: 100% 100%;
    animation: mountain-breathe 12s ease-in-out infinite alternate;
}

.waves-background::after {
    content: '';
    position: absolute;
    inset: auto 0 0;
    height: 24vh;
    min-height: 170px;
    background: linear-gradient(180deg, transparent, rgba(247, 251, 253, 0.9));
}

@keyframes mountain-breathe {
    from { transform: scale(1.01) translateY(4px); }
    to { transform: scale(1.035) translateY(-4px); }
}

header {
    min-height: 350px;
    padding: 76px 20px 118px;
    display: grid;
    align-items: center;
    background:
        linear-gradient(180deg, rgba(15, 42, 59, 0.36), rgba(23, 50, 68, 0.84)),
        linear-gradient(135deg, var(--alpine-blue), var(--alpine-night));
    border-bottom: 6px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 18px 45px rgba(23, 50, 68, 0.3);
}

header::before {
    content: '';
    inset: auto 0 0;
    width: 100%;
    height: 220px;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 260" preserveAspectRatio="none"><path d="M0 260V220L160 100l115 92L430 24l190 186L770 73l155 132 180-178 155 160 180-99v172Z" fill="%235e8495"/><path d="m351 108 79-84 82 80-51-30-31 43-28-36Z M1034 98l71-71 72 74-43-27-29 35-24-31Z" fill="%23f7fbfd"/><path d="M0 260v-18l205-91 110 70 205-87 155 95 205-93 149 85 228-109 183 109v39Z" fill="%23274e45" opacity=".92"/></svg>') center bottom / 100% 100% no-repeat;
    opacity: 1;
    animation: none;
}

header::after {
    content: '';
    right: 8%;
    bottom: 24px;
    width: 64px;
    height: 84px;
    background: linear-gradient(145deg, transparent 35%, #f7fbfd 36% 42%, transparent 43%), linear-gradient(90deg, #6f412c, #9a6848);
    clip-path: polygon(50% 0, 100% 36%, 76% 36%, 100% 68%, 65% 68%, 65% 100%, 35% 100%, 35% 68%, 0 68%, 24% 36%, 0 36%);
    opacity: 0.65;
    animation: none;
}

header .container {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    letter-spacing: -0.035em;
    text-shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
}

header .subtitle {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 999px;
    background: rgba(15, 42, 59, 0.35);
    backdrop-filter: blur(8px);
}

main.container {
    position: relative;
    z-index: 2;
    margin-top: -58px;
}

.party-detail-card,
.island-card,
.registration-section,
.ferry-card,
.card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.82);
    box-shadow: 0 16px 44px rgba(29, 62, 76, 0.14);
    backdrop-filter: blur(12px);
}

.party-detail-card {
    border-radius: 8px 8px 18px 18px;
}

.party-detail-card::before {
    height: 9px;
    background: linear-gradient(90deg, var(--alpine-pine), var(--alpine-gold));
}

.party-detail-card:hover {
    box-shadow: 0 22px 52px rgba(29, 62, 76, 0.23);
}

.card-icon {
    filter: drop-shadow(0 6px 8px rgba(23, 50, 68, 0.18));
}

.island-card {
    border-left-color: var(--alpine-pine);
}

.ferry-card {
    border-top-color: var(--alpine-pine);
    background-image: linear-gradient(145deg, rgba(247, 251, 253, 0.65), rgba(255, 255, 255, 0.96));
}

.ferry-card h3 {
    color: var(--alpine-pine);
}

.registration-section {
    border-top-color: var(--alpine-wood);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group select,
.form-group textarea {
    background: rgba(247, 251, 253, 0.84);
    border-color: #c7d9df;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--alpine-pine);
    box-shadow: 0 0 0 4px rgba(39, 78, 69, 0.12);
}

.submit-btn,
button {
    background: linear-gradient(135deg, var(--primary-red), #002b60);
}

.ferry-note {
    color: #4c4737;
    background: rgba(255, 236, 0, 0.14);
    border: 1px solid #ffec00;
}

footer {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--alpine-night), #0d242f);
    border-top: 5px solid var(--alpine-pine);
}

@media (max-width: 768px) {
    header {
        min-height: 300px;
        padding: 52px 16px 100px;
    }

    header::before {
        height: 165px;
    }

    main.container {
        margin-top: -36px;
    }

    .waves-background::before {
        height: 55vh;
    }
}

@media (prefers-reduced-motion: reduce) {
    .waves-background::before,
    .card-icon {
        animation: none;
    }
}
