/* Public Booking CSS - Mobile First, warm & einladend */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
    --primary: #636363;
    --primary-dark: #5568d3;
    --danger: #e65b5b;
    --success: #2da967;
    /* Warme Neutrals statt kühles Grau */
    --gray-50: #faf8f6;
    --gray-100: #f3efe9;
    --gray-200: #e8e2d9;
    --gray-300: #d4cdc2;
    --gray-400: #a39e93;
    --gray-600: #6b6560;
    --gray-700: #504b47;
    --gray-800: #3d3936;
    --gray-900: #2c2927;
    --surface: #fffefc;
    --warm-shadow: rgba(60, 50, 40, 0.06);
    --warm-shadow-hover: rgba(60, 50, 40, 0.1);
}

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

body {
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    color: var(--gray-800);
    background: linear-gradient(180deg, var(--gray-50) 0%, #f5f2ee 100%);
    min-height: 100vh;
}

/* Hintergrundbild für Buchungsseiten (Default oder individuell aus Einstellungen) */
body.booking-page.has-bg {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.intro-section {
    margin-bottom: 36px;
    text-align: center;
}

.page-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 10px;
    letter-spacing: -0.02em;
}

.intro-text {
    font-size: 17px;
    color: var(--gray-600);
    line-height: 1.6;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
}

/* Header – kompakt, modern */
.header {
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid rgba(200, 195, 190, 0.3);
    padding: 10px 0;
    margin-bottom: 20px;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    flex-wrap: wrap;
    text-align: center;
}

/* Startseite: drei Bereiche – links Logo, mittig Titel, rechts „→ Zur Startseite“ */
.header-index {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    justify-items: center;
    align-items: center;
    gap: 16px;
    text-align: center;
}

.header-index .header-left {
    justify-self: start;
    min-width: 0;
}

.header-index .header-center {
    justify-self: center;
    padding: 0 12px;
}

.header-index .header-right {
    justify-self: end;
}

/* Button-Variante klein für Header */
.btn-sm {
    padding: 8px 16px;
    font-size: 14px;
    min-height: 36px;
}

.header-app-name {
    font-size: 20px;
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
}

.header-logo-link {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

/* Logo: Wrapper, Bild darin eingepasst */
.site-logo-wrap {
    display: inline-block;
    width: 280px;
    height: 80px;
    max-width: 280px;
    max-height: 80px;
    overflow: hidden;
    flex-shrink: 0;
}

.site-logo-wrap .site-logo,
img.site-logo {
    display: block;
    width: 100%;
    height: 100%;
    max-width: 280px !important;
    max-height: 80px !important;
    object-fit: contain;
    object-position: center center;
}

.header-back {
    text-decoration: none;
    color: var(--gray-700);
    font-size: 15px;
    font-weight: 500;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: color 0.2s;
}
.header-back:hover {
    color: var(--primary);
}

.header h1 {
    font-size: 20px;
    color: var(--gray-900);
    font-weight: 700;
    letter-spacing: -0.01em;
}

/* Titel neben Logo etwas kleiner */
.header-index .header-app-name {
    font-size: 18px;
}

/* Offer Cards – modern, einladend, klare Buchungs-Aufforderung */
.offers-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 48px;
}

.offer-card {
    --card-accent: var(--primary);
    background: var(--surface);
    border-radius: 16px;
    padding: 0;
    box-shadow: 0 2px 12px var(--warm-shadow), 0 1px 3px rgba(0,0,0,0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 1px solid var(--gray-200);
    border-left: 4px solid var(--card-accent);
    overflow: hidden;
}

.offer-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--warm-shadow-hover), 0 2px 8px rgba(0,0,0,0.06);
}

.offer-card-inner {
    padding: 24px 26px 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.offer-card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-900);
    letter-spacing: -0.01em;
    /* Feste Höhe für 2 Zeilen, damit alle Titel gleich hoch sind */
    min-height: 2.4em;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-600);
    /* Feste Höhe für Meta-Bereich */
    min-height: 24px;
}

.offer-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.offer-description {
    color: var(--gray-700);
    line-height: 1.65;
    font-size: 15px;
    margin-bottom: 18px;
    /* Feste Höhe für Beschreibung (ca. 4 Zeilen) */
    min-height: 6.6em;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.offer-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    font-weight: 600;
    color: var(--card-accent);
    transition: gap 0.2s, color 0.2s;
    margin-top: auto;
    padding-top: 16px;
}

.offer-card:hover .offer-cta {
    gap: 10px;
}

/* Booking Layout */
.booking-layout {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.booking-info {
    background: var(--surface);
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 4px 20px var(--warm-shadow), 0 0 0 1px var(--gray-200);
}

.booking-info h1 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--gray-900);
}

.info-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.info-value {
    color: var(--gray-800);
}

