/* =====================================================
   NEXTNOMIC – SERVICES PAGE CSS (FINAL FIXED)
   Astra Child Theme
===================================================== */

/* -----------------------
   GLOBAL RESET & OVERRIDES
------------------------ */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Fix Astra Container for Services Page - UPDATED TO PAGE ID 9 */
.page-id-9 .ast-container,
body.page-template-services-page .ast-container {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin: 0 auto !important;
    width: 100% !important;
}

/* Remove any theme padding from content area */
.page-template-services-page #content,
.page-id-9 #content {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
}

/* Fix site content container */
.site-content {
    padding: 0 !important;
    margin: 0 !important;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    font-family: "Poppins", Arial, sans-serif;
    line-height: 1.6;
    width: 100%;
}

/* -----------------------
   BASE CONTAINER
   This ensures all sections are centered
------------------------ */
.nx-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 70px 24px;
    box-sizing: border-box;
}

/* -----------------------
   TEXT HELPERS
------------------------ */
.nx-center {
    text-align: center;
}

.nx-sub {
    max-width: 720px;
    margin: 14px auto 50px;
    color: #555;
    font-size: 16px;
    line-height: 1.7;
}

/* =====================================================
   HERO SECTION
===================================================== */
.nx-hero {
    width: 100%;
    background: #ffffff;
    padding: 40px 0;
}

.nx-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    min-height: 500px;
}

.nx-hero-content h1 {
    font-size: 44px;
    line-height: 1.25;
    margin-bottom: 18px;
    color: #111;
    font-weight: 700;
}

.nx-lead {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 16px;
    color: #444;
}

.nx-hero-content p {
    font-size: 16px;
    line-height: 1.75;
    color: #555;
    margin-bottom: 28px;
}

.nx-hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.nx-hero-visual img {
    width: 100%;
    max-width: 420px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

/* -----------------------
   BUTTON
------------------------ */
.nx-btn-primary {
    display: inline-block;
    padding: 14px 30px;
    background: #6a00ff;
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 16px;
    border: 2px solid #6a00ff;
}

.nx-btn-primary:hover {
    background: #5200cc;
    transform: translateY(-2px);
    border-color: #5200cc;
}

/* =====================================================
   SERVICES SECTION
===================================================== */
.nx-services {
    background: #f9fafc;
    width: 100%;
}

.nx-services h2 {
    font-size: 34px;
    margin-bottom: 10px;
    color: #111;
    font-weight: 700;
}

/* =====================================================
   GRID SYSTEM
===================================================== */
.nx-grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.nx-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

/* -----------------------
   CARD STYLE
------------------------ */
.nx-card {
    background: #ffffff;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    height: 100%;
    border: 1px solid #eef2f7;
}

.nx-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border-color: #6a00ff;
}

.nx-card h3 {
    font-size: 22px;
    margin-bottom: 12px;
    color: #222;
    font-weight: 600;
}

.nx-card p {
    font-size: 15px;
    color: #555;
    margin-bottom: 18px;
    line-height: 1.6;
}

.nx-card ul {
    padding-left: 20px;
    margin: 0;
    list-style: none;
}

.nx-card ul li {
    font-size: 14px;
    margin-bottom: 8px;
    color: #444;
    line-height: 1.5;
    position: relative;
    padding-left: 25px;
}

.nx-card ul li:before {
    content: "✓";
    color: #6a00ff;
    font-weight: bold;
    position: absolute;
    left: 0;
    top: 0;
}

/* =====================================================
   AMAZON SECTION
===================================================== */
.nx-amazon {
    background: #ffffff;
    width: 100%;
}

.nx-amazon h2 {
    font-size: 34px;
    color: #111;
    font-weight: 700;
    margin-bottom: 20px;
}

/* =====================================================
   CTA SECTION (FIXED)
===================================================== */
.nx-cta {
    background: linear-gradient(135deg, #0b0c2a, #1a1b4d);
    color: #ffffff;
    max-width: 1200px;
    margin: 80px auto;
    padding: 70px 30px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(11, 12, 42, 0.2);
}

.nx-cta h2 {
    font-size: 36px;
    margin-bottom: 25px;
    font-weight: 700;
    line-height: 1.3;
}

.nx-cta .nx-btn-primary {
    background: #ffffff;
    color: #1a1b4d;
    border-color: #ffffff;
    font-size: 18px;
    padding: 16px 40px;
}

.nx-cta .nx-btn-primary:hover {
    background: #f0f0f0;
    color: #0b0c2a;
    border-color: #f0f0f0;
}

/* =====================================================
   RESPONSIVE DESIGN
===================================================== */
@media (max-width: 991px) {
    .nx-hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
        min-height: auto;
    }

    .nx-hero-content h1 {
        font-size: 38px;
    }

    .nx-hero-visual img {
        max-width: 380px;
    }

    .nx-grid-3,
    .nx-grid-2 {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-width: 768px) {
    .nx-container {
        padding: 50px 20px;
    }

    .nx-hero-content h1 {
        font-size: 32px;
    }

    .nx-services h2,
    .nx-amazon h2 {
        font-size: 28px;
    }

    .nx-cta h2 {
        font-size: 28px;
    }

    .nx-card {
        padding: 25px;
    }

    .nx-cta {
        margin: 50px auto;
        padding: 50px 20px;
        border-radius: 16px;
    }
}

@media (max-width: 480px) {
    .nx-container {
        padding: 40px 16px;
    }

    .nx-hero-content h1 {
        font-size: 28px;
    }

    .nx-lead {
        font-size: 16px;
    }

    .nx-btn-primary {
        padding: 12px 25px;
        font-size: 15px;
    }

    .nx-card h3 {
        font-size: 20px;
    }

    .nx-grid-3,
    .nx-grid-2 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Additional fix for Astra theme spacing */
.ast-single-post .entry-content,
.ast-page .entry-content {
    margin: 0 !important;
    padding: 0 !important;
}


/* FIX FOR CROPPED/CUT IMAGES */
.nx-card-image {
    width: 60%;
    height: 140px;
    /* CENTERING CODE */
        margin-left: auto;
        margin-right: auto;
        display: block;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f9fa;
    /* Light background if image doesn't fill */
}

/* CHANGE THIS LINE - Replace 'cover' with 'contain' */
.nx-card-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    /* Changed from 'cover' to 'contain' */
    transition: transform 0.5s ease;
}

/* Alternative: If you want images to fill but not crop */
/* .nx-card-image img {
    width: 100%;
    height: auto;
    max-height: 180px;
    object-fit: scale-down;
} */

.nx-card:hover .nx-card-image img {
    transform: scale(1.05);
}