/* =========================
   SERVICE-PREVIEW.CSS – FULLY RESPONSIVE (IMPROVED)
   Purple background, green cards, perfect button & image scaling
========================= */

.services {
    padding: 80px 0;
    background: #1e1029;
    width: 100%;
}

.container {
    max-width: 1300px;
    width: 100%;
    margin: 0 auto;
    padding: 0 clamp(20px, 5vw, 40px);
    box-sizing: border-box;
}

/* ----- HEADER ROW (flex, but stacks on mobile) ----- */
.services-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;      /* changed from flex-end for better alignment */
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
    width: 100%;
}

.services-intro {
    flex: 1;
    min-width: 250px;
}

.services-cta {
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0;                /* removed fixed margin – let flex handle it */
}

.section-tag {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.section-tag hr {
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #c084fc, #4ade80);
    border: none;
    margin: 0;
}

.section-tag h5 {
    color: #4ade80;
    font-size: clamp(0.8rem, 3vw, 0.9rem);
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin: 0;
}

.services-intro h2 {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    color: #e2d6f0;
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.services-intro p {
    font-size: clamp(0.9rem, 2.5vw, 1rem);
    color: #d1e0d6;
    line-height: 1.5;
    max-width: 600px;
    margin-bottom: 0;
}

/* Button – consistent with other sections */
.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: #4ade80;
    color: #0a1f1a;
    border: 2px solid #4ade80;
    box-shadow: 0 0 6px rgba(74, 222, 128, 0.3);
    white-space: nowrap;
}

.btn-primary:hover {
    background: #22c55e;
    border-color: #22c55e;
    transform: translateY(-2px);
    box-shadow: 0 6px 14px rgba(74, 222, 128, 0.3);
}

/* ----- SERVICES GRID (responsive cards) ----- */
.services-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.service-card {
    flex: 1 1 300px;
    max-width: 320px;
    background: rgba(10, 31, 26, 0.7);
    backdrop-filter: blur(2px);
    border-radius: 24px;
    padding: 32px 24px;
    text-align: center;
    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;
}

.service-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.9);
}

.service-card figure {
    margin: 0 0 24px 0;
    display: flex;
    justify-content: center;
}

.service-card img {
    width: clamp(55px, 12vw, 70px);
    height: auto;
    filter: brightness(0) saturate(100%) invert(55%) sepia(60%) saturate(400%) hue-rotate(85deg) brightness(95%) drop-shadow(0 0 6px rgba(74, 222, 128, 0.4));
    transition: 0.3s ease;
}

.service-card:hover img {
    filter: brightness(0) saturate(100%) invert(18%) sepia(98%) saturate(3000%) hue-rotate(260deg) brightness(95%) drop-shadow(0 0 6px rgba(192, 132, 252, 0.4));
    transform: scale(1.05);
}

.service-card h3 {
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 600;
    color: #c084fc;
    margin-bottom: 16px;
    letter-spacing: -0.3px;
}

.service-card p {
    font-size: clamp(0.85rem, 2.5vw, 0.95rem);
    color: #b8c4bc;
    line-height: 1.5;
    flex-grow: 1;
    margin-bottom: 0;
}

/* ========== RESPONSIVE BREAKPOINTS ========== */

/* Tablet (max-width 900px): stack header, button left-aligned, cards flexible */
@media (max-width: 900px) {
    .services-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    .services-cta {
        align-self: flex-start;
    }
    .btn-primary {
        white-space: normal;          /* allow button text to wrap if needed */
        text-align: center;
    }
    .services-grid {
        gap: 25px;
    }
    .service-card {
        max-width: 100%;
        flex-basis: calc(50% - 25px); /* two columns on tablet */
    }
}

/* Mobile (max-width 768px): full width cards, single column */
@media (max-width: 768px) {
    .services {
        padding: 60px 0;
    }
    .services-grid {
        flex-direction: column;
        align-items: center;
    }
    .service-card {
        flex-basis: 100%;
        max-width: 400px;             /* not too wide on mobile */
        width: 100%;
    }
    .services-cta {
        width: 100%;
    }
    .btn-primary {
        width: auto;
        display: inline-block;
    }
}

/* Small phones (≤ 480px): tighter card padding, smaller images */
@media (max-width: 480px) {
    .service-card {
        padding: 24px 16px;
    }
    .service-card h3 {
        margin-bottom: 12px;
    }
    .service-card p {
        line-height: 1.4;
    }
    .services-intro h2 {
        margin-bottom: 12px;
    }
    .section-tag {
        margin-bottom: 12px;
    }
    .service-card img {
        width: 55px;
    }
}

/* Very narrow (≤ 360px) */
@media (max-width: 360px) {
    .service-card {
        padding: 20px 12px;
    }
    .service-card h3 {
        font-size: 1.1rem;
    }
    .service-card p {
        font-size: 0.8rem;
    }
    .service-card img {
        width: 45px;
    }
}

*, *::before, *::after {
    box-sizing: border-box;
}