/* --------------------------------------------------------------------------
   McTours site stylesheet - consolidated & fixes
   (Contains nav, slider, image alignment and responsive rules)
   --------------------------------------------------------------------------*/

/* 1. Variables & Reset */
:root {
    --site-max-width: 1200px;
    --nav-height: 72px;
    --nav-gap: 8px;
    --slider-aspect: 16/6;
    --slider-duration: 25s;
    --brand-color: #032c58;
    --accent-color: #ff0;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    width: auto !important;
}

body {
    font-family: Arial,sans-serif;
    color: #054e9e;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 2. Base layout / typography */
header, footer, main {
    width: 95%;
    max-width: var(--site-max-width);
}
header {
    margin-top: 100px;
}
main {
    margin: calc(var(--nav-height) + 20px) auto;
    display: block;
}
footer {
    margin: 20px auto;
}
.full-width {
    display: block;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--brand-color);
    font-weight: 700;
    padding-left: 10px;
    text-align: left;
    line-height:2em;
}

p, ol {
    padding: 1rem;
    font-size: 1rem;
    line-height: 1.25rem;
    margin-bottom: .5rem;
}

ul {
    font-size: 1rem;
    line-height: 1.3rem;
    padding-left: 35px;
    margin-bottom: .5rem;
}

li a {
line-height: 1.5rem;
}

a {
    font-weight: 700;
    color: var(--brand-color);
    text-decoration: none;
    transition: .25s;
}

    a:hover {
        background: var(--brand-color);
        color: var(--accent-color);
    }

/* Buttons */
.btn {
    display: inline-block;
    padding: .375rem .75rem;
    border-radius: .25rem;
}

.btn-primary {
    background: var(--brand-color);
    color: #fff;
    border: 1px solid transparent;
    margin: 10px;
}

    .btn-primary:hover {
        color: var(--accent-color);
    }

/* 5. Slider (hero) */
#slides {
    width: 100%;
    max-width: var(--site-max-width);
    margin: 0 auto;
    box-sizing: border-box;
}

    #slides.full-bleed {
        position: relative;
        width: 100vw;
        left: 50%;
        transform: translateX(-50%);
        max-width: none;
        margin-top: calc(var(--nav-height)+var(--nav-gap));
        box-sizing: border-box;
        z-index: 1;
    }

.slider {
    position: relative;
    width: 100%;
    aspect-ratio: var(--slider-aspect);
    overflow: hidden;
    margin: 0;
    padding: 0;
    list-style: none;
}

    .slider li {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        display: block;
        backface-visibility: hidden;
        will-change: transform;
        animation: slide var(--slider-duration) linear infinite;
        animation-fill-mode: both;
        z-index: 1;
    }

        .slider li:nth-child(1) {
            animation-delay: 0s;
        }

        .slider li:nth-child(2) {
            animation-delay: -20s;
        }

        .slider li:nth-child(3) {
            animation-delay: -15s;
        }

        .slider li:nth-child(4) {
            animation-delay: -10s;
        }

        .slider li:nth-child(5) {
            animation-delay: -5s;
        }

        .slider li:nth-child(n+6) {
            animation-delay: -5s;
        }

        .slider li img, .slider img, #slides img, picture img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            position: relative;
            z-index: 1;
        }

        .slider li .tip {
            position: absolute;
            left: 2%;
            bottom: 5%;
            z-index: 9999;
            background: rgba(0,0,0,0.6);
            color: #fff;
            padding: .75rem 1rem;
            max-width: 360px;
            border-radius: 6px;
            pointer-events: auto;
            line-height: 1.2;
        }

    .slider:after {
        z-index: 2000;
    }

@keyframes slide {
    0% {
        transform: translateX(-100%);
    }

    5%,25% {
        transform: translateX(0%);
    }

    30%,100% {
        transform: translateX(100%);
    }
}

/* Mobile slider tweaks:
   - keep the animation so slides continue to scroll on small screens
   - hide the tip overlay to avoid covering small images
*/
@media (max-width:599px) {
    .slider {
        aspect-ratio: var(--slider-aspect);
    }
        /* keep hero ratio, prevents collapse and stacking */
        .slider li {
            position: absolute;
        }
            /* still absolute so animation works */
            .slider li img {
                height: 100%;
                object-fit: cover;
            }

            .slider li .tip {
                display: none;
            }
    /* hide overlay text on mobile as requested */
}

/* 6. Columns / articles / grids */
.columns-2, .columns-3, .columns-4 {
    display: grid;
    gap: 20px;
}

.columns-2 {
    grid-template-columns: repeat(2,1fr);
}

.columns-3 {
    grid-template-columns: repeat(3,1fr);
}

.columns-4 {
    grid-template-columns: repeat(4,1fr);
}

section {
    display: block;
    padding: 15px;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
}

    /* Full-width section helper (opt-in) */
    section.full-width-section {
        width: 100%;
        float: none;
        padding: 15px;
        box-sizing: border-box;
    }
.two-col-section {
    width: 100%;
    float: none;
    box-sizing: border-box;
}

article {
    margin-bottom: 2rem;
    width: 100%;
    float: none;
    box-sizing: border-box;
    padding: 0 .5rem;
}
/* Grid-specific: ensure sections inside columns use the grid layout (do NOT float) */
.columns-4 > section,
.columns-3 > section,
.columns-2 > section {
    width: 100%;
    float: none;
    padding: 0 1rem; /* optional: match previous spacing */
    box-sizing: border-box;
}

