/* ======================= GLOBAL VARIABLES (aligned with About page) ======================= */

:root {
    --section-padding-hero: 38px;
    --section-padding-desktop: 36px;
    --section-padding-tight: 28px;
    --section-padding-mobile: 30px;
    --card-gap-desktop: 24px;

    --title-color: #0b1020;
    --text-color: #444;
    --muted-text: #555;

    --primary-purple: #4f46e5;
    --primary-purple-alt: #6d28d9;
    --accent-orange: #FF8804;

    /* soft beige background similar to About page layout */
    --soft-bg: #fbf5ec;
}

/* ======================= GLOBAL SAFE RESETS ======================= */

html,
body {
    margin: 0;
    padding: 0;
    background-color: var(--soft-bg);
}

main,
.main-content,
.site-main,
.content,
.content-wrapper {
    margin-bottom: 0;
    padding-bottom: 0;
}

footer,
.site-footer,
.footer {
    margin-top: 0 !important;
}

/* ======================= GLOBAL PARAGRAPH SETTINGS ======================= */

p {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-color);
}

/* ======================= HERO SECTION ======================= */

.services-hero {
    padding: var(--section-padding-hero) 0 24px 0;
    background: var(--soft-bg); /* beige band, like About hero */
    border-bottom: 1px solid rgba(15, 23, 42, 0.04);
}

.services-hero-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    flex-wrap: wrap;
}

.services-left {
    flex: 1;
    min-width: 300px;
}

.services-title {
    font-size: 48px;
    font-weight: 800;
    margin: 0 0 6px;
    color: var(--title-color);
}

.services-subtitle {
    margin-top: 2px;
    margin-bottom: 0 !important;
    max-width: 580px;
    color: var(--muted-text);
}

.services-right {
    flex: 1;
    min-width: 320px;
}

.services-hero-img {
    width: 100%;
    max-width: 420px;
    border-radius: 18px;
    display: block;
}

/* ======================= SERVICES GRID (SECTION 1 - WHITE) ======================= */

.services-grid-section {
    padding: 40px 0;
    background: #ffffff;      /* full white band */
}

.services-grid-section h2 {
    margin: 0 0 6px;
    font-size: 30px;
    font-weight: 800;
    color: var(--title-color);
    text-align: center;
}

.services-grid-section > p {
    max-width: 900px;
    margin: 0 auto 18px;
    text-align: center;
    color: var(--text-color);
}

/* Grid */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--card-gap-desktop);
    align-items: stretch;                 /* all cards same height */
}

.service-card {
    background: #ffffff;
    padding: 22px;
    border-radius: 16px;
    border: 1px solid #eee;
    transition: 0.3s ease;
    display: flex;                        /* flex for perfect alignment */
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.service-icon {
    width: 58px;
    height: 58px;
    object-fit: cover;
}

/* title block same height so headings line up across row */
.service-card h3 {
    font-size: 20px;
    margin: 12px 0 6px;
    font-weight: 700;
    color: #111827;
    min-height: 50px;                     /* ensures all headings occupy same vertical space */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    text-align: center;
}

.service-card p {
    margin-top: 6px;
    line-height: 1.6;
    color: var(--muted-text);
    flex-grow: 1;                         /* lets descriptions fill evenly inside equal-height cards */
}

/* ======================= WHY US (SECTION 2 - BEIGE) ======================= */

.why-us {
    padding: 38px 0;
    background: var(--soft-bg);      /* alternate beige band */
}

.why-us .section-title {
    margin-bottom: 6px;
    text-align: center;
    color: var(--title-color);
}

.why-us > p {
    max-width: 900px;
    margin: 0 auto 20px;
    text-align: center;
    color: var(--text-color);
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 22px;
    align-items: stretch;                 /* all why-cards equal height */
}

.why-card {
    padding: 22px;
    border-radius: 14px;
    border: 1px solid #eee;
    background: #ffffff;
    transition: 0.25s ease;
    display: flex;                        /* ✅ flexbox for same alignment */
    flex-direction: column;
    justify-content: flex-start;
}

/* make all headings occupy same vertical space */
.why-card h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #111827;
    min-height: 48px;                     /* ✅ tweak if you want a bit more/less */
    display: flex;
    align-items: flex-end;
}

/* description fills remaining space so last lines align */
.why-card p {
    font-size: 14px;
    color: var(--muted-text);
    line-height: 1.7;
    flex-grow: 1;                         /* ✅ makes paragraph stretch inside equal-height card */
}

.why-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-alt));
    border-color: transparent;
}

.why-card:hover h3,
.why-card:hover p {
    color: #ffffff;
}

/* ======================= TECH STACK (SECTION 3 - WHITE + BEIGE STRIP) ======================= */

.tech-stack {
    position: relative;
    padding: 60px 0 30px;
    background: #ffffff;   /* back to white */
}

/* soft separator strip (same style as About page separation) */
.tech-stack::before {
    content: "";
    position: absolute;
    top: -40px;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--soft-bg);
}

.tech-stack .container {
    position: relative;
    z-index: 1;
}

.tech-stack .section-title {
    margin-bottom: 8px;
    text-align: center;
    color: var(--title-color);
}

.tech-stack > p {
    max-width: 900px;
    margin: 0 auto 18px;
    text-align: center;
    color: var(--text-color);
}

.tech-logos {
    margin-top: 4px;
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.tech-logos img {
    height: 40px;
}

/* ======================= CTA SECTION (SECTION 4 - GRADIENT) ======================= */

.services-final-cta {
    padding: 32px 0;
    background: linear-gradient(135deg, var(--primary-purple), var(--primary-purple-alt));
    color: #ffffff;
    text-align: center;
}

.cta-title {
    font-size: 30px;
    margin: 0 0 6px;
}

.cta-sub {
    margin-top: 2px;
    font-size: 14px;
    color: #ffffff;
}

.cta-btn {
    display: inline-block;
    background: var(--accent-orange);
    color: #ffffff;
    font-size: 17px;
    font-weight: 700;
    padding: 13px 38px;
    border-radius: 50px;
    margin-top: 16px;
    text-decoration: none;
    transition: 0.25s;
    box-shadow: 0px 10px 25px rgba(255, 136, 4, 0.35);
}

.cta-btn:hover {
    background: #e67600;
    transform: translateY(-3px);
    box-shadow: 0px 14px 32px rgba(255, 136, 4, 0.45);
}

/* ======================= RESPONSIVE ======================= */

@media (max-width: 900px) {

    .services-hero-inner {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    .services-hero {
        padding: var(--section-padding-mobile) 16px;
    }

    .services-grid-section,
    .why-us,
    .tech-stack,
    .services-final-cta {
        padding: var(--section-padding-mobile) 16px;
    }
}

@media (max-width: 640px) {

    .services-title {
        font-size: 36px;
    }

    .cta-title {
        font-size: 26px;
    }

    .services-grid,
    .why-grid {
        gap: 18px;
    }
}
