/* Prevent sideways scrolling if anything tries to overflow */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

/* Scroll effect margin */
div[id] {
  scroll-margin-top: 120px;
}

.main {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-bottom: 50px;
}

/* Every main section */
.main > div {
    width: 75%;
    max-width: 1200px;
    min-width: 0;

    display: flex;
    align-items: center;
    gap: 25px;
}

/* Make sure flex children can shrink properly */
.main > div > * {
    min-width: 0;
}

/* ------------------------------- */
/* Quick Links */
/* ------------------------------- */

.trails-nav {
    width: 75%;
    max-width: 1200px;
    display: flex;
    justify-content: center;
}

.quick-links-card {
    width: 100%;
    padding: 18px;
    border-radius: 18px;

    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.06);
}

.quick-links-header {
    margin-bottom: 12px;
}

.quick-links-header h4 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}

.quick-links-header p {
    margin: 4px 0 0 0;
    font-size: 0.9rem;
    opacity: 0.7;
}

.quick-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.quick-link {
    display: inline-flex;
    align-items: center;

    padding: 10px 12px;
    border-radius: 999px;

    text-decoration: none;
    font-weight: 800;
    font-size: 0.95rem;

    color: var(--link-text);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.06);

    transition: transform 0.15s ease, background 0.15s ease;
}

.quick-link:hover {
    transform: translateY(-2px);
    background: rgba(0, 0, 0, 0.07);
}

.quick-link:active {
    transform: translateY(0px);
}

/* ------------------------------- */
/* Overview Section */
/* ------------------------------- */

.trails-overview {
    display: flex;
    align-items: center;
    gap: 25px;
}

.trails-info li {
    list-style: disc;
}

.trails-image img {
    width: 250px;
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 14px;
}

/* ------------------------------- */
/* Trail Times */
/* ------------------------------- */

.trail-times {
    flex-direction: column;
    align-items: flex-start;
}

.trail-hours {
    padding-left: 0;
    margin: 10px 0 18px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.info-images {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.info-tile {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    aspect-ratio: 16 / 10;
    min-height: 220px;

    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.info-tile::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 0;
}

.info-tile-overlay {
    position: absolute;
    inset: 0;

    display: flex;
    flex-direction: column;
    justify-content: center;

    padding: 18px;
    color: #fff;
    z-index: 2;
}

.info-tile-overlay h2 {
    margin: 0 0 6px 0;
    font-size: 1.8rem;
    font-weight: 800;
}

.info-tile-overlay p {
    margin: 0;
    font-size: 1.1rem;
    line-height: 1.4;
    opacity: 0.95;
}

.gift-certs {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

/* ------------------------------- */
/* Evening Trails */
/* ------------------------------- */

.evening-trails {
    flex-direction: column;
    align-items: flex-start;
}

.evening-trails img {
    max-width: 100%;
    height: auto;
    display: block;
    margin-top: 10px;
    border-radius: 14px;
}

/* ------------------------------- */
/* Additional Info */
/* ------------------------------- */

.additional-info {
    flex-direction: column;
    align-items: flex-start;
}

.additional-info h3 {
    text-align: left; 
    width: 100%;
    margin-bottom: -25px;
}

/* ------------------------------- */
/* View Some Trails (Gallery) */
/* ------------------------------- */

.view-trails {
    flex-direction: column;
    align-items: flex-start;
}

.trail-gallery {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-top: 10px;
}

.trail-thumb {
    border: none;
    padding: 0;
    background: transparent;
    cursor: pointer;
    border-radius: 14px;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 1 / 1;
    position: relative;
}

.trail-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;

    transform: scale(1);
    transition: transform 0.18s ease, filter 0.18s ease;
}

.trail-thumb:hover img {
    transform: scale(1.04);
    filter: brightness(0.95);
}

/* ------------------------------- */
/* Lightbox */
/* ------------------------------- */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, 0.75);
    padding: 18px;
}

.lightbox.is-open {
    display: flex;
}

.lightbox-inner {
    max-width: 1100px;
    width: 100%;
    max-height: 85vh;

    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-inner img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 16px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
}

.trail-thumb {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent;
    -webkit-tap-highlight-color: transparent;
}

.trail-thumb:focus,
.trail-thumb:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

.trail-thumb img {
    border: none !important;
    outline: none !important;
}

.trail-thumb img {
    transform: translateZ(0);
    backface-visibility: hidden;
}

.schedule {
    
}

#schedule {

}

/* ------------------------------- */
/* Mobile */
/* ------------------------------- */

@media (max-width: 1000px) {
    .main > div {
        width: 90%;
        flex-direction: column;
        align-items: flex-start;
    }

    .quick-links-card {
        width: 90%;
    }

    .trails-nav {
        width: 90%;
    }

    .trails-image img {
        width: 100%;
        max-width: 420px;
    }

    .info-images {
        grid-template-columns: 1fr;
    }

    .info-tile {
        aspect-ratio: 16 / 10;
        min-height: 220px;
    }

    .info-tile-overlay h2 {
        font-size: 1.4rem;
    }

    .info-tile-overlay p {
        font-size: 1rem;
    }

    .quick-links {
        flex-direction: column;
        align-items: flex-start;
        width: 90%;
    }

    .quick-link {
        justify-content: flex-start;
    }

    .gift-certs .tag {
        padding: 25px;
        text-align: center;
    }
}

/* Mobile gallery columns */
@media (max-width: 1000px) {
    .trail-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 520px) {
    .trail-gallery {
        grid-template-columns: 1fr;
    }
}