/**
 * Elecpromo Blog Homepage v4 - Styles
 */

:root {
    --ep-accent: #e67e22;
    --ep-text: #333;
    --ep-text-light: #666;
    --ep-text-muted: #999;
    --ep-bg: #fff;
    --ep-border: #eee;
}

/* Main Container */
.elecpromo-homepage {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Main Grid: Left + Right */
.elecpromo-homepage-grid {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 40px;
    align-items: start;
}

/* =================== */
/* LEFT COLUMN         */
/* =================== */

.elecpromo-left-column {
    min-width: 0;
}

/* Featured Post */
.elecpromo-featured {
    margin-bottom: 30px;
}

.elecpromo-featured-img-link {
    display: block;
    text-decoration: none;
}

.elecpromo-featured-img {
    width: 100%;
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
}

.elecpromo-featured-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.elecpromo-featured:hover .elecpromo-featured-img img {
    transform: scale(1.03);
}

.elecpromo-no-img {
    background: linear-gradient(135deg, #667eea, #764ba2);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 32px;
    font-weight: bold;
}

.elecpromo-featured-info {
    padding: 15px 0;
}

.elecpromo-cat {
    color: var(--ep-text-muted);
    font-size: 13px;
    text-transform: uppercase;
}

.ep-icon {
    margin-right: 4px;
}

.elecpromo-featured-title {
    font-size: 28px;
    margin: 10px 0 12px;
    line-height: 1.3;
}

.elecpromo-featured-title a {
    color: var(--ep-text);
    text-decoration: none;
}

.elecpromo-featured-title a:hover {
    color: var(--accent-color, var(--ep-accent));
}

.elecpromo-featured-excerpt {
    color: var(--ep-text-light);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 12px;
}

.elecpromo-meta {
    display: flex;
    gap: 20px;
    font-size: 13px;
    color: var(--ep-text-muted);
}

/* Old Posts Section */
.elecpromo-old-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid var(--ep-border);
}

.elecpromo-section-title {
    font-size: 18px;
    margin: 0 0 20px;
    color: var(--ep-text);
}

.elecpromo-old-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.elecpromo-grid-card {
    background: var(--ep-bg);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
}

.elecpromo-grid-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.elecpromo-grid-img-link {
    display: block;
}

.elecpromo-grid-img {
    width: 100%;
    height: 160px;
    overflow: hidden;
}

.elecpromo-grid-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.elecpromo-grid-card:hover .elecpromo-grid-img img {
    transform: scale(1.05);
}

.elecpromo-grid-info {
    padding: 12px 15px 15px;
}

.elecpromo-cat-small {
    font-size: 11px;
    color: var(--ep-text-muted);
    text-transform: uppercase;
}

.elecpromo-grid-title {
    font-size: 15px;
    margin: 8px 0;
    line-height: 1.4;
}

.elecpromo-grid-title a {
    color: var(--ep-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.elecpromo-grid-title a:hover {
    color: var(--accent-color, var(--ep-accent));
}

.elecpromo-meta-small {
    display: flex;
    gap: 12px;
    font-size: 11px;
    color: var(--ep-text-muted);
}

/* =================== */
/* RIGHT SIDEBAR       */
/* =================== */

.elecpromo-right-sidebar {
    position: sticky;
    top: 20px;
    background: var(--ep-bg);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Tabs */
.elecpromo-tabs {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--ep-border);
    padding-bottom: 10px;
}

.elecpromo-tab {
    background: none;
    border: none;
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: var(--ep-text-muted);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}

.elecpromo-tab:hover {
    color: var(--ep-text);
}

.elecpromo-tab.active {
    color: var(--accent-color, var(--ep-accent));
}

.elecpromo-tab.active::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color, var(--ep-accent));
}

/* Sidebar Items */
.elecpromo-tab-content {
    display: block;
}

.elecpromo-sidebar-item {
    display: flex;
    gap: 12px;
    padding: 15px 0;
    border-bottom: 1px solid var(--ep-border);
}

.elecpromo-sidebar-item:first-child {
    padding-top: 0;
}

.elecpromo-sidebar-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.elecpromo-sidebar-thumb {
    flex-shrink: 0;
    width: 100px;
    height: 75px;
    border-radius: 6px;
    overflow: hidden;
}

.elecpromo-sidebar-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.elecpromo-sidebar-thumb:hover img {
    transform: scale(1.05);
}

.elecpromo-no-thumb {
    width: 100%;
    height: 100%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-weight: bold;
    font-size: 16px;
}

.elecpromo-sidebar-info {
    flex: 1;
    min-width: 0;
}

.elecpromo-sidebar-cat {
    font-size: 10px;
    color: var(--ep-text-muted);
    display: block;
    margin-bottom: 5px;
}

.elecpromo-sidebar-title {
    font-size: 14px;
    margin: 0 0 6px;
    line-height: 1.35;
    font-weight: 600;
}

.elecpromo-sidebar-title a {
    color: var(--ep-text);
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.elecpromo-sidebar-title a:hover {
    color: var(--accent-color, var(--ep-accent));
}

.elecpromo-sidebar-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 10px;
    color: var(--ep-text-muted);
}

/* =================== */
/* RESPONSIVE          */
/* =================== */

@media (max-width: 1024px) {
    .elecpromo-homepage-grid {
        grid-template-columns: 1fr 320px;
        gap: 30px;
    }
    
    .elecpromo-featured-img {
        height: 350px;
    }
    
    .elecpromo-featured-title {
        font-size: 24px;
    }
}

@media (max-width: 768px) {
    .elecpromo-homepage-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .elecpromo-right-sidebar {
        position: static;
    }
    
    .elecpromo-featured-img {
        height: 280px;
    }
    
    .elecpromo-featured-title {
        font-size: 22px;
    }
    
    .elecpromo-old-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .elecpromo-grid-img {
        height: 130px;
    }
}

@media (max-width: 480px) {
    .elecpromo-homepage {
        padding: 15px;
    }
    
    .elecpromo-featured-img {
        height: 220px;
    }
    
    .elecpromo-featured-title {
        font-size: 20px;
    }
    
    .elecpromo-old-grid {
        grid-template-columns: 1fr;
    }
    
    .elecpromo-grid-img {
        height: 180px;
    }
    
    .elecpromo-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .elecpromo-sidebar-thumb {
        width: 80px;
        height: 60px;
    }
}
