/* ==========================================================================
   YellowPage.pk — Banner Responsiveness & Alignment Stylesheet (banners.css)
   Scoped to adhere to design tokens, ensure zero section overflow,
   and deliver seamless responsive behavior across all viewports.
   ========================================================================== */

/* ==================== 1. BANNER CONTAINERS (3-COLUMN DESKTOP) ==================== */

/* Desktop: 3-column bounded layout for sections WITH side banners */
.banner-enabled-section,
.home-light-v7 .sec-row-3col {
    display: flex;
    justify-content: center;
    align-items: center !important; /* Vertically center banners within large sections */
    gap: 20px;
    max-width: 1720px;
    margin: 80px auto 40px auto !important; /* Standard 80px section spacing on wrapper */
    width: 100%;
    overflow: hidden; /* Ensures banners NEVER overflow above or below sections */
    box-sizing: border-box;
}

/* Remove 120px offset from the inner child inside 3-column sections */
.banner-enabled-section .sec-block,
.home-light-v7 .sec-row-3col .sec-block {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.banner-enabled-section .sec-center-content,
.home-light-v7 .sec-row-3col .sec-center-content {
    flex: 1;
    max-width: 1200px;
    min-width: 0;
}

/* Side banner containers - match section height and centered alignment */
.side-banner-col,
.home-light-v7 .sec-banner-left,
.home-light-v7 .sec-banner-right {
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 100%;
    max-height: 500px;
    width: 245px;
    flex-shrink: 0;
    align-self: center !important; /* Vertically centered relative to adjacent content */
    box-sizing: border-box;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.side-banner-col .banner,
.side-banner-col .yp-banner-active,
.side-banner-col .yp-banner-wrapper {
    flex: 1;
    min-height: 150px;
    max-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
}

.side-banner-col .banner img,
.side-banner-col .yp-banner-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    max-height: 330px;
}

.side-banner-col .banner-placeholder,
.side-banner-col .yp-banner-placeholder {
    flex: 1;
    min-height: 150px;
    max-height: 350px;
    padding: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    text-align: center;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.side-banner-col .banner-placeholder:hover,
.side-banner-col .yp-banner-placeholder:hover {
    border-color: #FFD700;
    background: #FFFBEA;
}

/* ==================== 2. TABLET RESPONSIVENESS (769px - 1199px) ==================== */

@media (max-width: 1199px) {
    .banner-enabled-section,
    .home-light-v7 .sec-row-3col {
        margin-top: 48px !important;
        margin-bottom: 24px !important;
        flex-direction: column;
        align-items: center;
        gap: 16px;
        padding: 0 16px;
    }

    .banner-enabled-section .sec-center-content,
    .home-light-v7 .sec-row-3col .sec-center-content {
        order: 1 !important;
        width: 100%;
    }

    .side-banner-col,
    .home-light-v7 .sec-banner-left,
    .home-light-v7 .sec-banner-right {
        order: 2 !important;
        width: 100%;
        max-width: 1200px;
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        overflow-x: auto;
        padding: 12px;
        border-radius: 16px;
        -webkit-overflow-scrolling: touch;
    }

    .side-banner-col .yp-banner-wrapper,
    .home-light-v7 .sec-banner-left .yp-banner-wrapper,
    .home-light-v7 .sec-banner-right .yp-banner-wrapper {
        min-width: 220px;
        max-width: 280px;
        flex: 0 0 auto;
        min-height: 180px;
    }

    .banner-skyscraper,
    .banner-skyscraper-tall {
        min-height: 180px !important;
    }
}

/* ==================== 3. MOBILE RESPONSIVENESS (<= 768px) ==================== */

@media (max-width: 768px) {
    .banner-enabled-section,
    .home-light-v7 .sec-row-3col {
        margin-top: 36px !important;
        margin-bottom: 20px !important;
        gap: 12px;
        padding: 0 12px;
    }

    .banner-enabled-section .sec-center-content,
    .home-light-v7 .sec-row-3col .sec-center-content {
        order: 1 !important;
    }

    .side-banner-col,
    .home-light-v7 .sec-banner-left,
    .home-light-v7 .sec-banner-right {
        order: 2 !important;
        justify-content: flex-start;
        gap: 10px;
        padding: 8px 12px;
        border-radius: 14px;
    }

    .side-banner-col .yp-banner-wrapper,
    .home-light-v7 .sec-banner-left .yp-banner-wrapper,
    .home-light-v7 .sec-banner-right .yp-banner-wrapper {
        min-width: 160px;
        max-width: 200px;
        flex: 0 0 auto;
        min-height: 150px;
    }

    .side-banner-col .yp-placeholder-inner,
    .home-light-v7 .sec-banner-left .yp-placeholder-inner,
    .home-light-v7 .sec-banner-right .yp-placeholder-inner {
        padding: 10px;
    }

    .side-banner-col .yp-placeholder-title,
    .home-light-v7 .sec-banner-left .yp-placeholder-title,
    .home-light-v7 .sec-banner-right .yp-placeholder-title {
        font-size: 11px !important;
    }

    .side-banner-col .yp-placeholder-btn,
    .home-light-v7 .sec-banner-left .yp-placeholder-btn,
    .home-light-v7 .sec-banner-right .yp-placeholder-btn {
        font-size: 10px !important;
        padding: 4px 10px !important;
    }
}

@media (max-width: 480px) {
    .side-banner-col .yp-banner-wrapper,
    .home-light-v7 .sec-banner-left .yp-banner-wrapper,
    .home-light-v7 .sec-banner-right .yp-banner-wrapper {
        min-width: 135px;
        max-width: 160px;
        min-height: 130px;
    }

    .side-banner-col .yp-placeholder-badge,
    .home-light-v7 .sec-banner-left .yp-placeholder-badge,
    .home-light-v7 .sec-banner-right .yp-placeholder-badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
    }
}

/* ==================== 4. HORIZONTAL BILLBOARDS RESPONSIVENESS ==================== */

.horizontal-billboard,
.home-light-v7 .banner-leaderboard,
.home-light-v7 .banner-billboard,
.categories-page-view .yp-banner-wrapper {
    width: 100%;
    max-width: 1200px;
    height: auto !important;
    min-height: 90px;
    margin: 15px auto;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

@media (max-width: 1024px) {
    .horizontal-billboard,
    .home-light-v7 .banner-leaderboard,
    .home-light-v7 .banner-billboard,
    .categories-page-view .yp-banner-wrapper {
        min-height: 80px;
        padding: 10px 14px;
    }
    
    .banner-leaderboard .yp-placeholder-title,
    .horizontal-billboard .yp-placeholder-title {
        font-size: 14px !important;
    }
}

@media (max-width: 768px) {
    .horizontal-billboard,
    .home-light-v7 .banner-leaderboard,
    .home-light-v7 .banner-billboard,
    .categories-page-view .yp-banner-wrapper {
        min-height: 65px;
        padding: 8px 10px;
        border-radius: 12px !important;
    }

    .banner-leaderboard .yp-placeholder-title,
    .horizontal-billboard .yp-placeholder-title,
    .categories-page-view .yp-placeholder-title {
        font-size: 12px !important;
        margin-bottom: 2px !important;
    }

    .banner-leaderboard .yp-placeholder-size,
    .horizontal-billboard .yp-placeholder-size,
    .categories-page-view .yp-placeholder-size {
        font-size: 10px !important;
    }

    .banner-leaderboard .yp-placeholder-btn,
    .horizontal-billboard .yp-placeholder-btn,
    .categories-page-view .yp-placeholder-btn {
        font-size: 10px !important;
        padding: 5px 12px !important;
        margin-top: 4px !important;
    }
}

@media (max-width: 480px) {
    .horizontal-billboard,
    .home-light-v7 .banner-leaderboard,
    .home-light-v7 .banner-billboard,
    .categories-page-view .yp-banner-wrapper {
        min-height: 50px;
        padding: 6px 8px;
        border-radius: 8px !important;
    }

    .banner-leaderboard .yp-placeholder-badge,
    .horizontal-billboard .yp-placeholder-badge,
    .categories-page-view .yp-placeholder-badge {
        font-size: 9px !important;
        padding: 1px 6px !important;
    }

    .banner-leaderboard .yp-placeholder-title,
    .horizontal-billboard .yp-placeholder-title,
    .categories-page-view .yp-placeholder-title {
        font-size: 11px !important;
    }
}

/* ==================== 5. SERVICES & WHY CHOOSE US (STRICTLY FULL WIDTH, NO SIDE BANNERS) ==================== */

.services-section,
.why-choose-us,
.home-light-v7 .services-section,
.home-light-v7 .why-choose-us {
    width: 100% !important;
    max-width: 100% !important;
    padding: 48px 0;
    box-sizing: border-box;
    overflow: hidden;
}

.services-section .container,
.why-choose-us .container,
.services-section .sec-container,
.why-choose-us .sec-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 24px !important;
    width: 100% !important;
}

.why-choose-us {
    background: #F8FAFC !important;
    border-top: 1px solid #ECECEC;
    border-bottom: 1px solid #ECECEC;
}

@media (max-width: 768px) {
    .services-section,
    .why-choose-us,
    .home-light-v7 .services-section,
    .home-light-v7 .why-choose-us {
        padding: 32px 0;
    }

    .services-section .container,
    .why-choose-us .container,
    .services-section .sec-container,
    .why-choose-us .sec-container {
        padding: 0 16px !important;
    }
}

@media (max-width: 480px) {
    .services-section,
    .why-choose-us,
    .home-light-v7 .services-section,
    .home-light-v7 .why-choose-us {
        padding: 24px 0;
    }
}

/* ==================== 6. ZOOM RESILIENCE (50% - 125%) ==================== */

@media screen {
    .home-light-v7,
    .categories-page-view {
        zoom: 1;
        overflow-x: hidden;
    }
    
    .sec-row-3col,
    .banner-enabled-section {
        max-width: 100%;
        box-sizing: border-box;
    }
}

/* ==================== 7. UNIFORM SECTION CARDS (STEP 2 SPECIFICATION) ==================== */

/* Uniform card style - match existing design */
.section-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-sizing: border-box;
}

