/**
 * JNews Elementor Bridge Styles
 * 
 * Provides styling for JNews widgets rendered through the bridge.
 * Designed to be compatible with Foxiz theme styling.
 */

/* Block Container */
.fv-bridge-block {
    margin-bottom: 30px;
}

.fv-bridge-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--primary-color, #ff3939);
}

.fv-bridge-no-posts {
    padding: 20px;
    background: #f5f5f5;
    text-align: center;
    color: #666;
}

/* Grid Layout */
.fv-bridge-posts {
    display: grid;
    gap: 20px;
}

.fv-bridge-grid .fv-bridge-posts.fv-cols-1 { grid-template-columns: 1fr; }
.fv-bridge-grid .fv-bridge-posts.fv-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fv-bridge-grid .fv-bridge-posts.fv-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fv-bridge-grid .fv-bridge-posts.fv-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Overlay Layout */
.fv-bridge-overlay .fv-bridge-posts.fv-cols-1 { grid-template-columns: 1fr; }
.fv-bridge-overlay .fv-bridge-posts.fv-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fv-bridge-overlay .fv-bridge-posts.fv-cols-3 { grid-template-columns: repeat(3, 1fr); }

/* List Layout */
.fv-bridge-list .fv-bridge-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Post Card Base */
.fv-bridge-post {
    position: relative;
}

.fv-bridge-post .fv-post-thumb {
    display: block;
    overflow: hidden;
    border-radius: 4px;
}

.fv-bridge-post .fv-post-thumb img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
    display: block;
}

.fv-bridge-post:hover .fv-post-thumb img {
    transform: scale(1.05);
}

.fv-bridge-post .fv-post-content {
    padding-top: 12px;
}

.fv-bridge-post .fv-post-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--primary-color, #ff3939);
    text-decoration: none;
    margin-bottom: 5px;
}

.fv-bridge-post .fv-post-title {
    font-size: 17px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 8px;
}

.fv-bridge-post .fv-post-title a {
    color: inherit;
    text-decoration: none;
}

.fv-bridge-post .fv-post-title a:hover {
    color: var(--primary-color, #ff3939);
}

.fv-bridge-post .fv-post-meta {
    display: none; /* Hidden by default - enable if needed */
}

/* Grid Style Specifics */
.fv-style-grid .fv-post-thumb {
    aspect-ratio: 16/9;
}

.fv-style-grid .fv-post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* List Style */
.fv-style-list .fv-post-inner,
.fv-style-hero-side .fv-post-inner {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.fv-style-list .fv-post-thumb,
.fv-style-hero-side .fv-post-thumb {
    flex-shrink: 0;
    width: 120px;
}

.fv-style-list .fv-post-thumb img,
.fv-style-hero-side .fv-post-thumb img {
    aspect-ratio: 16/9;
    object-fit: cover;
}

.fv-style-list .fv-post-content,
.fv-style-hero-side .fv-post-content {
    flex: 1;
    padding-top: 0;
}

.fv-style-list .fv-post-title,
.fv-style-hero-side .fv-post-title {
    font-size: 15px;
}

.fv-style-list .fv-post-number {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-color, #ff3939);
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    border-radius: 3px;
}

/* Overlay Style */
.fv-style-overlay .fv-post-overlay,
.fv-style-hero-main .fv-post-overlay,
.fv-style-carousel .fv-post-overlay {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: 300px;
    padding: 20px;
    background-size: cover;
    background-position: center;
    border-radius: 4px;
    position: relative;
    text-decoration: none;
    color: #fff;
}

.fv-style-overlay .fv-post-overlay::before,
.fv-style-hero-main .fv-post-overlay::before,
.fv-style-carousel .fv-post-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 30%, rgba(0,0,0,0.8));
    border-radius: 4px;
}

.fv-style-overlay .fv-post-content,
.fv-style-hero-main .fv-post-content,
.fv-style-carousel .fv-post-content {
    position: relative;
    z-index: 1;
    padding-top: 0;
}

