:root {
    --bg-color: #fdfdfd;
    --section-bg: #fdfdfd;
    --accent-color: #FF6600;
    /* KTM Orange */
    --accent-hover: #e65c00;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --nav-height: 90px;
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

html {
    scroll-padding-top: var(--nav-height);
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.5px;
    font-weight: 700;
}

h1 {
    font-size: clamp(2.2rem, 8vw, 4.5rem);
}

h2 {
    font-size: clamp(1.8rem, 6vw, 3.5rem);
}

h3 {
    font-size: clamp(1.5rem, 5vw, 2.5rem);
}

/* --- Layout Utils --- */
.full-height-section {
    min-height: calc(100vh - var(--nav-height));
    height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    overflow: hidden;
    position: relative;
}

@media (min-width: 992px) {

    /* Sections need margin to clear fixed nav unless they are the hero */
    #intro,
    section.full-height-section {
        margin-top: var(--nav-height);
    }
}

@media (max-width: 991px) {
    .full-height-section {
        height: auto;
        min-height: auto;
        padding: 60px 0;
    }

    .container, .navbar .container-fluid {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .navbar .container-fluid {
        position: relative;
        min-height: 70px; /* Ensure consistent height for header line */
    }
}

/* --- Hero Section (100vh) --- */
.hero {
    height: 100vh;
    width: 100%;
    position: relative;
    background: linear-gradient(rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), url('../img/kaddy_uvodni obrazek.jpg');
    background-size: cover;
    background-position: bottom;
    overflow: hidden;
}

.hero-text-bottom-right {
    position: absolute;
    bottom: 20vh;
    right: 20%;
    text-align: right;
    max-width: 900px;
    width: 90%;
    color: #fff;
    z-index: 10;
}

.hero-text-bottom-right .accent-text {
    font-size: clamp(4rem, 10vw, 5rem);
    line-height: 1.1;
    margin-bottom: 0;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    cursor: pointer;
    display: inline-block;
}

.hero-text-bottom-right .accent-text:hover {
    color: var(--accent-color);
    transform: translateX(-15px);
}

.text-large {
    font-size: 2.10em;
    font-weight: 800;
    display: inline-block;
    vertical-align: middle;
}

.hero-tagline-top-right {
    position: absolute;
    top: 15vh;
    right: 10%;
    text-align: right;
    z-index: 10;
}

.hero-tagline {
    color: #fff;
    font-size: clamp(0.9rem, 1.5vw, 1.5rem);
    font-weight: 600;
    letter-spacing: 2px;
    margin: 0;
}

.hero-text-top-right h1 {
    font-size: clamp(1.8rem, 5vw, 4rem);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.scroll-down-btn {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    box-shadow: 0 10px 25px rgba(255, 102, 0, 0.4);
}

.scroll-down-btn:hover {
    background: #fff;
    color: var(--accent-color);
    transform: translateX(-50%) translateY(5px);
}

/* --- Navigation & Navbar --- */
.navbar {
    padding: 10px 0;
    transition: background 0.4s var(--easing), padding 0.4s var(--easing);
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0) 100%);
}

@media (max-width: 991px) {
    .navbar {
        transition: background 0.2s ease-out, padding 0.2s ease-out;
    }
}

.navbar.scrolled,
.navbar.navbar-open {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: #fff !important;
    transition: var(--transition);
}

.navbar.scrolled .navbar-brand,
.navbar.navbar-open .navbar-brand {
    color: var(--text-primary) !important;
}

.navbar-brand span {
    color: var(--accent-color);
}

.navbar-logo {
    height: 80px;
    width: auto;
    transition: var(--transition);
}

@media (max-width: 767px) {
    .navbar-logo {
        height: 60px;
    }
}

.navbar.scrolled .navbar-logo,
.navbar.navbar-open .navbar-logo {
    filter: brightness(0);
}

.nav-link {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    color: #fff !important;
    margin: 0 15px;
    opacity: 0.8;
    transition: var(--transition);
}

.navbar.scrolled .nav-link,
.navbar.navbar-open .nav-link {
    color: var(--text-primary) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color) !important;
    opacity: 1;
}

/* --- Global Brand Overrides --- */
.btn-warning {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: #fff !important;
}

.btn-warning:hover {
    background-color: var(--accent-hover) !important;
    border-color: var(--accent-hover) !important;
    color: #fff !important;
}

.text-warning {
    color: var(--accent-color) !important;
}

.border-warning {
    border-color: var(--accent-color) !important;
}

.header-socials {
    display: flex;
    gap: 20px;
}

.header-icon {
    font-size: 1.2rem;
    color: #fff !important;
    transition: var(--transition);
}

.navbar.scrolled .header-icon,
.navbar.navbar-open .header-icon {
    color: var(--text-primary) !important;
}

.header-icon:hover {
    color: var(--accent-color) !important;
    transform: translateY(-2px);
}