.section-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #FFD700;
}

.section-card .card-icon {
    width: 60px;
    height: 60px;
    background: #f3f4f6;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    font-size: 24px;
    color: #1a1a1a;
}

.section-card:hover .card-icon {
    background: #FFD700;
    transform: scale(1.1);
}

.section-card .card-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}

.section-card .card-description {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
    margin: 0;
}

@media (max-width: 768px) {
    .section-card {
        padding: 18px 15px;
    }
    .section-card .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }
    .section-card .card-title {
        font-size: 16px;
    }
    .section-card .card-description {
        font-size: 13px;
    }
}

/* Backward compatibility aliases */
.yp-service-card,
.yp-why-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.yp-service-card:hover,
.yp-why-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    border-color: #FFD700;
}
.yp-service-icon-wrap,
.yp-why-icon-wrap {
    width: 60px;
    height: 60px;
    background: #f3f4f6 !important;
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    font-size: 24px;
    color: #1a1a1a !important;
    border: none !important;
}
.yp-service-card:hover .yp-service-icon-wrap,
.yp-why-card:hover .yp-why-icon-wrap {
    background: #FFD700 !important;
    transform: scale(1.1);
}
.yp-service-title,
.yp-why-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 10px;
}
.yp-service-desc,
.yp-why-desc {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    flex: 1;
}

