/* Global box sizing */
* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: linear-gradient(
        to bottom,
        #74889c 0%,
        #c5d0da 50%,
        #ffffff 100%
    );
    color: #1f2933;
    font-family: Arial, Helvetica, sans-serif;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

/* Header and horizontal navigation */
.site-header {
    position: relative;
    z-index: 100;
    text-align: center;
}

.site-header h1 {
    margin: 0;
    padding: 38px 20px 22px;
    color: #172331;
}

.site-nav {
    display: flex;
    align-items: stretch;
    justify-content: center;
    width: 100%;
    overflow: visible;
    background-color: rgba(52, 72, 92, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
}

.nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 28px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
    background: transparent;
    border: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.25);
    cursor: pointer;
}

.site-nav > :last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.25);
}

.nav-link:hover,
.nav-link:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

.nav-link.active {
    color: #34485c;
    background-color: #ffffff;
}

.welcome-text {
    margin: 0;
    padding: 24px 20px 40px;
    color: #000000;
    font-size: 18px;
}

/* Main Collection dropdown */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    z-index: 1000;
    min-width: 220px;
    overflow: visible;
    background-color: #40566b;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0 0 6px 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(-4px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.dropdown:hover > .dropdown-menu,
.dropdown:focus-within > .dropdown-menu,
.dropdown.menu-open > .dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu > a,
.nested-trigger,
.nested-menu a {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 11px 20px;
    color: #ffffff;
    font-family: inherit;
    font-size: 16px;
    font-weight: bold;
    line-height: 1.2;
    text-align: left;
    text-decoration: none;
    white-space: nowrap;
    background: transparent;
    border: 0;
}

.dropdown-menu > a:hover,
.dropdown-menu > a:focus-visible,
.nested-trigger:hover,
.nested-trigger:focus-visible,
.nested-menu a:hover,
.nested-menu a:focus-visible {
    background-color: rgba(255, 255, 255, 0.2);
    outline: none;
}

/* Hover and click-to-open sideways sport menus */
.nested-dropdown {
    position: relative;
}

.nested-trigger {
    justify-content: space-between;
    gap: 24px;
    cursor: pointer;
}

.nested-trigger span:last-child {
    font-size: 10px;
    transition: transform 0.15s ease;
}

.nested-dropdown.open > .nested-trigger span:last-child {
    transform: rotate(90deg);
}

@media (hover: hover) and (pointer: fine) {
    .nested-dropdown:hover > .nested-trigger span:last-child,
    .nested-dropdown:focus-within > .nested-trigger span:last-child {
        transform: rotate(90deg);
    }
}

.nested-menu {
    position: absolute;
    top: 0;
    left: 100%;
    z-index: 1200;
    min-width: 190px;
    background-color: #40566b;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0 6px 6px 6px;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
}

.nested-dropdown.open > .nested-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
}

@media (hover: hover) and (pointer: fine) {
    .nested-dropdown:hover > .nested-menu,
    .nested-dropdown:focus-within > .nested-menu {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(0);
    }
}

/* General page sections */
main,
.page-section {
    background-color: transparent;
}

.page-section {
    min-height: 500px;
    padding: 60px 20px;
    text-align: center;
}

.page-section h2 {
    margin: 0 0 12px;
    color: #172331;
    font-size: 32px;
}

.page-section p {
    margin: 0;
    color: #000000;
    font-size: 17px;
}

/* Collection pages */
.collection-page {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    padding: 30px 16px 60px;
}

.collection-intro {
    margin-bottom: 28px;
    text-align: center;
}

.collection-intro h2 {
    margin: 0 0 8px;
    color: #172331;
    font-size: 34px;
}

.collection-intro p {
    margin: 0;
    color: #000000;
    font-size: 16px;
}

/* Sport landing-page cards */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    max-width: 1100px;
    margin: 0 auto;
}

.category-card {
    display: block;
    padding: 28px 20px;
    color: #172331;
    text-align: center;
    text-decoration: none;
    background-color: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(52, 72, 92, 0.25);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.14);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.category-card:hover,
