/* ====================================
   Resetowanie i Zmienne CSS
   ==================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #006C78;
    --primary-dark: #004F56;
    --primary-light: #E5F3F4;
    --white: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border-color: #E1E8ED;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Nunito', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
    overflow-x: hidden;
}

/* ====================================
   Layout Główny
   ==================================== */
.container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* ====================================
   Sidebar / Menu
   ==================================== */
.sidebar {
    width: 320px;
    background-color: var(--white);
    border-right: 2px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
}

.sidebar.minimized {
    width: 60px;
}

.sidebar-header {
    padding: 24px;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar-logo {
    max-width: 180px;
    height: auto;
    transition: var(--transition);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.toggle-sidebar {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    color: var(--primary-color);
    transition: var(--transition);
    font-size: 20px;
    font-weight: bold;
    position: relative;
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}

.toggle-sidebar:hover {
    color: var(--primary-dark);
    transform: scale(1.1);
}

.arrow {
    display: inline-block;
    transition: var(--transition);
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.arrow-right {
    display: none;
}

.sidebar.minimized .sidebar-logo {
    display: none;
}

.sidebar.minimized .sidebar-header {
    justify-content: center;
    padding: 16px 8px;
}

.sidebar.minimized .arrow-left {
    display: none;
}

.sidebar.minimized .arrow-right {
    display: inline-block;
}

.sidebar.minimized .video-title,
.sidebar.minimized .watched-dot,
.sidebar.minimized .sidebar-footer {
    display: none;
}

/* Lista filmów */
.video-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.video-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.video-item {
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.video-item a {
    display: flex;
    align-items: center;
    padding: 16px 24px;
    text-decoration: none;
    color: var(--text-dark);
    transition: var(--transition);
    position: relative;
}

.video-item a:hover {
    background-color: var(--primary-light);
}

.video-item.active {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary-color);
}

.video-item.active a {
    font-weight: 700;
    padding-left: 20px;
}

.video-item.active .video-title {
    color: var(--primary-dark);
}

.watched-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--primary-color);
    margin-right: 12px;
    flex-shrink: 0;
}

.video-title {
    font-size: 18px;
    line-height: 1.4;
}

/* Stopka sidebaru */
.sidebar-footer {
    padding: 24px;
    border-top: 2px solid var(--border-color);
    background-color: var(--white);
}

.back-to-home {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: var(--transition);
}

.back-to-home:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ====================================
   Mobilny przycisk menu
   ==================================== */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    width: 50px;
    height: 50px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.mobile-menu-toggle:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-hover);
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ====================================
   Główna treść
   ==================================== */
.main-content {
    flex: 1;
    margin-left: 320px;
    padding: 40px;
    max-width: 1400px;
    transition: var(--transition);
}

.sidebar.minimized ~ .main-content {
    margin-left: 60px;
}

/* ====================================
   Strona Główna - Welcome Section
   ==================================== */
.welcome-section {
    max-width: 900px;
}

.welcome-section h1 {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 16px;
}

.intro-text {
    font-size: 18px;
    color: var(--text-light);
    margin-bottom: 40px;
    line-height: 1.8;
}

.stats {
    display: flex;
    gap: 32px;
    margin-bottom: 48px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 48px;
    font-weight: 700;
    color: var(--primary-color);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Szybki dostęp */
.quick-links {
    margin-top: 48px;
}

.quick-links h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.quick-link-card {
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 24px;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: var(--transition);
}

.quick-link-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-hover);
    transform: translateY(-4px);
}

.quick-link-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-light);
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.quick-link-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

/* ====================================
   Strona Video
   ==================================== */
.video-header {
    margin-bottom: 24px;
}

.video-main-title {
    font-size: 38px;
    font-weight: 900;
    color: var(--primary-color);
    line-height: 1.3;
    margin: 0;
}

/* Video Player Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.fullscreen-btn {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: rgba(0, 0, 0, 0.6);
    border: none;
    border-radius: 8px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--white);
    transition: var(--transition);
    z-index: 10;
}

.fullscreen-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

.video-container:fullscreen {
    padding-bottom: 0;
}

.video-container:fullscreen iframe {
    width: 100vw;
    height: 100vh;
}

/* Prelegenci */
.speakers-section {
    margin-bottom: 40px;
}

.speakers-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 24px;
}

.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 24px;
}

.speaker-card {
    text-align: center;
}

.speaker-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--primary-light);
    transition: var(--transition);
}

.speaker-card:hover .speaker-photo {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.speaker-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.speaker-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 4px;
}

.speaker-position {
    font-size: 13px;
    color: var(--text-light);
    line-height: 1.4;
}

/* Streszczenie */
.summary-section {
    margin-bottom: 40px;
}

.summary-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.summary-text {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text-dark);
}

/* Materiały */
.materials-section {
    margin-bottom: 40px;
}

.materials-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 16px;
}

.materials-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    background-color: var(--primary-color);
    color: var(--white);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: var(--transition);
}

.materials-link:hover {
    background-color: var(--primary-dark);
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

/* Nawigacja video */
.video-navigation {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 2px solid var(--border-color);
}

.nav-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background-color: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    transition: var(--transition);
    flex: 1;
    max-width: 400px;
}

