/* =========================
   BLOG.CSS – FULLY RESPONSIVE
   Purple background, left header + right button
   Blog cards matching service card style
========================= */

.blog {
    width: 100%;
    padding: 80px 0;
    background: #1e1029;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
    box-sizing: border-box;
}

/* ----- HEADER ROW (flex, stacks on mobile) ----- */
.blog-center {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    margin-bottom: 60px;
    gap: 30px;
}

.w-66 {
    flex: 2;
    min-width: 250px;
}

.w-33 {
    flex: 1;
    min-width: 160px;
}

.flex-end {
    display: flex;
    justify-content: flex-end;
}

/* Left side content – responsive typography */
.section-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.section-tag hr {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #4ade80, #c084fc);
    border: none;
    margin: 0;
}

.section-tag h5 {
    color: #c084fc;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.blog h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #e2d6f0;
    letter-spacing: -0.02em;
    margin-bottom: 16px;
}

.blog p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #d1e0d6;
    line-height: 1.5;
    max-width: 550px;
}

/* Button styling – responsive, allows wrap on mobile */
.btn-primary {
    display: inline-block;
    padding: 12px 28px;
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    font-weight: 600;
    text-decoration: none;
    border-radius: 40px;
    transition: all 0.3s ease;
    letter-spacing: 0.5px;
    background: #c084fc;
    color: #0a1f1a;
    border: 2px solid #c084fc;
    box-shadow: 0 0 6px rgba(192, 132, 252, 0.3);
    white-space: nowrap;
}

.btn-primary:hover {
    background: #a855f7;
    border-color: #a855f7;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(168, 85, 247, 0.3);
}

/* ----- BLOG CARDS (responsive grid) ----- */
.blog-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.blog-card {
    background: rgba(10, 31, 26, 0.5);
    backdrop-filter: blur(2px);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(74, 222, 128, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
}

.blog-card:hover {
    transform: translateY(-8px);
    border-color: #c084fc;
    box-shadow: 0 16px 30px rgba(192, 132, 252, 0.2);
    background: rgba(10, 31, 26, 0.7);
}

.blog-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.blog-card:hover img {
    transform: scale(1.02);
}

.card-body {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-body h4 {
    font-size: clamp(1.1rem, 4vw, 1.3rem);
    font-weight: 700;
    color: #e2d6f0;
    margin-bottom: 12px;
    line-height: 1.3;
}

.card-body p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #b8c4bc;
    line-height: 1.5;
    margin-bottom: 20px;
    flex: 1;
}

.card-body a {
    color: #4ade80;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: gap 0.3s ease;
    align-self: flex-start;
}

.card-body a::after {
    content: "→";
    transition: transform 0.3s ease;
}

.card-body a:hover {
    color: #c084fc;
    gap: 10px;
}

.card-body a:hover::after {
    transform: translateX(4px);
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet (≤ 900px): reduce padding, adjust header gap, allow button to wrap */
@media (max-width: 900px) {
    .blog {
        padding: 60px 0;
    }
    .blog-center {
        margin-bottom: 40px;
        gap: 25px;
    }
    .btn-primary {
        white-space: normal;
        text-align: center;
    }
    .blog-card img {
        height: 200px;
    }
}

/* Mobile (≤ 768px): stack header completely, single column cards */
@media (max-width: 768px) {
    .blog-center {
        flex-direction: column;
        align-items: flex-start;
    }
    .flex-end {
        justify-content: flex-start;
        width: 100%;
    }
    .btn-primary {
        width: auto;
    }
    .blog-cards {
        grid-template-columns: 1fr;   /* single column */
        gap: 25px;
    }
    .blog-card img {
        height: 180px;
    }
    .card-body {
        padding: 20px;
    }
    .card-body h4 {
        font-size: 1.2rem;
    }
    .card-body p {
        font-size: 0.9rem;
    }
}

/* Small phones (≤ 480px): tighter spacing, smaller image */
@media (max-width: 480px) {
    .container {
        padding: 0 20px;
    }
    .blog-card img {
        height: 160px;
    }
    .card-body {
        padding: 16px;
    }
    .card-body h4 {
        font-size: 1.1rem;
        margin-bottom: 8px;
    }
    .card-body p {
        font-size: 0.85rem;
        margin-bottom: 16px;
    }
}

/* Very narrow (≤ 360px) */
@media (max-width: 360px) {
    .blog-card img {
        height: 140px;
    }
    .card-body h4 {
        font-size: 1rem;
    }
    .card-body p {
        font-size: 0.8rem;
    }
}