/**
 * BFHD Pro - Premium Single Listing Styles
 * Option B + Layout 1: Classic Professional with Sidebar
 */

:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --secondary-gradient: linear-gradient(135deg, #00E2C1 0%, #00a896 100%);
    --accent-color: #667eea;
    --text-dark: #1a202c;
    --text-gray: #4a5568;
    --text-light: #718096;
    --bg-light: #f8fafc;
    --bg-white: #ffffff;
    --border-color: #e2e8f0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   MAIN CONTAINER
   ================================ */
.bfhd-listing-premium {
    background: var(--bg-light);
    min-height: 100vh;
    padding: 20px 0;
    /* Vertical padding only, horiz handled by container */
}

.bfhd-listing-premium .container {
    max-width: 1360px;
    /* Match site header width exactly */
    margin: 0 auto;
    padding-left: 20px;
    padding-right: 20px;
}

/* ================================
   BREADCRUMB NAVIGATION
   ================================ */
.bfhd-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    color: var(--text-light);
}

.bfhd-breadcrumb a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.bfhd-breadcrumb a:hover {
    color: #764ba2;
    text-decoration: underline;
}

.bfhd-breadcrumb .separator {
    color: var(--border-color);
    margin: 0 4px;
}

.bfhd-breadcrumb .current {
    color: var(--text-dark);
    font-weight: 600;
}

/* ================================
   HERO SECTION
   ================================ */
.bfhd-hero {
    /* Brand Gradient + 20% Black Overlay for readability */
    background: #757DFE !important;
    /* Fallback */
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), linear-gradient(135deg, #00E2C1 0%, #757DFE 100%) !important;
    border-radius: var(--radius-lg);
    padding: 40px;
    color: white !important;
    /* Force white text */
    box-shadow: var(--shadow-lg);
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-sizing: border-box !important;
}

.bfhd-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: heroGlow 15s ease-in-out infinite;
}

@keyframes heroGlow {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(-50px, -50px);
    }
}

.bfhd-hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    /* Switch to Grid to match page layout */
    grid-template-columns: 350px 1fr;
    /* Exact match to .bfhd-layout-container */
    gap: 30px;
    align-items: center;
    /* Center logo vertically relative to info? Or start? User said "center of Quick Info width" */
}

.bfhd-hero-logo {
    width: 180px;
    /* Larger logo */
    height: 180px;
    border-radius: 50%;
    /* Circle */
    background: white;
    padding: 5px;
    /* Thinner padding */
    object-fit: contain;
    /* Center horizontally in the 350px column */
    margin: 0 auto;
    justify-self: center;
    /* Ripple Effect */
    box-shadow:
        0 0 0 15px rgba(255, 255, 255, 0.1),
        0 0 0 30px rgba(255, 255, 255, 0.05),
        0 8px 24px rgba(0, 0, 0, 0.3);
}

.bfhd-hero-logo.placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
}

.bfhd-hero-info {
    width: 100%;
    display: flex;
    /* Define flex */
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-left: 40px;
    /* Match body content padding */
    box-sizing: border-box;
}

.bfhd-hero-title {
    font-size: 42px;
    font-weight: 800;
    margin: 0 0 15px 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    /* Stronger shadow */
}

/* Bottom Row Layout */
.bfhd-hero-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

/* Badges - Right Side */
.bfhd-hero-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bfhd-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #60A5FA;
    /* Blue */
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bfhd-verified-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #10B981;
    /* Green */
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.bfhd-view-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #374151;
    /* Dark Gray */
    color: white;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}


/* Action Buttons - Modern & Green */
.bfhd-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.bfhd-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 40px;
    /* Square button for icon only */
    height: 40px;
    border-radius: 50%;
    /* Circle */
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    background: white;
    /* White background */
    color: #48bb78;
    /* Green icons */
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.bfhd-action-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
    background: #48bb78;
    color: white;
}

/* Save button specific - larger/pill? No, keep uniform icons for social */
.bfhd-action-btn.primary {
    /* If we want Save to be text, we need to override width */
    width: auto;
    padding: 0 20px;
    border-radius: 20px;
    background: white;
    color: #48bb78;
}

.bfhd-action-btn.primary:hover {
    background: #48bb78;
    color: white;
}

.bfhd-action-btn.secondary {
    /* Inherits circular style */
}

.bfhd-action-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* ================================
   MAIN LAYOUT (SIDEBAR + CONTENT)
   ================================ */
.bfhd-layout-container {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 30px;
    align-items: start;
    /* Force full width and alignment */
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
}

.bfhd-sidebar,
.bfhd-main-content {
    box-sizing: border-box !important;
}

/* ================================
   SIDEBAR
   ================================ */
.bfhd-sidebar {
    position: sticky;
    top: 20px;
}

.bfhd-quick-info {
    background: white;
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow-md);
}

.bfhd-quick-info-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px 0;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.bfhd-contact-item {
    margin-bottom: 20px;
}

.bfhd-contact-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.bfhd-contact-value {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
}

.bfhd-contact-value a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

.bfhd-contact-value a:hover {
    color: #764ba2;
}

.bfhd-copy-btn {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}

.bfhd-copy-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.bfhd-copy-btn.copied {
    background: #48bb78;
    color: white;
    border-color: #48bb78;
}

/* CTA Buttons in Sidebar */
.bfhd-sidebar-ctas {
    margin-top: 25px;
    padding-top: 25px;
    border-top: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.bfhd-cta-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
}

