/* BP Cup Bootstrap Theme */

:root {
    --bpcup-primary: #0453a5;
    --bpcup-primary-dark: #033a7d;
    --bpcup-secondary: #1f2937;
    --bpcup-light: #f8fafc;
    --bpcup-border: #d1d5db;
}

/* Reset and base styles */
html {
    scroll-behavior: smooth;
}

body {
    background-color: transparent;
    color: var(--bpcup-secondary);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.9rem;
}

/* Fixed viewport background image behind all content */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: url('/site/assets/files/images/2023 Sopot 2 Kacper.jpg');
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
}

/* Optional readability tint above background image */
body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    /* background: rgba(255, 255, 255, 0.28); */
    pointer-events: none;
}

/* Links */
a {
    color: var(--bpcup-primary);
    text-decoration: none;
}

a:hover {
    color: var(--bpcup-primary-dark);
    text-decoration: underline;
}

/* Frontend edit shortcut for users with edit access */
.front-edit-link {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1100;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background-color: var(--bpcup-primary);
    color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    text-decoration: none;
}

.front-edit-link:hover {
    color: #fff;
    background-color: var(--bpcup-primary-dark);
    text-decoration: none;
}

/* Colorbox overrides */
#cboxOverlay {
    background: rgba(15, 23, 42, 0.72);
}

#colorbox,
#cboxWrapper,
#cboxContent,
#cboxLoadedContent {
    border-radius: 14px;
}

#cboxWrapper {
    overflow: visible;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

#cboxLoadedContent {
    border: 0;
    background: #fff;
}

#cboxLoadedContent img {
    border-radius: 10px;
}

#cboxPrevious,
#cboxNext,
#cboxClose {
    background-image: none !important;
    background: rgba(4, 83, 165, 0.92) !important;
    color: #fff !important;
    width: 36px !important;
    height: 36px !important;
    border-radius: 50%;
    border: 0;
    text-indent: 0 !important;
    font-size: 0;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease;
}

#cboxClose {
    position: absolute !important;
    top: 10px !important;
    right: 10px !important;
}

#cboxPrevious,
#cboxNext {
    position: absolute !important;
    top: 50% !important;
    transform: translateY(-50%);
}

#cboxPrevious {
    left: 10px !important;
}

#cboxNext {
    right: 10px !important;
}

#cboxPrevious:hover,
#cboxNext:hover,
#cboxClose:hover {
    background: rgba(3, 58, 125, 0.95) !important;
}

#cboxPrevious::before,
#cboxNext::before,
#cboxClose::before {
    font-size: 20px;
    line-height: 1;
    color: #fff;
}

#cboxPrevious::before {
    content: "\2039";
}

#cboxNext::before {
    content: "\203A";
}

#cboxClose::before {
    content: "\00D7";
}

