/* Cantiere Specific Styles */
body {
    overflow-y: auto;
    /* Enable vertical scrolling */
    overflow-x: hidden;
    height: auto;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.cantiere-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    padding-bottom: 4rem;
}

/* Hero Section */
.hero-section {
    height: 100vh;
    height: 100dvh;
    /* Optimize for mobile browsers with dynamic bars */
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('assets/cantiere/cantiere_bckg.png');
    background-size: cover;
    background-position: center;
    z-index: -1;
    filter: brightness(0.6);
    transform: scale(1.1);
    animation: slowZoom 20s infinite alternate linear;
}

@keyframes slowZoom {
    0% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1.2);
    }
}

.hero-logo {
    max-width: 80%;
    width: 300px;
    height: auto;
    filter: drop-shadow(0 0 20px rgba(255, 201, 71, 0.3));
    /* Goldish glow */
    opacity: 0;
    transform: scale(0.8);
    animation: logoReveal 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards 0.5s;
}

@keyframes logoReveal {
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0;
    animation: fadeIn 1s ease-out forwards 2s;
}

.mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 4px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollWheel 2s infinite;
}

@keyframes scrollWheel {
    0% {
        top: 6px;
        opacity: 1;
    }

    100% {
        top: 20px;
        opacity: 0;
    }
}

@keyframes fadeIn {
    to {
        opacity: 0.7;
    }
}

/* Info Section */
.info-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
    text-align: center;
}

.glass-card-large {
    background: rgba(20, 18, 24, 0.7);
    /* Darker glass for readability */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 32px;
    padding: 48px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.highlight-text {
    background: linear-gradient(135deg, #FFC107, #FF9800);
    /* Construction colors */
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 700;
}

.description-text {
    font-size: 1.1rem;
    /* body-large */
    line-height: 1.6;
    margin: 1.5rem 0;
    color: var(--md-sys-color-on-background);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    margin: 2rem 0;
}

/* Gallery Section */
.gallery-section {
    padding: 4rem 2rem;
    overflow: hidden;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
    font: var(--md-sys-typescale-headline-large);
}

.screenshots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    perspective: 1000px;
}

.screenshot-container {
    position: relative;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: transform 0.4s var(--md-sys-motion-easing-emphasized), box-shadow 0.4s;
    border: 4px solid #332D41;
    /* Dark bezel */
}

/* Staggered animation classes added via JS intersection observer or simple CSS delays if static */
.screenshot-container:nth-child(2n) {
    transform: translateY(40px);
}

.screenshot-container:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(255, 193, 7, 0.15);
    /* Warm glow on hover */
    z-index: 10;
    /* Reset the stagger lift slightly on hover if needed, allowing individual control */
}

.screenshot-container:nth-child(2n):hover {
    transform: translateY(30px) scale(1.02);
}

.app-screenshot {
    width: 100%;
    height: auto;
    display: block;
}

/* Call to Action */
.cta-section {
    text-align: center;
    padding: 6rem 2rem;
}

.back-home {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 3rem;
    color: var(--md-sys-color-primary);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.back-home:hover {
    opacity: 0.8;
}

/* Media Queries */
@media (max-width: 768px) {
    .hero-logo {
        width: 180px;
        /* Slightly smaller for mobile */
        max-width: 60%;
    }

    .info-section {
        margin: 2rem auto;
        /* Less vertical space */
        padding: 0 1.5rem;
    }

    .screenshots-grid {
        gap: 24px;
        /* Tighter gap for mobile */
    }

    .screenshot-container:nth-child(2n) {
        transform: none;
    }

    .screenshot-container:hover,
    .screenshot-container:nth-child(2n):hover {
        transform: scale(1.02);
    }

    .glass-card-large {
        padding: 24px 20px;
    }

    .scroll-indicator {
        bottom: 80px;
        /* Move up slightly to avoid bottom navigation bars overlapping */
    }
}