.bfhd-cta-btn.call {
    background: var(--primary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.bfhd-cta-btn.call:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.bfhd-cta-btn.email {
    background: var(--secondary-gradient);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 226, 193, 0.4);
}

.bfhd-cta-btn.email:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 226, 193, 0.6);
}

.bfhd-cta-btn.website {
    background: white;
    color: var(--accent-color);
    border: 2px solid var(--accent-color);
}

.bfhd-cta-btn.website:hover {
    background: var(--accent-color);
    color: white;
}

/* ================================
   MAIN CONTENT AREA
   ================================ */
.bfhd-main-content {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

/* TAB NAVIGATION */
.bfhd-tab-nav {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    background: var(--bg-light);
    overflow-x: auto;
}

.bfhd-tab-nav::-webkit-scrollbar {
    height: 4px;
}

.bfhd-tab-nav::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.bfhd-tab-button {
    flex: 1;
    min-width: max-content;
    padding: 18px 24px;
    background: transparent;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-gray);
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.bfhd-tab-button:hover {
    background: rgba(102, 126, 234, 0.05);
    color: var(--accent-color);
}

.bfhd-tab-button.active {
    color: var(--accent-color);
    background: white;
}

.bfhd-tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-gradient);
}

/* TAB PANELS */
.bfhd-tab-panel {
    display: none;
    padding: 40px;
    animation: fadeIn 0.4s ease-in-out;
}

.bfhd-tab-panel.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bfhd-tab-panel h2 {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 20px 0;
}

.bfhd-tab-panel h3 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 30px 0 15px 0;
}

.bfhd-tab-panel p {
    line-height: 1.8;
    color: var(--text-gray);
    font-size: 16px;
    margin-bottom: 16px;
}

.bfhd-tab-panel a {
    color: var(--accent-color);
    text-decoration: underline;
}

.bfhd-tab-panel a:hover {
    color: #764ba2;
}

/* Additional Info Grid */
.bfhd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.bfhd-info-card {
    background: var(--bg-light);
    padding: 20px;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--accent-color);
}

.bfhd-info-card-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-light);
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.bfhd-info-card-value {
    font-size: 16px;
    color: var(--text-dark);
    font-weight: 500;
}

/* ================================
   GALLERY SECTION
   ================================ */
.bfhd-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.bfhd-gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4/3;
    background: var(--bg-light);
}

.bfhd-gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.bfhd-gallery-item:hover img {
    transform: scale(1.1);
}

.bfhd-gallery-item::after {
    content: '🔍';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 32px;
    opacity: 0;
    transition: var(--transition);
}

.bfhd-gallery-item:hover::after {
    opacity: 1;
}

/* ================================
   LIGHTBOX MODAL
   ================================ */
.bfhd-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.bfhd-lightbox.active {
    display: flex;
}

.bfhd-lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.bfhd-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--radius-md);
}

.bfhd-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: white;
    color: var(--text-dark);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.bfhd-lightbox-close:hover {
    transform: scale(1.1);
    background: var(--accent-color);
    color: white;
}

.bfhd-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    transition: var(--transition);
}

.bfhd-lightbox-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.bfhd-lightbox-prev {
    left: 20px;
}

.bfhd-lightbox-next {
    right: 20px;
}

.bfhd-lightbox-counter {
    position: absolute;
    bottom: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 600;
    color: var(--text-dark);
}

/* ================================
   RELATED LISTINGS
   ================================ */
.bfhd-related-section {
    margin-top: 40px;
}

.bfhd-related-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 25px;
}

.bfhd-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.bfhd-related-card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    text-decoration: none;
    display: flex;
    flex-direction: column;
}

.bfhd-related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.bfhd-related-logo {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--bg-light);
}

.bfhd-related-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.bfhd-related-name {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.bfhd-related-category {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 12px;
}

.bfhd-related-excerpt {
    font-size: 14px;
    color: var(--text-gray);
    line-height: 1.6;
    flex: 1;
}

.bfhd-related-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--accent-color);
    font-weight: 600;
    margin-top: 12px;
}

/* ================================
   RESPONSIVE DESIGN
   ================================ */
@media (max-width: 1024px) {
    .bfhd-layout-container {
        grid-template-columns: 1fr;
    }

    /* Stack Header content on mobile/tablet */
    .bfhd-hero-content {
        grid-template-columns: 1fr;
        justify-items: center;
        /* Center everything */
        text-align: center;
    }

    .bfhd-hero-info {
        display: flex;
        flex-direction: column;
        align-items: center;
        padding-left: 0;
        /* Reset for mobile center alignment */
    }

    .bfhd-hero-meta,
    .bfhd-hero-actions {
        justify-content: center;
    }

    .bfhd-sidebar {
        order: 2;
        /* Position static is default */
    }

    .bfhd-main-content {
        order: 1;
    }
}

@media (max-width: 768px) {
    .bfhd-hero {
        padding: 25px;
    }

    .bfhd-hero-title {
        font-size: 28px;
    }

    .bfhd-hero-logo {
        width: 100px;
        height: 100px;
    }

    .bfhd-tab-panel {
        padding: 25px;
    }

    .bfhd-quick-info {
        padding: 20px;
    }

    .bfhd-related-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================
   PRINT STYLES
   ================================ */
@media print {

    .bfhd-hero-actions,
    .bfhd-tab-nav,
    .bfhd-related-section,
    .bfhd-copy-btn {
        display: none !important;
    }

    .bfhd-layout-container {
        grid-template-columns: 1fr;
    }

    .bfhd-tab-panel {
        display: block !important;
        page-break-inside: avoid;
    }
}