/* bloggerintegration.css - Modern Clean Design v1.1 */

:root {
    --blog-primary: #24b9d7; /* PrestaShopi sinine, aga pehmem */
    --blog-text: #414141;
    --blog-light-text: #7a7a7a;
    --blog-bg-card: #ffffff;
    --blog-border: #f1f1f1;
    --blog-shadow: 0 4px 15px rgba(0,0,0,0.05);
    --blog-radius: 8px;
}

/* 1. HOME PAGE GRID */
#blog-posts-home {
    margin: 2rem 0;
    padding: 0;
}

#blog-posts-home .page-heading {
    text-align: center;
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: none;
    letter-spacing: -0.5px;
}

.posts-list.row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin: 0;
}

.post-item {
    background: var(--blog-bg-card);
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    border: 1px solid var(--blog-border);
}

.post-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

/* Pildi konteiner - säilitame 200px kõrguse, et grid oleks ühtlane */
.post-img-link {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f9f9f9;
}

.post-img-link img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* PARANDUS: Hoiab pea otsas ja keskendub pildi ülaservale */
    object-position: top center; 
    transition: transform 0.5s ease;
}

.post-item:hover .post-img-link img {
    transform: scale(1.05);
}

/* Sisu osa kaardil */
.post-content-block {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-item h4 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    line-height: 1.4;
}

.post-item h4 a {
    color: var(--blog-text);
    text-decoration: none;
    font-weight: 600;
}

.post-item h4 a:hover {
    color: var(--blog-primary);
}

.post-date {
    font-size: 0.85rem;
    color: var(--blog-light-text);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.post-date i { margin-right: 6px; }

.post-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--blog-light-text);
    margin-bottom: 20px;
    flex-grow: 1;
}

/* Nuppude stiil */
.post-item .btn-read-more {
    align-self: flex-start;
    padding: 8px 22px;
    border-radius: 50px;
    background: transparent;
    border: 2px solid var(--blog-primary);
    color: var(--blog-primary);
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.post-item .btn-read-more:hover {
    background: var(--blog-primary);
    color: #fff;
    box-shadow: 0 4px 10px rgba(36, 185, 215, 0.3);
}

/* 2. BLOG PAGE (Full list) */
#blogger-blog-page .blog-post-item {
    background: #fff;
    padding: 30px;
    margin-bottom: 30px;
    border-radius: var(--blog-radius);
    border: 1px solid var(--blog-border);
}

/* 3. SINGLE POST PAGE - Maksimaalne puhtus */
#blogger-single-post {
    max-width: 850px;
    margin: 2rem auto;
}

#blogger-single-post .post-title {
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--blog-text);
}

#blogger-single-post .post-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    font-family: inherit;
}

/* Tabelid ja pildid postituse sees */
#blogger-single-post .post-content table {
    width: 100% !important;
    margin: 20px 0;
    border-collapse: collapse;
}

#blogger-single-post .post-content table td {
    padding: 10px;
    border: 1px solid var(--blog-border);
}

#blogger-single-post .post-content img {
    max-width: 100%;
    height: auto !important;
    border-radius: var(--blog-radius);
    margin: 25px 0;
    box-shadow: var(--blog-shadow);
}

/* Eemaldame vanad HR jooned */
hr { border: 0; border-top: 1px solid var(--blog-border); margin: 3rem 0; }