/* ============================================================================
   LAYOUT MODULE - Mobile First Layout Components
   ============================================================================
   Contains: Mobile Menu Overlay, Floating Header, Hamburger Menu, Mobile Navigation
   ============================================================================ */

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 80, 22, 0.1);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Floating Header - Mobile First */
.floating-header {
    position: fixed;
    top: 20px;
    left: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.95) 0%, rgba(241, 245, 249, 0.95) 100%);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-medium);
    z-index: 1000;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    gap: 20px;
}

.header-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Desktop Navigation */
.desktop-nav {
    display: none;
    gap: 30px;
    align-items: center;
}

.desktop-nav-item {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: var(--border-radius-small);
    transition: all 0.3s ease;
    position: relative;
}

.desktop-nav-item:hover {
    color: var(--accent-green);
    background: rgba(45, 80, 22, 0.1);
    transform: translateY(-1px);
}

.desktop-nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--accent-green);
    transition: width 0.3s ease;
}

.desktop-nav-item:hover::after {
    width: 80%;
}

.commercial-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--accent-green), var(--light-green));
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: var(--border-radius-small);
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(45, 80, 22, 0.2);
    white-space: nowrap;
}

.commercial-btn:hover {
    background: linear-gradient(135deg, var(--primary-green), var(--accent-green));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(45, 80, 22, 0.3);
}

.commercial-btn .tv-icon {
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .commercial-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        gap: 6px;
    }

    .commercial-btn .tv-icon {
        width: 16px;
        height: 16px;
    }

    .commercial-btn span {
        display: none;
    }
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-facebook-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4267B2;
    transition: all 0.3s ease;
    padding: 8px;
}

.header-facebook-icon:hover {
    color: #365899;
    transform: translateY(-2px);
}

.logo-burst {
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.star-bg {
    font-size: 2rem;
}

.star-bg img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.hollywood {
    font-family: 'Fredoka', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    letter-spacing: -0.5px;
}

.snack {
    font-family: 'Fredoka', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--accent-green);
    margin-top: -2px;
}

/* Hamburger Menu */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: var(--border-radius-small);
    transition: background 0.3s ease;
    position: relative;
    width: 40px;
    height: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.menu-toggle:hover {
    background: rgba(45, 80, 22, 0.1);
}

.menu-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--primary-green);
    border-radius: 2px;
    transition: all 0.3s ease;
    position: absolute;
}

.menu-toggle span:nth-child(1) {
    top: 12px;
}

.menu-toggle span:nth-child(2) {
    top: 18.5px;
}

.menu-toggle span:nth-child(3) {
    top: 25px;
}

.menu-toggle.active span:nth-child(1) {
    top: 18.5px;
    transform: rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    top: 18.5px;
    transform: rotate(-45deg);
}

/* Mobile Navigation */
.mobile-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(45, 80, 22, 0.25);
    padding: 20px;
    margin-top: 10px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    transform: translateY(-20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 2px solid rgba(45, 80, 22, 0.1);
    z-index: 1001;
}

.mobile-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 15px 50px rgba(45, 80, 22, 0.3);
}

.nav-item {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 600;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(45, 80, 22, 0.15);
    transition: all 0.3s ease;
    text-align: center;
    border-radius: var(--border-radius-small);
    margin-bottom: 6px;
    background: rgba(45, 80, 22, 0.02);
}

.nav-item:hover {
    color: var(--accent-green);
    background: rgba(45, 80, 22, 0.08);
    transform: translateX(5px);
    border-bottom-color: var(--accent-green);
}

.nav-item:last-child,
.facebook-nav {
    border-bottom: 1px solid rgba(45, 80, 22, 0.15);
    margin-bottom: 0;
}

/* Facebook Navigation Icon */
.facebook-nav {
    color: #1877f2 !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.facebook-nav:hover {
    color: #166fe5 !important;
    transform: scale(1.1);
}

.facebook-nav svg {
    width: 20px;
    height: 20px;
}

.latest-nav-btn {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    text-align: center;
}

.call-btn {
    display: block;
    background: transparent;
    color: var(--text-dark);
    padding: 15px 8px;
    border-radius: var(--border-radius-small);
    text-align: center;
    font-weight: 700;
    font-size: 1.15rem;
    margin-top: 0;
    transition: all 0.3s ease;
    border: 2px solid var(--primary-green);
    position: relative;
    overflow: hidden;
    text-decoration: none;
}

/* Desktop responsive fix for call button */
@media (min-width: 1024px) {
    .call-btn {
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
}

.call-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.call-btn:hover::before {
    left: 100%;
}

.call-btn:hover {
    transform: translateY(-2px);
    color: var(--primary-green);
}

/* Mobile Navigation Animation */
.mobile-nav.active .nav-item:nth-child(1) {
    animation: slideInNav 0.4s ease forwards 0.1s;
}

.mobile-nav.active .nav-item:nth-child(2) {
    animation: slideInNav 0.4s ease forwards 0.2s;
}

.mobile-nav.active .nav-item:nth-child(3) {
    animation: slideInNav 0.4s ease forwards 0.3s;
}

.mobile-nav.active .nav-item:nth-child(4) {
    animation: slideInNav 0.4s ease forwards 0.4s;
}

.mobile-nav.active .nav-item:nth-child(5) {
    animation: slideInNav 0.4s ease forwards 0.5s;
}

.mobile-nav.active .nav-item:nth-child(6) {
    animation: slideInNav 0.4s ease forwards 0.6s;
}

.mobile-nav.active .nav-item:nth-child(7) {
    animation: slideInNav 0.4s ease forwards 0.7s;
}

.mobile-nav.active .call-btn {
    animation: slideInNav 0.4s ease forwards 0.7s;
}

@keyframes slideInNav {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Responsive Layout Adjustments */
/* Tablet Styles */
@media (min-width: 768px) {
    .floating-header {
        top: 30px;
        left: 30px;
        right: 30px;
    }

    /* Constrain navigation menu width on tablet */
    .mobile-nav {
        left: auto;
        right: 0;
        width: 300px;
    }
}

/* Desktop Styles */
@media (min-width: 1024px) {
    .floating-header {
        top: 40px;
        left: 5%;
        right: 5%;
        max-width: 1200px;
        margin: 0 auto;
    }

    /* Constrain navigation menu width on desktop */
    .mobile-nav {
        left: auto;
        right: 0;
        width: 350px;
    }
}