.category-card:focus-visible {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    outline: none;
}

.category-card h3 {
    margin: 0 0 8px;
    font-size: 24px;
}

.category-card p {
    margin: 0;
    color: #34485c;
    font-size: 14px;
}

/* Compact collection gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 12px;
}

.gallery-card {
    min-width: 0;
    overflow: hidden;
    background-color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(52, 72, 92, 0.25);
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.13);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.gallery-image-link {
    display: block;
    width: 100%;
    overflow: hidden;
    background-color: transparent;
}

.gallery-image-link img {
    display: block;
    width: 100%;
    height: auto;
}

.image-placeholder {
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1 / 1;
    padding: 8px;
    color: #172331;
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    background: linear-gradient(135deg, #6f8295, #d5dde5);
}

.gallery-card h3 {
    margin: 0;
    padding: 0;
    overflow: hidden;
    text-align: center;
    font-size: 13px;
    line-height: 1.25;
}

.gallery-title-link {
    display: block;
    padding: 10px 6px;
    overflow: hidden;
    color: #172331;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-title-link:hover,
.gallery-title-link:focus-visible {
    background-color: rgba(52, 72, 92, 0.1);
    text-decoration: underline;
    outline: none;
}

/* Responsive navigation */
@media (max-width: 760px) {
    .site-header h1 {
        padding: 26px 14px 18px;
        font-size: 28px;
    }

    .site-nav {
        flex-wrap: wrap;
    }

    .nav-link {
        flex: 1 1 auto;
        padding-right: 16px;
        padding-left: 16px;
        font-size: 15px;
    }

    .dropdown-menu {
        left: 50%;
        width: min(260px, calc(100vw - 24px));
    }

    .nested-menu {
        position: static;
        display: none;
        min-width: 0;
        margin: 0 8px 8px;
        background-color: rgba(28, 46, 64, 0.45);
        border-radius: 4px;
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: none;
    }

    .nested-dropdown.open > .nested-menu {
        display: block;
    }

    .nested-dropdown.open > .nested-trigger span:last-child {
        transform: rotate(90deg);
    }

    .collection-page {
        padding-right: 10px;
        padding-left: 10px;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
}

/* Lightbox overlay */
body.lightbox-open {
    overflow: hidden;
}

.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 5000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    background-color: rgba(0, 0, 0, 0.88);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox-overlay.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.lightbox-image {
    display: block;
    max-width: 95vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
    position: fixed;
    top: 18px;
    right: 24px;
    z-index: 5001;
    width: 48px;
    height: 48px;
    padding: 0;
    color: #ffffff;
    font-size: 42px;
    line-height: 42px;
    text-align: center;
    background: transparent;
    border: 0;
    cursor: pointer;
}

.lightbox-close:hover,
.lightbox-close:focus-visible {
    color: #d9e4ee;
    outline: none;
}

@media (max-width: 760px) {
    .lightbox-overlay {
        padding: 18px;
    }

    .lightbox-close {
        top: 8px;
        right: 10px;
    }
}

/* Lightbox navigation arrows */
.lightbox-arrow {
    position: fixed;
    top: 50%;
    z-index: 5002;
    width: 54px;
    height: 70px;
    padding: 0;
    color: #ffffff;
    font-size: 42px;
    line-height: 1;
    background-color: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 8px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.15s ease,
                transform 0.15s ease;
}

.lightbox-previous {
    left: 22px;
}

.lightbox-next {
    right: 22px;
}

.lightbox-arrow:hover,
.lightbox-arrow:focus-visible {
    background-color: rgba(52, 72, 92, 0.95);
    outline: none;
}

.lightbox-arrow:active {
    transform: translateY(-50%) scale(0.94);
}

@media (max-width: 760px) {
    .lightbox-arrow {
        width: 42px;
        height: 58px;
        font-size: 32px;
    }

    .lightbox-previous {
        left: 6px;
    }

    .lightbox-next {
        right: 6px;
    }
}