/* =========================================
   F_BRAND LINKEDIN STYLE DESIGN SYSTEM
   ========================================= */

:root {
    --brand-bg: #f3f2ef;
    --brand-card-bg: #ffffff;
    --brand-border: #e0e0e0;
    --brand-text-primary: rgba(0, 0, 0, 0.9);
    --brand-text-secondary: rgba(0, 0, 0, 0.6);
    --brand-blue: #0a66c2;
    --brand-blue-hover: #004182;
    --brand-radius: 8px;
    --brand-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
}

body .f-brand-page {
    background-color: var(--brand-bg);
    color: var(--brand-text-primary);
    font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Fira Sans", Ubuntu, Oxygen, "Oxygen Sans", Cantarell, "Droid Sans", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Lucida Grande", Helvetica, Arial, sans-serif;
    padding: 24px 0;
    min-height: 100vh;
}

/* =========================================
   GRID LAYOUT (3-Column LinkedIn Style)
   ========================================= */
.f-brand-page .brand-content-grid {
    display: grid;
    grid-template-columns: 200px minmax(0, 1fr) 280px;
    gap: 24px;
    align-items: start;
    max-width: 1128px;
    margin: 0 auto;
    padding: 0 16px;
}

@media (max-width: 1100px) {
    .f-brand-page .brand-content-grid {
        grid-template-columns: 180px minmax(0, 1fr) 260px;
        gap: 16px;
    }
}

@media (max-width: 992px) {
    .f-brand-page .brand-content-grid {
        grid-template-columns: 1fr 260px;
    }

    .f-brand-page .brand-left-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .f-brand-page .brand-content-grid {
        grid-template-columns: 1fr;
    }

    .f-brand-page .brand-right-sidebar {
        display: none;
    }
}

/* =========================================
   CARDS & COMMON
   ========================================= */
.f-brand-page .brand-sidebar-card,
.f-brand-page .brand-post-composer-card,
.f-brand-page .brand-post-card {
    background: var(--brand-card-bg);
    border-radius: var(--brand-radius);
    border: 1px solid var(--brand-border);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.04);
    margin-bottom: 12px;
    overflow: hidden;
}

/* =========================================
   LEFT SIDEBAR - BRAND IDENTITY
   ========================================= */
.f-brand-page .brand-left-sidebar {
    position: sticky;
    top: 24px;
}

.f-brand-page .brand-identity-card {
    text-align: center;
}

.f-brand-page .brand-identity-header {
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
}

.f-brand-page .brand-identity-header .mini-cover {
    height: 60px;
    overflow: hidden;
}

.f-brand-page .brand-identity-header .mini-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-brand-page .brand-identity-header .mini-cover.placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.f-brand-page .brand-identity-content {
    padding: 12px 16px 16px;
    position: relative;
}

.f-brand-page .brand-logo-mini {
    width: 72px;
    height: 72px;
    margin: -48px auto 12px;
    border: 3px solid white;
    border-radius: 8px;
    background: white;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.f-brand-page .brand-logo-mini img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-brand-page .brand-name-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    line-height: 1.3;
    color: var(--brand-text-primary);
}

.f-brand-page .brand-follower-info {
    font-size: 13px;
    color: var(--brand-text-secondary);
    margin: 0 0 16px 0;
}

.f-brand-page .brand-create-btn {
    display: block;
    background-color: var(--brand-blue);
    color: white !important;
    border: none;
    border-radius: 24px;
    padding: 8px 16px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
    margin-bottom: 8px;
    transition: background 0.2s;
}

.f-brand-page .brand-create-btn:hover {
    background-color: var(--brand-blue-hover);
}

.f-brand-page .brand-create-btn i {
    margin-right: 6px;
}

.f-brand-page .brand-view-member-btn {
    display: block;
    background-color: white;
    color: var(--brand-text-secondary) !important;
    border: 1px solid var(--brand-border);
    border-radius: 24px;
    padding: 7px 16px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.2s, border-color 0.2s;
}

.f-brand-page .brand-view-member-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: var(--brand-text-secondary);
}

.f-brand-page .brand-view-member-btn i {
    margin-right: 6px;
}

