/*
=================================
--- TERMINVERWALTUNG LOCAL CSS ---
=================================
Includes all necessary fonts, resets, header/footer styles, and page-specific styles.
*/

/* Font Awesome Icons - Local */
@import url('../fontawesome/css/all.min.css');

/*
=================================
--- 0. CSS VARIABLES (Design Tokens) ---
=================================
*/
:root {
    /* Primäre Markenfarben */
    --ks-color-primary: #61d7dd;
    --ks-color-secondary: #64B5F6;
    --ks-color-secondary-hover: #5a9aeb;
    --ks-color-accent: #ffd45c;
    --ks-color-tertiary: #B39DDB;
    --ks-color-brand-purple: #afa7fe;

    /* Hintergrundfarben */
    --ks-color-white: #ffffff;
    --ks-color-black: #000000;
    --ks-color-light-bg: #e6f7f8;
    --ks-color-gray-bg: #f9f9f9;

    /* Textfarben */
    --ks-color-text-primary: #333;
    --ks-color-text-secondary: #555;
    --ks-color-text-light: #777;

    /* UI-Farben */
    --ks-color-border: #e0e0e0;
    --ks-color-border-dark: #b0c7df;

    /* Font Families */
    --ks-font-family-base: 'Congenial', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --ks-font-family-display: 'Playfair Display', serif;

    /* Font Sizes */
    --ks-font-size-base: 1rem;
    --ks-font-size-xs: 0.75rem;
    --ks-font-size-sm: 0.875rem;
    --ks-font-size-lg: 1.1rem;
    --ks-font-size-xl: 1.2rem;

    /* Font Weights */
    --ks-font-weight-normal: 400;
    --ks-font-weight-medium: 500;
    --ks-font-weight-bold: 700;

    /* Line Heights */
    --ks-line-height-tight: 1.2;
    --ks-line-height-normal: 1.6;
    --ks-line-height-relaxed: 1.7;
    --ks-line-height-loose: 1.8;

    /* Spacing */
    --ks-spacing-xs: 0px;
    --ks-spacing-sm: 20px;
    --ks-spacing-md: 40px;
    --ks-spacing-lg: 60px;
    --ks-spacing-xl: 80px;
    --ks-spacing-2xl: 100px;

    /* Container Max-Widths */
    --ks-container-max-width: 1400px;
    --ks-content-max-width: 1200px;
    --ks-text-max-width: 850px;

    /* Borders & Radius */
    --ks-border-width: 1px;
    --ks-border-radius-sm: 4px;
    --ks-border-radius-md: 8px;
    --ks-border-radius-lg: 12px;

    /* Shadows */
    --ks-shadow-sm: 0 2px 5px rgba(0, 0, 0, 0.1);
    --ks-shadow-md: 0 4px 15px rgba(0, 0, 0, 0.15);
    --ks-shadow-lg: 0 5px 25px rgba(0, 0, 0, 0.2);

    /* Transitions */
    --ks-transition-fast: 0.2s ease;
    --ks-transition-normal: 0.3s ease;
    --ks-transition-slow: 0.5s ease;

    /* Z-Index */
    --ks-z-index-navigation: 1000;
}

/*
=================================
--- 1. FONTS & RESET ---
=================================
*/

