/* Custom styling for Toilets For Schools components */

/* ==========================================================================
   HOMEPAGE RESPONSIVE SLIDER
   ========================================================================== */

.slider-container {
    position: relative;
    width: min(760px, 100%);
    height: 520px;
    margin: 0 auto 40px auto;
    overflow: hidden;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.10);
    border: 1px solid #e6e6e6;
}

.slider-slides {
    position: relative;
    width: 100%;
    height: 100%;
    background: #ffffff;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff !important;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img,
.slide picture {
    display: block;
    max-width: 100%;
    max-height: 100%;
}

.slide img {
    width: auto !important;
    max-width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    background: #ffffff !important;
    box-shadow: none !important;
    margin: 0 auto;
}

/* Hide any decorative background layers or pseudo elements behind the hero image */
.slider-container::before,
.slider-container::after,
.slider-slides::before,
.slider-slides::after,
.slide::before,
.slide::after {
    display: none !important;
    content: none !important;
}

/* Navigation arrows */
.slider-arrow {
    position: absolute;
    z-index: 10;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(33, 63, 153, 0.82);
    border: none;
    color: #fff;
    font-size: 24px;
    width: 50px;
    height: 50px;
    line-height: 50px;
    text-align: center;
    cursor: pointer;
    border-radius: 50%;
    transition: background 0.3s, transform 0.2s, color 0.3s;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider-arrow:hover {
    background: rgba(254, 188, 4, 0.95);
    color: #333;
    transform: translateY(-50%) scale(1.08);
}

.slider-arrow.prev {
    left: 14px;
}

.slider-arrow.next {
    right: 14px;
}

/* Dots navigation */
.slider-dots {
    position: absolute;
    z-index: 10;
    bottom: 14px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 20px;
    background: rgba(255,255,255,0.75);
}

.dot {
    width: 12px;
    height: 12px;
    background: rgba(33, 63, 153, 0.25);
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    border: 0;
}

.dot.active, .dot:hover {
    background: #febc04;
    transform: scale(1.1);
}

/* Responsive slider adjustments */
@media only screen and (max-width: 959px) {
    .slider-container {
        width: min(700px, 100%);
        height: 480px;
        margin-bottom: 40px;
    }
}

@media only screen and (max-width: 767px) {
    .slider-container {
        width: 100%;
        height: 438px;
        margin-bottom: 30px;
        border-radius: 6px;
    }

    .slider-arrow {
        width: 38px;
        height: 38px;
        line-height: 38px;
        font-size: 18px;
    }

    .slider-arrow.prev {
        left: 8px;
    }

    .slider-arrow.next {
        right: 8px;
    }

    .slider-dots {
        bottom: 10px;
        gap: 6px;
        padding: 5px 8px;
    }

    .dot {
        width: 10px;
        height: 10px;
    }
}

/* ==========================================================================
   DOWNLOADS PAGE
   ========================================================================== */

.brochure-container {
    margin-top: 20px;
}

.brochure-intro-text {
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
    color: #444;
}

.download-action-box {
    text-align: center;
    background-color: #f4f6fa;
    border: 1px solid #dcdde1;
    border-radius: 8px;
    padding: 30px 20px;
    margin-bottom: 30px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
}

.download-large-btn {
    display: inline-block !important;
    background-color: #213f99 !important;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: bold !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    box-shadow: 0 4px 6px rgba(33, 63, 153, 0.15) !important;
    transition: all 0.2s ease-in-out !important;
    border: none !important;
    cursor: pointer !important;
}

.download-large-btn:hover {
    background-color: #febc04 !important;
    color: #333 !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(254, 188, 4, 0.25) !important;
}

.file-meta-info {
    display: block;
    font-size: 11px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

.spec-list {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.spec-list li {
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 20px;
    background: url(https://www.toiletsforschools.co.uk/assets/blue-arrow.png) no-repeat left 6px;
    background-size: 8px 8px;
    color: #444;
}

.pdf-preview-box {
    background: #fff;
    border: 1px solid #dcdde1;
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 20px;
    margin-bottom: 30px;
}

.pdf-preview-iframe {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 6px;
}

.fallback-preview-link {
    display: block;
    margin-top: 15px;
    text-align: center;
    font-size: 14px;
    color: #213f99;
    text-decoration: underline;
    font-weight: 600;
}

.fallback-preview-link:hover {
    color: #febc04;
}

@media only screen and (max-width: 767px) {
    .brochure-container {
        margin-top: 10px;
    }
    
    .pdf-preview-iframe {
        height: 400px;
    }
}


/* ========================================================================== 
   PERFORMANCE + ACCESSIBILITY PATCH 2026-06-18
   ========================================================================== */
main#main-content { display: block; }

.slider-container { contain: layout paint; background: #f4f6fa; }
.slider-slides picture { display: block; width: 100%; height: 100%; }
.slide img { display: block; }
.slide:not(.active) { pointer-events: none; }

.slider-arrow { min-width: 44px; min-height: 44px; }
.slider-dots { gap: 4px; }
.dot {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
}
.dot::before {
    content: "";
    position: absolute;
    left: 16px;
    top: 16px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.55);
    transition: background 0.3s, transform 0.2s;
}
.dot.active::before,
.dot:hover::before,
.dot:focus-visible::before {
    background: #febc04;
    transform: scale(1.12);
}
.dot:focus-visible,
.slider-arrow:focus-visible,
.nav a:focus-visible,
.footer a:focus-visible { outline: 3px solid #febc04; outline-offset: 2px; }

.nav ul li a,
.mobile-nav a,
a.footer-text { min-height: 44px; }
.nav ul li a,
.mobile-nav a { display: inline-flex; align-items: center; justify-content: center; }
.home-text a,
.footer a { text-underline-offset: 3px; }
.home-text a:hover,
.home-text a:focus-visible,
.footer a:hover,
.footer a:focus-visible { text-decoration: underline; }
img { max-width: 100%; height: auto; }

/* ========================================================================== 
   RAINBOW RANGE COMPACT SLIDER FIX 2026-06-19
   Keeps portrait/square Rainbow photos sharp by using a smaller centred slider
   rather than stretching them across the full page width with blurred sides.
   ========================================================================== */
.slider-container {
    max-width: 760px !important;
    width: 100% !important;
    aspect-ratio: 19 / 13;
    height: auto !important;
    margin: 0 auto 40px auto !important;
    background: #f4f6fa !important;
    border-radius: 6px;
    box-shadow: 0 4px 14px rgba(0,0,0,0.18);
}
.slider-slides,
.slider-slides picture,
.slide picture {
    width: 100% !important;
    height: 100% !important;
}
.slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center center !important;
    background: #f4f6fa !important;
}
.slider-arrow.prev { left: 14px !important; }
.slider-arrow.next { right: 14px !important; }
.slider-dots {
    bottom: 10px !important;
    max-width: calc(100% - 110px);
    flex-wrap: wrap;
    justify-content: center;
}
@media only screen and (max-width: 767px) {
    .slider-container {
        max-width: 100% !important;
        margin-bottom: 28px !important;
        border-radius: 0;
    }
    .slider-arrow.prev { left: 8px !important; }
    .slider-arrow.next { right: 8px !important; }
    .slider-dots { bottom: 6px !important; }
}

/* ========================================================================== 
   RAINBOW RANGE WHITE BACKGROUND SLIDER FINAL FIX 2026-06-19
   Removes baked/blended blur effect by using white-background image assets and
   a clean white slider stage. Do not re-enable blurred side-fill.
   ========================================================================== */
.slider-container {
    max-width: 760px !important;
    width: 100% !important;
    aspect-ratio: 19 / 13;
    height: auto !important;
    margin: 0 auto 40px auto !important;
    background: #ffffff !important;
    border-radius: 6px !important;
    box-shadow: 0 3px 10px rgba(0,0,0,0.12) !important;
    border: 1px solid #e6e6e6 !important;
    overflow: hidden !important;
}
.slider-slides,
.slide,
.slide picture {
    background: #ffffff !important;
}
.slide {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.slide img {
    width: 100% !important;
    height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    background: #ffffff !important;
    box-shadow: none !important;
    filter: none !important;
}
.slider-container::before,
.slider-container::after,
.slider-slides::before,
.slider-slides::after,
.slide::before,
.slide::after {
    display: none !important;
    content: none !important;
    background: none !important;
    filter: none !important;
}
.slider-arrow.prev { left: 12px !important; }
.slider-arrow.next { right: 12px !important; }
.slider-dots {
    bottom: 10px !important;
    max-width: calc(100% - 110px) !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 6px !important;
    padding: 6px 8px !important;
    background: rgba(255,255,255,0.78) !important;
    border-radius: 18px !important;
}
.dot {
    width: 10px !important;
    height: 10px !important;
    min-width: 10px !important;
    min-height: 10px !important;
}
@media only screen and (max-width: 767px) {
    .slider-container {
        max-width: 100% !important;
        margin-bottom: 28px !important;
        border-radius: 0 !important;
    }
    .slider-arrow.prev { left: 8px !important; }
    .slider-arrow.next { right: 8px !important; }
    .slider-dots { bottom: 6px !important; }
}
