/* TeamUp Design System Implementation */
:root {
    /* Color Palette from brand.json */
    --background: #e6eff1;
    --text-primary: #040335;
    --text-secondary: #666;
    --primary: #075f74;
    --secondary: #679485;
    --accent-red: #ed4d35;
    --accent-orange: #ee9a22;
    --accent-light: #d4eee5;
    
    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-subheading: 'Columbia-Serial', sans-serif;
    --font-body: 'Avenir', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;
    
    /* Border radius */
    --border-radius: 8px;
    --border-radius-lg: 12px;
}

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

/* Persistent Header */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.teamup-logo {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary, #333);
    margin: 0;
}

/* Adjust body to account for fixed header */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
    background: var(--background, #f8f9fa);
    color: var(--text-primary, #333);
    line-height: 1.6;
    padding-top: 80px; /* Space for fixed header */
}

/* Main Container */
.video-container {
    max-width: 1600px;
    padding: var(--spacing-sm) var(--spacing-lg); /* Reduced top/bottom padding */
    height: 100vh; /* Fixed height instead of min-height */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribute space evenly */
    align-items: center;
}

/* Header */
.video-header {
    text-align: center;
    margin: 0; /* No margin needed with space-between */
    padding-top: var(--spacing-lg); /* Add space above h1 */
}

.video-title {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 32px;
    color: var(--text);
    margin-bottom: var(--spacing-sm);
}

/* Main Navigation */
.main-nav {
    margin-top: var(--spacing-md);
}

.nav-link {
    display: inline-block;
    background: var(--primary);
    color: white;
    text-decoration: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-link:hover {
    background: var(--secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(103, 148, 133, 0.3);
}

/* Video Player Section */
.video-player-section {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center; /* Center within its space */
    width: 100%;
    max-width: 64vw; /* 20% smaller than 80vw (80% * 0.8 = 64%) */
    min-height: 400px; /* Ensure minimum height */
    margin: auto 0; /* Center vertically in remaining space */
}

/* Ensure Vimeo iframe takes full width and height */
.video-wrapper iframe {
    width: 100% !important;
    height: 100% !important;
    position: absolute;
    top: 0;
    left: 0;
    border: none;
    border-radius: var(--border-radius-lg);
}

/* Ensure video wrapper has proper dimensions */
.video-wrapper {
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    position: relative;
    background: white;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(7, 95, 116, 0.1);
}

/* Video Placeholder (temporary) */
.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--accent-light), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-content {
    text-align: center;
    color: var(--text);
}

.placeholder-icon {
    font-size: 48px;
    color: var(--primary);
    margin-bottom: var(--spacing-sm);
    opacity: 0.7;
}

.placeholder-text {
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 20px;
    margin-bottom: var(--spacing-xs);
}

.placeholder-subtext {
    font-family: var(--font-body);
    font-size: 14px;
    opacity: 0.8;
}

/* Footer */
.video-footer {
    text-align: center;
    margin: 0; /* No margin needed with space-between */
    padding-bottom: var(--spacing-lg); /* Add space below button */
}

/* Logo and Header Styles */
.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: flex-start;
    text-align: left;
}

.teamup-logo {
    height: 40px;
    width: auto;
}

.site-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* Update button styles to use title case */
.back-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    text-transform: none; /* Remove all caps */
}

.back-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 95, 116, 0.3);
}

.back-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(7, 95, 116, 0.2);
}

.back-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Update other button styles */
.nav-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none; /* Remove all caps */
}

.nav-button:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 95, 116, 0.3);
}

.nav-button:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.retry-button {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: var(--border-radius-md);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none; /* Remove all caps */
}

.retry-button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(7, 95, 116, 0.3);
}

.retry-button:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .video-container {
        padding: var(--spacing-md);
        gap: var(--spacing-lg);
    }
    
    .video-title {
        font-size: 24px;
    }
    
    .video-player-section {
        max-width: 95vw; /* Almost full width on tablets */
    }
    
    .video-wrapper {
        max-width: 100%;
    }
    
    .placeholder-icon {
        font-size: 36px;
    }
    
    .placeholder-text {
        font-size: 18px;
    }
    
    .back-button {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .video-container {
        padding: var(--spacing-sm);
        gap: var(--spacing-md);
    }
    
    .video-title {
        font-size: 20px;
    }
    
    .video-player-section {
        max-width: 95vw; /* Almost full width on mobile */
    }
    
    .placeholder-icon {
        font-size: 32px;
    }
    
    .placeholder-text {
        font-size: 16px;
    }
    
    .placeholder-subtext {
        font-size: 12px;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .back-button {
        transition: none;
    }
    
    .back-button:hover {
        transform: none;
    }
}

/* Focus states for accessibility */
.back-button:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .video-wrapper {
        border: 2px solid var(--text);
    }
    
    .back-button {
        border: 2px solid var(--text);
    }
}

/* Loading and Error States */
.loading-content,
.error-content {
    text-align: center;
    color: var(--text);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--accent-light);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--spacing-sm);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-icon {
    font-size: 48px;
    color: var(--accent-red);
    margin-bottom: var(--spacing-sm);
}

.error-text {
    font-family: var(--font-body);
    font-size: 16px;
    margin-bottom: var(--spacing-md);
    color: var(--text);
}

.retry-button {
    background-color: var(--primary);
    color: white;
    border: none;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    font-family: var(--font-subheading);
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.retry-button:hover {
    background-color: var(--secondary);
    transform: translateY(-1px);
}

.retry-button:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
} 