.nav-btn:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.prev-btn {
    justify-content: flex-start;
}

.next-btn {
    justify-content: flex-end;
    margin-left: auto;
}

.nav-btn svg {
    flex-shrink: 0;
    color: var(--primary-color);
}

.nav-btn-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-btn-label {
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-btn-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
}

/* ====================================
   Responsive Design
   ==================================== */

/* Tablet */
@media (max-width: 1024px) {
    .sidebar {
        width: 280px;
    }
    
    .main-content {
        margin-left: 280px;
        padding: 32px;
    }
    
    .sidebar.minimized ~ .main-content {
        margin-left: 60px;
    }
    
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 20px;
    }
    
    .quick-links-grid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

/* Mobile */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding: 80px 20px 32px;
    }
    
    .sidebar.minimized ~ .main-content {
        margin-left: 0;
    }
    
    .welcome-section h1 {
        font-size: 28px;
    }
    
    .intro-text {
        font-size: 16px;
    }
    
    .stats {
        flex-direction: column;
        gap: 24px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .quick-links-grid {
        grid-template-columns: 1fr;
    }
    
    .video-main-title {
        font-size: 22px;
    }
    
    .speakers-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 16px;
    }
    
    .speaker-photo {
        width: 100px;
        height: 100px;
    }
    
    .video-navigation {
        flex-direction: column;
    }
    
    .nav-btn {
        max-width: 100%;
    }
    
    .next-btn {
        margin-left: 0;
    }
    
    .fullscreen-btn {
        width: 40px;
        height: 40px;
        top: 12px;
        right: 12px;
    }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
    .main-content {
        padding: 80px 16px 24px;
    }
    
    .welcome-section h1 {
        font-size: 24px;
    }
    
    .speakers-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .speaker-photo {
        width: 80px;
        height: 80px;
    }
    
    .speaker-name {
        font-size: 14px;
    }
    
    .speaker-position {
        font-size: 12px;
    }
}

/* ====================================
   Scrollbar Custom
   ==================================== */
.sidebar::-webkit-scrollbar,
.video-list::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.video-list::-webkit-scrollbar-track {
    background: var(--white);
}

.sidebar::-webkit-scrollbar-thumb,
.video-list::-webkit-scrollbar-thumb {
    background: var(--primary-light);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.video-list::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

/* ====================================
   Animacje
   ==================================== */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.welcome-section,
.video-header,
.video-container,
.speakers-section,
.summary-section,
.materials-section {
    animation: slideIn 0.5s ease;
}

/* Print Styles */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .video-navigation,
    .fullscreen-btn {
        display: none;
    }
    
    .main-content {
        margin-left: 0;
    }
}

/* Modal biogramu */
.bio-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.3s ease;
}

.bio-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.bio-modal-content {
    background-color: #FFFFFF;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 108, 120, 0.3);
    animation: slideUp 0.3s ease;
    position: relative;
}

.bio-modal-header {
    background: linear-gradient(135deg, #006C78 0%, #004F56 100%);
    padding: 30px;
    border-radius: 12px 12px 0 0;
    color: white;
    text-align: center;
}

.bio-modal-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.bio-modal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.bio-modal-name {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.bio-modal-position {
    font-size: 16px;
    opacity: 0.95;
    font-weight: 400;
    margin: 0;
}

.bio-modal-body {
    padding: 30px;
}

.bio-modal-body h3 {
    color: #006C78;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
}

.bio-modal-body p {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
    text-align: justify;
}

.bio-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    color: white;
    font-size: 24px;
    line-height: 1;
}

.bio-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Animacje */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Kursor wskaźnika na zdjęciach prelegentów */
.speaker-photo {
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.speaker-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 108, 120, 0.3);
}

.speaker-card {
    position: relative;
}

.speaker-card::after {
    content: "👁️ Zobacz biogram";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: #006C78;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.speaker-photo:hover + .speaker-info::before,
.speaker-card:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(-5px);
}

/* Responsive */
@media (max-width: 768px) {
    .bio-modal-content {
        width: 95%;
        max-height: 90vh;
    }
    
    .bio-modal-header {
        padding: 20px;
    }
    
    .bio-modal-photo {
        width: 100px;
        height: 100px;
    }
    
    .bio-modal-name {
        font-size: 20px;
    }
    
    .bio-modal-body {
        padding: 20px;
    }
}

.bio-modal-body p {
    color: #333;
    font-size: 15px;
    line-height: 1.7;
    margin: 0 0 15px 0;  /* Odstęp między paragrafami */
    text-align: justify;
}

.bio-modal-body p:last-child {
    margin-bottom: 0;  /* Usuń margines z ostatniego paragrafu */
}

/* Obsługa <br> */
.bio-modal-body br {
    line-height: 1.7;
}

/* Jeśli ktoś użyje list */
.bio-modal-body ul,
.bio-modal-body ol {
    margin: 10px 0 15px 20px;
    color: #333;
}

.bio-modal-body li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* Wyróżnienia */
.bio-modal-body strong,
.bio-modal-body b {
    color: #006C78;
    font-weight: 700;
}