/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1a1a1a;
    --secondary-color: #00d4ff;
    --accent-color: #e74c3c;
    --bg-light: #0d0d0d;
    --text-dark: #ffffff;
    --text-light: #b0b0b0;
    --border-color: #333333;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #000000 0%, #0d0d0d 100%);
    color: var(--text-dark);
    line-height: 1.6;
    padding-top: 120px;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Navigation Bar */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #00a8cc 0%, #00d4ff 100%);
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 212, 255, 0.3);
}

/* Centered logo: position absolute inside the fixed nav so it visually sits in the middle of the bar */
.logo-btn,
.logo-link {
    width: 140px;
    height: 140px;
    background: transparent; /* keep background transparent so colored logo looks correct */
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;

    /* center across the viewport */
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    z-index: 1100;
}

.logo-btn:hover,
.logo-link:hover {
    transform: translateX(-50%) scale(1.03);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.18);
}

/* Make the logo image scale nicely and remain fully visible */
.logo-btn img,
.logo-link img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    padding: 2px;
}

.nav-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
    flex: 1;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    gap: 15px;
}

.nav-right {
    display: flex;
    gap: 15px;
}

.nav-btn {
    padding: 12px 25px;
    background: rgba(255, 255, 255, 0.3);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.7);
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 120px;
    text-align: center;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-btn.active {
    background: rgba(255, 255, 255, 0.9);
    color: #00a8cc;
    border-color: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Language buttons: use uploaded images as backgrounds, keep the PL/GB characters in front */
.lang-btn {
    font-size: 1.5em;
    background: transparent; /* background-image applied per-language */
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.7);
    overflow: hidden;
    position: relative;
}

.lang-btn:hover {
    background-size: cover;
    transform: scale(1.06);
}

.lang-btn:focus {
    outline: 3px solid rgba(255,255,255,0.6);
    outline-offset: 2px;
}

/* Per-language background images (ensure these files are in repo root) */
.lang-btn[data-lang="pl"] {
    background-image: url('plbutton.png');
    background-size: cover;
    background-position: center;
}

.lang-btn[data-lang="en"] {
    background-image: url('gbbutton.png');
    background-size: cover;
    background-position: center;
}

.language-switcher {
    display: flex;
    gap: 10px;
    margin-left: auto;
    flex-shrink: 0;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.9);
    border-color: white;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
}

/* Main Content */
main {
    margin-bottom: 40px;
}

/* Page Headers */
header {
    text-align: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, #00a8cc 0%, #00d4ff 100%);
    color: white;
    border-radius: 10px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px rgba(0, 212, 255, 0.3);
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.1em;
    opacity: 0.95;
}

/* PDF Viewer & Content Grid */
.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
    align-items: start;
}

.pdf-viewer-section,
.main-content {
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 212, 255, 0.2);
    overflow: hidden;
    border: 2px solid #333333;
    padding: 20px;
}

.main-content {
    grid-column: 1 / -1;
    padding: 30px;
}

/* YouTube Videos Grid */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.video-card {
    background: #2a2a2a;
    border: 2px solid #333333;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
}

.video-iframe {
    width: 100%;
    height: 200px;
    border: none;
}

.video-title {
    padding: 15px;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.95em;
}

/* Programs Grid */
.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 20px;
}

.program-card {
    background: #2a2a2a;
    border: 2px solid #333333;
    border-radius: 10px;
    padding: 20px;
    transition: all 0.3s ease;
}

.program-card:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
    transform: translateY(-5px);
}

.program-title {
    color: var(--secondary-color);
    font-size: 1.3em;
    font-weight: 600;
    margin-bottom: 10px;
}

.program-description {
    color: var(--text-light);
    line-height: 1.6;
}

