/**
 * PerfectAuto Theme Styles
 * Main stylesheet for all PerfectAuto Theme components
 * 
 * All classes use .pa- prefix to avoid conflicts
 */

/* ========================================
   ARTICLES GRID COMPONENT
   ======================================== */

.pa-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
    gap: 20px;
    align-items: stretch;
}

/* Left column */
.pa-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* Featured article */
.pa-featured-article {
    background: white;
    overflow: hidden;
    border: 1px solid #ebebeb;
}

.pa-featured-article img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
}

.pa-featured-article .pa-content {
    padding: 24px;
}

.pa-category {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
    color: #000;
    text-decoration: none;
}

.pa-category:hover {
    text-decoration: underline;
}

.pa-featured-article h2 {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 16px 0!important;
    color: #000;
}

.pa-featured-article h2 a {
    color: inherit;
    text-decoration: none;
}

.pa-featured-article h2 a:hover {
    color: #545252;
}

.pa-excerpt {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.5;
}

.pa-meta {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #666;
}

.pa-meta .pa-author {
    color: #000;
    font-weight: 500;
    text-decoration: none;
}

.pa-meta .pa-author:hover {
    text-decoration: underline;
}

.pa-meta .pa-date {
    margin-left: 8px;
}

/* Secondary article */
.pa-secondary-article {
    background: white;
    overflow: hidden;
    border: 1px solid #ebebeb;
    display: grid;
    grid-template-columns: 1fr 320px;
    grid-auto-rows: minmax(0, auto);
    gap: 0;
    flex: 1;
    min-height: 200px;
}

.pa-secondary-article img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    grid-column: 2;
    grid-row: 1;
}

.pa-secondary-article .pa-content {
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    grid-column: 1;
    grid-row: 1;
}

.pa-secondary-article h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 16px 0!important;
    color: #000;
}

.pa-secondary-article h2 a {
    color: inherit;
    text-decoration: none;
}

.pa-secondary-article h2 a:hover {
    color: #545252;
}

/* Right column */
.pa-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

/* Top articles */
.pa-top-articles {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex-shrink: 0;
}

.pa-card-article {
    background: white;
    overflow: hidden;
    border: 1px solid #ebebeb;
}

.pa-card-article img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.pa-card-article .pa-content {
    padding: 20px;
}

.pa-card-article h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 12px 0!important;
    color: #000;
}

.pa-card-article h2 a {
    color: inherit;
    text-decoration: none;
}

.pa-card-article h2 a:hover {
    color: #545252;
}

.pa-card-article .pa-meta {
    font-size: 13px;
}

/* Articles list */
.pa-articles-list {
    background: white;
    padding: 20px;
    border: 1px solid #ebebeb;
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 60px;
}

.pa-list-column {
    display: flex;
    flex-direction: column;
}

.pa-list-article {
    padding: 16px 0;
    border-bottom: 1px solid #e5e5e5;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.pa-list-article:last-child {
    border-bottom: none;
}

.pa-list-article h2 {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px 0;
    color: #000;
}

.pa-list-article h2 a {
    color: inherit;
    text-decoration: none;
}

.pa-list-article h2 a:hover {
    color: #545252;
}

.pa-list-article .pa-date {
    font-size: 13px;
    color: #666;
}

/* Image links */
.pa-image-link {
    display: block;
    text-decoration: none;
}

.pa-image-link:hover img {
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .pa-container {
        grid-template-columns: 1fr;
    }

    .pa-secondary-article {
        display: flex;
        flex-direction: column;
    }

    .pa-secondary-article img {
        height: 200px;
        grid-column: unset;
        grid-row: unset;
    }

    .pa-secondary-article .pa-content {
        grid-column: unset;
        grid-row: unset;
    }

    .pa-featured-article img {
        height: 300px;
    }

    .pa-featured-article h2 {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .pa-top-articles {
        grid-template-columns: 1fr;
    }

    .pa-articles-list {
        grid-template-columns: 1fr;
    }

    .pa-secondary-article {
        display: flex;
        flex-direction: column;
    }

    .pa-secondary-article img {
        height: 180px;
        grid-column: unset;
        grid-row: unset;
    }

    .pa-secondary-article .pa-content {
        grid-column: unset;
        grid-row: unset;
    }

    .pa-featured-article img {
        height: 180px;
    }

    .pa-featured-article h2 {
        font-size: 18px;
    }

    .pa-featured-article .pa-excerpt {
        display: none;
    }

    .pa-featured-article .pa-content,
    .pa-secondary-article .pa-content,
    .pa-card-article .pa-content {
        padding: 20px;
    }
}