@media (max-width: 991px) {
    .navbar-brand {
        margin-right: 0 !important;
        position: absolute;
        left: 50%;
        top: 5px;
        transform: translateX(-50%);
        z-index: 1052;
    }

    .navbar-toggler {
        position: absolute;
        right: 15px;
        top: 11px; /* Align with logo center */
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        z-index: 1051;
    }

    .navbar-toggler:focus {
        outline: none !important;
        box-shadow: none !important;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 1%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .navbar.scrolled .navbar-toggler-icon,
    .navbar.navbar-open .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgb%280, 0, 0%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
    }

    .header-socials {
        display: none !important;
    }

    .navbar-collapse {
        width: 100%;
        padding: 0;
    }
    .navbar-collapse.show, 
    .navbar-collapse.collapsing {
        margin-top: 85px; /* Push below logo only when active */
        padding: 10px 0 20px 0;
    }
    .navbar-collapse .navbar-nav {
        padding-top: 0;
    }
    .navbar-collapse .nav-link {
        padding: 15px 0;
        margin: 0;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        color: var(--text-primary) !important;
    }
    .navbar-collapse .nav-link:last-child {
        border-bottom: none;
    }
}

/* --- Sections & Cards --- */
section {
    padding: 100px 0;
}

.section-title {
    margin-bottom: 60px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
}

.story-img-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.story-img-container img {
    width: 100%;
    height: auto;
    transition: var(--transition);
}

.story-img-container:hover img {
    transform: scale(1.02);
}

/* --- Intro Section Custom Styles --- */
.intro-title {
    font-family: 'Outfit', 'Google Sans Flex', sans-serif;
    font-size: clamp(3rem, 6vw, 5.5rem);
    font-weight: 300;
    text-transform: none;
    letter-spacing: -2px;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.intro-subtitle {
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 30px;
    color: var(--text-primary);
}

.intro-description p {
    font-size: 1.05rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-width: 90%;
}

.simple-link {
    color: var(--text-primary);
    text-decoration: underline;
    font-weight: 700;
    font-size: 0.95rem;
    transition: var(--transition);
}

.simple-link:hover {
    color: var(--accent-color);
}

.intro-img {
    border-radius: 12px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
    filter: grayscale(1);
    transition: var(--transition);
}

.intro-img:hover {
    filter: grayscale(0);
    transform: translateY(-5px);
}

/* --- Merch Section Styles --- */


.merch-premium-bg {
    background: #fdfdfd;
}

.modern-merch-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 20px;
    overflow: hidden;
    height: auto;
    max-height: calc(100vh - var(--nav-height) - 80px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.04);
}

.modern-merch-card .row {
    display: flex;
    align-items: stretch;
    /* Ensure columns take full height */
}

.modern-card-img-wrapper {
    width: 100%;
    height: 100%;
}

.modern-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modern-card-title {
    font-size: 1.6rem;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-family: 'Outfit', 'Poppins', sans-serif;
    text-transform: none;
    letter-spacing: -0.5px;
}

.modern-card-text p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

@media (max-width: 991px) {
    .modern-merch-card {
        height: auto;
        max-height: none;
        border-radius: 15px;
        margin: 20px 0;
    }

    .modern-card-img-wrapper {
        height: 250px;
    }
}

