/* === ÜLDISED STIILID JA PAIGUTUS === */
body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    color: #333; 
    background-color: #fcfcfc; 
    line-height: 1.7; 
}

.content-wrapper {
    max-width: 800px;
    margin: 20px auto 40px auto;
    padding: 0 20px; /* Eemaldasin topelt-paddingu, kuna see on juba siin */
}

a {
    color: #c2966c;
    text-decoration: none;
}
a:hover {
    color: #a97d52;
}

/* === PÄIS === */
header { 
    background: white; 
    border-bottom: 1px solid #eee; 
    padding: 10px 20px; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
}
.logo-image { 
    max-height: 50px; 
    display: block; 
}

/* === JÄLJERAJA NAVIGATSIOON (BREADCRUMBS) === */
.breadcrumbs {
    font-size: 0.9em;
    color: #777;
    margin: 50px 0 20px 0;
    margin-left: 160px !important;
}

/* === PEALKIRJAD === */
h1 {
    font-size: 1.8em;
    color: #c2966c;
    text-align: center;
    margin-bottom: 30px;
}
h2 {
    font-size: 2.2em;
    color: #c2966c;
    margin-top: 50px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
    text-align: center;
}

/* === BLOGI NIMEKIRJA VAADE (blog.php) === */
.blog-post-summary {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
    margin-bottom: 40px;
    padding: 0;
    border-bottom: 1px solid #eee;
    padding-bottom: 40px;
}
.blog-post-summary:last-child {
    border-bottom: none;
}

/* Pisipildi konteiner */
.post-thumbnail {
    width: 200px; /* Proovime veidi suuremat pilti */
    flex-shrink: 0;
}

/* PARANDATUD: See reegel tagab, et pilt ei lähe suureks */
.blog-post-summary .post-thumbnail img {
    width: 200px !important;      /* Sunnime laiuse peale */
    height: 160px !important;     /* Sunnime kõrguse peale */
    max-width: 200px !important;  /* Kirjutame üle kõik max-width reeglid */
    object-fit: cover !important; /* Tagab pildi korrektse kuvamise */
    display: block;
    border-radius: 8px;
}

.post-details {
    flex-grow: 1;
}

/* Blogi nimekirjas olevad pealkirjad */
.blog-post-summary h2 {
    margin-top: 0;
    text-align: left;
    border-bottom: none;
    font-size: 1.8em; /* Veidi väiksem, et paremini sobiks */
    padding-bottom: 0;
}
.blog-post-summary h2 a {
    color: #333;
    transition: color 0.2s;
}
.blog-post-summary h2 a:hover {
    color: #c2966c;
}

.post-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
}

.post-excerpt {
    font-size: 1em; /* Standardne fondisuurus */
    color: #555;
    line-height: 1.6;
}

.read-more-btn {
    display: inline-block;
    margin-top: 15px;
    padding: 10px 20px;
    background-color: #c2966c;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.2s;
}
.read-more-btn:hover {
    background-color: #a97d52;
}


/* === ÜKSIKU POSTITUSE VAADE (post.php) === */
.post-full .post-meta {
    text-align: center;
}
.post-content {
    margin-top: 20px;
}
.post-content img {
    max-width: 100%; /* See reegel jääb kehtima ainult postituse sisu piltidele */
    height: auto;
    border-radius: 8px;
    margin: 25px 0;
}

/* === JAGAMISNUPUD === */
.secondary-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 25px 0;
    justify-content: center; /* Keskendame nupud */
}
.secondary-actions .cta-button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    color: #fff;
    font-size: 14px;
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.secondary-actions .cta-button:hover {
    opacity: 0.9;
}
.facebook-share { background-color: #1877F2; }
.pinterest-share { background-color: #E60023; }


/* === KOMMENTAARID === */
.comments-section { margin-top: 60px; }
.comment-form-container h3 { font-size: 1.8em; text-align: left; margin-bottom: 20px; border: none; padding: 0; }
.comment-form .form-group { margin-bottom: 20px; }
.comment-form label { display: block; margin-bottom: 5px; font-weight: bold; }
.comment-form input, .comment-form textarea { width: 100%; padding: 12px; border: 1px solid #ccc; border-radius: 5px; font-size: 1em; box-sizing: border-box; }
.comment-form textarea { resize: vertical; min-height: 120px; }
.comment-form .submit-btn { display: inline-block; padding: 12px 25px; background-color: #c2966c; color: white; border-radius: 5px; transition: background-color 0.2s; border: none; cursor: pointer; font-size: 1.1em; }
.comment-form .submit-btn:hover { background-color: #a97d52; }
.comments-list { margin-top: 40px; }
.comment { border-bottom: 1px solid #eee; padding: 20px 0; }
.comment:last-child { border-bottom: none; }
.comment-author { font-weight: bold; }
.comment-date { font-size: 0.85em; color: #777; margin-left: 10px; }
.comment-body { margin-top: 10px; }


/* === JALUS === */
footer { 
    text-align: center; 
    padding: 40px 20px !important; 
    margin-top: 60px !important; 
    background-color: #f1f1f1; 
    max-width: 1600px !important;
}


/* ============================================= */
/* === MOBIILIVAATE STIILID (KÕIK KOOS) === */
/* ============================================= */
@media (max-width: 768px) {

    h1 { font-size: 2em; }
    .post-full h1 { font-size: 1.8em; line-height: 1.2; } /* Üksiku postituse pealkiri */

    /* Blogi nimekirja paigutus mobiilis */
    .blog-post-summary {
        flex-direction: column;
    }
    .post-thumbnail {
        width: 100%;
    }
    .blog-post-summary .post-thumbnail img {
        height: 200px; /* Suurem kõrgus mobiilis */
    }

    /* Jagamisnupud ikoonideks */
    .secondary-actions .cta-button {
        font-size: 0;
        padding: 0;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        position: relative;
    }
    .secondary-actions .cta-button::before {
        font-family: "Font Awesome 6 Brands", "Font Awesome 6 Free", sans-serif;
        font-weight: 900;
        font-size: 20px;
        color: white;
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        line-height: 1;
    }
    .secondary-actions .facebook-share::before {
        font-family: "Font Awesome 6 Brands", sans-serif;
        content: "\f39e";
    }
    .secondary-actions .pinterest-share::before {
        font-family: "Font Awesome 6 Brands", sans-serif;
        content: "\f231";
    }
}