/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: white;
    color: #111827;
}

/* Prevent horizontal overflow on mobile only; desktop uses full container width */
@media (max-width: 767px) {
    main.container {
        max-width: 100%;
        overflow-x: hidden;
    }
}

/* Layout */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1.25rem;
    margin-top: 20px;
}

.section-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

/* Mobile: center-align main content and sections */
@media (max-width: 767px) {
    .container {
        text-align: center;
    }
    .hero-content {
        text-align: center;
    }
    .hero-buttons {
        justify-content: center;
    }
    .brand-label {
        text-align: center;
    }
    .brand-label img {
        display: inline-block;
    }
    .service-providers-section {
        text-align: center;
    }
    .providers-section {
        margin-left: auto;
        margin-right: auto;
    }
    .providers-title {
        text-align: center;
    }
    .providers-subtitle {
        text-align: center;
    }
    .providers-buttons {
        justify-content: center;
    }
    .promo-card {
        margin-left: auto;
        margin-right: auto;
    }
    .divider {
        margin-left: auto;
        margin-right: auto;
    }

    /* Postcode search recommended/provider cards should not appear centered.
       The global mobile rule above sets `text-align: center` on `.container`,
       which makes provider card content look centered. Force left alignment
       and full-width stretching for provider cards. */
    .provider-grid {
        width: 100%;
        justify-items: stretch;
        text-align: left;
    }

    .provider-card {
        width: 100%;
        text-align: left;
    }
}

@media (min-width: 640px) {
    .provider-grid {
        grid-template-columns: repeat(3, 1fr) !important;
    }
    .container {
        padding: 0 2rem;
    }
}

@media (min-width: 768px) {
    .container {
        margin-left: auto;
        margin-right: auto;
        padding: 0 3rem;
        margin-top: 20px;
    }
}

@media (min-width: 1024px) {
    .container {
        margin-left: auto;
        margin-right: auto;
        padding: 0 4rem;
        margin-top: 20px;
    }
}

/* Top Section */
.hero-section {
    padding-top: 2.5rem;
    display: grid;
    grid-template-columns: 1fr;
    /* gap: 2rem; */
    position: relative;
    min-width: 0; /* allow grid to shrink below content size */
}

@media (min-width: 768px) {
    .hero-section {
        padding-top: 4rem;
        grid-template-columns: 5fr 7fr;
        /* gap: 3rem; */
    }
}

.hero-content {
    /* max-width: 36rem; */
    padding-right: 0;
    position: relative;
    z-index: 1;
    min-width: 0; /* allow flex/grid child to shrink */
}

@media (min-width: 768px) {
    .hero-content {
        padding-right: 2rem;
    }
}

.hero-title {
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.3;
    word-wrap: break-word;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 1.875rem;
    }
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
        line-height: 1.2;
    }
}

.hero-subtitle {
    margin-top: 0.75rem;
    color: #4B5563;
    font-size: 1rem;
    line-height: 1.5;
}

@media (min-width: 640px) {
    .hero-subtitle {
        font-size: 1.25rem;
    }
}

.hero-description {
    margin-top: 1.25rem;
    font-size: 0.95rem;
    color: #374151;
    line-height: 1.6;
}

@media (min-width: 640px) {
    .hero-description {
        font-size: 1.25rem;
    }
}

