/* ============================================================
   SERVICE AREA / GEO PAGES — Fence-list / service-list section
   Copied out of css/_custom.css (the "FENCE TYPES SLIDER" + "FENCE GRID"
   blocks). The original stays in _custom.css because the fence-list
   section is a shared include used on non-geo pages too.
   ============================================================ */

/* FENCE TYPES SLIDER */
.fence-types {
    padding: 70px 0;
    position: relative;
    overflow: hidden;
}
/* real lazy-loaded background image (replaces the old CSS background-image) */
.fence-types > .fence-types-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}
.fence-types::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}
.fence-types > .container,
.fence-types > .container-fluid {
    position: relative;
    z-index: 2;
}
.fence-types .section-header {
    text-align: center;
    margin-bottom: 40px;
}
.fence-types .section-header h2,
.fence-types .section-header h2 .over {
    color: #fff;
}

/* Slide row — flex so partial slides center */
.fence-slide {
    display: flex;
    justify-content: center;
    align-items: stretch;
    padding: 10px 0;
}
.fence-slide [class*="col-"] {
    display: flex;
}
/* Carousel mechanics — Bootstrap-3 carousel rules, scoped to .fence-carousel so this
   section slides correctly even on a site whose pruned bootstrap dropped these rules
   (without them, every .item shows at once and the slides stack as separate cards). */
.fence-carousel {
    position: relative;
}
.fence-carousel .carousel-inner {
    position: relative;
    overflow: hidden;
    width: 100%;
}
.fence-carousel .carousel-inner > .item {
    display: none;
    position: relative;
    -webkit-transition: 0.6s ease-in-out left;
    -o-transition: 0.6s ease-in-out left;
    transition: 0.6s ease-in-out left;
}
.fence-carousel .carousel-inner > .active,
.fence-carousel .carousel-inner > .next,
.fence-carousel .carousel-inner > .prev {
    display: block;
}
.fence-carousel .carousel-inner > .active {
    left: 0;
}
.fence-carousel .carousel-inner > .next,
.fence-carousel .carousel-inner > .prev {
    position: absolute;
    top: 0;
    width: 100%;
}
.fence-carousel .carousel-inner > .next {
    left: 100%;
}
.fence-carousel .carousel-inner > .prev {
    left: -100%;
}
.fence-carousel .carousel-inner > .next.left,
.fence-carousel .carousel-inner > .prev.right {
    left: 0;
}
.fence-carousel .carousel-inner > .active.left {
    left: -100%;
}
.fence-carousel .carousel-inner > .active.right {
    left: 100%;
}
/* _bootstrap.css still ships BS3's translate3d carousel rules (inside the
   @media (transform-3d) query, which is true in every modern browser). Those
   transform offsets fought this section's left-based slide, so the slide snapped
   back instead of settling. Force transform off here so ONLY `left` drives it.
   (Scoped to the carousel item — card/image hover transforms are unaffected.) */
.fence-carousel .carousel-inner > .item {
    -webkit-transform: none !important;
    transform: none !important;
}

/* Frosted glass cards */
/* overflow VISIBLE, explicitly — the host's _custom.css ships its own copy of this
   block with overflow:hidden, and it loads on geo pages too; this sheet links later
   so the explicit value wins. The card must not clip so the ::after hover pad below
   can work; corner clipping is done by the inner <a> and .card-image instead. */
.fence-type-card {
    position: relative;
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: var(--geo-border-radius);
    overflow: visible;
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.fence-type-card:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.22);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    border-color: var(--geo-accent);
}
/* Hover pad: the lift moves the card 8px off a cursor parked at its bottom edge,
   which un-hovers it, drops it back onto the cursor, and loops — the "jumpy" hover.
   This invisible strip rides below the card and keeps covering the vacated pixels,
   so the hover holds for the whole lift. */
