/**
 * Ferienwohnung Meerblick - Custom Styles
 *
 * Diese Datei enthält zusätzliche Styles, die über Tailwind CSS hinausgehen
 * oder spezifische Anpassungen für die Website bieten.
 */

/* ---- Allgemeine Stile ---- */
html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Bessere Fokus-Styles für Barrierefreiheit */
a:focus, button:focus, input:focus, select:focus, textarea:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* ---- Header & Navigation ---- */
.nav-link-active {
    border-bottom: 2px solid white;
}

/* Animation für Hover-Effekte */
.hover-effect {
    transition: all 0.3s ease-in-out;
}

/* Mobile Navigation Anpassungen */
@media (max-width: 767px) {
    nav .container {
        width: 100%;
    }

    /* Hover-Effekt für mobile Menüpunkte */
    nav a:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    /* Reservieren-Button im mobilen Menü */
    nav .bg-white.text-orange-600 {
        display: inline-block;
        margin-top: 0.5rem;
        margin-bottom: 0.5rem;
        text-align: center;
    }

    /* Animation für das mobile Menü */
    nav [x-show="mobileMenuOpen"] {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* ---- Hero-Bereich ---- */
.hero-overlay {
    background: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5));
}

/* ---- Bilder & Galerie ---- */
.gallery-item {
    transition: transform 0.3s ease-in-out;
}

.gallery-item:hover {
    transform: scale(1.03);
}

/* Lightbox-Effekt für Galerie */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-image {
    max-width: 90%;
    max-height: 90%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: white;
    font-size: 30px;
    cursor: pointer;
}

/* ---- Buchungsformular ---- */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: border-color 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #1f2937;
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Datepicker Anpassungen */
.datepicker-input {
    background-image: url('../images/icon-calendar.svg');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
}