/* If any section is wrapped in another element inside the grid, also handle descendants */
.columns-4 section,
.columns-3 section,
.columns-2 section {
    max-width: 100%;
    float: none;
}
/* reintroduce two-column article layout on wide screens */
/* Fix: scope desktop grid layout and restore article default width */
@media (min-width: 992px) {
    /* Use explicit grid for columns containers (prevents float wrapping issues) */
    #routes {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        align-items: start;
    }

        /* Ensure each article is a grid item, contains its floats and aligns at top */
        #routes > article {
            width: auto !important;
            box-sizing: border-box;
            padding: 0 0.75rem;
            align-self: start;
            display: flow-root; /* modern BFC to contain floats */
        }

    .columns-2 {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .columns-3 {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }

    .columns-4 {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

        /* Ensure direct children of columns are grid items and not full-width */
        .columns-2 > section,
        .columns-3 > section,
        .columns-4 > section {
            float: none !important;
            width: auto !important;
            display: block;
            box-sizing: border-box;
            align-self: start;
        }

    /* Restore generic article sizing (allow specific helpers to opt into 2-col layout) */
    article {
        width: auto !important;
        float: none !important;
    }

    /* Legacy, opt-in two-column helper - use this only where you need 2-up article layout */
    .two-col-article {
        width: 50%;
        float: left;
        box-sizing: border-box;
        padding: 0 1rem;
    }
    /* Restore missing helpers used across the site (place near the other layout helpers) */

    /* Opt-in two-column article helper (use only where you want float-based 2-up) */
    .two-col-article {
        box-sizing: border-box;
        padding: 0 1rem;
        width: 50%;
        float: left;
    }

    /* Explicit full-width section helper (keeps a section full-width regardless of parent grid/columns) */
    section.full-width-section,
    .full-width-section {
        width: 100%;
        max-width: 100%;
        float: none;
        padding: 15px;
        box-sizing: border-box;
        display: block;
    }

    /* Helper to make a block truly full width across the viewport (resets container constraints) */
    .full-width {
        width: 100%;
        max-width: 100%;
        float: none;
        box-sizing: border-box;
        padding: 0;
    }

    /* Full-bleed helper (use on containers that should span the entire viewport horizontally) */
    .full-bleed {
        width: 100vw;
        position: relative;
        left: 50%;
        transform: translateX(-50%);
        max-width: none;
        box-sizing: border-box;
        padding: 0;
        margin-left: 0;
        margin-right: 0;
    }
    /* Fallback for older browsers that don't support flow-root */
    @supports not (display: flow-root) {
        #routes > article {
            overflow: auto;
        }
    }
}

@media (max-width: 768px) {
    .columns-2, .columns-3, .columns-4 {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }

    /* Reset legacy two-column floats and widths on mobile */
    section,
    article,
    .two-col-section,
    .two-col-article {
        width: 100% !important;
        float: none !important;
        display: block !important;
        box-sizing: border-box !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    /* Ensure sections inside column containers respect the grid */
    .columns-4 > section,
    .columns-3 > section,
    .columns-2 > section {
        width: 100% !important;
        float: none !important;
        padding: .5rem !important;
    }
}
/* 7. Forms */
form {
    max-width: 800px;
    margin: 20px auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

    .form-group label,
    .form-row label {
        display: block;
        margin-bottom: 0.4rem;
        font-weight: 700;
    }

    .form-group input,
    .form-group select,
    .form-group textarea,
    .form-row input,
    .form-row select,
    .form-row textarea {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 8px;
        font-size: 1rem;
        border: 1px solid #ccc;
        border-radius: 4px;
    }

    /* make selects a comfortable touch target */
    .form-group select,
    .form-row select {
        min-height: 44px;
        line-height: 1.2;
    }
.inputWebsite {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
/* 8. Image alignment (restore your original helpers) */
.routeImg, .routeImgW, .routeImgP, .routeImgFull {
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Specific widths kept as you defined */
.routeImg {
    float: right;
    width: 360px;
    margin: 5px;
}

.routeImgW {
    float: right;
    width: 550px;
    margin: 5px;
}

.routeImgP {
    float: right;
    height: 360px;
    margin: 5px;
}
/* preserve if intended */
.routeImgFull {
    float: right;
    width: 100%;
    margin: 5px;
}

.imgL {
    float: left
}

.imgR {
    float: right
}
.imgDiary {
    float: left;
    width: 360px; 
    max-width: 100%;
    margin: 10px 1rem 1rem 0;
    box-sizing: border-box;
}
.bikeImg {
    float: right;
    width: 350px;
    height: auto;
}
/* utilities */
picture {
    display: block;
}

img {
    border: 0;
    max-width: 100%;
    height: auto;
    display: block;
}
/* footer social icons */
.svg {
    display: none;
}
.mct-social-icons > a {
    padding: 4px 10px;
    color: #032c58
}

    .mct-social-icons > a i {
        font-size: 2rem;
        line-height: 2.5rem;
    }

.mct-social-icons p, .mct-social-icons a, .mct-social-icons span, .mct-social-icons span a {
    font-size: 1.5rem;
    line-height: 2rem;
}

.mct-social-icons > a:active, .mct-social-icons > a:focus, .mct-social-icons > a:hover {
    text-decoration: none;
    background-color: #032c58;
    color: #ff0
}

#myCookieConsent {
    z-index: 2000;
    position: fixed;
    top: 330px;
    right: 10px;
    background: rgba(0,0,0,.85);
    color: #fff;
    padding: 10px 20px;
    border-radius: 6px;
    display: none;
    max-width: 420px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
}
.clearDiv {
    clear: both;
    display: block;
    width: 100%;
    height: 0;
}

/* End of file */