/* Calendar */
.calendar-widget {
    background: var(--surface);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 20px var(--warm-shadow), 0 0 0 1px var(--gray-200);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-nav {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 10px 14px;
    color: var(--gray-700);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
}

.calendar-nav:hover {
    background: var(--gray-100);
}

.calendar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.calendar-today-btn {
    padding: 8px 14px;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--primary);
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}
.calendar-today-btn:hover {
    background: var(--primary);
    color: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-600);
    padding: 8px 2px;
}

.calendar-day {
    min-height: 44px;
    aspect-ratio: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.calendar-day.empty {
    cursor: default;
}

.calendar-day.disabled {
    color: var(--gray-400);
    cursor: not-allowed;
}

.calendar-day.available {
    background: var(--gray-100);
    color: var(--gray-800);
}

.calendar-day.available:hover {
    background: var(--primary);
    color: white;
}

.calendar-day.selected {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.calendar-day.today {
    border-color: var(--primary);
    font-weight: 600;
}
.calendar-day.today.available {
    background: rgba(102, 126, 234, 0.12);
}
.calendar-day.today.selected {
    background: var(--primary);
}

/* Sessions List */
.sessions-container {
    margin-top: 24px;
}

.sessions-list {
    display: grid;
    gap: 12px;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 20px;
    min-height: 56px;
    background: var(--gray-100);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
}

.session-item:hover {
    background: var(--gray-100);
}

.session-item.selected {
    border-color: var(--primary);
    background: #eef2ff;
}

.session-time {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.session-capacity {
    font-size: 14px;
    color: var(--gray-600);
}

.session-capacity.full {
    color: var(--danger);
}

/* Booking Form */
.booking-form {
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 6px;
    color: var(--gray-700);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    font-size: 16px;
    background: var(--surface);
    transition: border-color 0.2s, box-shadow 0.2s;
    min-height: 48px;
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.18);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 4px;
}

.checkbox-group label {
    margin: 0;
    font-weight: normal;
}

.help-text {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 4px;
}

.required {
    color: var(--danger);
}

/* Buttons – klar und einladend */
.btn {
    display: inline-block;
    padding: 14px 28px;
    min-height: 48px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.25s ease;
    text-align: center;
    line-height: 1.25;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 10px var(--warm-shadow);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--warm-shadow-hover);
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-danger:hover {
    background: #c53030;
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-block {
    display: block;
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Alerts – weiche, verständliche Hinweise */
.alert {
    padding: 18px 22px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 15px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.alert-info {
    background: #e0f2fe;
    color: #0c4a6e;
    border: 1px solid #7dd3fc;
}

/* Confirmation Page – ruhig und bestätigend */
.confirmation-box {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px 36px;
    box-shadow: 0 4px 24px var(--warm-shadow), 0 0 0 1px var(--gray-200);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.confirmation-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.confirmation-box h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--gray-900);
}

.booking-details {
    background: var(--gray-100);
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    text-align: left;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--gray-200);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--gray-700);
}

.detail-value {
    color: var(--gray-800);
}

/* Loading */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--gray-600);
}

.spinner {
    border: 3px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Utility */
.text-center { text-align: center; }
.text-muted { color: var(--gray-600); }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.hidden { display: none; }

/* Mobile: kein ungewolltes Zoomen, Touch-freundlich */
@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }
    .container {
        padding: 16px;
    }
    .intro-section {
        margin-bottom: 28px;
    }
    .page-heading {
        font-size: 24px;
        margin-bottom: 8px;
    }
    .intro-text {
        font-size: 16px;
    }
    .header {
        padding: 1px 0 1px;
        margin-bottom: 20px;
    }
    .header h1 {
        font-size: 20px;
    }
    .site-logo-wrap {
        width: 200px;
        height: 60px;
        max-width: 200px;
        max-height: 60px;
    }
    .site-logo-wrap .site-logo,
    img.site-logo {
        max-width: 200px !important;
        max-height: 60px !important;
    }
    .header-app-name {
        font-size: 18px;
    }
    .header-index .header-app-name {
        font-size: 16px;
    }
    .header-index {
        gap: 10px;
    }
    .btn-sm {
        padding: 6px 12px;
        font-size: 13px;
    }
    .confirmation-box {
        padding: 24px 20px;
    }
    .confirmation-icon {
        font-size: 48px;
    }
    .confirmation-box h1 {
        font-size: 24px;
    }
}

/* Desktop */
@media (min-width: 768px) {
    .offers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .booking-layout {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
    
    /* Linke Spalte (Angebotsinfos): feste Höhe, bleibt beim Scrollen sichtbar */
    .booking-info {
        position: sticky;
        top: 24px;
    }
    
    .calendar-day {
        font-size: 16px;
    }
}

@media (min-width: 1024px) {
    .offers-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