/* ==================== 8. OUR SERVICES 2x2 GRID & VIBRANT COLORFUL ICONS ==================== */

.services-grid-2x2,
.solutions-section .s3-cards-grid,
.home-light-v7 .services-grid-2x2 {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important; /* 2 columns x 2 rows = 4 boxes in total */
    gap: 24px !important;
}

@media (max-width: 900px) {
    .services-grid-2x2,
    .solutions-section .s3-cards-grid,
    .home-light-v7 .services-grid-2x2 {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }
}

.service-2x2-card {
    background: #FFFFFF;
    border: 1px solid #ECECEC;
    border-radius: 16px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(10, 10, 10, 0.04);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
}

.service-2x2-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(10, 10, 10, 0.08);
    border-color: #E2E8F0;
}

.service-card-top {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 480px) {
    .service-card-top {
        flex-direction: column;
        gap: 12px;
    }
}

/* Vibrant Colorful Icon Badges (NOT Black and Yellow) */
.service-icon-box {
    width: 58px;
    height: 58px;
    min-width: 58px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-2x2-card:hover .service-icon-box {
    transform: scale(1.08);
}

/* 1. Sapphire Blue Badge */
.icon-blue {
    background: #EFF6FF !important;
    color: #2563EB !important;
    border: 1px solid #BFDBFE !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}
.service-2x2-card:hover .icon-blue {
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.25);
}

/* 2. Coral / Rose Red Badge */
.icon-coral {
    background: #FFF1F2 !important;
    color: #E11D48 !important;
    border: 1px solid #FECDD3 !important;
    box-shadow: 0 4px 12px rgba(225, 29, 72, 0.12);
}
.service-2x2-card:hover .icon-coral {
    box-shadow: 0 6px 18px rgba(225, 29, 72, 0.25);
}

/* 3. Emerald Green Badge */
.icon-green {
    background: #ECFDF5 !important;
    color: #059669 !important;
    border: 1px solid #A7F3D0 !important;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.12);
}
.service-2x2-card:hover .icon-green {
    box-shadow: 0 6px 18px rgba(5, 150, 105, 0.25);
}

/* 4. Royal Purple Badge */
.icon-purple {
    background: #F5F3FF !important;
    color: #7C3AED !important;
    border: 1px solid #DDD6FE !important;
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.12);
}
.service-2x2-card:hover .icon-purple {
    box-shadow: 0 6px 18px rgba(124, 58, 237, 0.25);
}

.service-card-title {
    font-size: 18px;
    font-weight: 800;
    color: #0A0A0A;
    margin: 0 0 6px 0;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.service-card-desc {
    font-size: 13.5px;
    line-height: 1.55;
    color: #5F6368;
    margin: 0;
}

.service-learn-btn {
    align-self: flex-start;
    background: #0A0A0A;
    color: #FFFFFF !important;
    font-weight: 700;
    font-size: 12.5px;
    padding: 8px 18px;
    border-radius: 30px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none !important;
    transition: all 0.2s ease;
    margin-top: 4px;
}

.service-2x2-card:hover .service-learn-btn {
    background: #FFD900;
    color: #0A0A0A !important;
}
