/* =========================================================
   SERVICE DETAIL PAGES (plastic-waste.php, scrap-metal-waste.php, ...)
   These pages are generated by includes/functions.php, so this file is
   loaded from includes/header.php and only targets the template's own
   classes (.banner-section, .form-content-section, .normal-section,
   .view-services-section). Many template styles are inline, so some
   rules here need !important.
   ========================================================= */

/* Soft page background behind the content cards */
body:has(.normal-section) {
    background:
        radial-gradient(circle at 5% 30%, rgba(25, 169, 133, 0.08) 0%, transparent 30%),
        radial-gradient(circle at 95% 70%, rgba(17, 139, 167, 0.06) 0%, transparent 30%),
        #f3faf8;
}

/* ---------- Banner (the template already has its own photo + overlay) ---------- */
.banner-section h1 {
    color: #fff;
    letter-spacing: 1px;
}

.banner-section .banner-divider {
    border: 0;
    height: 4px;
    width: 70px;
    border-radius: 4px;
    background: linear-gradient(90deg, #19a985, #ffae00);
    opacity: 1;
    animation: sdLineGrow 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) 0.4s both;
}

@keyframes sdLineGrow {
    from { width: 0; }
    to   { width: 70px; }
}

/* ---------- Image + highlights row ---------- */
.form-content-section {
    background:
        radial-gradient(circle at 10% 20%, rgba(25, 169, 133, 0.12) 0%, transparent 40%),
        linear-gradient(180deg, #f6fcfb 0%, #e1f7f1 100%) !important;
}

.form-content-section .equal-form-box {
    position: relative;
    overflow: hidden;
    background: #ffffff !important;
    border-radius: 18px !important;
    box-shadow: 0 18px 40px rgba(9, 44, 42, 0.14) !important;
}

.form-content-section .equal-form-box img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.form-content-section .equal-form-box:hover img {
    transform: scale(1.07);
}

.form-content-section .report-box {
    background: #ffffff !important;
    border-radius: 18px !important;
    border-top: 4px solid #19a985;
    box-shadow: 0 18px 40px rgba(9, 44, 42, 0.14) !important;
    transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.45s ease;
}

.form-content-section .report-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 26px 50px rgba(9, 44, 42, 0.2) !important;
}

.form-content-section .report-list li {
    transition: transform 0.3s ease, color 0.3s ease;
}

.form-content-section .report-list li:hover {
    transform: translateX(6px);
    color: #12655f !important;
}

.form-content-section .call-btn,
.form-content-section .report-btn {
    border-radius: 50px !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease !important;
}

.form-content-section .call-btn:hover,
.form-content-section .report-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(9, 44, 42, 0.25);
}

/* ---------- Content sections: white cards ---------- */
.normal-section .content-left {
    position: relative;
    background: #ffffff;
    border-radius: 18px;
    padding: 30px 34px;
    border: 1px solid #ddf0eb;
    box-shadow: 0 10px 28px rgba(9, 44, 42, 0.07);
    overflow: hidden;
    transition: box-shadow 0.45s ease, transform 0.45s ease;
}

/* Green bar on the left that brightens on hover */
.normal-section .content-left::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 5px;
    background: linear-gradient(180deg, #19a985, #12655f);
    transition: width 0.4s ease;
}

.normal-section .content-left:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(9, 44, 42, 0.12);
}

.normal-section .content-left:hover::before {
    width: 8px;
}

.normal-section .heading-h2 {
    position: relative;
    color: #132625;
    font-weight: 800;
    padding-bottom: 12px;
    margin-bottom: 18px;
}

/* Underline under each section heading */
.normal-section .heading-h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #19a985, #ffae00);
    transition: width 0.5s ease;
}

.normal-section .content-left:hover .heading-h2::after {
    width: 120px;
}

.normal-section .heading-h4 {
    color: #12655f;
    font-weight: 700;
    margin-top: 18px;
}

.normal-section .paragraph-text {
    color: #4b5d5b;
    line-height: 1.8;
}

/* Bullets become green check marks */
.normal-section .bullet-points {
    list-style: none;
    padding-left: 0;
}

.normal-section .bullet-points li {
    position: relative;
    padding: 6px 0 6px 30px;
    color: #4b5d5b;
    line-height: 1.7;
    transition: transform 0.3s ease, color 0.3s ease;
}