/* Header */
.site-header {
    background: #53b7ff;
    position: sticky;
    top: 0;
    z-index: 1000;
    isolation: isolate;
    border-bottom: 2px solid var(--bpcup-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 0.5rem;
    transition: box-shadow 0.2s ease;
}

.site-header::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('/site/assets/files/images/clouds.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.7; /* Adjust opacity as needed */
    pointer-events: none;
}

.navbar {
    padding: 0.9rem 0;
    transition: padding 0.2s ease;
}

.site-header .navbar,
.site-header .navbar.bg-light {
    background-color: transparent !important;
    position: relative;
    z-index: 1;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem !important;
    color: var(--bpcup-primary) !important;
    font-weight: 700;
    transition: font-size 0.2s ease;
}

.navbar-brand-logo {
    display: block;
    height: 60px;
    width: auto;
    transition: height 0.2s ease;
}

.navbar-brand-year {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1;
}

.navbar-brand:hover {
    color: var(--bpcup-primary-dark) !important;
}

.navbar-nav .nav-link {
    color: var(--bpcup-secondary) !important;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0.5rem 0.95rem !important;
    margin: 0 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

body.is-scrolled .site-header {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

body.is-scrolled .navbar {
    padding: 0.4rem 0;
}

body.is-scrolled .navbar-brand {
    font-size: 1.05rem !important;
}

body.is-scrolled .navbar-brand-logo {
    height: 38px;
}

body.is-scrolled .navbar-nav .nav-link {
    font-size: 0.84rem;
    padding: 0.35rem 0.7rem !important;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--bpcup-primary) !important;
    background-color: rgba(4, 83, 165, 0.1);
}

.dropdown-menu {
    border: 1px solid var(--bpcup-border);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    z-index: 1000;
}

.dropdown-item {
    color: var(--bpcup-secondary);
    transition: all 0.2s ease;
}

.dropdown-item:hover,
.dropdown-item.active {
    background-color: rgba(4, 83, 165, 0.1);
    color: var(--bpcup-primary);
}

.nav-item.dropdown {
    position: relative;
}

@media (min-width: 992px) {
    .nav-item.dropdown:hover > .dropdown-menu {
        display: block;
    }
}

/* Main content */
.site-content {
    flex: 1;
    width: 100%;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.site-content {
    background: transparent;
}

.reveal-panel {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(2px);
}

.site-content.py-4 {
    padding-top: 0 !important;
}

.container {
    max-width: 1000px;
}

/* Page content */
.page-content,
.home-content,
.sponsors-content {
    padding: 1rem 2rem 2rem;
    width: 100%;
    background: transparent;
}

.home-content {
    background: #fff;
}

.page-content {
    background: #fff;
}

.sponsors-content {
    background: #fff;
}

/* Headings */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--bpcup-secondary);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2rem;
    border-bottom: 3px solid var(--bpcup-primary);
    padding-bottom: 1rem;
}

h2 {
    font-size: 1.75rem;
    color: var(--bpcup-primary);
}

h3 {
    font-size: 1.25rem;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
    padding-left: 2rem;
}

li {
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

/* Home page specific */
.home-intro {
    background: linear-gradient(135deg, rgba(4, 83, 165, 0.05) 0%, rgba(4, 83, 165, 0.02) 100%);
    padding: 2.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
}

.home-intro h2 {
    margin-top: 0;
    color: var(--bpcup-primary);
    font-size: 2rem;
}

.home-notice {
    margin: 0 0 1.5rem;
    padding: 1rem 1.2rem;
    border-radius: 10px;
    border: 2px solid #f59e0b;
    background: linear-gradient(135deg, #fff9db 0%, #fff3c4 100%);
    box-shadow: 0 8px 18px rgba(245, 158, 11, 0.2);
}

.home-notice-title {
    margin: 0 0 0.5rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(146, 64, 14, 0.25);
    color: #92400e;
    font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

.home-notice-content {
    color: #7c2d12;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.55;
}

.home-notice-content > :last-child {
    margin-bottom: 0;
}

.home-slideshow {
    position: relative;
    margin-bottom: 2rem;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(4, 83, 165, 0.15);
    box-shadow: 0 12px 24px rgba(3, 58, 125, 0.16);
    background: #0f172a;
}

.home-slideshow-track {
    position: relative;
    aspect-ratio: 1400 / 640;
    width: 100%;
    min-height: 220px;
    max-height: 520px;
    overflow: hidden;
}

.home-slide {
    position: absolute;
    inset: 0;
    height: 100%;
    opacity: 0;
    transform: translate3d(0, 12px, 0) scale(1.01);
    transition: opacity 1.3s ease, transform 1.2s ease;
    pointer-events: none;
}

.home-slide.is-active {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    pointer-events: auto;
    z-index: 1;
}

.home-slide-media,
.home-slide-media:hover {
    display: block;
    text-decoration: none;
    height: 100%;
}

.home-slide-image {
    display: block;
    width: 100% !important;
    max-width: none !important;
    max-height: none !important;
    height: 100%;
    object-fit: cover;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    float: none !important;
    margin: 0 !important;
}

.home-slide-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem 1.25rem;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.74), rgba(2, 6, 23, 0));
    color: #fff;
}

.home-slide.is-active .home-slide-caption {
    animation: homeSlideCaptionIn 0.7s ease both;
}

.home-slide-caption h3 {
    margin: 0;
    color: #fff;
    font-size: clamp(1.05rem, 2.2vw, 1.45rem);
}

.home-slide-caption p {
    margin: 0.35rem 0 0;
    font-size: 0.95rem;
    line-height: 1.4;
}

.home-slideshow-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    color: #fff;
    background: rgba(2, 6, 23, 0.56);
    transition: background-color 0.2s ease;
}