.hero-buttons {
    margin-top: 1.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* Primary CTA — clear main action on homepage */
.hero-cta-primary {
    order: -1;
}
.btn-cta-primary {
    font-weight: 600;
    padding: 0.65rem 1.5rem;
    font-size: 1.05rem;
    min-width: 10rem;
}
.btn-cta-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.promo-card {
    margin-top: 2rem;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    /* max-width: 20rem; */
    position: relative;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
}

@media (min-width: 480px) {
    .promo-card {
        min-width: 280px;
        max-width: 20rem;
    }
}

.promo-content {
    padding: 0.5rem 0.75rem 0.75rem;
}

/* Promo banner image: full width of card, reduced gaps */
.promo-banner-image-wrap {
    margin: 0 -0.75rem 0.25rem -0.75rem; /* bleed to edges, small gap below */
    width: calc(100% + 1.5rem);
    max-width: none;
    overflow: hidden;
    border-radius: 0.25rem 0.25rem 0 0;
}
@media (max-width: 767px) {
    .promo-banner-image-wrap {
        margin: 0 0 0.25rem 0;
        width: 100%;
    }
}
.promo-banner-image-wrap .promo-banner-image,
.promo-banner-image {
    width: 100%;
    max-height: 140px;
    object-fit: cover;
    display: block;
    vertical-align: middle;
}
.promo-banner-heading {
    margin-top: 0;
    margin-bottom: 0.25rem;
}
.promo-cta-btn {
    margin-top: 0.5rem !important;
}

.promo-badge {
    position: absolute;
    top: 2rem;
    right: 0;
    background-color: #2563EB;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    transform: rotate(360deg);
    /* transform-origin: top right; */
    writing-mode: vertical-rl;
}

/* Ribbon 2 */
.promo-badge {
    width: 40px;
    height: 120px;
    padding: 10px 0;
    padding-right: 10px;
    position: absolute;
    top: -6px;
    right: 10px;
    text-align: center;
    border-top-left-radius: 3px;
    font-size: 0.7rem;
    z-index: 1;
    /* background: #f47530; */
}

@media (max-width: 480px) {
    .promo-badge {
        width: 35px;
        height: 100px;
        font-size: 0.65rem;
        padding: 8px 0;
        padding-right: 8px;
    }
}
  
  .promo-badge:before,
  .promo-badge:after {
    content: "";
    position: absolute;
  }
  
  .promo-badge:before {
    height: 0;
    width: 0;
    right: -5.5px;
    top: 0.1px;
    /* border-bottom: 6px solid #8d5a20; */
    border-right: 6px solid transparent;
  }
  
  .promo-badge:after {
    height: 0;
    width: 0;
    bottom: -19.5px;
    left: 0;
    border-left: 20px solid #2563EB;
    border-right: 20px solid #2563EB;
    border-bottom: 20px solid transparent;
  }

.hero-image-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin-top: 1.5rem;
    order: 2;
    min-width: 0;
}

.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    min-height: 250px;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.375rem;
}

@media (min-width: 768px) {
    .hero-image-container {
        position: absolute;
        top: 0;
        right: 0;
        width: 58.33%; /* 7/12 of the container */
        height: 100%;
        margin-top: 0;
        order: 0;
    }
    
    .hero-image {
        height: 100%;
        min-height: auto;
        max-height: none;
    }
}

/* Brand Label */
.brand-label {
    margin-top: 3rem;
}

.brand-text {
    display: inline-block;
    background-color: black;
    color: white;
    font-weight: 700;
    font-size: 0.75rem;
    padding: 0.25rem 0.75rem;
    letter-spacing: 0.1em;
}

.service-providers-section {
    margin-top: 1.5rem;
    padding: 1rem;
    width: 100%;
    background-color: #f0f0f0;
    overflow-x: hidden;
}

@media (max-width: 479px) {
    .service-providers-section {
        padding: 0.75rem;
    }
}

/* Service Providers Section */
.providers-section {
    max-width: 48rem;
    width: 100%;
}

.providers-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.4;
}

@media (min-width: 640px) {
    .providers-title {
        font-size: 1.5rem;
        line-height: 1.2;
    }
}

.providers-subtitle {
    margin-top: 0.25rem;
    font-size: 1rem;
    color: #9CA3AF;
}

.providers-buttons {
    margin-top: 1rem;
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* Testimonials Section */
.testimonials-section {
    margin-top: 2rem;
    max-width: 64rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0 1rem;
    width: 100%;
}

@media (max-width: 479px) {
    .testimonials-section {
        padding: 0 0.75rem;
    }
}

@media (min-width: 768px) {
    .testimonials-grid {
        gap: 1.5rem 2rem;
    }
}

.testimonials-title {
    font-weight: 700;
    text-align: center;
    font-size: 1.125rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .testimonials-title {
        font-size: 1.25rem;
    }
}

.testimonials-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
}