@font-face {
    font-family: 'Congenial';
    src: url('../fonts/Congenial_ExtraLight.otf') format('opentype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Congenial';
    src: url('../fonts/Congenial_Medium.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

@font-face {
    font-family: 'Congenial';
    src: url('../fonts/Congenial_Bold.otf') format('opentype');
    font-weight: 700;
    font-style: normal;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100vh;
    font-family: 'Congenial', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #333;
    background-color: #fff;
    line-height: 1.6;
    overflow-x: hidden;
}

/* 
=================================
--- 2. NAVIGATION --- 
=================================
*/

.site-header {
    background-color: var(--ks-color-white);
    padding: 15px 30px;
    box-shadow: var(--ks-shadow-sm);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: var(--ks-z-index-navigation);
}

.header-container {
    max-width: var(--ks-container-max-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.site-branding .logo-link img {
    height: auto;
    width: 200px;
    display: block;
}

.nav-links {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--ks-color-text-secondary);
    font-weight: var(--ks-font-weight-medium);
    padding: 5px 0;
    position: relative;
    transition: color var(--ks-transition-normal);
    white-space: nowrap;
    font-size: var(--ks-font-size-base);
    line-height: var(--ks-line-height-normal);
}

.nav-links a:hover {
    color: var(--ks-color-black);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    background-color: var(--ks-color-secondary);
    bottom: 0;
    left: 0;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform var(--ks-transition-normal);
}

.nav-links a:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* Hamburger Menu (Mobile dummy styles to prevent breakage if logic is there) */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger-menu .line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Mobile Nav Styles - Now includes tablets */
@media (max-width: 1200px) {
    .site-branding .logo-link img {
        width: 150px;
    }

    .site-header {
        padding: 10px 20px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        height: 100vh;
        background-color: var(--ks-color-white);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        transform: translateX(100%);
        transition: transform var(--ks-transition-normal) ease-in-out;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateX(0);
    }

    .nav-links a {
        font-size: 1.2rem;
    }

    .hamburger-menu {
        display: block;
    }

    .hamburger-menu.active .line:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger-menu.active .line:nth-child(2) {
        opacity: 0;
    }

    .hamburger-menu.active .line:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}

/* 
=================================
--- 3. FOOTER --- 
=================================
*/

.site-footer {
    background-color: var(--ks-color-white);
    color: var(--ks-color-text-primary);
    padding: var(--ks-spacing-lg) var(--ks-spacing-sm);
    font-size: var(--ks-font-size-base);
    position: relative;
    z-index: 50;
    border-top: 1px solid var(--ks-color-border);
}

.footer-container {
    max-width: var(--ks-content-max-width);
    margin: 0 auto;
}

.footer-logo {
    text-align: center;
    margin-bottom: 50px;
}

.footer-logo img {
    height: 100px;
    width: auto;
}

.footer-logo .tagline {
    margin: 5px 0 0 0;
    font-size: 0.9em;
    color: var(--ks-color-text-light);
}

.footer-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--ks-spacing-md) var(--ks-spacing-lg);
    text-align: left;
    padding: 50px 0;
}

.footer-column {
    flex-basis: 200px;
    flex-grow: 0;
}

.footer-column h4 {
    font-size: 1em;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
    position: relative;
    line-height: 1.6;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--ks-color-primary);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-column h4 a {
    color: var(--ks-color-text-primary);
    text-decoration: none;
    transition: color var(--ks-transition-fast);
}

.footer-links a:hover,
.footer-column h4 a:hover {
    color: var(--ks-color-primary);
}

.site-footer p {
    margin-bottom: 0;
    line-height: var(--ks-line-height-normal);
}

@media (max-width: 1200px) {
    .site-footer {
        padding-top: 80px;
    }

    .footer-grid {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .footer-grid {
        flex-direction: column;
        align-items: center;
        text-align: left;
    }

    .footer-column {
        width: 100%;
        max-width: 350px;
    }
}

/* 
=================================
--- 4. CALENDAR & PAGE STYLES --- 
=================================
*/

.ks-container--content {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
    margin-top: 120px;
    /* Space for fixed header */
}

/* Simple Tooltip for slots */
.slot-tooltip {
    cursor: help;
}

/* Modern Fixed Grid Calendar */
.calendar-container {
    background: var(--ks-color-white);
    border: 1px solid var(--ks-color-border);
    border-radius: var(--ks-border-radius-lg);
    overflow: hidden;
    width: 100%;
    box-shadow: var(--ks-shadow-sm);
    display: flex;
    flex-direction: column;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: var(--ks-color-white);
    border-bottom: 1px solid var(--ks-color-border);
}

.calendar-header-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f9fa;
    border-bottom: 1px solid var(--ks-color-border);
    font-weight: 600;
}

.calendar-header-row div {
    padding: 15px 10px;
    text-align: center;
    color: var(--ks-color-text-secondary);
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    font-weight: 700;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background-color: var(--ks-color-border);
    /* Gap color */
    gap: 1px;
    /* Creates borders */
    border-bottom: 1px solid var(--ks-color-border);
}

.calendar-day {
    min-height: 140px;
    /* Fixing the "squashed" look */
    background: var(--ks-color-white);
    padding: 10px;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.calendar-day:hover {
    background-color: #f8f9fa;
    z-index: 5;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

.calendar-day.other-month {
    background: #fdfdfd;
}

.calendar-day.other-month .day-number {
    color: #e0e0e0;
}

.calendar-day.today {
    background-color: #bbf7d0 !important;
    /* Stronger green hint */
}

.day-number {
    font-weight: 700;
    color: var(--ks-color-text-primary);
    margin-bottom: 8px;
    display: block;
    font-size: 1.1rem;
}

/* New Logic uses .event-chip from JS */
.event-chip {
    display: block;
    background: #198754;
    /* Restored Green */
    color: white;
    padding: 4px 10px;
    border-radius: 50px;
    /* Pill shape */
    font-size: 0.75rem;
    margin-bottom: 4px;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.1s;

    /* Truncation */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.event-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    color: white;
}

.event-chip.booked {
    background: #dc3545;
    /* Restored Red */
    border: none;
}

/* Responsive Adjustments */
@media (max-width: 1200px) {
    .calendar-day {
        min-height: 100px;
    }
}

@media (max-width: 768px) {
    .calendar-header {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-header-row div {
        font-size: 0.75rem;
        padding: 10px 2px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 5px;
    }

    .day-number {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .calendar-day {
        min-height: 60px;
        padding: 4px;
    }

    .day-number {
        font-size: 0.8rem;
    }

    .event-chip {
        font-size: 0.65rem;
        padding: 2px 6px;
    }
}

/*
=================================
--- 5. BLUE ACCENT STYLES ---
=================================
*/

/* Override Bootstrap Primary Color */
.btn-primary,
.btn-outline-primary {
    --bs-btn-bg: var(--ks-color-secondary);
    --bs-btn-border-color: var(--ks-color-secondary);
    --bs-btn-hover-bg: var(--ks-color-secondary-hover);
    --bs-btn-hover-border-color: var(--ks-color-secondary-hover);
    --bs-btn-active-bg: var(--ks-color-secondary-hover);
    --bs-btn-active-border-color: var(--ks-color-secondary-hover);
}

.btn-outline-primary {
    --bs-btn-color: var(--ks-color-secondary);
    --bs-btn-bg: transparent;
    --bs-btn-hover-color: #fff;
}

/* Text Primary Color Override */
.text-primary {
    color: var(--ks-color-secondary) !important;
}

/* Display-4 Heading Color */
.display-4 {
    color: var(--ks-color-secondary) !important;
}

/* Calendar Month/Year Title */
#currentMonthYear {
    color: var(--ks-color-secondary) !important;
}

/* Links Styling */
a {
    color: var(--ks-color-secondary);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--ks-color-secondary-hover);
}

/* Alert Links */
.alert a {
    color: var(--ks-color-secondary);
    font-weight: bold;
}

.alert a:hover {
    color: var(--ks-color-secondary-hover);
}

/* Month Navigation Buttons */
.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--ks-color-secondary) !important;
    border-color: var(--ks-color-secondary) !important;
    color: white !important;
}

/* Bootstrap Alert Primary Override */
.alert-primary {
    background-color: rgba(100, 181, 246, 0.1);
    border-color: var(--ks-color-secondary);
    color: var(--ks-color-text-primary);
}

/* Modal Primary Elements */
.modal-title {
    color: var(--ks-color-secondary);
}