.billing-container {
    max-width: 1320px;
    padding: 20px;
    margin: 0 auto;
}

.container-custom {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 15px;
}

/* --- Shared Components --- */
.section-heading-center {
    text-align: center;
    margin-bottom: 3rem;
}
.section-title {
    font-size:48px;
    font-weight: 500;
    font-family: 'Outfit';
}

/* --- Hero Section --- */
.billing-hero {
    position: relative;
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(50% - 50vw);
    height: 0;
    padding-bottom: 50%;
    border-radius: 0 0 20px 20px;
    overflow: hidden;
}

@media (min-width: 1400px) {
    .billing-hero { 
        height: 955px; 
        padding-bottom: 0; 
    }
}

.billing-hero-background {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.billing-hero-image {
    width: 100%;
    min-width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.billing-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.4) 100%);
    z-index: 2;
    border-radius: inherit;
}

.billing-hero-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    color: white;
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 350px;
}

.billing-hero-title {
    font-family: 'Outfit';
    font-size: 72px;
    font-weight: 600;
    margin-bottom: 20px;
    line-height: 1.2;
}

.billing-hero-description {
    font-family: 'Outfit';
    font-size: 22px;
    line-height: 1.4;
    font-weight: 300;
    margin-bottom: 50px;
    max-width: 700px;
}

