/* ============================================
   FM MARKETPLACE - FINAL CSS (styles existing markup)
   ============================================ */

/* --- Card Container --- */
.view-marketplace-service-providers .views-col > div,
.view-marketplace-vendors .views-col > div,
.view-marketplace-professional-services .views-col > div,
.view-marketplace-directory .views-col > div,
.view-marketplace-featured-partners .views-row {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, border-color 0.2s;
    height: 100%;
    text-align: center;
}
.view-marketplace-service-providers .views-col > div:hover,
.view-marketplace-vendors .views-col > div:hover,
.view-marketplace-professional-services .views-col > div:hover,
.view-marketplace-directory .views-col > div:hover,
.view-marketplace-featured-partners .views-row:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border-color: #004a99;
}

/* Grid spacing */
.view-marketplace-service-providers .views-view-grid .views-col,
.view-marketplace-vendors .views-view-grid .views-col,
.view-marketplace-professional-services .views-view-grid .views-col,
.view-marketplace-directory .views-view-grid .views-col {
    padding: 0 10px 20px;
}

/* --- Logo Container --- */
.views-field-field-company-logo {
    background: #fff;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 160px;
    border-bottom: 1px solid #f0f0f0;
}
.views-field-field-company-logo img {
    max-width: 250px !important;
    max-height: 120px !important;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

/* --- Company Name --- */
.views-field-title {
    padding: 12px 15px 0;
    text-align: center;
}
.views-field-title span,
.views-field-title a {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    text-decoration: none;
}
.views-field-title a:hover {
    color: #004a99;
}

/* --- Organisation Type Badge --- */
.views-field-field-company-org-type {
    padding: 5px 15px;
    text-align: center;
}
.views-field-field-company-org-type .field-content {
    display: inline-block;
    background: #e8f0fe;
    color: #004a99;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* --- Action Buttons --- */
.card-actions {
    display: flex;
    gap: 0.5rem;
    padding: 10px 15px 15px;
    margin-top: auto;
}
.card-actions .btn-outline,
.card-actions .btn-solid {
    flex: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}
.card-actions .btn-outline {
    border: 1px solid #004a99;
    color: #004a99;
    background: #fff;
}
.card-actions .btn-outline:hover {
    background: #e8f0fe;
}
.card-actions .btn-solid {
    background: #004a99;
    color: #fff;
    border: 1px solid #004a99;
}
.card-actions .btn-solid:hover {
    background: #003366;
}

/* --- Hero --- */
.marketplace-hero {
    background: linear-gradient(135deg, #004a99 0%, #002244 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}
.marketplace-hero__title { font-size: 2.5rem; font-weight: 700; margin-bottom: 1rem; }
.marketplace-hero__subtitle { font-size: 1.2rem; opacity: 0.9; }

/* --- Intent Buttons --- */
.intent-card {
    display: block;
    text-align: center;
    padding: 2rem 1rem;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px solid transparent;
    transition: all 0.3s;
    text-decoration: none;
    color: #333;
    height: 100%;
}
.intent-card:hover {
    border-color: #004a99;
    box-shadow: 0 4px 15px rgba(0,74,153,0.15);
    text-decoration: none;
    color: #004a99;
    transform: translateY(-2px);
}
.intent-card i { color: #004a99; margin-bottom: 1rem; }
.intent-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 0.5rem; }
.intent-card p { font-size: 0.9rem; color: #666; margin-bottom: 0; }

/* --- Featured Partners Ribbon --- */
.view-marketplace-featured-partners {
    overflow-x: auto;
    margin-bottom: 2rem;
}
.view-marketplace-featured-partners .view-content {
    display: flex;
    gap: 15px;
}
.view-marketplace-featured-partners .views-row {
    min-width: 180px;
    border: 2px solid #004a99 !important;
    border-radius: 8px;
    padding: 15px 10px;
    text-align: center;
    background: linear-gradient(135deg, #f0f4ff, #fff);
}
.view-marketplace-featured-partners .views-field-field-company-logo {
    height: 100px;
    padding: 0.5rem;
    border-bottom: none;
}
.view-marketplace-featured-partners .views-field-field-company-logo img {
    max-height: 80px !important;
}
.view-marketplace-featured-partners .views-field-title {
    font-size: 0.85rem;
    font-weight: 600;
    padding: 5px;
}

/* --- Shelf Headers --- */
.block-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

/* --- Filter Bar --- */
.views-exposed-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}
.views-exposed-form .form--inline {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.views-exposed-form .form-item { margin-bottom: 0; }
.views-exposed-form label { font-weight: 600; font-size: 0.8rem; margin-bottom: 3px; display: block; }
.views-exposed-form .form-text,
.views-exposed-form .form-select { padding: 8px 12px; border: 1px solid #ddd; border-radius: 4px; }
.views-exposed-form .form-submit { background: #004a99; color: #fff; border: none; padding: 9px 20px; border-radius: 4px; cursor: pointer; font-weight: 600; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .marketplace-hero { padding: 2rem 0; }
    .marketplace-hero__title { font-size: 1.8rem; }
    .card-actions { flex-direction: column; }
    .views-exposed-form .form--inline { flex-direction: column; }
}

/* VVJT visibility fixes */
.vvjt-tabs-container { display: block !important; }
.vvjt-tab-pane { display: none; }
.vvjt-tab-pane.active { display: block !important; }
.vvjt-tab-link { cursor: pointer; display: inline-block; }

/* Force Tab Label Visibility */
.vvjt-button, 
.vvjt-tab-link, 
.vvjt-tab-title {
    color: #333 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    display: inline-block !important;
    min-width: 150px;
    text-align: center;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Clear any 'empty button' styling from the theme */
.vvjt-button:empty::before {
    content: "Category Label Missing";
    color: red;
}

/* Minimalist B2B Card Styling */
.b2b-card {
    border: 1px solid #eee !important;
    box-shadow: none !important;
    padding: 20px !important;
    transition: all 0.3s ease;
}
.b2b-card:hover {
    border-color: #1a73e8 !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05) !important;
}
/* Reduce Logo Visual Noise */
.b2b-card__logo-container img {
    filter: grayscale(100%);
    opacity: 0.7;
    transition: all 0.3s ease;
}
.b2b-card:hover .b2b-card__logo-container img {
    filter: grayscale(0%);
    opacity: 1;
}
/* Intent Block Removal (Optional/Manual) */
.intent-buttons { display: none; } 
/* Pro A-Z Bar */
.marketplace-az-wrapper { margin: 30px 0; border-bottom: 2px solid #eee; padding-bottom: 15px; }
.az-links { list-style: none; display: flex; justify-content: space-between; padding: 0; }
.az-links a { font-weight: 700; color: #1a73e8; text-decoration: none; padding: 5px 10px; border-radius: 4px; }
.az-links a:hover { background: #1a73e8; color: #fff; }

/* Hide redundant Intent Buttons */
.intent-buttons { display: none !important; }

/* Logo Uniformity - B2B Professionalism */
.views-field-field-company-logo img {
    filter: grayscale(100%);
    opacity: 0.8;
    max-height: 80px;
    object-fit: contain;
    transition: all 0.4s ease;
}
.views-row:hover .views-field-field-company-logo img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Toolbar Style Filters for Directory Page */
.path-directory .views-exposed-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 2rem;
}
.path-directory .form-actions {
    align-self: end;
}
.path-directory .button {
    width: 100%;
    background: #1a73e8;
    color: #fff;
    border: none;
    padding: 10px;
    border-radius: 4px;
}
/* Ensure Logo Uniformity */
.b2b-card__logo-container {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    overflow: hidden;
}

.b2b-card__logo-container img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}
/* Card Type Badge */
.b2b-card__type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f0f4f8;
    color: #546e7a;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

/* Specific styling for Strategic/Non-Profit Partners */
.b2b-card:has(.b2b-card__type-badge:contains("Charity")) {
    border-left: 4px solid #4caf50; /* Green for CSR/Social Value */
}
/* Directory Main Container */
.path-directory .layout-builder__region {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Preparation for "Best Practice" Sidebar */
.directory-editorial-sidebar {
    background: #f9f9f9;
    border-left: 4px solid #1a73e8;
    padding: 20px;
    margin-bottom: 2rem;
}
/* Premium Category Tiles */
.service-tile {
    border-top: 4px solid #1a73e8 !important;
    background: #ffffff !important;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05) !important;
    padding: 30px 15px !important;
    text-align: center;
    border-radius: 0 0 8px 8px !important;
}

.service-tile strong {
    font-size: 1.1rem !important;
    color: #222 !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


/* 4th Pillar Social Value Cards */
.node--type-opportunity {
    border-left: 5px solid #28a745 !important; /* Green for CSR */
    background: #fdfdfd;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 0 8px 8px 0;
}
.opportunity-badge {
    background: #e9f7ef;
    color: #28a745;
    padding: 4px 10px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Intelligence Sidebar Promotion */
.sidebar-promo-block {
    background: #fdfdfd;
    border: 1px solid #1a73e8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 2rem;
}
.sidebar-promo-block h4 { color: #1a73e8; font-size: 0.9rem; margin-top: 0; }
.sidebar-promo-link { font-weight: 700; text-decoration: none; display: block; }

/* Sidebar Opportunity Block */
.block-views-blockmarketplace-tabbed-companies-block-social-value {
    background: #f4faf6 !important;
    border-top: 4px solid #28a745 !important;
    padding: 15px !important;
    margin-bottom: 2rem !important;
}
.block-views-blockmarketplace-tabbed-companies-block-social-value h2 {
    color: #28a745 !important;
    font-size: 1.1rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
}

/* Marketplace Buttons */
.btn-contact {
    display: inline-block;
    background: #1a73e8;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: 10px;
}
.btn-contact:hover { background: #1557b0; }

/* Social Value Variant */
.node--type-opportunity .btn-contact {
    background: #28a745;
}

.btn-back {
    display: inline-block !important;
    color: #1a73e8 !important;
    font-weight: 700 !important;
    text-decoration: none !important;
    border: 1px solid #1a73e8 !important;
    padding: 8px 18px !important;
    border-radius: 4px !important;
    transition: 0.3s !important;
}
.btn-back:hover {
    background: #1a73e8 !important;
    color: #fff !important;
}



/* Target modern wide desktop monitors */
@media (min-width: 1400px) {
  body.is-front #main-wrapper,
  body.is-front .main-container {
    max-width: 1440px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

