/* --- මූලික සැකසුම් (Base Settings) --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif; /* පට්ට ලස්සන ෆොන්ට් එක */
    background-color: #fafbfe; /* ඇස් වලට අමාරු නැති සුදට හුරු (Off-white) වර්ණයක් */
    color: #333;
    line-height: 1.6;
}

/* --- Navigation / Back Button --- */
.navbar {
    padding: 20px 5%;
    background-color: transparent;
    display: flex;
    align-items: center;
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 20px;
    background-color: #ffffff;
    border-radius: 30px; /* රවුම් හැඩය (Shapes) */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05); /* ලස්සන ෂැඩෝ එකක් */
    transition: all 0.3s ease; /* ස්මූත් ඇනිමේෂන් එකක් */
}

.back-btn:hover {
    transform: translateY(-3px) scale(1.02); /* මවුස් එක ගෙනිච්චම උඩට එනවා */
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    color: #0066ff; /* ලස්සන නිල් පාටක් */
}

/* --- Page Header (මාතෘකා කොටස) --- */
.page-header {
    text-align: center;
    padding: 40px 20px;
    animation: fadeUp 0.8s ease forwards;
}

.page-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

.page-header p {
    color: #666;
    font-size: 1.1rem;
}

/* --- Blog Container (ලිපි පෙළගස්වන තැන) --- */
.blog-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* කෙලින්ම පේළියට 2යි */
    gap: 30px;
    padding: 20px 5%;
    max-width: 1000px;
    margin: 0 auto 60px auto;
}

/* මොබයිල් ෆෝන් එකෙන් බලද්දී එක පේළියට 1 ගානේ වැටෙන්න මේකත් එකතු කරන්න */
@media (max-width: 768px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
}

/* --- Blog Card (එක් ලිපියක ඩිසයින් එක) --- */
.blog-card {
    background: #ffffff;
    border-radius: 20px; /* ලස්සනට රවුම් කරපු මුළු */
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.04); /* සුමට ෂැඩෝ එක */
    transition: all 0.4s ease;
    animation: fadeUp 1s ease forwards;
    opacity: 0;
}

/* මවුස් එක ගෙනිච්චම කාඩ් එකට වෙන දේ (Hover Effect) */
.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

/* --- Card Image --- */
.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* මවුස් එක ගෙනිච්චම ෆොටෝ එක සූම් වෙනවා */
.blog-card:hover .card-image img {
    transform: scale(1.08);
}

/* --- Card Content --- */
.card-content {
    padding: 25px;
}

.card-category {
    display: inline-block;
    padding: 5px 12px;
    background-color: #f0f4ff;
    color: #0066ff;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 20px;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

.card-title {
    font-size: 1.25rem;
    color: #222;
    margin-bottom: 15px;
    line-height: 1.4;
}

.card-excerpt {
    font-size: 0.95rem;
    color: #777;
    margin-bottom: 20px;
}

.read-more {
    text-decoration: none;
    color: #111;
    font-weight: 600;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
}

.read-more span {
    transition: transform 0.3s ease;
}

.read-more:hover {
    color: #0066ff;
}

.read-more:hover span {
    transform: translateX(5px); /* ඊතලය ඉස්සරහට යනවා */
}

/* --- Footer --- */
.site-footer {
    background-color: #ffffff;
    padding: 40px 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: #111;
    margin-bottom: 10px;
}

.site-footer p {
    color: #777;
    font-size: 0.9rem;
}

.copyright {
    margin-top: 20px;
    font-size: 0.8rem;
    color: #aaa;
}

/* --- පේජ් එක ලෝඩ් වෙද්දී ලස්සනට උඩට එන ඇනිමේෂන් එක (Keyframes) --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* කාඩ් එකින් එක ලෝඩ් වෙන්න පොඩි ප්‍රමාදයක් දීම */
.blog-card:nth-child(1) { animation-delay: 0.1s; }
.blog-card:nth-child(2) { animation-delay: 0.2s; }
.blog-card:nth-child(3) { animation-delay: 0.3s; }
.blog-card:nth-child(4) { animation-delay: 0.4s; }