.billing-hero-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.billing-btn {
    display: inline-flex;
    height: 48px;
    padding: 0 32px;
    justify-content: center;
    align-items: center;
    border-radius: 90px;
    font-family: 'Outfit';
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.billing-btn-primary { 
    background-color: #1989FB; 
    color: white; 
}

.billing-btn-primary:hover { 
    background-color: #0d7be8; 
    transform: translateY(-2px); 
}

.billing-btn-secondary { 
    background-color: white; 
    color: #0D0100; 
}

.billing-btn-secondary:hover { 
    background-color: #f8f9fa; 
    transform: translateY(-2px); 
}

/* --- Contractor & PAYE Section --- */
.contractor-billing-section {
    padding: 80px 0;
}

.sticky-services-grid {
    display: flex;
    gap: 84px;
    align-items: flex-start;
    position: relative;
    margin-top: 130px;
}

.sticky-services-left {
    flex: 0 0 504px;
    position: sticky;
    top: 100px;
}

.sticky-image-box {
    width: 100%;
    border-radius: 24px;
    overflow: hidden;
}

.sticky-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.scrollable-services-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.service-info-card {
    background: #ffffff;
    border-radius: 24px;
}

.service-info-card h2 {
    font-size: 34px;
    font-weight: 500;
    color: #0D0100;
    font-family: 'Outfit';
    line-height: 1;
    letter-spacing: 2px;
    margin-bottom: 30px;
}

.service-info-card p,
.service-info-card li {
    font-size: 24px;
    color: #0D0100;
    line-height: 1.5;
    font-family: 'Outfit';
    font-weight: 400;
}

.service-benefit-label {
    font-size: 24px;
    color: #0D0100;
    line-height: 1.5;
    font-family: 'Outfit';
    font-weight: 400;
    display: block;
    margin-bottom: 5px;
}

.benefit-pill-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

.benefit-pill-list li {
    font-family: 'Outfit';
    font-size: 24px;
    line-height: 1.5;
    color: #0D0100;
    font-weight: 400;
    position: relative;
    padding-left: 20px;
}

.benefit-pill-list li::before {
    content: "•";
    color: #0D0100;
    font-size: 20px;
    position: absolute;
    left: 0;
    top: 4px;
}

/* --- Why Choose Section --- */
.why-choose-section {
    background-color: #ffffff !important;
    padding: 50px 0;
}

.why-choose-title {
    font-family: 'Outfit';
    font-size: 48px;
    font-weight: 500;
    color: #0D0100;
    margin-bottom: 75px;
    line-height: 1.3;
}

/* Class names used in home.css to ensure overrides work when optimized */
.hire-card {
    background: #FFFCFA;
    border: none;
    border-radius: 24px;
    width: 100%;
    max-width: unset;
    min-height: 429px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 63px;
    transition: all 0.3s ease;
    cursor: pointer;
    box-sizing: border-box;
}

.flip-card-front, 
.flip-card-inner {
    min-height: 360px;
}

.hire-card h3 {
    max-width: 216px;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    justify-content: stretch;
    gap: 20px;
}

/* --- Pricing Section --- */
.transparent-fee-section {
    padding-bottom: 100px;
}

.billing-pricing-card {
    background-color: #1989FB !important; 
    border-radius: 32px;
    padding: 3px;
}

.pricing-card-header {
    background-color: transparent !important;
    border-radius: 32px 32px 0 0;
    padding: 24px 0;
    text-align: center;
}

.pricing-card-header h4 {
    font-weight: 500;
    font-family: 'Outfit';
    font-size: 26px;
    margin: 0;
}

.pricing-card-body {
    background-color: #0A0A0A !important;
    border-radius: 32px;
    padding: 2rem 1.5rem;
}

@media (min-width: 768px) {
    .pricing-card-body {
        padding: 3rem;
    }
}

.pricing-card-body p {
    font-family: 'Outfit';
    font-size: 20px;
    font-weight: 400;
    color: #ffffff !important;
    margin-bottom: 1.5rem;
}

.pricing-feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pricing-feature-list li {
    font-family: 'Outfit';
    font-size: 20px;
    font-weight: 400;
    color: #ffffff;
    display: flex;
    align-items: center;
}

.pricing-dot {
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    margin-right: 1rem;
}

.price-tag {
    font-family: 'Outfit';
    font-weight: 600;
    color: white;
    margin-top: 40px;
    font-size: 48px;
    margin-bottom: 30px !important;
}

.pricing-cta-btn {
    background: #3197EE !important;
    border-radius: 90px !important;
    font-family: 'Outfit' !important;
    font-size: 16px !important;
    line-height: 1;
    font-weight: 400 !important;
    padding: 16px 0 !important;
    color: white !important;
    border: none !important;
    width: 100%;
    transition: opacity 0.3s ease;
}

.pricing-cta-btn:hover {
    opacity: 0.9;
}

/* Uniform Sections Wrapper - Only for screens 767px and above */
@media (min-width: 767px) {
    .uniform-sections-wrapper {
        margin: 0 auto;
        padding-left: 20px;
        padding-right: 20px;
        max-width: 1270px;
    }

    .uniform-sections-wrapper .contractor-billing-section,
    .uniform-sections-wrapper .why-choose-section,
    .uniform-sections-wrapper .outcomes-morden-softwarea,
    .uniform-sections-wrapper .how-works-section,
    .uniform-sections-wrapper .billing-cta-section,
    .uniform-sections-wrapper .billing-container,
    .uniform-sections-wrapper .how-works-container,
    .hire-container,
    .outcomes-container {
        padding-left: 0;
        padding-right: 0;
        max-width: unset;
    }

    .how-step:first-child {
        padding-left: 0;
    }
    
    .how-step:last-child {
        padding-right: 0;
    }

    .how-works-grid {
        margin: 0;
    }
}

/* --- Bottom CTA Section --- */
.billing-cta-section {
    padding: 60px 24px 80px;
}

/* Overriding home.css styles for billing page specifically */
.ready-strengthen-content {
    padding-right: 25px;
    max-width: 615px;
}

.billing-cta-section .ready-strengthen-text {
    width: 80%;
}

/* --- Responsive Media Queries --- */

@media (max-width: 1440px) {
    .sticky-services-grid {
        gap: 84px;
    }
    .sticky-services-left {
        margin-left: 25px;
    }
}

@media (max-width: 1439px) {
    .sticky-services-grid, 
    .scrollable-services-right {
        gap: 20px;
    }
}

@media (max-width: 1200px) {
    .billing-hero-title { font-size: 42px; }
    .billing-hero { padding-bottom: 70%; }
}

@media (max-width: 991px) {
    .sticky-services-grid {
        flex-direction: column;
    }
    .sticky-services-left {
        position: static;
        width: 100%;
        flex: auto;
        margin-left: 0;
    }
    .sticky-image-box img {
        height: auto;
        max-height: 400px;
    }
    .service-info-card h2 {
        font-size: 28px;
    }
    .service-info-card p,
    .service-info-card li,
    .service-benefit-label {
        font-size: 18px;
    }
}

.card-custom {
    border: none;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    height: 100%;
  }

  .card-custom img {
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
  }

  .card-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  }

  .card-overlay h5 {
    margin-bottom: 5px;
    font-weight: 600;
  }

  .section-title {
    text-align: center;
    margin-bottom: 75px;
  }

  .step-icon {
    width: 60px;
    height: 60px;
  }

  .step-icon img {
    width: 100%;
    height: 100%;
  }

  .card-overlay p {
    color: #524E4E;
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 300;
    line-height: 20px;

  }

  @media (max-width: 768px) {

    .billing-hero { padding: 0; min-height: 480px;}
    .billing-hero-title { font-size: 27px; line-height: 32px; margin-bottom: 20px;}
    .billing-hero-description { font-size: 16px; line-height: 18px; margin-bottom: 35px;}
    .billing-btn { margin: 0; font-size: 12px; line-height: 16px; padding: 11px 14px; height: unset;}
    
    /* Minimum padding (20px) for tablet screens */
    .contractor-billing-section,
    .why-choose-section,
    .how-works-section,
    .billing-cta-section { 
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .sticky-services-grid {
        margin-top: 40px;
    }

    .contractor-billing-section .section-title {
        margin-bottom: 0;
    }

    .section-title, .why-choose-title, .section-heading-center h2, .how-works-title {
        font-size: 32px;
        font-weight: 500;
    }
    
    .transparent-fee-section { 
        padding-top: 20px !important;
        padding-bottom: 20px !important; 
    }
    
    /* Handle internal container spacing */
    .transparent-fee-section .container.py-4 {
        padding-top: 20px !important;
        padding-bottom: 20px !important;
    }

    .why-choose-title {
        margin-bottom: 15px !important;
        padding-bottom: 0 !important;
    }

    .service-info-card h2 {
        font-size: 24px;
        margin-bottom: 15px;
    }
    .service-info-card p,
    .service-info-card li,
    .service-benefit-label {
        font-size: 16px;
    }
    
    /* Using original names to catch home.css overrides */
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        max-width: 100%;
    }
    .hire-card {
        padding: 0 16px 0px 28px !important;
        gap: 20px !important;
        min-height: 180px !important;
        max-width: none !important;
    }
    .hire-card h3 {
        font-size: clamp(18px, 4.2vw, 24px) !important;
    }
    .card-overlay p {
        font-size: 15px;
    }

    .flip-card-inner, .flip-card-front, .flip-card-back {
        min-height: 200px;
        gap: 20px;
    }
}
  
@media (max-width: 480px) {
    .service-info-card h2 {
        font-size: 22px;
    }
    .service-info-card p,
    .service-info-card li,
    .service-benefit-label {
        font-size: 14px;
    }

    .section-title,
    .why-choose-title,
    .section-heading-center h2,
    .how-works-title {
        font-size: 26px;
        line-height: 34px;
    }
}

@media (max-width: 375px) {
    .billing-hero-title {
        margin-bottom: 5px !important;
    }
    
    /* Minimum padding (15px) for very small mobile screens */
    .why-choose-section,
    .contractor-billing-section,
    .how-works-section,
    .billing-cta-section {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
    
    .transparent-fee-section.py-5 {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
    
    .transparent-fee-section .container.py-4 {
        padding-top: 15px !important;
        padding-bottom: 15px !important;
    }
}
