/* ============================================
   Layout Improvements CSS
   - Utility buttons styling
   - Hero visual improvements
   - Mobile menu enhancements
   - Accessibility improvements
   ============================================ */

/* Utility Buttons Container */
.utility-buttons {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.utility-btn {
    pointer-events: auto;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: #fff;
    color: #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.utility-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.utility-btn:active {
    transform: translateY(0);
}

.utility-btn.scroll-top-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

/* Dark mode styles for utility buttons */
[data-theme="dark"] .utility-btn {
    background: #2d3748;
    color: #e2e8f0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .utility-btn.scroll-top-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Hero Visual Badge */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 16px 32px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
    animation: float 3s ease-in-out infinite;
}

.badge-icon {
    font-size: 1.5rem;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Mobile Menu Enhancements */
.mobile-menu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    z-index: 9998;
    padding: 20px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
}

.mobile-menu.active {
    display: block;
}

.mobile-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.mobile-nav-list li {
    margin-bottom: 8px;
}

.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #f7fafc;
    color: #667eea;
}

/* Dark mode mobile menu */
[data-theme="dark"] .mobile-menu {
    background: #2d3748;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .mobile-nav-link {
    color: #e2e8f0;
}

[data-theme="dark"] .mobile-nav-link:hover,
[data-theme="dark"] .mobile-nav-link.active {
    background: #4a5568;
    color: #667eea;
}

/* Mobile menu toggle button animations */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

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

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

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

[data-theme="dark"] .mobile-menu-toggle span {
    background: #e2e8f0;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Screen reader only content */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Footer Legal Links */
.legal-links {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 8px;
    font-size: 0.9rem;
}

.legal-links a {
    color: inherit;
    text-decoration: none;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.legal-links a:hover {
    opacity: 1;
    text-decoration: underline;
}

.disclaimer {
    font-size: 0.9rem;
    opacity: 0.7;
}

/* Stats Compact Layout */
.stats-compact {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.stats-compact span {
    font-size: 0.9rem;
    padding: 4px 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .utility-buttons {
        bottom: 16px;
        right: 16px;
        gap: 8px;
    }
    
    .utility-btn {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    
    .hero-badge {
        padding: 12px 24px;
        font-size: 0.95rem;
    }
    
    .badge-icon {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .utility-buttons {
        bottom: 12px;
        right: 12px;
    }
    
    .utility-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* Focus visible for accessibility */
.utility-btn:focus-visible,
.mobile-nav-link:focus-visible,
.legal-links a:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, color 0.3s ease;
}