.home-slideshow-control:hover,
.home-slideshow-control:focus-visible {
    background: rgba(2, 6, 23, 0.82);
}

.home-slideshow-control.prev {
    left: 0.65rem;
}

.home-slideshow-control.next {
    right: 0.65rem;
}

.home-slideshow-indicators {
    position: absolute;
    left: 50%;
    bottom: 0.75rem;
    transform: translateX(-50%);
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.home-slideshow-indicator {
    width: 10px;
    height: 10px;
    border: 0;
    border-radius: 50%;
    padding: 0;
    background: rgba(255, 255, 255, 0.56);
}

.home-slideshow-indicator.is-active {
    background: #fff;
    transform: scale(1.2);
}

@keyframes homeSlideCaptionIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-slide,
    .home-slideshow-control,
    .home-slideshow-indicator,
    .home-slide.is-active .home-slide-caption {
        transition: none;
        animation: none;
    }
}

.highlight {
    background-color: #fef08a;
    padding: 1rem;
    border-radius: 4px;
    font-weight: 500;
    color: #78350f;
    margin: 1rem 0;
}

.home-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .home-intro {
    padding: 0;
    }

    .home-notice {
        margin: 0 0 1rem;
        padding: 0.85rem 0.95rem;
    }

    .home-notice-content {
        font-size: 0.95rem;
    }

    .home-slideshow-track {
        aspect-ratio: 16 / 9;
        min-height: 140px;
        max-height: 260px;
    }

    .home-slide-caption {
        padding: 0.8rem 0.9rem;
    }

    .home-slide-caption p {
        font-size: 0.85rem;
    }

    .home-slideshow-control {
        width: 36px;
        height: 36px;
    }

    .home-columns {
        grid-template-columns: 1fr;
    }
}

.home-copy {
    line-height: 1.8;
}

.home-copy p {
    margin-bottom: 1rem;
}

.home-media {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#content img {
    width: 100%;
    max-width: 400px;
    max-height: min(60vh, 420px);
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

#content img:hover {
    transform: scale(1.02);
}

/* Content image defaults */
/* Default wrap for unaligned images in body content */
#content img:not(.home-slide-image):not(.align_left):not(.align-left):not(.left):not(.page-image-left):not(.align_right):not(.align-right):not(.right):not(.page-image-right):not([style*="float"]) {
    float: left;
    width: auto;
    max-width: min(45%, 250px);
    margin: 0.35rem 1.25rem 0.9rem 0;
}

/* Let text flow around explicitly aligned images */
#content img.align_left,
#content img.align-left,
#content img.left,
#content img.page-image-left,
#content img[style*="float: left"] {
    float: left;
    width: auto;
    max-width: min(45%, 360px);
    margin: 0.35rem 1.25rem 0.9rem 0;
}

#content img.align_right,
#content img.align-right,
#content img.right,
#content img.page-image-right,
#content img[style*="float: right"] {
    float: right;
    width: auto;
    max-width: min(45%, 360px);
    margin: 0.35rem 0 0.9rem 1.25rem;
}

#content {
    display: flow-root;
    width: min(1240px, calc(100% - 2.5rem));
    margin: 0 auto;
}