.normal-section .bullet-points li::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f058";
    position: absolute;
    left: 0;
    top: 7px;
    color: #19a985;
    transition: transform 0.4s ease;
}

.normal-section .bullet-points li:hover {
    transform: translateX(5px);
    color: #132625;
}

.normal-section .bullet-points li:hover::before {
    transform: scale(1.2);
}

/* ---------- "View All Services" button ---------- */
.view-services-section .zk-recycle-btn {
    background: linear-gradient(135deg, #19a985, #12655f) !important;
    padding: 14px 34px !important;
    box-shadow: 0 10px 24px rgba(25, 169, 133, 0.35);
    transition: transform 0.35s ease, box-shadow 0.35s ease !important;
}

.view-services-section .zk-recycle-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px rgba(25, 169, 133, 0.45);
}

@media (max-width: 600px) {
    .normal-section .content-left {
        padding: 22px 18px 22px 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .banner-section .banner-divider {
        animation: none !important;
    }
}

/* =========================================================
   SAME WIDTH FOR EVERY SECTION: 1300px
   The generated pages set mixed inline widths (900 / 1050 / 1200px
   or none), so !important is needed to override them.
   ========================================================= */
/* The sections keep a 20px inline side padding (marked !important in the
   generated HTML, so it can't be removed), so the boxes are 1340px wide
   to make the visible content exactly 1300px. */
.form-content-section .form-content-container,
.normal-section,
.view-services-section .max-width {
    max-width: 1340px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Cap the content card itself at 1300px and centre it, so it is the
   same width whatever side padding a generated page puts on the section
   (some use 20px, some 0 — both inline !important). */
.normal-section .content-left {
    max-width: 1300px !important;
    width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
}

/* Pages whose section has no side padding ("padding: 15px 0") get the
   same 20px gap from the screen edge on smaller screens */
.normal-section[style*="15px 0"] .content-left {
    width: calc(100% - 40px) !important;
}

/* Image + highlights row: two equal columns inside the 1300px width
   (removes the old 160% width / -100px margin that pushed the image off-screen) */
.form-content-section .form-content-container {
    gap: 24px !important;
}

.form-content-section .form-left,
.form-content-section .content-right-custom {
    flex: 1 1 0 !important;
    min-width: 0;
}

.form-content-section .equal-form-box {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    height: auto !important;
    min-height: 262px;
    padding: 12px !important;
}

.form-content-section .report-box {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    justify-content: center;
}

@media (max-width: 768px) {
    .form-content-section .form-content-container {
        flex-direction: column !important;
    }
}

/* =====================================================================
   Service detail pages — full-width patterned bands behind each content
   section, cycling through 4 styles (dots, grid, waves, stripes), each
   with its own big faint animated icon at the screen edge.
   The sections are max 1340px wide, so the band is a 100vw ::before.
   ===================================================================== */
body:has(.normal-section) { overflow-x: clip; }

.normal-section,
.form-content-section,
.view-services-section {
    position: relative;
    isolation: isolate;
}

.normal-section::before,
.view-services-section::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 100vw;
    translate: -50% 0;
    z-index: -2;
    pointer-events: none;
}

.normal-section::after,
.form-content-section::after {
    position: absolute;
    z-index: -1;
    line-height: 1;
    pointer-events: none;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

/* A — dot grid + turning recycle symbol (right edge) */
.normal-section:nth-of-type(4n+1)::before {
    background:
        radial-gradient(circle at 90% 20%, rgba(25, 169, 133, 0.12) 0, rgba(25, 169, 133, 0) 30%),
        radial-gradient(rgba(25, 169, 133, 0.15) 1.4px, transparent 1.6px) 0 0 / 22px 22px,
        linear-gradient(180deg, #ffffff 0%, #f1faf7 100%);
}
.normal-section:nth-of-type(4n+1)::after {
    content: "\f1b8";
    top: 20px;
    right: calc(50% - 50vw + 10px);
    font-size: 240px;
    color: rgba(25, 169, 133, 0.08);
    animation: sdSpin 60s linear infinite;
}

/* B — square grid + swaying leaf (left edge) */
.normal-section:nth-of-type(4n+2)::before {
    background:
        radial-gradient(circle at 8% 80%, rgba(255, 174, 0, 0.12) 0, rgba(255, 174, 0, 0) 30%),
        linear-gradient(rgba(25, 169, 133, 0.07) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg, rgba(25, 169, 133, 0.07) 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(180deg, #f1faf7 0%, #ffffff 100%);
}
.normal-section:nth-of-type(4n+2)::after {
    content: "\f06c";
    bottom: 20px;
    left: calc(50% - 50vw + 10px);
    font-size: 210px;
    color: rgba(25, 169, 133, 0.09);
    transform-origin: 50% 100%;
    animation: sdSway 6s ease-in-out infinite;
}

/* C — flowing waves + truck driving (right edge) */
.normal-section:nth-of-type(4n+3)::before {
    background:
        radial-gradient(circle at 85% 85%, rgba(9, 146, 178, 0.10) 0, rgba(9, 146, 178, 0) 30%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='36'%3E%3Cpath d='M0 18Q30 0 60 18T120 18' fill='none' stroke='%2319a985' stroke-opacity='.13' stroke-width='1.5'/%3E%3C/svg%3E") 0 0 / 120px 36px,
        linear-gradient(180deg, #eefaf6 0%, #ffffff 100%);
    animation: sdWaves 18s linear infinite;
}
.normal-section:nth-of-type(4n+3)::after {
    content: "\f0d1";
    top: 30px;
    right: calc(50% - 50vw + 10px);
    font-size: 150px;
    color: rgba(25, 169, 133, 0.09);
    animation: sdDrive 10s ease-in-out infinite alternate;
}

/* D — diagonal stripes + floating factory (left edge) */
.normal-section:nth-of-type(4n+4)::before {
    background:
        radial-gradient(circle at 50% 0%, rgba(255, 174, 0, 0.12) 0, rgba(255, 174, 0, 0) 38%),
        repeating-linear-gradient(135deg, rgba(25, 169, 133, 0.05) 0 2px, transparent 2px 22px),
        linear-gradient(180deg, #ffffff 0%, #f4fbf9 100%);
}
.normal-section:nth-of-type(4n+4)::after {
    content: "\f275";
    top: 30px;
    left: calc(50% - 50vw + 10px);
    font-size: 220px;
    color: rgba(9, 146, 178, 0.08);
    animation: sdFloat 9s ease-in-out infinite;
}

/* Image + highlights row — honeycomb + glowing badge */
.form-content-section {
    background:
        radial-gradient(circle at 10% 20%, rgba(25, 169, 133, 0.12) 0, rgba(25, 169, 133, 0) 40%),
        radial-gradient(circle at 90% 80%, rgba(255, 174, 0, 0.12) 0, rgba(255, 174, 0, 0) 35%),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='100'%3E%3Cpath d='M28 66L0 50V16L28 0l28 16v34L28 66v34M28 0v34L0 50v34l28 16 28-16V50L28 34' fill='none' stroke='%2319a985' stroke-opacity='.11' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 56px 100px,
        linear-gradient(180deg, #f6fcfb 0%, #e1f7f1 100%) !important;
    overflow-x: clip;
}
.form-content-section::after {
    content: "\f0a3";
    bottom: -40px;
    right: -30px;
    font-size: 220px;
    color: rgba(255, 174, 0, 0.14);
    animation: sdSpin 50s linear infinite;
}

/* "View all services" strip — dotted mint band */
.view-services-section::before {
    background:
        radial-gradient(rgba(25, 169, 133, 0.16) 1.4px, transparent 1.6px) 0 0 / 20px 20px,
        linear-gradient(180deg, #f4fbf9 0%, #e6f6f1 100%);
}

@keyframes sdSpin { to { transform: rotate(360deg); } }
@keyframes sdSway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes sdFloat { 0%, 100% { translate: 0 0; } 50% { translate: 0 -24px; } }
@keyframes sdDrive { from { translate: 0 0; } to { translate: -160px 0; } }
@keyframes sdWaves { from { background-position: 0 0, 0 0, 0 0; } to { background-position: 0 0, 240px 0, 0 0; } }

@media (max-width: 767px) {
    .normal-section::after, .form-content-section::after { font-size: 110px !important; }
}

@media (prefers-reduced-motion: reduce) {
    .normal-section::before, .normal-section::after,
    .form-content-section::after { animation: none; }
}
