/**
 * Featured Post Grid Styles
 * Version: 1.0.0
 */

/* Container */
.fpg-container {
    width: 100%;
    margin: 0 auto;
    padding: 15px;
    background-color: #ffffff;
}

/* Grid Layout */
.fpg-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    grid-gap: 15px;
    gap: 15px;
    width: 100%;
    background-color: #ffffff;
}

/* Grid Items */
.fpg-item {
    position: relative;
    overflow: hidden;
    background: #ffffff;
}

/* Top row - 2 items side by side */
.fpg-item.fpg-top {
    grid-column: span 3;
}

/* Bottom row - 3 items */
.fpg-item.fpg-bottom {
    grid-column: span 2;
}

/* Link styling */
.fpg-link {
    display: block;
    text-decoration: none;
    color: inherit;
    position: relative;
}

/* Image Wrapper - maintains 16:9 aspect ratio */
.fpg-image-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
    background: #e0e0e0;
}

/* Image styling */
.fpg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* Hover effect */
.fpg-link:hover .fpg-image {
    transform: scale(1.05);
}

/* Overlay */
.fpg-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0) 100%);
    padding: 20px 15px 15px;
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Title styling */
.fpg-title {
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
	display:none;
}

/* Responsive Design */

/* Tablet - max-width: 1024px */
@media (max-width: 1024px) {
    .fpg-container {
        padding: 12px;
    }
    
    .fpg-grid {
        grid-gap: 12px;
        gap: 12px;
    }
    
    .fpg-title {
        font-size: 16px;
    }
    
    .fpg-overlay {
        padding: 15px 12px 12px;
    }
}

/* Mobile - max-width: 768px */
@media (max-width: 768px) {
    .fpg-container {
        padding: 15px;
    }
    
    /* Switch to single column layout */
    .fpg-grid {
        grid-template-columns: 1fr;
        grid-gap: 15px;
        gap: 15px;
    }
    
    .fpg-item.fpg-top,
    .fpg-item.fpg-bottom {
        grid-column: span 1;
    }
    
    .fpg-title {
        font-size: 16px;
    }
}

/* Small Mobile - max-width: 480px */
@media (max-width: 480px) {
    .fpg-container {
        padding: 12px;
    }
    
    .fpg-grid {
        grid-gap: 12px;
        gap: 12px;
    }
    
    .fpg-title {
        font-size: 15px;
    }
    
    .fpg-overlay {
        padding: 12px 10px 10px;
    }
}

/* Accessibility - Focus states */
.fpg-link:focus {
    outline: 3px solid #0073aa;
    outline-offset: 2px;
}

.fpg-link:focus .fpg-image {
    transform: scale(1.05);
}

/* Print styles */
@media print {
    .fpg-container {
        page-break-inside: avoid;
    }
    
    .fpg-overlay {
        background: rgba(0, 0, 0, 0.7);
    }
}

/* RTL Support */
html[dir="rtl"] .fpg-overlay {
    left: auto;
    right: 0;
}

/* Dark mode support (if theme supports it) */
@media (prefers-color-scheme: dark) {
    .fpg-image-wrapper {
        background: #333;
    }
}

/* Loading state (optional - can be used with lazy loading) */
.fpg-image[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fpg-image[loading="lazy"].loaded,
.fpg-image:not([loading]) {
    opacity: 1;
}
