/* Lucas Salomons */
/* CSS Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Bootstrap variabelen overschreven en uitgebreid */
:root {
    /* Bootstrap kleuren aangepast voor dark theme */
    --bs-primary: #2d1b3d;
    --bs-secondary: #3d2a4d;
    --bs-dark: #4a3a5a;
    
    /* Eigen kleuren toegevoegd aan Bootstrap systeem */
    --accent-orange: #ff6b00;     
    --accent-red: #ff3b30;
    --accent-blue: #00b3cc;
    --text-white: #ffffff;
    --text-gray: #e5e5e7;
    --text-muted: #c4c4c6;       
    --border-color: rgba(255, 255, 255, 0.2);
    
    /* Custom spacing systeem bovenop Bootstrap */
    --spacing-xs: 8px;
    --spacing-sm: 12px;
    --spacing-md: 16px;
    --spacing-lg: 20px;
    
    /* Eigen font scale die (hopelijk) werkt met Bootstrap */
    --fs-xs: 14px;               
    --fs-sm: 16px;               
    --fs-md: 18px;               
    --fs-lg: 20px;               
    --fs-xl: 22px;               
    --fs-xxl: 28px;              
}

/* Bootstrap breakpoints gebruikt voor responsive variabelen */
@media (min-width: 576px) {
    :root {
        --spacing-sm: 14px;
        --spacing-md: 18px;
        --spacing-lg: 22px;
        --fs-sm: 17px;
        --fs-md: 19px;
        --fs-lg: 21px;
        --fs-xxl: 30px;
    }
}

@media (min-width: 768px) {
    :root {
        --spacing-sm: 16px;
        --spacing-md: 20px;
        --spacing-lg: 24px;
        --fs-sm: 18px;
        --fs-md: 20px;
        --fs-lg: 22px;
        --fs-xxl: 34px;
    }
}

@media (min-width: 992px) {
    :root {
        --spacing-lg: 28px;
        --fs-xxl: 36px;
    }
}

/* Basis body styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background-color: var(--bs-primary);
    color: var(--text-white);
    line-height: 1.5;                    
    font-size: var(--fs-sm);            
    -webkit-text-size-adjust: 100%;
}

/* Skip link voor accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--accent-orange);
    color: var(--text-white);
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    z-index: 1000;
}

.skip-link:focus {
    top: 6px;
}

/* Bootstrap container-fluid doorontwikkeld */
.container-fluid {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    /* Custom max-width bovenop Bootstrap responsive container */
    max-width: 480px;
    margin: 0 auto;
}

/* Bootstrap breakpoints gebruikt voor custom container sizing */
@media (min-width: 768px) {
    .container-fluid {
        max-width: 600px;
    }
}

@media (min-width: 992px) {
    .container-fluid {
        max-width: 700px;
    }
}

/* Bootstrap btn class uitgebreid met eigen styling */
.btn,
.back-btn,
.settings-btn {
    /* Bootstrap btn basis behouden */
    background-color: var(--bs-secondary);
    color: var(--text-white);
    font-size: var(--fs-sm);
    padding: var(--spacing-sm) var(--spacing-md);    
    border-radius: 8px;
    border: none;
    /* Eigen touch-friendly sizing toegevoegd */
    min-width: 48px;                                 
    min-height: 48px;                                
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: pointer;
}

/* Custom hover states voor Bootstrap buttons */
.btn:hover,
.back-btn:hover,
.settings-btn:hover {
    background-color: var(--bs-dark);
    color: var(--text-white);
    text-decoration: none;
}

/* Verbeterde focus voor interactieve elementen - SCRIPT REFERENTIE */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
    box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.3);
}

/* Eigen button variant bovenop Bootstrap systeem */
.btn-orange,
.play-btn {
    background-color: var(--accent-orange);
    font-weight: 600;
    font-size: var(--fs-sm);                         
    padding: var(--spacing-sm) var(--spacing-md);
    cursor: pointer;
}

/* Custom hover voor oranje buttons */
.btn-orange:hover,
.play-btn:hover {
    background-color: #e65e00;
    transform: scale(1.02);
    color: var(--text-white);
    text-decoration: none;
}

/* Bootstrap card component uitgebreid */
.card,
.tutorial-card {
    /* Bootstrap card basis behouden */
    background-color: var(--bs-dark);
    border: 2px solid transparent;
    padding: var(--spacing-sm);
    gap: var(--spacing-sm);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    border-radius: 10px;
    align-items: flex-start;
}

/* Custom hover effect voor cards */
.card:hover,
.tutorial-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    border-color: var(--accent-orange);
}

/* Bootstrap card-body doorontwikkeld */
.card-body,
.tutorial-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Custom typography bovenop Bootstrap */
.card-title,
.tutorial-title {
    font-size: var(--fs-md);
    font-weight: 600;
    margin: 0 0 8px 0;
    line-height: 1.4;
    color: var(--text-white);
    /* Responsive text handling toegevoegd */
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Bootstrap card-text uitgebreid */
.card-text,
.tutorial-description {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    overflow-wrap: break-word;
    word-wrap: break-word;
    hyphens: auto;
}

/* Bootstrap nav component doorontwikkeld */
.nav,
.nav-tabs-custom {
    border-bottom: 1px solid var(--border-color);
}

/* Bootstrap nav-link styling aangepast */
.nav-link,
.tab-link {
    color: var(--text-muted);
    font-size: var(--fs-sm);
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-xs);
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
    text-decoration: none;
}

/* Custom hover voor nav links */
.nav-link:hover,
.tab-link:hover {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.05);
    text-decoration: none;
}

/* Bootstrap active state aangepast */
.nav-link.active,
.tab-link.active {
    color: var(--text-white);
    border-bottom-color: var(--accent-orange);
}

