/* Base styles */
body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: rgba(255, 165, 0, 0.9); /* Orange background to avoid flashes */
}

h1, h2 {
    margin: 0;
    padding: 0;
    text-transform: uppercase;
}

p {
    margin: 1em 0;
}

a {
    text-decoration: none;
    color: white;
    font-weight: bold;
    border-radius: 5px;
    padding: 8px 12px;
    box-shadow: inset 0 2px 5px rgba(255, 255, 255, 0.3), /* Indented bevel */
                0 0 10px rgba(255, 255, 255, 0.2); /* Subtle outer glow */
    transition: all 0.3s ease-in-out; /* Smooth transitions */
}

a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 3px rgba(255, 255, 255, 0.5), /* Lower bevel */
                0 0 15px rgba(255, 255, 255, 0.5); /* Stronger outer glow */
}

a:active {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.8), /* Even lower bevel */
                0 0 20px 5px rgba(255, 255, 255, 0.7), /* Larger glow */
                0 0 30px 10px rgba(255, 165, 0, 0.5); /* Pulsating orange glow */
    animation: pulse-glow 1s infinite ease-in-out; /* Pulsating glow */
}

/* Pulsating Glow Animation */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.8),
                    0 0 20px 5px rgba(255, 255, 255, 0.7),
                    0 0 30px 10px rgba(255, 165, 0, 0.5);
    }
    50% {
        box-shadow: inset 0 0 1px rgba(255, 255, 255, 0.8),
                    0 0 25px 10px rgba(255, 255, 255, 0.9),
                    0 0 35px 15px rgba(255, 165, 0, 0.7);
    }
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    font-size: 24px;
    color: white;
    background: none;
    border: none;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: auto; /* Automatically adjust height based on content */
    min-height: 26vh; /* Ensure a minimum height for consistency */
    background: url('./img/hero-section.jpg') center/cover no-repeat;
    display: flex;
    flex-direction: column; /* Allow content to stack */
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-top: 58px; /* Overlap control */
    padding: 20px 10px; /* Add padding for better spacing */
    overflow: hidden;
}

.hero-overlay {
    backdrop-filter: blur(10px) brightness(0.8);
    background: rgba(255, 165, 0, 0.3); /* Semi-transparent orange */
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.5); /* Subtle glow */
}

.hero-overlay h1 {
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); /* Subtle shadow for visibility */
    font-size: 3rem;
}

.hero-overlay p {
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); /* Matches heading */
    font-size: 1.5rem;
    margin-top: 10px;
}

/* Base styles for sections */
.content-section {
    position: relative;
    height: 100vh; /* Full viewport height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    overflow: hidden;
    padding: 20px;
    box-sizing: border-box;
}

/* Content container for text with frosted orange effect */
.content-container {
    z-index: 2; /* Keep the content above the background */
    max-width: 800px;
    margin: auto;
    text-align: left;
    position: relative;
    backdrop-filter: blur(10px) brightness(0.8); /* Frosted effect */
    background: rgba(255, 165, 0, 0.3); /* Semi-transparent orange background */
    padding: 20px;
    border-radius: 10px; /* Rounded edges */
    box-shadow: 0 0 20px rgba(255, 165, 0, 0.5); /* Subtle glow around the container */
}

.content-container h2 {
    margin-bottom: 20px;
    font-size: 2.5rem;
    text-transform: uppercase;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7); /* Text shadow for better visibility */
}

.content-container p,
.content-container ul,
.content-container ol {
    font-size: 1.2rem;
    line-height: 1.6;
    color: white;
    text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.7);
}

/* Parallax background */
.content-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 150%; /* Ensure a larger background for smooth scrolling */
    background-attachment: fixed; /* Creates parallax effect */
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    z-index: 1; /* Keep the background behind the text and overlay */
    transform: translateY(0);
}

/* Specific backgrounds for each section */
#what-we-do::before {
    background-image: url('./img/what-we-do.jpg');
}

#how-it-works::before {
    background-image: url('./img/how-it-works.jpg');
}

#why-storizzi::before {
    background-image: url('./img/why-storizzi.jpg');
}

#contact-us::before {
    background-image: url('./img/contact-us.jpg');
}

/* Footer */
.footer-section {
    text-align: center;
    padding: 20px;
    background: rgba(255, 165, 0, 0.8);
    color: white;
}

/* Parallax for larger screens only */
@media (min-width: 768px) {
    .content-section::before {
        transform: translateY(calc(-20px * var(--scroll-speed)));
    }
}

@media (max-width: 768px) {

    .menu-toggle {
        display: block; /* Show menu toggle in mobile view */
        z-index: 1100; /* Ensure toggle stays above the menu */
    }

    .hero-section {
        height: auto; /* Let height adjust with content */
        min-height: 30vh; /* Reduce minimum height for mobile */
        margin-top: 58px; /* Adjust overlap for smaller screens */
        padding: 30px 10px;
    }

    .hero-overlay h1 {
        font-size: 2rem; /* Smaller font size for mobile */
    }

    .hero-overlay p {
        font-size: 1.2rem; /* Smaller font size for mobile */
    }

    .content-container h2 {
        font-size: 2rem;
        margin-bottom: 15px;
    }

    .content-container p,
    .content-container ul,
    .content-container ol {
        font-size: 1rem;
        line-height: 1.4;
    }
}