@media (max-width: 767px) {
    .testimonials-grid {
        align-items: center;
    }
    .testimonial-card {
        width: 100%;
        max-width: 20rem;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (min-width: 640px) {
    .testimonials-grid {
        flex-direction: row;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (min-width: 1024px) {
    .testimonials-grid {
        flex-wrap: nowrap;
    }
}

.testimonial-card {
    background-color: white;
    border: 1px solid #D1D5DB;
    border-radius: 0.5rem;
    padding: 1rem;
    max-width: 20rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    width: 100%;
}

@media (min-width: 480px) {
    .testimonial-card {
        min-width: 280px;
    }
}

.testimonial-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.testimonial-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 9999px;
    object-fit: cover;
}

.testimonial-name {
    font-weight: 600;
    font-size: 0.75rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .testimonial-name {
        font-size: 0.875rem;
    }
}

.testimonial-role {
    color: #9CA3AF;
    font-size: 0.75rem;
}

.testimonial-rating {
    margin-left: auto;
    color: #FBBF24;
    font-size: 0.75rem;
    display: flex;
    gap: 0.125rem;
}

@media (min-width: 640px) {
    .testimonial-rating {
        font-size: 0.875rem;
    }
}

.testimonial-title {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 0.25rem;
}

@media (min-width: 640px) {
    .testimonial-title {
        font-size: 1rem;
    }
}

.testimonial-text {
    color: #4B5563;
    font-size: 0.75rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .testimonial-text {
        font-size: 0.875rem;
    }
}

/* Download App Section */
.download-section {
    margin-top: 3rem;
    margin-bottom: 4rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 1rem;
    text-align: center;
}

@media (max-width: 479px) {
    .download-section {
        padding: 0 0.75rem;
        margin-top: 2rem;
        margin-bottom: 2rem;
    }
}

.download-logo {
    margin-bottom: 1rem;
}

.download-title {
    color: #2563EB;
    font-weight: 800;
    font-size: 1.5rem;
    margin-bottom: 0.25rem;
    text-align: center;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .download-title {
        font-size: 1.875rem;
    }
}

.download-subtitle {
    font-size: 0.75rem;
    color: #4B5563;
    margin-bottom: 1rem;
}

.download-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    width: 100%;
}

.download-button {
    display: inline-block;
    flex: 0 0 auto;
}

.download-button img {
    height: 2.5rem;
    width: auto;
    max-width: 100%;
}

@media (max-width: 479px) {
    .download-buttons {
        gap: 0.75rem;
    }
    
    .download-button img {
        height: 2rem;
    }
}

/* Buttons */
.btn {
    font-weight: 600;
    border-radius: 9999px;
    padding: 0.5rem 1.25rem;
    font-size: 0.75rem;
    transition: background-color 0.2s;
}

@media (min-width: 640px) {
    .btn {
        font-size: 0.875rem;
    }
}

.btn-primary {
    background-color: #2563EB;
    color: white;
}

.btn-primary:hover {
    background-color: #1D4ED8;
}

.btn-outline {
    border: 1px solid #2563EB;
    color: #2563EB;
}

.btn-outline:hover {
    background-color: #EFF6FF;
}

/* Divider */
.divider {
    margin: 2rem 0;
    border-color: #D1D5DB;
}

.select_cat{
    cursor: pointer;
  }
  .service-card {
        transition: transform 0.3s;
        /* border-radius: 10px; */
        overflow: hidden;
        border: none;
        cursor: pointer;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }
    .service-card:hover {
        transform: translateY(-5px);
    }
    .service-img {
        height: 120px;
        object-fit: contain;
        padding: 15px;
    }
    .category-img {
        height: 80px;
        object-fit: contain;
    }
    .provider-grid {
        display: grid;
        grid-template-columns: repeat(1, 1fr);
        gap: 16px;
    }
    .provider-card {
        background-color: white;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        padding: 12px;
        display: flex;
        align-items: flex-start;
        gap: 12px;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    }
    .provider-image {
        width: 48px;
        height: 48px;
        object-fit: contain;
    }
    
    .provider-info {
        flex: 1;
    }
    
    .provider-name {
        font-size: 12px;
        font-weight: 600;
        color: #111827;
        margin-bottom: 4px;
    }
    
    .provider-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #6b7280;
        font-size: 10px;
        margin-bottom: 4px;
    }
    
    .provider-description {
        font-size: 10px;
        color: #4b5563;
    }
    .ad-banner {
        background: linear-gradient(89.99deg, #008AD9 0.01%, #004973 15.52%, #80DBF1 47.8%);
        color: white;
        border-radius: 10px;
        padding: 30px;
    }
    .offer-banner {
        background: linear-gradient(135deg, #ff758c, #ff7eb3);
        color: white;
        border-radius: 10px;
        padding: 20px;
    }
    .search-box {
        border-radius: 50px;
        padding: 10px 20px;
        box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    }

/* Ad Banner Section */
.ad-banner {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 72rem;
    max-height: 200px;
    overflow: hidden;
    padding: 0;

}

@media (min-width: 768px) {
    .ad-banner {
        flex-direction: row;
    }
}

.ad-banner-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: white;
    padding: 5rem 2rem;
    height: 100px;
}

@media (min-width: 768px) {
    .ad-banner-content {
        width: 50%;
    }
}

.ad-banner-title {
    font-weight: 800;
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 0.25rem;
}

@media (min-width: 768px) {
    .ad-banner-title {
        font-size: 1.75rem;
    }
}

.ad-banner-text {
    font-size: 0.875rem;
    font-weight: 400;
}

.ad-banner-image {
    width: 100%;
    /* height: 100px; */
    object-fit: cover;
    overflow: hidden;
}

@media (min-width: 768px) {
    .ad-banner-image {
        width: 50%;
    }
}

/* Offer Banner */
.offer-banner {
    width: 100%;
    background: linear-gradient(to right, #0084E8, #00A0FF);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
}

@media (min-width: 640px) {
    .offer-banner {
        padding: 1rem 2rem;
    }
}

.offer-image {
    position: absolute;
    top: -20%;
    width: 10rem;
    height: 10rem;
    object-fit: cover;
    flex-shrink: 0;
}

.offer-content {
    text-align: center;
    color: white;
    max-width: 20rem;
}

@media (min-width: 640px) {
    .offer-content {
        max-width: 24rem;
    }
}

.offer-title {
    font-weight: 800;
    font-size: 1.25rem;
    line-height: 1.2;
}

@media (min-width: 640px) {
    .offer-title {
        font-size: 1.5rem;
    }
}

.offer-text {
    font-size: 0.875rem;
    font-weight: 400;
    margin-top: 0.25rem;
}

@media (min-width: 640px) {
    .offer-text {
        font-size: 1rem;
    }
}

.offer-button {
    margin-top: 0.75rem;
    background-color: white;
    color: #0084E8;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 1rem;
    border-radius: 0.25rem;
    border: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: background-color 0.2s;
}

@media (min-width: 640px) {
    .offer-button {
        font-size: 0.875rem;
    }
}

.offer-button:hover {
    background-color: #f3f4f6;
}

.offer-logo {
    width: 6rem;
    height: 2.5rem;
    object-fit: contain;
    flex-shrink: 0;
}

/* Popular Services Section */
.services-container {
    max-width: 80rem;
    margin: 0 auto;
}

.services-title {
    font-weight: 700;
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.service-card {
    width: 100%;
}

.service-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.service-title {
    margin-top: 0.5rem;
    padding: 0 1rem;

    font-weight: 600;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
}

.service-title i {
    margin-left: 0.25rem;
    font-size: 0.75rem;
}

.service-description {
    padding: 0 1rem;
    font-size: 0.75rem;
    color: #374151;
}

/* Upgrade Banner */
.upgrade-banner {
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.exclusive-tag {
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.exclusive-text {
    position: absolute;
    top: 0;
    background-color: #f97316;
    color: white;
    font-size: 13px;
    font-weight: 600;
    transform: rotate(360deg);
    transform-origin: center;
    white-space: nowrap;
    padding: 4px;
    writing-mode: vertical-rl;
}

.upgrade-content {
    background: linear-gradient(90deg, #15ABFF 2%, #2FC5E6 55%, #80DBF1 100%);
    color: white;
    padding: 32px 24px 32px 64px;
    display: flex;
    flex-direction: column;
}

.upgrade-title {
    font-size: 20px;
    font-weight: normal;
}

.upgrade-button {
    background-color: #1d4ed8;
    color: white;
    font-size: 14px;
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    margin-top: 16px;
}

.upgrade-button:hover {
    background-color: #1e40af;
}

/* -------------------------------------------------------------------------- */
/* Tablet / iPad (769px–1024px): calmer grids vs 3- or 4-column desktop rules   */
/* Does not apply at ≤768 (mobile) or ≥1025 (large desktop).                 */
/* -------------------------------------------------------------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
    .provider-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Postcode search results: single provider should not sit in one narrow grid column (768–1024, incl. iPad portrait) */
@media (min-width: 768px) and (max-width: 1024px) {
    #searchResults .provider-grid:has(> :only-child) {
        grid-template-columns: minmax(0, 1fr) !important;
        max-width: 42rem;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Postcode search: xl would be 6-up (col-xl-2); with sidebar keep 4-up until very wide */
@media (min-width: 1200px) and (max-width: 1399.98px) {
    .postcode-search-page .browse-categories-grid .select_cat {
        flex: 0 0 25% !important;
        max-width: 25% !important;
        width: 25% !important;
    }
}

/*
 * Postcode search — tablet & small laptop beside app sidebar (768–1199px).
 * Bootstrap col-lg-3 was 4-up from 992px → razor-thin cards + mid-word breaks.
 * Use a 2-column grid so each category card gets ~half the content width.
 */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .postcode-search-page .browse-categories-grid.row {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.25rem;
        margin-left: 0 !important;
        margin-right: 0 !important;
        --bs-gutter-x: 0;
    }

    .postcode-search-page .browse-categories-grid > [class*="col-"] {
        width: 100% !important;
        max-width: none !important;
        flex: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .postcode-search-page .browse-categories-grid .service-card {
        min-width: 0;
        width: 100%;
    }

    .postcode-search-page .browse-categories-grid .service-card .card-title {
        font-size: 1rem;
        line-height: 1.35;
        word-break: normal !important;
        overflow-wrap: break-word;
        hyphens: none;
    }

    /* Stacked search bars read better next to narrow main column */
    .postcode-search-page .search-container .row > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}