/**
 * Advanced Post Lists Pro - Frontend Styles
 * 
 * @package Advanced_Post_Lists_Pro
 * @version 1.1.0
 */

/* General Container */
.apl-pro-container {
    display: grid;
    width: 100%;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.apl-pro-post-item {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
}

.apl-pro-post-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.12);
}

.apl-pro-post-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.apl-pro-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.apl-pro-post-item:hover .apl-pro-post-image img {
    transform: scale(1.1);
}

.apl-pro-post-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.apl-pro-post-meta {
    font-size: 0.8rem;
    color: #0073aa;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 12px;
    display: flex;
    gap: 15px;
}

.apl-pro-post-title {
    font-size: 1.4rem;
    margin: 0 0 15px;
    line-height: 1.3;
    font-weight: 700;
}

.apl-pro-post-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s;
}

.apl-pro-post-title a:hover {
    color: #0073aa;
}

.apl-pro-post-excerpt {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.7;
    margin-bottom: 20px;
}

.apl-pro-read-more {
    margin-top: auto;
}

.apl-pro-btn {
    display: inline-block;
    padding: 10px 24px;
    background: #0073aa;
    color: #fff;
    text-decoration: none;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: background 0.3s;
}

.apl-pro-btn:hover {
    background: #005a87;
    color: #fff;
}

/* --- Advanced Layouts --- */

/* Classic Grid */
.apl-pro-layout-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.apl-pro-columns-2 { grid-template-columns: repeat(2, 1fr); }
.apl-pro-columns-3 { grid-template-columns: repeat(3, 1fr); }
.apl-pro-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* 1+3 Featured Layout */
.apl-pro-layout-featured_1_3 {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.apl-pro-featured-area {
    flex: 1 1 60%;
    min-width: 300px;
}

.apl-pro-side-area {
    flex: 1 1 30%;
    min-width: 250px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.apl-pro-side-area .apl-pro-post-item {
    flex-direction: row;
    height: auto;
    box-shadow: none;
    border-radius: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.apl-pro-side-area .apl-pro-post-image {
    width: 100px;
    height: 100px;
    aspect-ratio: 1/1;
    border-radius: 8px;
    flex-shrink: 0;
}

.apl-pro-side-area .apl-pro-post-content {
    padding: 0 0 0 15px;
}

.apl-pro-side-area .apl-pro-post-title {
    font-size: 1rem;
    margin-bottom: 5px;
}

.apl-pro-side-area .apl-pro-post-excerpt,
.apl-pro-side-area .apl-pro-read-more {
    display: none;
}

/* Overlay Grid */
.apl-pro-layout-overlay_grid .apl-pro-post-item {
    min-height: 400px;
}

.apl-pro-layout-overlay_grid .apl-pro-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
}

.apl-pro-layout-overlay_grid .apl-pro-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 40%, rgba(0,0,0,0.85));
}

.apl-pro-layout-overlay_grid .apl-pro-post-content {
    position: relative;
    z-index: 2;
    margin-top: auto;
    color: #fff;
}

.apl-pro-layout-overlay_grid .apl-pro-post-title a {
    color: #fff;
}

.apl-pro-layout-overlay_grid .apl-pro-post-excerpt {
    color: #ddd;
}

/* Color Schemes */
.apl-pro-scheme-dark {
    background: #121212;
    padding: 40px;
    border-radius: 15px;
}

.apl-pro-scheme-dark .apl-pro-post-item {
    background: #1e1e1e;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.apl-pro-scheme-dark .apl-pro-post-title a { color: #fff; }
.apl-pro-scheme-dark .apl-pro-post-excerpt { color: #aaa; }
.apl-pro-scheme-dark .apl-pro-side-area .apl-pro-post-item { border-color: #333; }

/* Responsive Adjustments */
@media (max-width: 992px) {
    .apl-pro-columns-3, .apl-pro-columns-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .apl-pro-featured-area, .apl-pro-side-area { flex: 1 1 100%; }
    .apl-pro-columns-2, .apl-pro-columns-3, .apl-pro-columns-4 { grid-template-columns: 1fr; }
}

/* Pagination */
.apl-pro-pagination {
    margin-top: 50px;
    text-align: center;
}

.apl-pro-pagination ul {
    display: inline-flex;
    list-style: none;
    padding: 0;
    gap: 8px;
}

.apl-pro-pagination li a,
.apl-pro-pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    color: #333;
    text-decoration: none;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.apl-pro-pagination li span.current {
    background: #0073aa;
    color: #fff;
}

.apl-pro-pagination li a:hover {
    background: #f0f0f0;
}
