:root {
    --lynx-orange: #fed547;
    --lynx-orange-dark: #e55a24;
}

body {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: #fff;
    font-family: 'Quicksand', sans-serif;
}

/* Respect iPhone notch/home indicator safe areas */
@supports (padding: max(0px)) {
    body {
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }
}

.hidden-element {
    display: none !important;
}

.race-winner {
    background-color: rgba(40, 167, 69, 0.3) !important;
}

.qualifying-section {
    background: linear-gradient(180deg, rgba(0, 0, 0, 0.62) 0%, rgba(20, 20, 20, 0.78) 100%);
    border: 1px solid rgba(254, 213, 71, 0.28);
    border-radius: 18px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.qualifying-best-row td {
    background: rgba(255, 255, 255, 0.04) !important;
}

.modal-backdrop {
    display: none !important;
}

.modal.show {
    background-color: rgba(0, 0, 0, 0.5);
}

.navbar {
    background: #000 !important;
    border-bottom: 3px solid var(--lynx-orange);
    position: relative;
}

/* Lithuanian flag stripes on left side */
.navbar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 120px;
    height: 100%;
    background: linear-gradient(
        45deg,
        transparent 0%,
        /* transparent 20%,
        #FDB913 20%,
        #FDB913 32%,
        transparent 32%,
        transparent 38%,
        #006A44 38%,
        #006A44 50%,
        transparent 50%,
        transparent 56%,
        #C1272D 56%,
        #C1272D 68%,
        transparent 68%, */
        transparent 100%
    );
    z-index: 0;
    overflow: hidden;
}

/* Lithuanian flag stripes on right side */
.navbar::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    width: 35%;
    height: 100%;
    background: linear-gradient(
        -45deg,
        transparent 0%,
        transparent 5%,
        #C1272D 5%,
        #C1272D 30%,
        #006A44 30%,
        #006A44 55%,
        #FDB913 50%,
        #FDB913 80%,
        transparent 80%,
        transparent 100%
    );
    z-index: 0;
}

/* Ensure navbar content stays above stripe (container not positioned so nav can align to .navbar) */
.navbar .container {
    position: static;
    z-index: 1;
}

/* Position nav links over the right-side flag stripes so each link sits in its color band */
.navbar .navbar-nav {
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 35%; /* match the ::after stripe width */
    display: flex;
    justify-content: stretch;
    align-items: stretch;
    gap: 0;
    z-index: 3; /* above the decorative stripes */
    padding-left: 0;
    margin: 0;
}

.navbar .nav-item {
    flex: 1 1 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Per-band offsets to visually center each link inside its diagonal stripe */
.navbar .nav-item:nth-child(1) { margin-left: 110px; }
.navbar .nav-item:nth-child(2) { margin-left: 5px; }
.navbar .nav-item:nth-child(3) { margin-left: 0px; }

.navbar .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0.35rem 0.5rem;
}

.navbar-brand {
    color: var(--lynx-orange) !important;
    font-weight: 700;
}
.nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    transition: color 0.3s;
}
.nav-link:hover {
    color: var(--lynx-orange) !important;
}

.navbar-toggler {
    border-color: rgba(255, 255, 255, 0.35);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(254, 213, 71, 0.35);
}

.navbar-collapse {
    position: static;
    z-index: 2;
}

/* On desktop (lg+), the collapse is transparent - nav is absolutely positioned over the flag */
@media (min-width: 992px) {
    .navbar-collapse {
        position: static !important;
        display: block !important; /* ensure collapse wrapper doesn't constrain absolute child */
        overflow: visible !important;
    }
}

/* Ensure brand, logo and toggler sit above decorative stripes */
.navbar .navbar-brand,
.navbar .container > img,
.navbar .navbar-toggler {
    position: relative;
    z-index: 4;
}

.hero h1 { color: var(--lynx-orange); }
.hero p { color: #ccc; }

/* Hero background video */
.hero {
    position: relative;
    overflow: hidden;
    min-height: 70vh;
    min-height: 70svh;
}

.hero--event-text {
    min-height: 52vh;
    min-height: 52svh;
}
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    z-index: 1;
    filter: brightness(0.4);
    pointer-events: none;
}

