/* Critical CSS for above-the-fold content */
/* This file contains only the most critical styles for initial render */

/* Critical reset and base styles */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #333;
    color: #fff;
    overflow-x: hidden;
    line-height: 1.6;
}

.container {
    width: 100%;
    margin: 0;
    position: relative;
}

/* Critical header styles */
header {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    position: absolute;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: transparent;
}

.logo {
    height: 4vh;
    margin-left: 0.5vw;
}

nav {
    flex: 1;
    display: flex;
    justify-content: flex-end;
    margin-right: 0.5vw;
}

nav ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0.3vw 0.8vw;
    background-color: rgba(26, 26, 26, 0.8);
    border-radius: 0.3vw;
    backdrop-filter: blur(10px);
}

nav a {
    color: #fff;
    text-decoration: none;
    margin: 0 0.2vw;
    font-weight: 600;
    font-size: 1.2vw;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #00cc00;
}

/* Critical banner styles */
.banner {
    height: 70vh;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
    position: relative;
    text-align: center;
    width: 100%;
    padding: 0.3vh 0.3vw 0 0.3vw;
    gap: 0.2vw;
    z-index: 1;
}

.banner .image-section {
    flex: 1;
    background-size: cover;
    background-position: center;
    background-color: #444;
    transition: filter 0.3s ease;
    filter: grayscale(100%);
    border-radius: 0.8vw;
    position: relative;
}

.banner .image-section:hover {
    filter: none;
}

.banner .image1 { background-image: url('police.webp'); }
.banner .image2 { background-image: url('military.webp'); }
.banner .image3 { background-image: url('mafia.webp'); }
.banner .image4 { background-image: url('hand.webp'); }
.banner .image5 { background-image: url('doctor.webp'); }
.banner .image6 { background-image: url('criminal.webp'); }

.banner-button {
    font-size: 2.5vw;
    text-transform: uppercase;
    position: absolute;
    bottom: 8vh;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    white-space: normal;
    text-align: center;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
}

.arrow {
    position: absolute;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    font-size: 3rem;
    font-weight: 900;
    animation: bounce 1.5s infinite;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Performance optimizations */
.banner .image-section {
    will-change: filter;
    contain: layout style paint;
}

.banner-button {
    will-change: transform;
    contain: layout style;
}

.arrow {
    will-change: transform;
    contain: layout style;
}

/* Preload critical images */
.banner .image-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.banner .image-section:hover::before {
    opacity: 1;
}

/* Optimize animations */
@media (prefers-reduced-motion: reduce) {
    .arrow {
        animation: none;
    }
    
    .banner .image-section,
    .banner-button,
    .path-button {
        transition: none;
    }
}

/* Critical responsive styles */
@media (max-width: 768px) {
    .banner {
        height: 50vh;
        flex-direction: column;
        gap: 0.5vh;
    }
    
    .banner .image-section {
        height: 16.66%;
    }
    
    .banner-button {
        font-size: 3vw;
        bottom: 6vh;
    }
    
    .arrow {
        bottom: 1.5vh;
        font-size: 2.5rem;
    }
    
    nav a {
        font-size: 1rem;
    }
}

/* Font loading optimization */
@font-face {
    font-family: 'Segoe UI';
    font-display: swap;
}

/* Critical content visibility */
.banner,
header {
    content-visibility: auto;
    contain-intrinsic-size: 70vh auto;
}

/* Optimize paint and layout */
.banner .image-section {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce layout thrashing */
.banner-button,
.arrow {
    transform: translate3d(-50%, 0, 0);
    backface-visibility: hidden;
}

/* Optimize for mobile performance */
@media (max-width: 480px) {
    .banner {
        height: 40vh;
    }
    
    .banner-button {
        font-size: 4vw;
        bottom: 4vh;
    }
    
    .arrow {
        bottom: 1vh;
        font-size: 2.5rem;
    }
    
    nav ul {
        padding: 0.5rem;
    }
    
    nav a {
        font-size: 0.9rem;
        margin: 0 0.3rem;
    }
}

/* High DPI display optimizations */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .banner .image-section {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Print styles */
@media print {
    .banner,
    nav,
    .arrow {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
}

/* Focus styles for accessibility */
.banner-button:focus,
nav a:focus {
    outline: 2px solid #00cc00;
    outline-offset: 2px;
}

/* Loading state */
.banner.loading .image-section {
    background-color: #666;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Error state */
.banner .image-section.error {
    background-color: #444;
    background-image: none;
}

.banner .image-section.error::after {
    content: '⚠';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    color: #ff4444;
} 