/* Custom Checkboxes und Radio Buttons */
.custom-checkbox, .custom-radio {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.custom-checkbox input, .custom-radio input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.checkmark {
    position: relative;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 3px;
    margin-right: 10px;
}

.custom-radio .checkmark {
    border-radius: 50%;
}

.custom-checkbox:hover input ~ .checkmark,
.custom-radio:hover input ~ .checkmark {
    background-color: #ccc;
}

.custom-checkbox input:checked ~ .checkmark,
.custom-radio input:checked ~ .checkmark {
    background-color: #3b82f6;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after,
.custom-radio input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 7px;
    top: 3px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-radio .checkmark:after {
    top: 6px;
    left: 6px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* ---- Buttons ---- */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    text-align: center;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    cursor: pointer;
}

.btn-primary {
    background-color: #3b82f6;
    color: white;
}

.btn-primary:hover {
    background-color: #2563eb;
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid #3b82f6;
    color: #3b82f6;
}

.btn-secondary:hover {
    background-color: rgba(59, 130, 246, 0.1);
}

/* ---- Admin-Bereich ---- */
.admin-card {
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    background-color: white;
    margin-bottom: 1rem;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th, .admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.admin-table th {
    background-color: #f8fafc;
    font-weight: 600;
}

.admin-table tr:hover {
    background-color: #f1f5f9;
}

/* Status-Badges für Buchungen */
.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.status-pending {
    background-color: #fef3c7;
    color: #92400e;
}

.status-confirmed {
    background-color: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background-color: #fee2e2;
    color: #b91c1c;
}

/* ---- Kalender ---- */
.calendar {
    width: 100%;
    border-collapse: collapse;
}

.calendar th, .calendar td {
    padding: 10px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.calendar th {
    background-color: #f8fafc;
    font-weight: 600;
}

.calendar .today {
    background-color: #e0f2fe;
    font-weight: 600;
}

.calendar .booked {
    background-color: #fee2e2;
    color: #b91c1c;
}

.calendar .free {
    background-color: #d1fae5;
    color: #065f46;
}

.calendar .arrival {
    background: linear-gradient(135deg, #d1fae5 50%, #fee2e2 50%);
}

.calendar .departure {
    background: linear-gradient(135deg, #fee2e2 50%, #d1fae5 50%);
}

/* ---- Responsive Anpassungen ---- */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .hidden-mobile {
        display: none;
    }

    .mobile-menu {
        display: block;
    }

    .admin-table {
        font-size: 14px;
    }

    .admin-table th, .admin-table td {
        padding: 8px;
    }

    /* Verbesserte mobile Menü-Darstellung */
    nav .flex.flex-col a {
        padding: 0.75rem 0;
        width: 100%;
    }

    /* Schatten-Effekt für mobiles Menü */
    nav [x-show="mobileMenuOpen"] {
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    }

    /* Hamburger Icon Verbesserungen */
    nav button i.fa-bars {
        padding: 0.5rem;
    }
}

/* ---- Druckstile ---- */
@media print {
    header, footer, .no-print {
        display: none;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .container {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    .print-full-width {
        width: 100%;
    }
}

/* ---- Animationen ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(30px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in {
    animation: slideInFromRight 0.5s ease-in-out;
}

/* ---- Tooltips ---- */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltip-text {
    visibility: hidden;
    width: 200px;
    background-color: #333;
    color: #fff;
    text-align: center;
    border-radius: 6px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
}

.tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* ---- Utilities ---- */
.text-shadow {
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.box-shadow {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.box-shadow-hover:hover {
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

.transition-all {
    transition: all 0.3s ease-in-out;
}

body {
    font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}


/* Moderner Markenname/Titel */
nav .text-xl.font-bold {
    font-weight: 700;
    letter-spacing: 0.01em;
    font-size: 1.3rem;
}

/* Desktop Navigation Links */
nav .hidden.md\:flex a {
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.05em;
    position: relative;
    padding: 0.5rem 0.25rem;
    transition: all 0.3s ease;
}

/* Unterstrich-Animation für Navigation Links */
nav .hidden.md\:flex a:not(.bg-white):after {
    content: "";
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: rgba(255, 255, 255, 0.8);
    transition: width 0.3s ease;
}

nav .hidden.md\:flex a:not(.bg-white):hover:after {
    width: 100%;
}

/* Aktiver Navigationspunkt */
nav .hidden.md\:flex a.text-orange-200:after {
    width: 50%;
    background-color: #fed7aa; /* Helles Orange */
}

/* "Reservieren" Button */
nav a.bg-white.text-orange-600 {
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

nav a.bg-white.text-orange-600:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Mobile Navigation Styling */
nav [x-show="mobileMenuOpen"] a {
    font-weight: 500;
    letter-spacing: 0.03em;
    transition: all 0.2s ease;
}

@media (max-width: 767px) {
    nav [x-show="mobileMenuOpen"] {
        border-radius: 0.5rem;
    }

    nav [x-show="mobileMenuOpen"] a {
        text-transform: uppercase;
        font-size: 0.9rem;
        padding: 0.75rem 0.5rem;
    }

    /* Hamburger-Icon */
    nav button i.fa-bars {
        font-size: 1.25rem;
    }

    /* Reservieren Button im mobilen Menü */
    nav [x-show="mobileMenuOpen"] a.bg-white.text-orange-600 {
        margin: 0.5rem 0;
        font-weight: 600;
        font-size: 0.85rem;
        text-align: center;
        width: auto;
        display: inline-block;
    }
}

/* Füge diese Stilanpassungen zu deiner styles.css Datei hinzu */

/* Spezifische Anpassungen für die Navigation */
nav {
    /* Verbesserte Font-Rendering-Einstellungen für die Navigation */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Desktop-Navigation: Feinabstimmung für systemnahe Schriften */
nav .hidden.md\:flex a {
    /* Optimierte Abstände für Systemschriften */
    letter-spacing: 0.02em; /* Etwas reduzierter Zeichenabstand */
    padding: 0.5rem 0.35rem; /* Leicht angepasste Polsterung */
    font-weight: 600; /* Etwas stärker für bessere Lesbarkeit */
    font-size: 0.9rem; /* Leicht größer für bessere Lesbarkeit */
}

/* Logo/Websitentitel: Verbesserte Darstellung */
nav .text-xl.font-bold {
    font-weight: 700; /* Maximale Stärke für klare Darstellung */
    letter-spacing: 0.01em; /* Leicht angepasster Zeichenabstand */
}

/* "Reservieren" Button optimieren */
nav a.bg-white.text-orange-600 {
    font-weight: 600;
    /* Leicht geänderte Abstände für bessere Darstellung mit Systemschriften */
    letter-spacing: 0.01em;
    padding: 0.5rem 1rem; /* Etwas mehr horizontalen Platz */
}

/* Mobiles Menü: Bessere Lesbarkeit */
@media (max-width: 767px) {
    nav [x-show="mobileMenuOpen"] a {
        font-weight: 600; /* Stärker für bessere Lesbarkeit auf kleinen Bildschirmen */
        font-size: 1rem; /* Etwas größer für Touch-Geräte */
    }
}