/* Navigation List */
.f-brand-page .nav-card {
    padding: 8px 0;
}

.f-brand-page .brand-nav-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.f-brand-page .brand-nav-item a {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    color: var(--brand-text-secondary);
    font-weight: 500;
    font-size: 13px;
    text-decoration: none;
    transition: background 0.1s;
}

.f-brand-page .brand-nav-item a:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--brand-text-primary);
}

.f-brand-page .brand-nav-item.active a {
    color: var(--brand-blue);
    font-weight: 600;
    background-color: rgba(10, 102, 194, 0.08);
}

.f-brand-page .brand-nav-item i {
    width: 20px;
    text-align: center;
    margin-right: 10px;
    font-size: 16px;
}

.f-brand-page .brand-nav-item.separator {
    height: 1px;
    background: var(--brand-border);
    margin: 8px 16px;
}

/* =========================================
   MIDDLE COLUMN - FEED SECTION
   ========================================= */
.f-brand-page .brand-feed-section {
    min-width: 0;
}

.f-brand-page .page-section-header {
    margin-bottom: 16px;
}

.f-brand-page .section-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--brand-text-primary);
}

.f-brand-page .section-subtitle {
    font-size: 14px;
    color: var(--brand-text-secondary);
    margin: 0;
}

/* Filter Bar / Tabs */
.f-brand-page .feed-filter-bar {
    display: flex;
    border-bottom: 1px solid var(--brand-border);
    margin-bottom: 16px;
    background: transparent;
}

.f-brand-page .filter-tab {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand-text-secondary);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.f-brand-page .filter-tab:hover {
    background-color: rgba(0, 0, 0, 0.08);
    color: var(--brand-text-primary);
}

.f-brand-page .filter-tab.active {
    color: var(--brand-blue);
    border-bottom-color: var(--brand-blue);
}

/* Composer */
.f-brand-page .brand-post-composer-card {
    padding: 12px 16px 4px 16px;
}

.f-brand-page .composer-top {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.f-brand-page .composer-avatar {
    width: 48px;
    height: 48px;
    margin-right: 8px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
}

.f-brand-page .composer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-brand-page .composer-input-trigger {
    flex-grow: 1;
    border: 1px solid var(--brand-text-secondary);
    border-radius: 35px;
    padding: 12px 16px;
    color: var(--brand-text-secondary);
    font-weight: 600;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    text-decoration: none;
    text-align: left;
    display: block;
}

.f-brand-page .composer-input-trigger:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.f-brand-page .composer-actions {
    display: flex;
    justify-content: space-around;
    padding: 4px 0;
}

.f-brand-page .action-btn {
    display: flex;
    align-items: center;
    background: transparent;
    border: none;
    padding: 12px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: var(--brand-text-secondary);
    font-weight: 600;
    transition: background-color 0.2s;
}

.f-brand-page .action-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.f-brand-page .action-btn i {
    font-size: 20px;
    margin-right: 8px;
}

.f-brand-page .video-btn i {
    color: #5f9b41;
}

.f-brand-page .media-btn i {
    color: #378fe9;
}

.f-brand-page .article-btn i {
    color: #e06847;
}

/* =========================================
   RIGHT SIDEBAR - WIDGETS
   ========================================= */
.f-brand-page .brand-right-sidebar {
    position: sticky;
    top: 24px;
}

.f-brand-page .widget-card {
    padding: 16px;
}

.f-brand-page .widget-header {
    margin-bottom: 16px;
}

.f-brand-page .widget-title {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--brand-text-primary);
}

.f-brand-page .widget-title i {
    font-size: 14px;
    color: var(--brand-text-secondary);
    margin-left: 4px;
}

.f-brand-page .widget-period {
    font-size: 12px;
    color: var(--brand-text-secondary);
}

.f-brand-page .widget-text {
    font-size: 13px;
    color: var(--brand-text-secondary);
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.f-brand-page .highlight-section {
    margin-bottom: 16px;
}

.f-brand-page .highlight-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--brand-text-primary);
    margin: 0 0 8px 0;
}

