/**
 * Branchenbuchsuche - CSS Styles
 *
 * Google-ähnliche Suchmaschine für Branchenverzeichnisse
 */

/* Hero Section */
.branchenbuch-hero {
    background: transparent;
    padding: 60px 0 40px;
    display: flex;
    align-items: center;
}

.branchenbuch-logo {
    max-height: 80px;
    margin-bottom: 20px;
}

.branchenbuch-title {
    color: #212529;
    font-weight: 700;
    font-size: 2.5rem;
}

.branchenbuch-subtitle {
    color: #6c757d;
    font-size: 1.1rem;
    max-width: 600px;
    line-height: 1.6;
}

/* ===== GUIDED TOUR STYLES ===== */

/* Overlay */
.tour-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.tour-overlay.active {
    opacity: 1;
    pointer-events: none; /* Klicks durchlassen, nur visuell abdunkeln */
}

/* Highlighted Element */
.tour-highlight {
    position: relative;
    z-index: 99999 !important;
    box-shadow: 0 0 0 4px rgba(13, 110, 253, 0.5), 0 0 20px rgba(13, 110, 253, 0.3) !important;
    border-radius: 8px;
}

/* Tooltip */
.tour-tooltip {
    position: fixed;
    background: white;
    border-radius: 12px;
    padding: 20px;
    max-width: 340px;
    width: calc(100vw - 40px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 100000;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tour-tooltip.active {
    opacity: 1;
    transform: translateY(0);
}

/* Tooltip Arrow */
.tour-tooltip::before {
    content: '';
    position: absolute;
    width: 0;
    height: 0;
    border: 10px solid transparent;
}

.tour-tooltip.arrow-top::before {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-bottom-color: white;
}

.tour-tooltip.arrow-bottom::before {
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-top-color: white;
}

.tour-tooltip.arrow-left::before {
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border-right-color: white;
}

/* Tooltip Content */
.tour-tooltip-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #212529;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tour-tooltip-title i {
    color: #0d6efd;
}

.tour-tooltip-text {
    color: #6c757d;
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 15px;
}

/* Tour Buttons */
.tour-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.tour-btn {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.tour-btn-skip {
    background: transparent;
    color: #6c757d;
}

.tour-btn-skip:hover {
    background: #f8f9fa;
}

.tour-btn-next {
    background: #0d6efd;
    color: white;
}

.tour-btn-next:hover {
    background: #0b5ed7;
}

/* Tour Progress */
.tour-progress {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin-top: 15px;
}

.tour-progress-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #dee2e6;
    transition: background 0.2s ease;
}

.tour-progress-dot.active {
    background: #0d6efd;
}

/* Search Wrapper */
.branchenbuch-search-wrapper {
    position: relative;
    background: white;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 5px;
}

.branchenbuch-input {
    border: none !important;
    font-size: 1.1rem;
    padding-left: 0 !important;
}

.branchenbuch-input:focus {
    box-shadow: none !important;
}

.branchenbuch-btn {
    border-radius: 50px !important;
    padding: 12px 30px;
}

.input-group-text {
    border: none !important;
    background: transparent !important;
}

/* Autocomplete Dropdown */
.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 20px 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    display: none;
    z-index: 1000;
    max-height: 400px;
    overflow-y: auto;
    margin-top: -5px;
    padding-top: 10px;
}

.autocomplete-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 20px 20px;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa;
}

/* Tag Badges */
.tag-badge,
.branchenbuch-hero .badge.bg-secondary {
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
    cursor: pointer;
    padding: 8px 12px !important;
    font-size: 0.85rem;
    border-radius: 20px;
}

.tag-badge:hover,
.branchenbuch-hero .badge.bg-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    background-color: #495057 !important;
    color: white !important;
}

/* Portal Cards */
.portal-card {
    border: none;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 15px;
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Suchergebnis Cards */
.portal-ergebnis-card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s;
}

.portal-ergebnis-card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.portal-tags .badge {
    font-weight: 400;
    font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 768px) {
    .branchenbuch-hero {
        padding: 40px 0;
        min-height: auto;
    }

    .branchenbuch-title {
        font-size: 1.8rem;
    }

    .branchenbuch-search-wrapper {
        border-radius: 20px;
        padding: 10px;
    }

    .branchenbuch-search-wrapper .input-group {
        flex-wrap: wrap;
    }

    .branchenbuch-search-wrapper .input-group-text {
        border-radius: 15px 0 0 15px !important;
    }

    .branchenbuch-input {
        flex: 1 1 auto;
        border-radius: 0 15px 15px 0 !important;
        min-width: 0;
    }

    .branchenbuch-btn {
        width: 100%;
        margin-top: 10px;
        padding: 12px 20px;
        border-radius: 15px !important;
        font-size: 1rem;
    }
}

/* Extra kleine Geraete */
@media (max-width: 480px) {
    .branchenbuch-hero {
        padding: 30px 0;
    }

    .branchenbuch-title {
        font-size: 1.5rem;
    }

    .branchenbuch-subtitle {
        font-size: 0.9rem;
    }

    .branchenbuch-search-wrapper {
        padding: 8px;
    }

    .branchenbuch-btn {
        padding: 10px 15px;
        font-size: 0.95rem;
    }

    .branchenbuch-input {
        font-size: 1rem;
    }

    /* Tour Mobile Extra Small */
    .tour-tooltip {
        max-width: calc(100vw - 30px);
        padding: 15px;
    }

    .tour-tooltip-title {
        font-size: 1rem;
    }

    .tour-tooltip-text {
        font-size: 0.85rem;
    }

    .tour-btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

/* Tour Mobile Allgemein */
@media (max-width: 768px) {
    .tour-tooltip {
        left: 50% !important;
        transform: translateX(-50%);
        max-width: calc(100vw - 40px);
    }

    .tour-tooltip.active {
        transform: translateX(-50%) translateY(0);
    }

    .tour-tooltip.arrow-top::before,
    .tour-tooltip.arrow-bottom::before {
        left: 50%;
        transform: translateX(-50%);
    }

    .branchenbuch-subtitle {
        font-size: 1rem;
        padding: 0 10px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.portal-card,
.portal-ergebnis-card {
    animation: fadeIn 0.3s ease-out;
}

/* Dark Mode - Suchfeld bleibt IMMER weiß */
.branchenbuch-search-wrapper {
    background: white !important;
}

.branchenbuch-input {
    background: white !important;
    color: #212529 !important;
}

.autocomplete-dropdown {
    background: white !important;
}

.autocomplete-item:hover,
.autocomplete-item.active {
    background-color: #f8f9fa !important;
}
