/**
 * Business Directory - Alap CSS stílusok
 *
 * @version 1.0.0
 */

/* ============================================
   KATEGÓRIA SZŰRŐ GOMBOK
   ============================================ */

.bd-filter-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.bd-filter-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #495057;
    background-color: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.bd-filter-btn:hover {
    color: #212529;
    border-color: #adb5bd;
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.bd-filter-btn.active {
    color: #ffffff;
    background-color: #007bff;
    border-color: #007bff;
}

.bd-filter-btn.active:hover {
    background-color: #0056b3;
    border-color: #0056b3;
}

/* ============================================
   GRID ELRENDEZÉS
   ============================================ */

.bd-grid-container {
    min-height: 200px;
}

.bd-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

/* ============================================
   KÁRTYÁK (CARDS)
   ============================================ */

.bd-card {
    display: flex;
    flex-direction: column;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07), 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    position: relative;
}

.bd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #007bff 0%, #00c6ff 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bd-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12), 0 8px 16px rgba(0, 0, 0, 0.08);
}

.bd-card:hover::before {
    opacity: 1;
}

/* Kártya kép */
.bd-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.bd-card-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60%;
    background: linear-gradient(to top, rgba(0,0,0,0.4) 0%, transparent 100%);
    pointer-events: none;
}

.bd-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.bd-card-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.bd-card:hover .bd-card-thumbnail {
    transform: scale(1.08);
}

/* Kártya tartalom */
.bd-card-content {
    padding: 24px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.bd-card-title {
    margin: 0 0 16px 0;
    font-size: 1.3rem;
    font-weight: 700;
    line-height: 1.4;
}

.bd-card-title a {
    color: #1a1a2e;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(120deg, #007bff 0%, #007bff 100%);
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: 0 95%;
}

.bd-card-title a:hover {
    color: #007bff;
    background-size: 100% 2px;
}

/* ============================================
   META ADATOK
   ============================================ */

.bd-card-meta {
    margin-top: auto;
    padding-top: 18px;
    border-top: 2px solid #f0f0f0;
}

.bd-meta-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.5;
}

.bd-meta-item:last-child {
    margin-bottom: 0;
}

.bd-meta-label {
    font-weight: 600;
    color: #4a5568;
    margin-right: 10px;
    min-width: 90px;
    flex-shrink: 0;
}

.bd-meta-value {
    color: #2d3748;
    flex: 1;
    word-break: break-word;
}

/* Kiemelt meta adatok (pl. Telefon, Weboldal) */
.bd-meta-item:nth-child(1) .bd-meta-value,
.bd-meta-item:nth-child(2) .bd-meta-value {
    font-weight: 500;
    color: #007bff;
}

/* ============================================
   LOADING INDIKÁTOR
   ============================================ */

.bd-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.bd-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: bd-spin 1s linear infinite;
}

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

/* ============================================
   HIBAÜZENETEK ÉS EGYÉB
   ============================================ */

.bd-no-results,
.bd-error-message {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 16px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #dee2e6;
}

.bd-error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

/* ============================================
   RESZPONZÍV STÍLUSOK
   ============================================ */

@media (max-width: 768px) {
    .bd-filter-container {
        padding: 12px;
        gap: 8px;
    }

    .bd-filter-btn {
        padding: 8px 14px;
        font-size: 12px;
    }

    .bd-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .bd-card {
        border-radius: 12px;
    }

    .bd-card-image {
        height: 180px;
    }

    .bd-card-content {
        padding: 18px;
    }

    .bd-card-title {
        font-size: 1.15rem;
    }

    .bd-meta-label {
        min-width: 75px;
        font-size: 13px;
    }

    .bd-meta-value {
        font-size: 13px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .bd-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   TÉRKÉP STÍLUSOK
   ============================================ */

.bd-map-wrapper {
    position: relative;
}

.bd-map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(248, 249, 250, 0.95);
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.bd-map-overlay-content {
    text-align: center;
    padding: 20px;
}

.bd-map-container {
    width: 100%;
    height: 600px;
    background-color: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Térkép loading */
.bd-map-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 1000;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.bd-map-loading p {
    margin-top: 15px;
    color: #6c757d;
    font-size: 14px;
}

/* Leaflet popup stílusok */
.bd-map-popup {
    min-width: 200px;
    max-width: 300px;
    font-family: inherit;
}

.bd-popup-title {
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
}

.bd-popup-title a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bd-popup-title a:hover {
    color: #0056b3;
    text-decoration: underline;
}

.bd-popup-address {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #495057;
}

.bd-popup-meta {
    margin: 10px 0;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.bd-popup-meta p {
    margin: 5px 0;
    font-size: 13px;
    color: #6c757d;
}

.bd-popup-meta strong {
    color: #495057;
}

.bd-popup-link {
    margin: 15px 0 0 0;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.bd-popup-button {
    display: inline-block;
    padding: 8px 16px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.bd-popup-button:hover {
    background-color: #0056b3;
    color: white;
}

/* Leaflet marker animáció */
.leaflet-marker-icon {
    transition: all 0.3s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
}

/* Reszponzív térkép */
@media (max-width: 768px) {
    .bd-map-container {
        height: 400px;
    }

    .bd-map-popup {
        min-width: 180px;
        max-width: 250px;
    }

    .bd-popup-title {
        font-size: 14px;
    }
}

/* ============================================
   ALKATEGÓRIA MEGJELENÍTÉSE A KÁRTYÁN
   ============================================ */

.bd-card-category {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 12px;
    font-weight: 500;
}

.bd-card-category::before {
    content: '\f318';
    font-family: 'dashicons';
    margin-right: 5px;
    vertical-align: middle;
    color: #007bff;
}