.fv-style-overlay .fv-post-cat,
.fv-style-hero-main .fv-post-cat,
.fv-style-carousel .fv-post-cat {
    background: var(--primary-color, #ff3939);
    color: #fff;
    padding: 3px 8px;
    border-radius: 2px;
}

.fv-style-overlay .fv-post-title,
.fv-style-hero-main .fv-post-title,
.fv-style-carousel .fv-post-title {
    color: #fff;
    font-size: 18px;
}

.fv-style-overlay .fv-post-meta,
.fv-style-hero-main .fv-post-meta,
.fv-style-carousel .fv-post-meta {
    display: none; /* Hidden by default */
}

/* Hero Layout */
.fv-bridge-hero .fv-hero-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

.fv-bridge-hero .fv-style-hero-main .fv-post-overlay {
    min-height: 450px;
}

.fv-bridge-hero .fv-style-hero-main .fv-post-title {
    font-size: 26px;
}

.fv-bridge-hero .fv-hero-side {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.fv-bridge-hero .fv-hero-side .fv-style-hero-side .fv-post-thumb {
    width: 100px;
}

/* Carousel */
.fv-bridge-carousel .fv-carousel-scroll {
    display: flex;
    gap: 15px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 15px;
}

.fv-bridge-carousel .fv-style-carousel {
    flex: 0 0 300px;
    scroll-snap-align: start;
}

.fv-bridge-carousel .fv-style-carousel .fv-post-overlay {
    min-height: 350px;
}

/* Breadcrumb */
.fv-bridge-breadcrumb {
    font-size: 13px;
    padding: 10px 0;
    color: #666;
}

.fv-bridge-breadcrumb a {
    color: inherit;
    text-decoration: none;
}

.fv-bridge-breadcrumb a:hover {
    color: var(--primary-color, #ff3939);
}

/* Title & Subtitle */
.fv-bridge-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
}

.fv-bridge-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 20px;
}

/* Meta */
.fv-bridge-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
}

/* Featured Image */
.fv-bridge-featured {
    margin-bottom: 25px;
}

.fv-bridge-featured img {
    width: 100%;
    height: auto;
    border-radius: 4px;
}

/* Content */
.fv-bridge-content {
    line-height: 1.7;
}

/* Author Box */
.fv-bridge-author-box {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f7f7f7;
    border-radius: 4px;
    margin-top: 30px;
}

.fv-bridge-author-box img {
    border-radius: 50%;
}

.fv-bridge-author-box .author-info h4 {
    margin: 0 0 10px;
}

.fv-bridge-author-box .author-info p {
    margin: 0;
    color: #666;
}

/* Tags */
.fv-bridge-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.fv-bridge-tags a {
    display: inline-block;
    padding: 5px 12px;
    background: #f0f0f0;
    color: #333;
    font-size: 12px;
    text-decoration: none;
    border-radius: 3px;
}

.fv-bridge-tags a:hover {
    background: var(--primary-color, #ff3939);
    color: #fff;
}

/* Related Posts */
.fv-bridge-related {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.fv-bridge-related h3 {
    margin-bottom: 20px;
}

.fv-bridge-related .fv-cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

/* Ad Placeholder */
.fv-bridge-ad-placeholder {
    min-height: 90px;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
}

/* Archive Grid */
.fv-bridge-archive.fv-cols-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Responsive */
@media (max-width: 991px) {
    .fv-bridge-grid .fv-bridge-posts.fv-cols-4 { grid-template-columns: repeat(3, 1fr); }
    .fv-bridge-grid .fv-bridge-posts.fv-cols-3 { grid-template-columns: repeat(2, 1fr); }
    .fv-bridge-hero .fv-hero-layout { grid-template-columns: 1fr; }
    .fv-bridge-archive.fv-cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 767px) {
    .fv-bridge-grid .fv-bridge-posts.fv-cols-4,
    .fv-bridge-grid .fv-bridge-posts.fv-cols-3,
    .fv-bridge-grid .fv-bridge-posts.fv-cols-2 { grid-template-columns: 1fr; }
    
    .fv-bridge-overlay .fv-bridge-posts.fv-cols-2,
    .fv-bridge-overlay .fv-bridge-posts.fv-cols-3 { grid-template-columns: 1fr; }
    
    .fv-style-list .fv-post-thumb,
    .fv-style-hero-side .fv-post-thumb { width: 100px; }
    
    .fv-bridge-carousel .fv-style-carousel { flex: 0 0 280px; }
    
    .fv-bridge-archive.fv-cols-3 { grid-template-columns: 1fr; }
    
    .fv-bridge-related .fv-cols-3 { grid-template-columns: 1fr; }
}
