﻿/* ============================================
   layout.css - App Container, Header, Navigation, Background
   ============================================ */

/* ============================================
   App Container & Background
   ============================================ */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
}

/* ============================================
   CSS-Only Background Slideshow (Fade Effect)
   5 images × 30 seconds each = 150s total cycle
   Faster fade transitions (2x speed)
   ============================================ */
.bg-fade {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    filter: blur(1px);
}

    /* Background images - use your local paths */
    .bg-fade:nth-child(1) {
        background-image: url('/images/backgrounds/bg1.webp');
        animation: bgFade 150s 0s infinite;
    }

    .bg-fade:nth-child(2) {
        background-image: url('/images/backgrounds/bg2.webp');
        animation: bgFade 150s 30s infinite;
    }

    .bg-fade:nth-child(3) {
        background-image: url('/images/backgrounds/bg3.webp');
        animation: bgFade 150s 60s infinite;
    }

    .bg-fade:nth-child(4) {
        background-image: url('/images/backgrounds/bg4.webp');
        animation: bgFade 150s 90s infinite;
    }

    .bg-fade:nth-child(5) {
        background-image: url('/images/backgrounds/bg5.webp');
        animation: bgFade 150s 120s infinite;
    }

    /* First image visible immediately on load */
    .bg-fade:nth-child(1) {
        opacity: 1;
    }

@keyframes bgFade {
    0% {
        opacity: 0;
    }

    5% {
        opacity: 1;
    }

    16% {
        opacity: 1;
    }

    20% {
        opacity: 0;
    }

    100% {
        opacity: 0;
    }
}

/* Transparent overlay - allows background image to show through */
.bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient( 180deg, rgba(0, 0, 0, 0.65) 0%, rgba(0, 0, 0, 0.65) 50%, rgba(0, 0, 0, 0.65) 100% );
    z-index: 10;
}

/* Reduced motion - disable animation for accessibility */
@media (prefers-reduced-motion: reduce) {
    .bg-fade {
        animation: none;
    }

        .bg-fade:nth-child(1) {
            opacity: 1;
        }

        .bg-fade:nth-child(2),
        .bg-fade:nth-child(3),
        .bg-fade:nth-child(4),
        .bg-fade:nth-child(5) {
            opacity: 0;
        }
}

/* ============================================
   Top Bar
   ============================================ */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--top-bar-height);
    background: var(--color-gradient);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 1000;
}

.top-bar-content {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 var(--spacing-lg);
    gap: var(--spacing-lg);
}

.top-bar-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: var(--font-size-xs);
}

    .top-bar-item a {
        color: var(--color-text);
        text-decoration: none;
        transition: opacity var(--transition-fast);
    }

        .top-bar-item a:hover {
            opacity: 0.8;
        }

    .top-bar-item svg {
        flex-shrink: 0;
    }

    .top-bar-item.whatsapp,
    .top-bar-item.instagram {
        margin-left: auto;
    }

    .top-bar-item.instagram {
        margin-left: var(--spacing-lg);
    }

/* ============================================
   Main Header - Solid Grey Style
   ============================================ */
.main-header {
    position: fixed;
    top: var(--top-bar-height);
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 999;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 2px solid;
    border-image: linear-gradient(to right, #3ea0e6, #f047ff) 1;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.header-content {
    max-width: var(--max-width);
    margin: 0 auto;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--spacing-lg);
}

.logo-link {
    display: flex;
    align-items: center;
}

.logo {
    height: 60px;
    width: auto;
    transition: transform var(--transition-base);
}

    .logo:hover {
        transform: scale(1.05);
    }

/* ============================================
   Desktop Navigation
   ============================================ */
.desktop-nav {
    display: none;
    gap: var(--spacing-xl);
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: var(--spacing-sm) var(--spacing-md);
    transition: color var(--transition-fast), background-color var(--transition-fast);
    position: relative;
    border-radius: 4px;
}

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 0;
        height: 2px;
        background: #e91e8c;
        transition: all var(--transition-base);
        transform: translateX(-50%);
    }

    .nav-link:hover::after,
    .nav-link.active::after {
        width: 100%;
    }

    .nav-link:hover {
        color: white;
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-link.active {
        color: #e91e8c;
    }

/* ============================================
   Mobile Menu Button
   ============================================ */
.mobile-menu-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: var(--spacing-sm);
    z-index: 1001;
}

.hamburger-line {
    width: 28px;
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    transition: all var(--transition-base);
}

.mobile-menu-btn:hover .hamburger-line {
    background: #ffffff;
}

/* ============================================
   Mobile Navigation - Solid Grey Style
   ============================================ */
.mobile-nav {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    max-width: 80vw;
    height: calc(100vh - var(--header-height));
    background: #2a2a2a;
    display: flex;
    flex-direction: column;
    padding: var(--spacing-xl);
    transition: right var(--transition-slow);
    z-index: 998;
    border-left: 1px solid #3a3a3a;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

    .mobile-nav.open {
        right: 0;
    }

    .mobile-nav .nav-link {
        padding: var(--spacing-md);
        border-bottom: 1px solid #3a3a3a;
        font-size: var(--font-size-lg);
        color: #e0e0e0;
        border-radius: 0;
    }

        .mobile-nav .nav-link::after {
            display: none;
        }

        .mobile-nav .nav-link:hover {
            background-color: rgba(255, 255, 255, 0.05);
            color: #ffffff;
        }

        .mobile-nav .nav-link.active {
            color: #e91e8c;
            background-color: rgba(233, 30, 140, 0.1);
        }

/* ============================================
   Main Content
   ============================================ */
main {
    flex: 1 0 auto;
}

.main-content {
    margin-top: var(--header-height);
    min-height: calc(100vh - var(--header-height));
    display: flex;
    flex-direction: column;
}

.content-wrapper {
    flex: 1;
    min-height: 60vh;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-xl) var(--spacing-lg);
    width: 100%;
}

.inner {
    max-width: 105em;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    padding-left: 3.5%;
    padding-right: 3.5%;
}

.page-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    padding: var(--spacing-xl) 0;
}

.page-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
    text-align: center;
    background: var(--color-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    outline: none;
}

.page-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-lg);
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.contentcontroll {
    padding-bottom: 200px;
    min-height: 100vh;
}

/* ============================================
   Responsive - Desktop
   ============================================ */
@media (min-width: 768px) {
    .desktop-nav {
        display: flex;
    }

    .mobile-menu-btn {
        display: none;
    }

    .mobile-nav {
        display: none;
    }

    .desktop-only {
        display: flex;
    }

    .page-title {
        font-size: var(--font-size-3xl);
    }

    .page-subtitle {
        font-size: var(--font-size-lg);
    }
}

@media (max-width: 767px) {
    .desktop-only {
        display: none !important;
    }

    .top-bar-content {
        padding: 0 var(--spacing-md);
        gap: var(--spacing-md);
    }

    .top-bar-item.email {
        margin-left: auto;
    }

    .header-content {
        padding: 0 var(--spacing-md);
    }

    .logo {
        height: 50px;
    }

    .content-wrapper {
        padding: var(--spacing-lg) var(--spacing-md);
    }

    /* Ensure all containers are properly constrained */
    * {
        max-width: 100%;
    }

    img {
        max-width: 100%;
        height: auto;
    }
}
