/* ==========================================================================
   WordPress Theme Neutralization (FORCE WIDE & NO GAPS)
   ========================================================================== */
/* WordPress Title & Header Neutralization */
.entry-title, 
.post-title, 
.wp-block-post-title,
.page-title,
header.entry-header {
    display: none !important;
}

main#wp--skip-link--target,
main#wp--skip-link--target > *,
.entry-content, 
.entry-content > *, 
.wp-block-post-content,
.wp-block-post-content > *,
.wp-block-group.has-global-padding:has(#bfmt-esim-app) {
    margin-top: 0 !important;
    padding-top: 0 !important;
    max-width: none !important;
    width: 100% !important;
    height: auto !important; /* Ensure dynamic height */
    min-height: unset !important;
}

/* Hide WordPress Spacer blocks that are added via the editor on this page */
.wp-block-spacer {
    display: none !important;
    height: 0 !important;
    margin: 0 !important;
}

#bfmt-esim-app {
    display: block !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    background-color: #ffffff !important;
    font-family: 'Inter', -apple-system, sans-serif !important;
    position: relative !important;
    overflow-x: hidden !important;
    padding-bottom: 40px !important; /* Reduced gap before footer */
    height: auto !important;
}

/* ==========================================================================
   Hero Section Styling
   ========================================================================== */
.bfmt-hero-section {
    background: linear-gradient(rgba(13, 33, 64, 0.85), rgba(13, 33, 64, 0.85)), url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=2072') !important;
    background-size: cover !important;
    background-position: center !important;
    padding: 100px 20px !important;
    margin-bottom: 50px !important;
    width: 100% !important;
}

.bfmt-hero-title {
    font-size: 42px !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    line-height: 1.2 !important;
    margin-bottom: 15px !important;
}

.bfmt-hero-subtitle {
    font-size: 18px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    max-width: 850px !important;
    line-height: 1.6 !important;
    font-weight: 400 !important;
}

/* ==========================================================================
   Main Content Container (Spacious & Centered)
   ========================================================================== */
.bfmt-main-container {
    max-width: 1400px !important;
    margin: 0 auto !important;
    width: 95% !important;
    padding: 40px 20px 80px 20px !important; /* Balanced top padding */
    box-sizing: border-box !important;
    min-height: 400px !important; /* Ensure grid has space to render */
}

/* Sidebar Layout */
.bfmt-content-layout {
    display: flex !important;
    gap: 32px !important;
    align-items: flex-start !important;
}

@media (max-width: 991px) {
    .bfmt-content-layout {
        flex-direction: column !important;
    }
    .bfmt-sidebar {
        width: 100% !important;
        position: static !important;
    }
}

.bfmt-sidebar {
    width: 280px !important;
    flex-shrink: 0 !important;
    position: sticky !important;
    top: 20px !important;
}

.bfmt-main-content {
    flex-grow: 1 !important;
    min-width: 0 !important; /* Prevents flex items from overflowing */
}

.bfmt-sidebar-section {
    margin-bottom: 30px !important;
}

.bfmt-sidebar-title {
    font-size: 13px !important;
    font-weight: 800 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.1em !important;
    color: #94a3b8 !important;
    margin-bottom: 15px !important;
    padding-left: 4px !important;
}

.bfmt-vertical-tabs {
    display: flex !important;
    flex-direction: column !important;
    gap: 6px !important;
}

.bfmt-vtab-btn {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    width: 100% !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #64748b !important;
    background: transparent !important;
    border: 1px solid transparent !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    cursor: pointer !important;
    text-align: left !important;
}

.bfmt-vtab-btn:hover {
    background: #f8fafc !important;
    color: #1e293b !important;
    transform: translateX(4px) !important;
}

.bfmt-vtab-active {
    background: rgba(43, 108, 176, 0.08) !important;
    color: rgb(43, 108, 176) !important;
    border-color: rgba(43, 108, 176, 0.1) !important;
}

.bfmt-vtab-active:hover {
    background: rgba(43, 108, 176, 0.12) !important;
    transform: none !important;
}

/* Grid & Cards */
.bfmt-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-rows: 1fr !important; /* Force equal height for all cards in a row */
    gap: 20px !important;
    margin-top: 0 !important;
}

@media (max-width: 1024px) {
    .bfmt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 640px) {
    .bfmt-grid { grid-template-columns: repeat(1, minmax(0, 1fr)) !important; }
}

.bfmt-card {
    background-color: #f8fafc !important;
    border: 1px solid #edf2f7 !important;
    border-radius: 12px !important;
    padding: 16px 20px !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: space-between !important;
    height: 100% !important; /* Fill the grid row height */
}

.bfmt-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
    border-color: rgb(43, 108, 176) !important;
}

.bfmt-card-active {
    background-color: rgba(43, 108, 176, 0.05) !important;
    border-color: rgb(43, 108, 176) !important;
}

.bfmt-card h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #1a202c !important;
    margin-bottom: 2px !important;
}

.bfmt-card p {
    font-size: 14px !important;
    color: #718096 !important;
    font-weight: 500 !important;
}

/* ==========================================================================
   Component Styling
   ========================================================================== */
.bfmt-tabs-container {
    background-color: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 12px !important;
    padding: 4px !important;
    display: inline-flex !important;
    gap: 4px !important;
}

.bfmt-tab-btn {
    padding: 10px 28px !important;
    border-radius: 8px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    border: none !important;
    cursor: pointer !important;
    background: transparent !important;
    color: #4a5568 !important;
}

.bfmt-tab-active {
    background-color: rgb(43, 108, 176) !important;
    color: #ffffff !important;
}

.bfmt-search-container {
    width: 100% !important;
    max-width: 320px !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.bfmt-search-input {
    width: 100% !important;
    padding: 11px 45px 11px 16px !important;
    border-radius: 10px !important;
    border: 1px solid #e2e8f0 !important;
    font-size: 14px !important;
    color: #718096 !important;
    outline: none !important;
    background: #ffffff !important;
    height: 48px !important; /* Matches tab container height */
}

.bfmt-search-icon-wrapper {
    position: absolute !important;
    right: 14px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #a0aec0 !important;
    display: flex !important;
    align-items: center !important;
    pointer-events: none !important;
}

/* Purchase Button */
.bfmt-btn-purchase {
    display: block !important;
    width: 100% !important;
    background-color: rgb(43, 108, 176) !important;
    color: #ffffff !important;
    padding: 16px !important;
    border-radius: 12px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: center !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    box-shadow: 0 10px 15px -3px rgba(43, 108, 176, 0.2) !important;
}

.bfmt-btn-purchase:hover {
    background-color: rgb(30, 80, 140) !important;
    transform: translateY(-1px) !important;
}

.bfmt-btn-purchase:active {
    transform: scale(0.98) !important;
}

/* Flag circle */
.bfmt-flag-circle {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 48px !important;
    height: 48px !important;
    min-width: 48px !important;
    min-height: 48px !important;
    border-radius: 50% !important;
    background-color: #f1f5f9 !important;
    border: 1px solid #e2e8f0 !important;
    overflow: hidden !important;
}

.bfmt-flag-circle img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block !important;
    border-radius: 50% !important;
}

/* Custom internal panel scrollbars configuration */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
}
.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}
.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}
.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}