.fence-type-card::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 8px;
}
.fence-type-card a {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    overflow: hidden;
    border-radius: var(--geo-border-radius);
}
.fence-type-card .card-image {
    position: relative;
    overflow: hidden;
    height: 230px;
}
.fence-type-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.fence-type-card:hover .card-image img {
    transform: scale(1.08);
}
.fence-type-card .card-content {
    padding: 25px 20px 50px;
    position: relative;
    flex: 1;
}
.fence-type-card .card-content h3 {
    color: #fff;
    font-weight: 700;
    margin: 0 0 8px 0;
    transition: color 0.3s ease;
}
.fence-type-card:hover .card-content h3 {
    color: var(--geo-accent);
}
.fence-type-card .card-content p {
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
    line-height: 1.5;
}
.fence-type-card .card-arrow {
    position: absolute;
    bottom: 18px;
    right: 18px;
    width: 32px;
    height: 32px;
    background: var(--geo-accent);
    border-radius: var(--geo-icon-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}
.fence-type-card:hover .card-arrow {
    opacity: 1;
    transform: translateX(0);
}
.fence-type-card .card-arrow i {
    color: var(--geo-accent-text);
    font-size: 12px;
}

/* Carousel controls */
.fence-carousel .carousel-control {
    position: absolute;
    z-index: 10;
    width: 50px;
    height: 50px;
    background: var(--geo-accent);
    border: none;
    border-radius: var(--geo-icon-radius);
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    opacity: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    background-image: none;
    text-shadow: none;
}
/* invert on hover — --geo-accent-text, not #fff, so a dark-text brand inverts correctly */
.fence-carousel .carousel-control:hover {
    background: var(--geo-accent-text);
}
.fence-carousel .carousel-control.left {
    left: -25px;
}
.fence-carousel .carousel-control.right {
    right: -25px;
}
.fence-carousel .carousel-control i {
    color: var(--geo-accent-text);
    font-size: var(--geo-icon-size);
    line-height: 1;
}
.fence-carousel .carousel-control:hover i {
    color: var(--geo-accent);
}

/* Responsive */
@media (max-width: 991px) {
    .fence-types > .container {
        width: 100%;
        max-width: 100%;
        padding-left: 15px;
        padding-right: 15px;
    }
    .fence-carousel .carousel-control {
        width: 40px;
        height: 40px;
        top: calc(50% - 20px);
    }
    .fence-carousel .carousel-control.left {
        left: -15px;
    }
    .fence-carousel .carousel-control.right {
        right: -15px;
    }
}
@media (min-width: 768px) and (max-width: 991px) {
    .fence-type-card {
        min-height: 500px;
    }
}
/* Mobile — kill slider, stack everything */
@media (max-width: 767px) {
    .fence-types {
        padding: 50px 0;
    }
    .fence-carousel .carousel-control {
        display: none;
    }
    .fence-carousel .item {
        display: block !important;
        position: relative !important;
        opacity: 1 !important;
        transform: none !important;
        left: 0 !important;
    }
    .fence-slide {
        flex-direction: column;
    }
    .fence-slide [class*="col-"] {
        margin-bottom: 15px;
    }
    .fence-type-card .card-image {
        height: 200px;
    }
}
/* FENCE TYPES SLIDER END */


/* ============================
   FENCE GRID (non-carousel)
   ============================ */
.fence-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}
.fence-grid .fence-type-card {
    flex: 0 0 calc((100% - 40px) / 3);
    max-width: calc((100% - 40px) / 3);
}
.fence-grid .card-images {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 5px;
}
.fence-grid .card-images img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--geo-border-radius);
}
/* Card-count variants (Matt, 2026-07-17): the grid shows the client's homepage fence
   lineup — usually 5, sometimes 6, sometimes 4. Six cards = the default 3-up (two rows
   of three). A 5-type or 4-type client adds fence-grid-5 / fence-grid-4 on .fence-grid
   for ONE row. Declared before the breakpoints so mobile still collapses them.
   fence-grid-5 REQUIRES the wide container (Matt, 2026-07-19): its section swaps
   .container for <div class="container-fluid" style="max-width: 1800px;"> (the gallery
   pattern) — five across the normal 1170px container is ~212px per card, squished.
   Below 1200px even full-width can't fit five, so the 1199 breakpoint drops
   fence-grid-5 back to the default 3-up (rows of 3+2, short row centers). */
.fence-grid-5 .fence-type-card {
    flex: 0 0 calc((100% - 80px) / 5);
    max-width: calc((100% - 80px) / 5);
}
.fence-grid-4 .fence-type-card {
    flex: 0 0 calc((100% - 60px) / 4);
    max-width: calc((100% - 60px) / 4);
}
@media (max-width: 1199px) {
    .fence-grid-5 .fence-type-card {
        flex: 0 0 calc((100% - 40px) / 3);
        max-width: calc((100% - 40px) / 3);
    }
}
@media (max-width: 991px) {
    .fence-grid .fence-type-card {
        flex: 0 0 calc((100% - 20px) / 2);
        max-width: calc((100% - 20px) / 2);
    }
}
@media (max-width: 767px) {
    .fence-grid .fence-type-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}
.fence-types-no-bg {
    background-image: none !important;
    background-color: #fff;
}
.fence-types-no-bg::before {
    display: none;
}
/* The cards hold transparent 3d RENDERS (images/service-list/), not photos:
   contain shows the whole panel; cover would crop a product shot. */
.fence-types-no-bg .fence-type-card .card-image {
    background: #fff;
}
.fence-types-no-bg .fence-type-card .card-image img {
    object-fit: contain;
    padding: 12px;
}
.fence-types-no-bg .fence-type-card {
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-color: #e0e0e0;
}
.fence-types-no-bg .fence-type-card:hover {
    background: #fff;
    border-color: var(--geo-accent);
}
.fence-types-no-bg .section-header h2,
.fence-types-no-bg .section-header h2 .over {
    color: inherit;
}
.fence-types-no-bg .fence-type-card .card-content h3 {
    color: var(--geo-dark);
}
.fence-types-no-bg .fence-type-card:hover .card-content h3 {
    color: var(--geo-accent);
}
.fence-types-no-bg .fence-type-card .card-content p {
    color: #666;
}
.fence-types-no-bg .fence-type-card .card-content .over {
    color: var(--geo-accent);
}
/* FENCE GRID END */