/* Social links */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin: 2rem 0;
    padding: 1.5rem 0;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: var(--bpcup-primary);
    color: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.social-links a:hover {
    background-color: var(--bpcup-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(4, 83, 165, 0.3);
    text-decoration: none;
}

.social-links img {
    width: 32px;
    height: 32px;
}

/* Call to action */
.enter-now {
    text-align: center;
    margin: 2rem 0;
}

.enter-now a {
    display: inline-block;
    padding: 1rem 2rem;
    background-color: var(--bpcup-primary);
    color: white;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.enter-now a:hover {
    background-color: var(--bpcup-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(4, 83, 165, 0.3);
    text-decoration: none;
}

/* Buttons */
.btn-primary {
    background-color: var(--bpcup-primary);
    border-color: var(--bpcup-primary);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: var(--bpcup-primary-dark);
    border-color: var(--bpcup-primary-dark);
}

/* Sponsors gallery */
.sponsor-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.sponsor-card {
    display: flex;
    transition: all 0.3s ease;
    text-align: center;
}

.sponsor-card:hover {
    opacity: 0.8;
}

.sponsor-card a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    /* min-height: 210px; */
    transition: all 0.2s ease;
    color: inherit;
}

.sponsor-card img {
    display: block;
    max-width: 100%;
    height: auto;
    max-height: 250px;
    object-fit: contain;
}

.sponsor-card a:hover {
    text-decoration: none;
    opacity: 0.7;
}

/* Intro section */
.sponsors-intro {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid var(--bpcup-border);
}

/* Footer */
.site-footer {
    background-color: var(--bpcup-secondary);
    color: #ffffff;
    border-top: 3px solid var(--bpcup-primary);
    margin-top: auto;
    width: 100%;
    font-size: 0.8rem;
}

.site-footer a {
    color: #ffffff;
    font-weight: 600;
    transition: all 0.2s ease;
}

.site-footer a:hover {
    color: var(--bpcup-primary);
    text-decoration: none;
}

.site-footer .social-links {
    justify-content: flex-end;
}

.site-footer .social-links a {
    background-color: rgba(255, 255, 255, 0.15);
    color: white;
    width: 40px;
    height: 40px;
    font-size: 1rem;
}

.site-footer .social-links a:hover {
    background-color: var(--bpcup-primary);
    color: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body::before {
        background-repeat: no-repeat;
        background-size: cover;
        background-position: center top;
    }

    .site-header {
        margin-bottom: 1rem;
    }

    .navbar-brand {
        font-size: 1rem !important;
    }

    .navbar-brand-logo {
        height: 34px;
    }

    .navbar-brand-year {
        font-size: 0.95rem;
    }

    .navbar-nav .nav-link {
        font-size: 0.85rem;
    }

    .page-content,
    .home-content,
    .sponsors-content {
        padding: 1.5rem;
    }

    #content {
        width: min(1240px, calc(100% - 1.5rem));
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    .sponsor-gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }

    .site-footer .col-md-4 {
        text-align: start !important;
        margin-top: 1rem;
    }
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

table thead {
    background-color: var(--bpcup-primary);
    color: white;
}

table th {
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
}

table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--bpcup-border);
}

table tbody tr:hover {
    background-color: rgba(4, 83, 165, 0.05);
}

/* Cards */
.card {
    border: 1px solid var(--bpcup-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background-color: rgba(4, 83, 165, 0.1);
    border-bottom: 2px solid var(--bpcup-primary);
    font-weight: 600;
    color: var(--bpcup-primary);
}

.page-summary-item .card-body.no-read-more {
    padding-bottom: 0.75rem;
}

.page-summary-item .card-body.no-read-more .card-text,
.page-summary-item .card-body.no-read-more .card-text > :last-child {
    margin-bottom: 0 !important;
}

/* Alerts */
.alert-info {
    background-color: rgba(4, 83, 165, 0.1);
    border: 1px solid var(--bpcup-primary);
    color: var(--bpcup-secondary);
}

.alert-info strong {
    color: var(--bpcup-primary);
}

/* Form controls */
.form-control:focus {
    border-color: var(--bpcup-primary);
    box-shadow: 0 0 0 0.2rem rgba(4, 83, 165, 0.25);
}

.form-check-input:checked {
    background-color: var(--bpcup-primary);
    border-color: var(--bpcup-primary);
}

.form-check-input:focus {
    border-color: var(--bpcup-primary);
    box-shadow: 0 0 0 0.2rem rgba(4, 83, 165, 0.25);
}
