/**
 * BFHD Pro 1 Theme - Modern Global Styles
 * Ported from BFHD Plugin for consistent design.
 * Prefix: bfht- (Theme)
 */

:root {
    /* Colors (Redefined here to ensure availability if base not loaded or for specifics) */
    --color-primary: #00E2C1;
    --color-blue: #5B8FE5;
    --color-blue-dark: #4A6FA5;
    --color-text-dark: #2D3748;
    --color-text-light: #718096;
    --color-text-gray: #8B8B8B;
    --color-bg: #F7FAFC;
    --color-white: #FFFFFF;

    --font-family: 'Roboto', sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.16);

    --radius-sm: 8px;
    --radius-md: 50px;
    --radius-lg: 16px;
    --radius-xl: 24px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   Generic Resets & Helpers
   ================================ */

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    color: var(--color-text-dark);
    background: #FFFFFF;
}

/* Scroll Lock for Mobile Menu */
body.bfht-menu-open {
    overflow: hidden !important;
}

/* === Sticky Sidebar === */
.bfht-sidebar-column {
    position: -webkit-sticky;
    /* Safari */
    position: sticky;
    top: 20px;
    /* Spacing from top */
    height: fit-content;
    /* Ensure it stops scrolling when content ends */
    align-self: start;
}

/* Modern Container */
.bfht-container {
    max-width: var(--bfhd-container-width, 1360px);
    margin: 0 auto;
    padding: 0 var(--bfhd-container-padding, 20px);
}


/* ================================
   Buttons (.bfht-btn)
   ================================ */

.bfht-btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 14px;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-block;
    line-height: normal;
}

.bfht-btn-signup {
    background: var(--color-blue);
    color: var(--color-white);
}

.bfht-btn-signup:hover {
    background: var(--color-blue-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-white);
}

.bfht-btn-login {
    background: var(--color-primary);
    color: var(--color-white);
}

.bfht-btn-login:hover {
    background: #00C4A8;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    color: var(--color-white);
}

/* ================================
   Inputs & Forms
   ================================ */

.bfht-input {
    width: 100%;
    border: 1px solid #CBD5E0;
    padding: 12px 16px;
    font-size: 15px;
    font-family: var(--font-family);
    color: var(--color-text-dark);
    background: var(--color-white);
    border-radius: var(--radius-sm);
    outline: none;
    transition: var(--transition);
}

.bfht-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(0, 226, 193, 0.1);
}

.bfht-input::placeholder {
    color: #BDBDBD;
}

/* ================================
   Cards
   ================================ */

.bfht-card {
    background: var(--color-white);
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    padding: 24px;
    transition: var(--transition);
}

.bfht-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
    border-color: var(--color-primary);
}

/* ================================
   Typography Helpers
   ================================ */

.bfht-text-primary {
    color: var(--color-primary);
}

.bfht-text-blue {
    color: var(--color-blue);
}

.bfht-text-dark {
    color: var(--color-text-dark);
}

.bfht-text-light {
    color: var(--color-text-light);
}

.bfht-title {
    font-weight: 700;
    color: var(--color-text-dark);
    margin: 0 0 16px 0;
}

/* ================================
   Page Content Box (Standard Pages)
   ================================ */

.bfht-page-content-box {
    background: var(--color-white);
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.bfht-page-content-box img {
    max-width: 100%;
    width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 20px 0;
    display: block;
}

.bfht-page-content-box a {
    color: #4A5568;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.bfht-page-content-box a:hover {
    color: var(--color-primary);
}

.bfht-page-content-box p {
    line-height: 1.8;
    margin-bottom: 20px;
    font-size: 16px;
    color: #4A5568;
}

/* === Single Post Grid Layout === */
.bfht-single-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

@media (max-width: 991px) {
    .bfht-single-grid {
        grid-template-columns: 1fr;
    }
}

/* === Post Meta Modern === */
.bfht-post-meta-modern {
    display: flex;
    flex-direction: column;
    /* Stack rows */
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #E2E8F0;
    font-size: 13px;
    /* Slightly smaller text */
    color: #718096;
}

.bfht-meta-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

.bfht-meta-sep {
    color: #CBD5E0;
    font-size: 12px;
}

.bfht-author-meta {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Tiny Avatar - Force Size */
.bfht-author-img,
.bfht-author-meta img.avatar {
    width: 24px !important;
    height: 24px !important;
    max-width: 24px !important;
    min-width: 24px !important;
    border-radius: 50%;
    object-fit: cover;
    display: inline-block;
    vertical-align: middle;
}

.bfht-author-name a {
    color: #2D3748;
    font-weight: 600;
    text-decoration: none;
}

.bfht-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Tiny Icon */
.bfht-meta-icon {
    width: 14px !important;
    height: 14px !important;
    fill: #A0AEC0;
}

.bfht-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
}

.bfht-tags-row a {
    background: #F7FAFC;
    padding: 3px 10px;
    border-radius: 4px;
    /* More subtle radius */
    font-size: 11px;
    color: #718096;
    text-decoration: none;
    border: 1px solid #EDF2F7;
    transition: all 0.2s;
}

.bfht-tags-row a:hover {
    background: #E2E8F0;
    color: #2D3748;
    border-color: #CBD5E0;
}

/* === Related Posts === */
.bfht-related-posts {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #E2E8F0;
}

.bfht-related-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 30px;
    color: #2D3748;
}

.bfht-related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.bfht-related-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}

.bfht-related-card h3 {
    font-size: 15px;
    /* Slightly smaller */
    line-height: 1.4;
    margin: 0;
}

.bfht-related-card a {
    color: #2D3748;
    text-decoration: none;
}

.bfht-related-card a:hover {
    color: var(--color-primary);
}

@media (max-width: 768px) {
    .bfht-related-grid {
        grid-template-columns: 1fr;
    }
}