.program-image {
    width: 100%;
    height: 250px;
    background: #1a1a1a;
    border-radius: 8px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Shop Grid */
.shop-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shop-item {
    background: #2a2a2a;
    border: 2px solid #333333;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.shop-item:hover {
    border-color: var(--secondary-color);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.shop-image {
    width: 100%;
    height: 200px;
    background: #1a1a1a;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

.shop-content {
    padding: 15px;
}

.shop-title {
    color: var(--secondary-color);
    font-weight: 600;
    margin-bottom: 10px;
}

.shop-description {
    color: var(--text-light);
    font-size: 0.9em;
    margin-bottom: 15px;
}

.buy-btn {
    width: 100%;
    padding: 10px;
    background: var(--secondary-color);
    color: #000000;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.buy-btn:hover {
    background: #00b8e6;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

/* Reports List (from old design) */
.reports-list {
    background: #1a1a1a;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 212, 255, 0.2);
    padding: 25px;
    height: fit-content;
    position: sticky;
    top: 130px;
    border: 2px solid #333333;
}

.reports-list h2 {
    font-size: 1.3em;
    margin-bottom: 20px;
    color: var(--text-dark);
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 10px;
}

.reports {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.report-item {
    padding: 12px;
    background: #2a2a2a;
    border: 2px solid #333333;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.report-item:hover {
    background: #3a3a3a;
    border-color: var(--secondary-color);
    transform: translateX(5px);
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}

.report-title {
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 8px;
    word-break: break-word;
    font-size: 0.95em;
}

.report-actions {
    display: flex;
    gap: 8px;
}

.btn-download {
    flex: 1;
    padding: 6px 10px;
    background: var(--secondary-color);
    color: #000000;
    text-decoration: none;
    border-radius: 5px;
    font-size: 0.85em;
    text-align: center;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-download:hover {
    background: #00b8e6;
    box-shadow: 0 0 10px rgba(0, 212, 255, 0.5);
}

.no-reports {
    text-align: center;
    color: var(--text-light);
    padding: 20px;
    font-style: italic;
}

.placeholder,
.loading,
.error {
    text-align: center;
    color: var(--text-light);
    font-size: 1.1em;
}

.error {
    color: var(--accent-color);
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 30px;
    background: linear-gradient(135deg, #00a8cc 0%, #00d4ff 100%);
    color: white;
    border-radius: 10px;
    margin-top: 40px;
    box-shadow: 0 4px 6px rgba(0, 212, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 1024px) {
    nav {
        flex-wrap: wrap;
        gap: 10px;
    }

    .nav-buttons {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
        order: 3;
    }

    .nav-left, .nav-right {
        width: 100%;
        justify-content: center;
    }

    .language-switcher {
        margin-left: 0;
        order: 4;
        width: 100%;
        justify-content: center;
    }

    /* Reduce logo size on tablet */
    .logo-btn,
    .logo-link {
        width: 100px;
        height: 100px;
        position: relative;
        left: auto;
        transform: none;
        top: auto;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 100px;
    }

    nav {
        padding: 10px;
        flex-direction: column;
    }

    .logo-btn {
        width: 80px;
        height: 80px;
        position: relative;
        left: auto;
        transform: none;
        top: auto;
    }

    .nav-btn {
        padding: 10px 20px;
        font-size: 0.85em;
        min-width: 100px;
    }

    .content-wrapper {
        grid-template-columns: 1fr;
    }

    .reports-list {
        position: static;
        top: auto;
    }

    header h1 {
        font-size: 1.8em;
    }

    header p {
        font-size: 1em;
    }

    .videos-grid,
    .programs-grid,
    .shop-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 120px;
    }

    .container {
        padding: 10px;
    }

    .logo-btn,
    .logo-link {
        width: 60px;
        height: 60px;
        position: relative;
        left: auto;
        transform: none;
        top: auto;
    }

    nav {
        padding: 8px;
    }

    .nav-btn {
        padding: 8px 15px;
        font-size: 0.75em;
        min-width: 90px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .lang-btn {
        width: 60px;
        height: 60px;
    }

    .lang-btn {
        padding: 8px 15px;
        font-size: 0.75em;
        min-width: 90px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }

    .lang-btn {
        width: 40px;
        height: 40px;
    }
}