.no-heavy-video-placeholder {
    background: linear-gradient(135deg, #101010 0%, #232323 100%);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(0,0,0,0.4) 0%, rgba(0,0,0,0.6) 100%);
}
.hero-content {
    position: relative;
    z-index: 3;
    padding-bottom: 130px;
}

.hero--event-text .hero-content {
    padding-bottom: 70px;
}

/* Hero message box overlay */
.hero-message-box {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 4;
    background: rgba(254, 213, 71, 0.9);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    padding: 20px 40px;
    border-radius: 8px;
    border: 1px solid rgba(253, 185, 19, 0.3);
    max-width: 90%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.hero-message-text {
    color: #000;
    font-size: 18px;
    font-weight: 500;
    margin: 0;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: block;
    cursor: pointer;
    transition: color 0.3s ease;
}

.hero-message-text:hover {
    color: #5f5f5f;
}

@media (max-width: 768px) {
    .navbar-collapse {
        background: rgba(0, 0, 0, 0.92);
        margin-top: 10px;
        padding: 12px;
        border: 1px solid rgba(254, 213, 71, 0.25);
        border-radius: 8px;
    }

    .navbar .nav-link {
        color: #fff !important;
    }

    .hero {
        min-height: 76vh;
        min-height: 76svh;
    }

    .hero--event-text {
        min-height: 58vh;
        min-height: 58svh;
    }

    .hero-content {
        padding-bottom: 165px;
    }

    .hero--event-text .hero-content {
        padding-bottom: 90px;
    }

    .hero-message-box {
        bottom: 20px;
        padding: 15px 30px;
        max-width: 85%;
    }

    .hero-message-text {
        font-size: 16px;
    }

    /* On small screens restore default stacked nav behavior */
    .navbar .navbar-nav {
        position: static;
        width: auto;
        height: auto;
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .navbar .nav-item {
        flex: 0 0 auto;
        display: block;
        justify-content: unset;
        margin-left: 0 !important;
    }
    .navbar .nav-link {
        display: block;
        width: auto;
        height: auto;
        padding: 0.5rem 1rem;
    }
}

/* Logo and text slide-out effect */
@keyframes slideOutRight {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.hero-branding {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

.hero-logo-center {
    width: 100px;
    height: 100px;
    flex-shrink: 0;
}

.hero-title-slide {
    animation: slideOutRight 1.5s ease-out;
    white-space: nowrap;
}

.hero h1 { color: var(--lynx-orange); }
.hero p { color: #ccc; }

@media (max-width: 992px) {
    /* .navbar::before, */
    .navbar::after {
        width: 60px;
    }

    /* Reset nav to normal stacked layout when hamburger is shown */
    .navbar .navbar-nav {
        position: static;
        width: auto;
        height: auto;
        transform: none;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .navbar .nav-item {
        flex: 0 0 auto;
        display: block;
        justify-content: unset;
        margin-left: 0 !important;
    }
    .navbar .nav-link {
        display: block;
        width: auto;
        height: auto;
        padding: 0.5rem 1rem;
    }

    /* .navbar::before {
        background: linear-gradient(
            45deg,
            transparent 0%,
            transparent 20%,
            #C1272D 20%,
            #C1272D 32%,
            transparent 32%,
            transparent 38%,
            #006A44 38%,
            #006A44 50%,
            transparent 50%,
            transparent 56%,
            #FDB913 56%,
            #FDB913 68%,
            transparent 68%,
            transparent 100%
        );
    } */
}

@media (max-width: 768px) {
    /* .navbar::before, */
    .navbar::after {
        width: 40px;
    }

    .hero-branding {
        gap: 15px;
    }
}

@media (max-width: 576px) {
    .navbar {
        padding-left: max(0.5rem, env(safe-area-inset-left, 0px));
        padding-right: max(0.5rem, env(safe-area-inset-right, 0px));
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar-brand img {
        height: 32px !important;
    }

    /* .navbar::before, */
    .navbar::after {
        display: none;
    }

    .hero {
        min-height: 82vh;
        min-height: 82svh;
    }

    .hero--event-text {
        min-height: 60vh;
        min-height: 60svh;
    }

    .hero-content {
        padding-bottom: 175px;
    }

    .hero--event-text .hero-content {
        padding-bottom: 95px;
    }

    .hero-logo-center {
        width: 60px;
        height: 60px;
    }
    .hero-title-slide h1 {
        font-size: 2rem !important;
    }
}

.btn-lynx {
    background: var(--lynx-orange);
    color: #000;
    border: none;
    transition: background 0.3s, color 0.3s;
}
.btn-lynx:hover {
    background: var(--lynx-orange-dark);
    color: #fff;
}

.stat-box {
    background: rgba(254, 213, 71, 0.1);
    border-left: 4px solid var(--lynx-orange);
}

.stat-box h3 { color: var(--lynx-orange); }

.stat-box-top-list {
    height: 100%;
}

.class-index-top-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.class-index-top-item {
    display: flex;
    gap: 12px;
    align-items: stretch !important;
    min-height: 74px;
}

.class-index-top-rank {
    flex: 0 0 62px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(254, 213, 71, 0.5);
    background: rgba(254, 213, 71, 0.08);
    color: var(--lynx-orange);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
    align-self: stretch;
}

.class-index-top-rank span {
    font-size: 1.35rem;
}

.class-index-top-rank small {
    color: #ddd;
    font-size: 0.64rem;
    font-weight: 600;
}

.class-index-top-main {
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 0;
}

.class-index-top-time {
    color: var(--lynx-orange);
    font-weight: 700;
    line-height: 1.2;
}

.class-index-top-time span {
    font-size: 0.9rem;
}

.class-index-top-driver,
.class-index-top-meta {
    font-size: 0.92rem;
    line-height: 1.35;
}

.class-index-top-meta {
    color: #bfbfbf;
}

.driver-list {
    margin-bottom: 0;
}

.driver-entry {
    margin-bottom: 8px;
}

.driver-link-btn {
    background: transparent;
    border: 0;
    color: var(--lynx-orange);
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    padding: 2px 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.driver-link-btn::before {
    content: '+';
    font-size: 0.85rem;
    line-height: 1;
    color: #ffd977;
}

.driver-link-btn:not(.collapsed)::before {
    content: '-';
}

.driver-link-btn:hover {
    color: #ffe28f;
}

.driver-link-btn:focus-visible {
    outline: 2px solid var(--lynx-orange);
    outline-offset: 2px;
    border-radius: 4px;
}

.driver-stats {
    margin-top: 4px;
    margin-left: 4px;
    padding: 8px 10px;
    border-left: 2px solid rgba(254, 213, 71, 0.4);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 0 6px 6px 0;
    color: #ddd;
    font-size: 0.9rem;
}

footer {
    background: #000;
    border-top: 3px solid var(--lynx-orange);
    color: #fff;
}

/* Carousel Styling */
#postsCarousel {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.carousel-image {
    height: 500px;
    object-fit: cover;
    filter: brightness(0.7);
}

.carousel-no-image {
    height: 500px;
    background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.carousel-no-image-text {
    color: #999;
    font-size: 1.5rem;
    font-weight: 500;
}

.carousel-caption {
    background: rgba(0, 0, 0, 0.7);
    padding: 20px 30px;
    border-radius: 0 0 12px 12px;
    bottom: 0;
    left: 0;
    right: 0;
    height: 220px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.carousel-caption h5 {
    color: var(--lynx-orange);
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.carousel-caption p {
    color: #ccc;
    font-size: 1rem;
    margin-bottom: 8px;
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-grow: 0;
    flex-shrink: 1;
}

.carousel-caption small {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.carousel-caption .btn {
    flex-shrink: 0;
    align-self: flex-start;
    z-index: 15;
}

.carousel-indicators {
    z-index: 5;
}

.carousel-indicators [data-bs-target] {
    background-color: rgba(255, 255, 255, 0.5);
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.carousel-indicators .active {
    background-color: var(--lynx-orange);
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: invert(1) brightness(2);
}

.carousel-control-prev,
.carousel-control-next {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
}

/* Modal Styling */
.modal-content {
    background: #1a1a1a;
    color: #fff;
    border: 1px solid #333;
}

.modal-with-image {
    overflow: hidden;
    border-radius: 12px;
}

.modal-image-header {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.modal-featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.modal-with-image .modal-image-header .btn-close {
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.7);
    padding: 8px;
    border-radius: 50%;
}

.modal-header {
    border-bottom: 1px solid #333;
    background: #1a1a1a;
    padding: 20px;
}

.modal-no-image .modal-header {
    border-bottom: 2px solid var(--lynx-orange);
}

.modal-title {
    color: var(--lynx-orange);
    font-weight: 700;
    font-size: 1.5rem;
}

.btn-close {
    filter: invert(1);
}

.modal-body {
    padding: 30px;
    line-height: 1.8;
    background: #1a1a1a;
}

.post-full-content {
    font-size: 1.1rem;
    color: #ccc;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.modal-with-image .post-full-content {
    background: linear-gradient(to bottom, rgba(26, 26, 26, 0), #1a1a1a);
}

.modal-no-image .post-full-content {
    font-size: 1.2rem;
    color: #e0e0e0;
}

.modal-footer {
    border-top: 1px solid #333;
    background: #1a1a1a;
}

.modal-footer .btn-secondary {
    background-color: #333;
    border-color: #333;
}

.modal-footer .btn-secondary:hover {
    background-color: #444;
    border-color: #444;
}

.text-muted {
    color: #777 !important;
}

/* Post Detail Page */
.post-page-card {
    max-width: 1080px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    padding: 24px;
}

.post-page-title {
    color: var(--lynx-orange);
    font-weight: 700;
    font-size: 2.2rem;
    line-height: 1.2;
}

.post-page-date {
    color: #c7c7c7;
}

.post-page-featured {
    margin-bottom: 20px;
}

.post-page-image-open {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: #111;
    color: #fff;
    cursor: zoom-in;
    overflow: hidden;
}

.post-page-image-open:focus-visible {
    outline: 3px solid var(--lynx-orange);
    outline-offset: 3px;
}

.post-page-image-open-label {
    position: absolute;
    right: 12px;
    bottom: 12px;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 0.88rem;
    font-weight: 700;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.post-page-image-open:hover .post-page-image-open-label,
.post-page-image-open:focus-visible .post-page-image-open-label {
    opacity: 1;
    transform: translateY(0);
}

.post-page-featured-image {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: block;
}

.post-page-content {
    color: #f0f0f0;
    line-height: 1.75;
    font-size: 1.03rem;
    margin-bottom: 24px;
}

.post-page-content img {
    max-width: 100%;
    height: auto;
}

.post-page-gallery {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 18px;
}

.post-page-carousel-inner {
    border-radius: 10px;
    overflow: hidden;
}

.post-page-carousel-open {
    border-radius: 0;
}

.post-page-carousel-open .post-page-image-open-label {
    top: 12px;
    right: auto;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, 6px);
}

.post-page-carousel-open:hover .post-page-image-open-label,
.post-page-carousel-open:focus-visible .post-page-image-open-label {
    transform: translate(-50%, 0);
}

.post-page-carousel-image {
    width: 100%;
    max-height: 460px;
    object-fit: contain;
    background: #111;
}

.post-page-thumb-btn {
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
    cursor: pointer;
}

.post-page-thumb {
    width: 100%;
    height: 90px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.post-image-lightbox .modal-content {
    background: #0d0f12;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.post-image-lightbox .modal-header,
.post-image-lightbox .modal-footer {
    border-color: rgba(255, 255, 255, 0.12);
}

.post-image-lightbox .modal-title {
    max-width: calc(100vw - 96px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.post-image-lightbox .modal-body {
    position: relative;
    min-height: min(72vh, 760px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 68px;
    background: #050607;
}

.post-lightbox-image {
    display: block;
    max-width: 100%;
    max-height: 78vh;
    object-fit: contain;
    border-radius: 8px;
}

.post-lightbox-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 64px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.62);
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.post-lightbox-control:focus-visible {
    outline: 3px solid var(--lynx-orange);
    outline-offset: 3px;
}

.post-lightbox-control--prev {
    left: 12px;
}

.post-lightbox-control--next {
    right: 12px;
}

.post-lightbox-count {
    width: 100%;
    text-align: center;
    color: #d4d4d4;
    font-weight: 700;
}

/* Sponsors Section */
.sponsors-section {
    background: #303030;
    overflow: hidden;
    padding: 25px 0;
}

.sponsors-section-title {
    text-align: center;
    color: var(--lynx-orange);
    font-weight: 700;
    margin: 0 auto 25px;
    font-size: 2rem;
    width: 100%;
}

/* Sponsors Ribbon - Big (Premium Sponsors) */
.sponsors-ribbon-big {
    margin-bottom: 25px;
    padding: 15px 0;
    border-top: 2px solid var(--lynx-orange);
    border-bottom: 2px solid var(--lynx-orange);
}

.sponsors-container-big {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding: 8px 20px;
}

.sponsors-content-big {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 20px;
}

.sponsor-item-big {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    border-radius: 12px;
    border: 1px solid rgba(254, 213, 71);
    padding: 15px;
    min-width: 130px;
    max-width: 160px;
    overflow: visible;
    transition: transform 0.3s ease, background 0.3s ease;
    flex-shrink: 1;
}



.sponsor-item-big:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.05);
}

.sponsor-link.sponsor-item-big:hover .sponsor-logo {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Featured Sponsors (stand out in same row) */
.sponsor-featured {
    border: 3px solid var(--lynx-orange);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    background: linear-gradient(135deg, rgba(254, 213, 71, 0.05) 0%, rgba(229, 90, 36, 0.05) 100%);
}

.sponsor-featured:hover {
    border-color: var(--lynx-orange-dark);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
    transform: translateY(-8px);
}

.sponsor-link.sponsor-featured:hover .sponsor-logo {
    filter: brightness(1.3);
    transform: scale(1.05);
}

.sponsor-featured .sponsor-name {
    font-weight: 600;
}

/* Sponsors Ribbon - Small (Scrolling Sponsors) */
.sponsors-ribbon-small {
    margin-bottom: 0;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 165, 0, 0.3);
}

.sponsors-container-small {
    width: 100%;
    overflow: hidden;
    padding: 0 20px;
    position: relative;
}

.sponsors-container-small.has-scroll {
    /* Mask fade effect for smooth scrolling edges */
    -webkit-mask-image: linear-gradient(to right, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,1) 5%, 
        rgba(0,0,0,1) 95%, 
        rgba(0,0,0,0) 100%);
    mask-image: linear-gradient(to right, 
        rgba(0,0,0,0) 0%, 
        rgba(0,0,0,1) 5%, 
        rgba(0,0,0,1) 95%, 
        rgba(0,0,0,0) 100%);
}

.sponsors-content-small {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 8px 0;
    flex-wrap: nowrap;
    /* Will be animated by JavaScript when needed */
}

.sponsors-container-small.has-scroll .sponsors-content-small {
    justify-content: flex-start;
}

.sponsor-item-small {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    text-align: center;
    border-radius: 8px;
    padding: 8px;
    min-width: 110px;
    transition: transform 0.3s ease, background 0.3s ease;
    flex-shrink: 0;
    border: 0.5px solid rgba(254, 213, 71);
}

.sponsor-item-small:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.05);
}

.sponsor-link.sponsor-item-small:hover .sponsor-logo {
    filter: brightness(1.2);
}

.sponsor-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.sponsor-link:hover {
    color: inherit;
    text-decoration: none;
}

.sponsor-logo {
    max-width: 100px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: brightness(0.9);
    transition: filter 0.3s ease, transform 0.3s ease;
}

.sponsor-name {
    color: #fff;
    font-size: 0.75rem;
    font-weight: 500;
    text-align: center;
    margin: 0;
    padding-top: 5px;
    line-height: 1.3;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    min-height: 2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Mobile Responsive Carousel */
@media (max-width: 768px) {
    .carousel-image {
        height: 350px;
    }
    
    .carousel-no-image {
        height: 350px;
    }
    
    .carousel-caption {
        min-height: 180px;
        height: auto;
        padding: 15px 20px;
    }
    
    .carousel-caption h5 {
        font-size: 1.25rem;
        margin-bottom: 6px;
    }
    
    .carousel-caption p {
        font-size: 0.85rem;
        margin-bottom: 6px;
        line-clamp: 2;
        -webkit-line-clamp: 2;
    }
    
    .carousel-caption small {
        font-size: 0.75rem;
        margin-bottom: 8px;
    }
    
    .carousel-caption .btn {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
    
    .carousel-control-prev,
    .carousel-control-next {
        width: 15%;
    }
    
    .carousel-indicators {
        bottom: 8px;
    }

    #postsCarousel .carousel-indicators {
        top: 12px;
        bottom: auto;
        margin-top: 0;
        margin-bottom: 0;
    }

    #postsCarousel .carousel-caption {
        padding-bottom: 18px;
    }

    .sponsors-section {
        padding: 20px 0;
    }

    .sponsors-section-title {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }

    .sponsor-item-big {
        min-width: 100px;
        max-width: 125px;
        padding: 10px;
    }

    .sponsor-item-big .sponsor-logo {
        width: 100%;
        max-width: 100%;
        height: auto !important;
        max-height: 42px !important;
        object-fit: contain;
    }

    .sponsor-featured {
        border-width: 2.5px;
        box-shadow: 0 6px 14px rgba(0, 0, 0, 0.25);
    }

    .sponsor-item-small {
        min-width: 85px;
        padding: 6px;
    }

    .sponsor-name {
        font-size: 0.65rem;
    }

    .post-page-card {
        padding: 16px;
    }

    .post-page-title {
        font-size: 1.75rem;
    }

    .post-page-featured-image {
        max-height: 220px;
    }

    .post-page-carousel-image {
        max-height: 280px;
    }

    .post-page-thumb {
        height: 72px;
    }

    .post-page-image-open-label {
        opacity: 1;
        transform: none;
        right: 8px;
        bottom: 8px;
        font-size: 0.8rem;
    }

    .post-page-carousel-open .post-page-image-open-label {
        top: 8px;
        right: auto;
        bottom: auto;
        left: 50%;
        transform: translateX(-50%);
    }

    .post-image-lightbox .modal-content {
        min-height: 100svh;
        border: 0;
        border-radius: 0;
    }

    .post-image-lightbox .modal-body {
        min-height: calc(100svh - 116px);
        padding: 8px 0;
    }

    .post-lightbox-image {
        max-height: calc(100svh - 138px);
        border-radius: 0;
    }

    .post-lightbox-control {
        width: 46px;
        height: 58px;
        font-size: 2.6rem;
        background: rgba(0, 0, 0, 0.52);
    }

    .post-lightbox-control--prev {
        left: 6px;
    }

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

/* Extra small devices (phones) */
@media (max-width: 576px) {
    .sponsors-content-big {
        gap: 12px;
    }

    .sponsor-item-big {
        min-width: 70px;
        max-width: 95px;
        padding: 8px;
    }

    .sponsor-item-big .sponsor-logo {
        max-height: 34px !important;
    }

    .sponsor-featured {
        border-width: 2px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.22);
    }

    .sponsor-item-big:hover {
        transform: translateY(-3px);
    }

    .sponsor-featured:hover {
        transform: translateY(-4px);
    }

    .sponsor-name {
        font-size: 0.6rem;
        min-height: 1.8em;
    }
}

/* Very small devices */
@media (max-width: 480px) {
    .sponsors-ribbon-big {
        padding: 12px 0;
    }

    .sponsors-container-big {
        padding: 8px 10px;
    }

    .sponsors-content-big {
        gap: 8px;
    }

    .sponsor-item-big {
        min-width: 55px;
        max-width: 75px;
        padding: 6px;
    }

    .sponsor-item-big .sponsor-logo {
        max-height: 28px !important;
    }

    .sponsor-featured {
        border-width: 1.75px;
    }

    .sponsor-name {
        font-size: 0.55rem;
        min-height: 1.6em;
        padding-top: 3px;
    }
}