.f-brand-page .highlight-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.f-brand-page .highlight-preview {
    font-size: 13px;
    color: var(--brand-text-secondary);
}

.f-brand-page .invite-btn {
    display: inline-block;
    border: 1px solid var(--brand-blue);
    color: var(--brand-blue) !important;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}

.f-brand-page .invite-btn:hover {
    background-color: rgba(10, 102, 194, 0.1);
}

.f-brand-page .sidebar-item {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 1.4;
}

.f-brand-page .sidebar-item strong {
    display: block;
    color: var(--brand-text-primary);
    margin-bottom: 2px;
}

.f-brand-page .sidebar-item a {
    color: var(--brand-blue);
    text-decoration: none;
}

.f-brand-page .sidebar-item a:hover {
    text-decoration: underline;
}

/* =========================================
   POST CARD STYLES
   ========================================= */
.f-brand-page .brand-post-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08), 0 2px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 12px;
    padding: 12px 0 4px 0;
    overflow: hidden;
}

.f-brand-page .post-header {
    padding: 0 16px;
    margin-bottom: 8px;
    display: flex;
}

.f-brand-page .post-author-avatar {
    width: 48px;
    height: 48px;
    margin-right: 12px;
    border-radius: 8px;
    overflow: hidden;
}

.f-brand-page .post-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.f-brand-page .post-meta-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.f-brand-page .post-author-name a {
    font-weight: 600;
    color: var(--brand-text-primary);
    text-decoration: none;
    font-size: 14px;
}

.f-brand-page .post-author-name a:hover {
    color: var(--brand-blue);
    text-decoration: underline;
}

.f-brand-page .post-follower-count {
    font-size: 12px;
    color: var(--brand-text-secondary);
    display: block;
}

.f-brand-page .post-timestamp {
    font-size: 12px;
    color: var(--brand-text-secondary);
}

.f-brand-page .post-content-text {
    padding: 0 16px;
    font-size: 14px;
    color: var(--brand-text-primary);
    margin-bottom: 8px;
    line-height: 1.5;
}

.f-brand-page .post-media {
    width: 100%;
    margin-bottom: 8px;
}

.f-brand-page .post-media img {
    width: 100%;
    height: auto;
    display: block;
}

/* Post Action Bar */
.f-brand-page .post-action-bar {
    display: flex;
    justify-content: space-around;
    padding: 4px 12px;
    border-top: 1px solid var(--brand-border);
    margin-top: 8px;
}

.f-brand-page .action-bar-btn {
    background: transparent;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 8px;
    color: var(--brand-text-secondary);
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    flex-grow: 1;
    margin: 0 4px;
    transition: background-color 0.2s;
}

.f-brand-page .action-bar-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--brand-text-primary);
}

.f-brand-page .action-bar-btn i {
    font-size: 20px;
    margin-right: 8px;
}

/* =========================================
   UTILITY OVERRIDES
   ========================================= */
.f-brand-page img.brand-logo-small {
    display: block !important;
    width: 40px !important;
    height: 40px !important;
    object-fit: cover !important;
    border-radius: 8px !important;
}

/* Hide empty field displays */
.f-brand-page .field--name-cover-image,
.f-brand-page .field--name-logo {
    margin: 0;
    padding: 0;
}

.f-brand-page .field--name-cover-image .field__label,
.f-brand-page .field--name-logo .field__label {
    display: none;
}

/* =========================================
   EVENTS WIDGET STYLES
   ========================================= */
.f-brand-page .events-widget .widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.f-brand-page .events-widget .widget-title i {
    color: #c37d16;
    margin-right: 6px;
}

.f-brand-page .events-widget .view-all-link {
    font-size: 13px;
    color: var(--brand-blue);
    text-decoration: none;
    font-weight: 600;
}

.f-brand-page .events-widget .view-all-link:hover {
    text-decoration: underline;
}

.f-brand-page .events-widget .events-preview {
    text-align: center;
    padding: 10px 0;
}

.f-brand-page .events-widget .events-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: #fff;
    border-radius: 20px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-top: 10px;
    transition: all 0.2s;
}

.f-brand-page .events-widget .events-link-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}