/* Shared Navigation and Header Styles - Consistent across all pages */
/* This file ensures contact info, main logo, and menu icon are in the exact same position on every page */

/* Page Transitions */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Apply fade-in to entire page */
html {
    animation: fadeIn 0.6s ease-out;
}

/* Main content slides up */
.main-content, .content-wrapper, main, .grid-scroll-container {
    animation: fadeInUp 0.8s ease-out;
    animation-fill-mode: both;
}

/* Font Faces */
@font-face {
    font-family: 'Apercu Pro Bold';
    src: url('fonts/Apercu Pro Font/apercu_bold_pro.otf') format('opentype');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'Apercu Pro Medium';
    src: url('fonts/Apercu Pro Font/apercu_medium_pro.otf') format('opentype');
    font-weight: 500;
    font-style: normal;
}

/* Top Logo (Header) - Fixed position */
.logo {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    height: 50px;
    width: auto;
    z-index: 9998;
    cursor: url('brand/RE-cursor-blue-24.png') 12 12, pointer;
    transition: opacity 0.3s ease;
    animation: fadeIn 0.6s ease-out;
}

body.dark-mode .logo {
    content: url('brand/RE-logo-text-white.png');
}

/* Contact Info - Fixed position top left */
.contact-info {
    position: fixed;
    top: 42px;
    left: 50px;
    font-family: 'Apercu Pro Medium', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14.7px;
    font-weight: 500;
    color: #0000FF;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10000;
    transition: color 0.3s ease;
    animation: fadeIn 0.7s ease-out;
    line-height: 1;
}

.contact-info .insta-logo {
    width: 16px;
    height: 16px;
    display: inline-block;
    vertical-align: middle;
}

.contact-info span,
.contact-info a {
    display: flex;
    align-items: center;
}

body.dark-mode .contact-info {
    color: white;
}

/* Menu Container - Fixed position top right */
.menu-container {
    position: fixed;
    top: 30px;
    right: 50px;
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    animation: fadeIn 0.7s ease-out;
}

/* Expanded hover area for menu */
.menu-container::before {
    content: '';
    position: absolute;
    top: -30px;
    left: -30px;
    right: -30px;
    bottom: -30px;
    z-index: -1;
}

/* Menu Icon (Bottom Logo) */
.bottom-logo {
    width: 60px;
    height: auto;
    cursor: url('brand/RE-cursor-blue-24.png') 12 12, pointer;
    transition: transform 0.3s ease;
}

.bottom-logo:hover {
    transform: scale(1.1);
}

body.dark-mode .bottom-logo {
    content: url('brand/RE-logo-icon-white.png');
}

/* Menu Popup */
.menu-popup {
    position: absolute;
    top: 65px;
    right: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 10001;
}

.menu-item {
    font-family: 'Apercu Pro Medium', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 500;
    color: #0000FF;
    text-transform: uppercase;
    margin: 5px 0;
    cursor: url('brand/RE-cursor-blue-24.png') 12 12, pointer;
    transition: transform 0.2s ease, opacity 0.2s ease, color 0.3s ease;
    white-space: nowrap;
    letter-spacing: 0.02em;
    text-decoration: none;
    display: block;
    text-align: right;
    z-index: 10002;
    position: relative;
}

body.dark-mode .menu-item {
    color: white;
}

.menu-item:hover {
    transform: translateX(-5px);
    opacity: 0.8;
}

/* Show menu on hover */
.menu-container:hover .menu-popup,
.menu-container.auto-show .menu-popup {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Hide mobile menu items on desktop */
.menu-item-mobile {
    display: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Hide text logo on mobile */
    .logo { 
        display: none !important;
    }
    
    /* Hide contact info on mobile */
    .contact-info { 
        display: none !important;
    }
    
    /* Mobile header with menu items on both sides of logo */
    .menu-container {
        position: fixed !important;
        top: 22px !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        z-index: 9999 !important;
        transform: none !important;
        gap: 0 !important;
        padding: 0 20px !important;
    }
    
    /* Icon logo in the center */
    .bottom-logo { 
        width: 66px !important;
        height: auto !important;
        position: relative !important;
    }
    
    /* Hide expanded hover area on mobile */
    .menu-container::before {
        display: none !important;
    }
    
    /* Hide desktop menu popup on mobile */
    .menu-popup {
        display: none !important;
    }
    
    /* Show mobile menu items */
    .menu-item-mobile {
        display: block !important;
        font-family: 'Apercu Pro Bold', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        font-size: 21.5px !important;
        font-weight: bold;
        color: #0000FF;
        text-transform: uppercase;
        text-decoration: none;
        white-space: nowrap;
        transition: opacity 0.3s ease;
        flex: 1;
        text-align: center;
    }
    
    /* Center OUR WORK in left space */
    .menu-work {
        text-align: right !important;
        padding-right: 45px;
    }
    
    /* Center ABOUT RE in right space */
    .menu-about {
        text-align: left !important;
        padding-left: 45px;
    }
    
    body.dark-mode .menu-item-mobile {
        color: white;
    }
    
    .menu-item-mobile:hover {
        opacity: 0.7;
    }
    
    /* Show only specific menu items on mobile */
    .menu-item { 
        font-size: 14px !important;
        text-align: center !important;
        margin: 0 !important;
        text-transform: uppercase !important;
        white-space: nowrap !important;
        display: none !important; /* Hide all by default */
        visibility: visible !important;
    }
    
    /* Show only OUR WORK and ABOUT RE on mobile */
    .menu-item:nth-child(1) { /* OUR WORK */
        display: block !important;
        visibility: visible !important;
        order: 1 !important;
        margin-right: auto !important;
    }
    
    .menu-item:nth-child(2) { /* ABOUT RAISON D'ÊTRE */
        display: block !important;
        visibility: visible !important;
        order: 3 !important;
        margin-left: auto !important;
        font-size: 0 !important; /* Hide the original text */
    }
    
    /* Show abbreviated version on mobile */
    .menu-item:nth-child(2)::after {
        content: "ABOUT RE" !important;
        font-size: 14px !important;
        display: inline-block !important;
        visibility: visible !important;
    }
    
    /* Hide GET YOURS menu item on mobile (using footer button instead) */
    .menu-item:nth-child(3) {
        display: none !important;
    }
    
    .menu-item:hover {
        transform: none !important;
        opacity: 0.7 !important;
    }
}

@media (max-width: 480px) {
    /* Keep same mobile header structure for small screens */
    .logo { 
        display: none;
    }
    
    .menu-container {
        top: 18px;
        padding: 0 15px !important;
    }
    
    .bottom-logo { 
        width: 57px !important;
    }
    
    .menu-item-mobile {
        font-size: 18.6px !important;
    }
    
    .menu-work {
        padding-right: 35px;
    }
    
    .menu-about {
        padding-left: 35px;
    }
    
    .menu-popup {
        top: 60px;
    }
    
    .menu-item { 
        font-size: 16px; 
    }
    
    .contact-info { 
        display: none;
    }
}