.merch-bottom-link-wrapper {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

/* --- Footer --- */
footer {
    padding: 60px 0 30px;
    border-top: 1px solid #eee;
    background: #fff;
}

.footer-nav {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-bottom: 30px;
}

.footer-nav a {
    text-transform: uppercase;
    font-weight: 600;
    font-size: 0.8rem;
    color: var(--text-secondary);
    transition: var(--transition);
}

.footer-nav a:hover {
    color: var(--accent-color);
}

.social-icons {
    display: flex;
    gap: 25px;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.social-icons a {
    color: var(--text-primary);
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #f5f5f5;
    padding-top: 30px;
}

/* --- Stats Section --- */
.stats-section {
    position: relative;
    overflow: hidden;
    padding: 100px 0;
}

.stats-heading {
    font-size: clamp(2.2rem, 5vw, 4.2rem);
    font-weight: 600;
    line-height: 1.1;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    text-transform: none;
}

.stats-narrative p {
    font-size: 1rem;
    line-height: 1.4;
}

.stats-footer {
    font-size: 1rem;
    font-weight: 500;
}

.social-card {
    max-width: 300px;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.stats-separator {
    width: 1px;
    height: 120px;
    background: #e0e0e0;
    margin: 0 50px;
}

.stats-big-number {
    font-size: clamp(2.5rem, 8vw, 5.5rem);
    font-weight: 300;
    color: var(--accent-color);
    line-height: 1;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -2px;
}

@media (max-width: 991px) {
    .stats-row {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        margin-bottom: 40px !important;
    }

    .stats-separator {
        width: 60px;
        height: 1px;
        margin: 10px auto;
    }

    .stats-heading {
        margin-bottom: 30px;
    }
}


/* ── Story Page Specific Styles ── */

.story-container {
    position: relative;
    width: 100%;
}

/* Left vertical timeline */
.story-timeline {
    position: sticky;
    top: 150px;
    left: 40px;
    z-index: 900;
    width: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0;
    height: fit-content;
    padding: 20px 0;
    float: left;
    margin-left: 30px;
}

.story-timeline .tl-line {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 35px;
    bottom: 35px;
    width: 2px;
    background: rgba(255, 102, 0, 0.3);
    border-radius: 2px;
    z-index: -1;
}

.story-timeline .tl-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    border: 2px solid var(--accent-color);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
    margin: 10px 0;
    text-decoration: none;
    display: block;
}

.story-timeline .tl-dot:hover {
    transform: scale(1.4);
    background: var(--accent-color);
}

.story-timeline .tl-dot.danger {
    border-color: #da0016;
}

.story-timeline .tl-dot:hover {
    transform: scale(1.6);
    background: var(--accent-color);
}

.story-timeline .tl-dot.tl-active {
    background: transparent !important;
    border-width: 4px;
    transform: scale(2.2);
    box-shadow: 0 0 15px var(--accent-color);
}

/* Story cards area */
.story-cards {
    padding-top: calc(var(--nav-height) + 20px);
    padding-left: 20px;
    padding-right: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Individual story card */
.story-card {
    display: flex;
    align-items: stretch;
    min-height: 420px;
    height: auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 40px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    background: #fff;
}

.story-card:hover {
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.13);
    transform: translateY(-3px);
}

/* Reverse card - image first */
.story-card.reverse {
    flex-direction: row-reverse;
}

.story-card-img {
    flex: 0 0 45%;
    overflow: hidden;
}

.story-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-card-img img {
    transform: scale(1.04);
}

.story-card-body {
    flex: 1;
    padding: 48px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (max-width: 767px) {
    .story-card-body {
        padding: 30px 20px;
    }

    .story-cards {
        padding-left: 10px;
        padding-right: 10px;
    }

    .story-card {
        margin-bottom: 30px;
        border-radius: 15px;
        margin-left: 10px;
        margin-right: 10px;
    }
}

.story-card-date {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.story-card-title {
    font-size: clamp(1.2rem, 2vw, 1.7rem);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.story-card-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Danger card (accident) */
.story-card.danger-card {
    border-left: 5px solid #dc3545;
}

.story-card.danger-card.reverse {
    border-left: none;
    border-right: 5px solid #dc3545;
}

.story-card.danger-card .story-card-date {
    color: #dc3545;
}

.story-card.danger-card .story-card-title {
    color: #dc3545;
}

/* Page hero */
.story-page-hero {
    height: 100vh;
    width: 100%;
    position: relative;
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/kaddy_o_mne.jpg');
    background-color: #e0e0e0;
    background-blend-mode: luminosity;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    color: #fff;
    text-shadow: 0 4px 15px rgba(0,0,0,0.6);
    margin-bottom: 60px;
    border-radius: 0;
    overflow: hidden;
}

@media (max-width: 991px) {
    .story-timeline {
        display: none;
    }

    .story-cards {
        padding-left: 20px;
    }

    .story-card {
        flex-direction: column !important;
        height: auto;
    }

    .story-card-img {
        flex: 0 0 250px;
        height: 250px;
    }

    .story-card-body {
        padding: 30px 20px;
    }
}

@media (max-width: 767px) {
    .story-page-hero h1 {
        padding: 0 20px;
    }

    .story-page-hero p {
        padding: 0 20px;
    }
}

/* --- Object Fit for Story Images --- */
.object-fit-cover {
    object-fit: cover;
}

/* --- Reveal on Scroll --- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* --- Merch Page Specific --- */
.merch-section {
    padding: 100px 0;
}

.merch-header {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../img/kaddy_merch_header.jpg') !important;
    background-blend-mode: normal;
}

.product-slider-container {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.product-slider img {
    width: 100%;
    height: 600px;
    object-fit: cover;
}

@media (max-width: 991px) {
    .product-slider img {
        height: 450px;
    }
}

@media (max-width: 767px) {
    .product-slider img {
        height: 350px;
    }

    .product-title {
        font-size: 2.2rem;
        margin-bottom: 20px;
    }
}

.product-info {
    padding-left: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.product-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 30px;
    text-transform: uppercase;
}

.product-description {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.btn-merch {
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 12px;
    transition: var(--transition);
    align-self: flex-start;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-item {
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cta-section {
    padding: 120px 0;
    background: #1a1a1a;
    color: #fff;
    text-align: center;
}

.cta-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 40px;
}

.btn-cta {
    padding: 20px 60px;
    font-size: 1.5rem;
    font-weight: 800;
    border-radius: 50px;
    background: var(--accent-color);
    color: #fff;
    border: none;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-cta:hover {
    background: #fff;
    color: var(--accent-color);
    transform: scale(1.05);
}

/* Lightbox simplified */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.lightbox-content {
    max-width: 100%;
    max-height: 100%;
    border-radius: 10px;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 40px;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
}

@media (max-width: 991px) {
    .product-info {
        padding-left: 15px;
        padding-right: 15px;
        margin-top: 40px;
    }

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

    .product-slider img {
        height: 400px;
    }

    .product-title {
        font-size: 2.5rem;
    }
}

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

    .cta-title {
        font-size: 2.5rem;
    }

    .btn-cta {
        padding: 15px 40px;
        font-size: 1.2rem;
    }
}