/* Eigen page header component */
.page-header {
    padding: var(--spacing-sm) var(--spacing-md);
    flex-shrink: 0;
}

/* Typography hierarchy */
.page-title {
    font-size: var(--fs-xxl);
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
}

/* Custom welkomst sectie */
.welcome-section {
    padding: 0 var(--spacing-md) var(--spacing-lg);
}

/* Welkomst card gebaseerd op Bootstrap card */
.welcome-card {
    background-color: var(--bs-secondary);
    border-radius: 10px;
    padding: var(--spacing-md);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Welkomst tekst styling */
.welcome-text {
    font-size: var(--fs-lg);
    font-weight: 500;
    margin: 0;
    line-height: 1.4;
}

/* Bootstrap flex utilities gebruikt */
.main-menu {
    flex: 1;
    padding: 0 var(--spacing-md);
}

/* Menu links met Bootstrap-achtige styling */
.menu-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-lg) var(--spacing-md);
    border-radius: 10px;
    color: var(--text-white);
    font-size: var(--fs-lg);
    font-weight: 600;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    min-height: 70px;
    text-align: center;
    line-height: 1.3;
    text-decoration: none;
}

/* Hover effects */
.menu-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    color: var(--text-white);
    text-decoration: none;
}

/* Focus management voor custom links - SCRIPT REFERENTIE */
.menu-link:focus,
.tutorial-card-link:focus,
.bottom-nav-link:focus {
    outline: 3px solid #ffd700;
    outline-offset: 2px;
    transform: translateY(-1px);
}

/* Color variants zoals Bootstrap */
.play-game { 
    background-color: var(--accent-orange); 
}

.relevant-media { 
    background-color: var(--accent-red); 
}

.progress { 
    background-color: var(--accent-blue); 
}

/* Custom navigation component */
.tab-navigation {
    padding: 0 var(--spacing-md) var(--spacing-sm);
    flex-shrink: 0;
}

/* Main content area met Bootstrap flex */
.tutorials-content {
    flex: 1;
    padding: var(--spacing-md);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Video thumbnails */
.tutorial-thumbnail,
.video-thumbnail {
    position: relative;
    flex-shrink: 0;
    width: 180px;
    height: 135px;
    border-radius: 6px;
    overflow: hidden;
}

/* Responsive afbeeldingen */
.thumbnail-img {
    width: 100%;
    height: 100%;
    border-radius: 6px;
    object-fit: cover;
}

/* Video duur badge */
.video-duration {
    position: absolute;
    bottom: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.9);
    color: var(--text-white);
    font-size: var(--fs-xs);
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 3px;
}

/* Play button component */
.play-btn {
    font-size: var(--fs-sm);
    padding: var(--spacing-sm) var(--spacing-md);
    min-width: 140px;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Cards geforceerd naar verticale layout */
.card,
.tutorial-card {
    background-color: var(--bs-dark);
    border: 2px solid transparent;
    padding: var(--spacing-lg);
    gap: var(--spacing-md);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    border-radius: 10px;
    /* Bootstrap flex utilities overschreven */
    flex-direction: column !important;
    align-items: center;
    text-align: center;
}

/* Tutorial info component */
.tutorial-info {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--spacing-xs) 0;
}

/* Footer navigation */
.bottom-nav {
    background-color: var(--bs-secondary);
    padding: var(--spacing-xs) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

/* Footer links met Bootstrap approach */
.bottom-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--text-gray);
    font-size: var(--fs-xs);
    padding: var(--spacing-xs) 4px;
    border-radius: 6px;
    transition: color 0.2s;
    min-height: 44px;
    text-decoration: none;
}

/* Footer hover states */
.bottom-nav-link:hover {
    color: var(--text-white);
    background-color: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* Footer text */
.nav-text {
    font-size: var(--fs-xs);
    line-height: 1.2;
    margin-top: 2px;
}

/* Link reset */
.video-link,
.tutorial-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.video-link:hover,
.tutorial-card-link:hover {
    text-decoration: none;
    color: inherit;
}

/* Accessibility helper class */
.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Focus management */
*:focus {
    outline: 2px solid #ffd700;
    outline-offset: 2px;
}

/* Bootstrap responsive breakpoints gebruikt */
@media (max-width: 768px) {
    .tutorial-thumbnail,
    .video-thumbnail {
        width: 140px;
        height: 105px;
    }
    
    .card,
    .tutorial-card {
        padding: var(--spacing-sm);
        gap: var(--spacing-sm);
    }
    
    .play-btn {
        font-size: var(--fs-xs);
        min-width: 120px;
    }
}

/* Desktop responsive styling */
@media (min-width: 769px) {
    .tutorial-thumbnail,
    .video-thumbnail {
        width: 200px;
        height: 150px;
    }
    
    .play-btn {
        font-size: var(--fs-md);
        min-width: 160px;
    }
}

/* Bootstrap responsive pattern gevolgd */
@media (min-width: 768px) {
    .welcome-text {
        font-size: var(--fs-xl);
    }
    
    .card-title,
    .tutorial-title {
        font-size: var(--fs-lg);
        margin-bottom: 8px;
    }
    
    .card-text,
    .tutorial-description {
        font-size: var(--fs-md);
        line-height: 1.5;
    }
}

@media (min-width: 992px) {
    .page-title {
        font-size: 34px;
    }
    
    .menu-link {
        font-size: var(--fs-xl);
        min-height: 80px;
    }
    
    .card-title,
    .tutorial-title {
        font-size: var(--fs-xl);
    }
    
    .card-text,
    .tutorial-description {
        font-size: var(--fs-lg);
    }
    
    .play-btn,
    .btn-orange {
        font-size: var(--fs-sm);
        padding: 10px 16px;
    }
}

/* Accessibility preference support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
    }
}