/* ===================================================
   Control Productions - Single Page Layout CSS
   ================================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Page Sections */
.page-section {
    position: relative;
    width: 100%;
    min-height: auto;
    scroll-margin-top: 80px; /* Account for fixed topbar */
}

/* Ensure content is above background overlays */
.page-section > * {
    position: relative;
    z-index: 1;
}

/* Home Section - Full Height */
.home-section {
    min-height: 100vh;
    height: 100vh;
}

.home-section #home-container {
    height: 100%;
}

/* Other Sections - Content Height */
.about-section,
.why-us-section,
.events-section,
.testimonials-section,
.contact-section {
    min-height: auto;
    padding: 4rem 0;
}

/* Section Background Support (for future background images) */
.page-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* When section has background image */
.page-section[data-bg]::before {
    opacity: 1;
    background-image: var(--section-bg);
}

/* Content overlay (dark layer above background image for readability) */
.page-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 0;
    pointer-events: none;
    transition: background-color 0.3s ease;
}

/* When section has background image - apply content overlay */
.page-section[data-bg]::after {
    background-color: var(--content-overlay, rgba(0, 0, 0, 0.5));
}

/* Active Link in Navigation */
.nav-menu a.active {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
    position: relative;
}

.nav-menu a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* Mobile Menu Link Active */
.mobile-nav a.active {
    color: var(--primary-color) !important;
    font-weight: 700 !important;
}

/* Section Animation - Initial State */
.page-section:not(.home-section) {
    opacity: 0;
    transform: translateY(50px);
}

/* Section Animation - Loaded State */
.page-section.section-visible {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Home section is always visible */
.home-section {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .page-section {
        scroll-margin-top: 60px;
    }

    .about-section,
    .why-us-section,
    .events-section,
    .testimonials-section,
    .contact-section {
        padding: 3rem 0;
    }
}
