/* ==========================================================================
   CUSTOM EGG CURSOR STYLES
   ========================================================================== */

/* Hide native cursor globally on interactive devices */
html, body, a, button, input, select, textarea, [role="button"], .navbar-link {
    cursor: none !important;
}

/* Custom Floating Egg Cursor Container */
#custom-egg-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 32px;
    height: 32px;
    pointer-events: none; /* Allows clicks to pass directly through */
    z-index: 999999;
    background-image: url('/assets/img/EggIcon.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    /* 🥚 Shifted offset & rotated -30deg diagonally to match traditional cursor pointer tip */
    transform: translate(-20%, -20%) rotate(-30deg);
    transition: transform 0.05s ease-out;
    display: none; /* Shown dynamically via JS */
}

/* Cracked State on Click */
#custom-egg-cursor.cracked {
    background-image: url('/assets/img/EggCrackIcon_No_BG.png');
    /* Slightly scales up while maintaining diagonal angle */
    transform: translate(-20%, -20%) rotate(-30deg) scale(1.25);
}

/* ==========================================================================
   GLOBAL RESET & OVERFLOW BOUNDARIES
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box; /* Forces padding to stay within elements instead of breaking widths */
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden; /* Hard boundary fallback to hide unexpected horizontal scrolling */
}

body {
    margin: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    background: url('/assets/img/eggsheld_background.png') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    color: #222;
    
    /* 🔥 Setup base state boundary for clean global fade-in */
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

/* 🔥 When template engine configuration binds, fade body structures forward safely */
body.fade-in {
    opacity: 1;
}

/* Disable image dragging, right-clicks visual highlights, and selection site-wide */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;

    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;

    /* Optional: prevents long-press context menus on mobile browsers */
    -webkit-touch-callout: none;
}

/* Decorative assets won't trigger mouse hover/click context events */
.generated-cloud,
.generated-chicken,
.generated-egg,
.block-asset-frame img,
.survey-qr-image {
    pointer-events: none;
}

/* ==========================================================================
   ANIMATED CHARACTER LOADING OVERLAY
   ========================================================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(34, 34, 34, 0.75); /* Dark gray overlay with 75% opacity */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999; /* Higher stack visibility depth than headers or widgets */
    opacity: 0;
    pointer-events: none;
    /* 🥚 Shortened transition delay slightly so refreshes snap the dark overlay into view immediately */
    transition: opacity 0.15s ease-in-out;
}

/* Active helper state triggered via script logic */
.loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
}

.loading-sprite {
    width: 120px;
    height: 120px;
    -o-object-fit: contain;
       object-fit: contain;
    /* Clean rapid scale animation pulse mimicking retro screen loads */
    -webkit-animation: eggPulse 0.9s ease-in-out infinite alternate;
            animation: eggPulse 0.9s ease-in-out infinite alternate;
}

.loading-caption {
    font-family: 'Luckiest Guy', cursive;
    color: #ffe066; /* Matching accent color scheme */
    font-size: 2.2rem;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0 #22211e;
    text-align: center;
    min-width: 180px; /* Prevents textual content size jumping when layout dots swap */
}

@-webkit-keyframes eggPulse {
    0% { transform: scale(0.96); }
    100% { transform: scale(1.04); }
}

@keyframes eggPulse {
    0% { transform: scale(0.96); }
    100% { transform: scale(1.04); }
}

/* ==========================================================================
   NAVIGATION BAR MAIN MENU STYLES
   ========================================================================== */
.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(34, 34, 34, 0.85);
    padding: 0.5rem 2rem;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar-left {
    display: flex;
    align-items: center;
}

.navbar-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    margin-right: 1rem;
    background: #fff;
    -o-object-fit: cover;
       object-fit: cover;
}

.navbar-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    color: #fff;
    letter-spacing: 1px;
}

.navbar-links {
    display: flex;
    gap: 2rem;
}

.navbar-link {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 1.1rem;
    position: relative;
    transition: color 0.2s;
}

.navbar-link.active,
.navbar-link:hover {
    color: #ffe066;
}

.navbar-link.active::after {
    content: '';
    display: block;
    margin: 0 auto;
    width: 60%;
    height: 3px;
    background: #ffe066;
    border-radius: 2px;
    margin-top: 2px;
}

.navbar-brand-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

/* ==========================================================================
   NEW HERO AND TRADITIONAL MAIN CONTENT LAYOUT
   ========================================================================== */
.hero-section {
    width: 100%;
    background: rgba(0, 0, 0, 0.45);
    padding: 6rem 2rem;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-container {
    width: 100%;
    max-width: 1100px;
    text-align: left;
}

.hero-content {
    max-width: 750px;
}

.hero-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 4.5rem;
    color: #fff;
    margin: 0 0 1.5rem 0;
    text-shadow: 3px 3px 0 #ffe066, 6px 6px 0 #22211e;
    letter-spacing: 2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: #fff;
    margin: 0 0 2.5rem 0;
    font-weight: bold;
    text-shadow: 1px 1px 4px rgba(0,0,0,0.8);
}

.hero-action-buttons {
    display: flex;
    gap: 2rem;
}

.hero-btn {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.8rem;
    text-decoration: none;
    text-align: center;
    padding: 0.8rem 2.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s, background 0.2s, color 0.2s;
    display: inline-block;
}

.hero-btn.primary {
    background: #222;
    color: #ffe066;
    box-shadow: 4px 4px 0 #ffe066, 8px 8px 0 #22211e;
}

.hero-btn.primary:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 2px 2px 0 #ffe066, 4px 4px 0 #22211e;
}

.hero-btn.secondary {
    background: #fff;
    color: #222;
    font-family: 'Montserrat', Arial, sans-serif;
    font-weight: bold;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 0 #ffe066, 4px 4px 0 #22211e;
}

.hero-btn.secondary:hover {
    background: #ffe066;
    color: #222;
}

.home-main-wrapper {
    width: 100%;
    box-sizing: border-box;
    flex: 1 0 auto;
}

.main-content {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    align-items: center;
    margin-top: 3rem;
    margin-bottom: 3rem;
}

.main-title {
    font-family: 'Luckiest Guy', cursive;
    font-size: 3.5rem;
    color: #2d2212;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 0 #ffe066, 4px 4px 0 #22211e;
}

.main-buttons {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.main-btn {
    font-family: 'Luckiest Guy', cursive;
    font-size: 2rem;
    background: #222;
    color: #ffe066;
    border: none;
    border-radius: 5px;
    padding: 1rem 3rem;
    margin: 0.5rem 0;
    box-shadow: 4px 4px 0 #ffe066, 8px 8px 0 #22211e;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.main-btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 2px 2px 0 #ffe066, 4px 4px 0 #22211e;
}

.sub-buttons {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.sub-btn {
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 1.1rem;
    background: #fff;
    color: #222;
    border: none;
    border-radius: 5px;
    padding: 0.7rem 2rem;
    margin: 0.5rem 0;
    box-shadow: 2px 2px 0 #ffe066, 4px 4px 0 #22211e;
    cursor: pointer;
    font-weight: bold;
    transition: background 0.2s, color 0.2s;
}

.sub-btn:hover {
    background: #ffe066;
    color: #222;
}

/* ==========================================================================
   DROPDOWN ACCOUNT MENUS
   ========================================================================== */
.navbar-account-dropdown {
    position: relative;
    display: inline-block;
}

.navbar-account-dropdown .arrow {
    display: inline-block;
    margin-left: 0.5em;
    transition: transform 0.2s;
}

.navbar-account-dropdown:hover .arrow,
.navbar-account-dropdown:focus-within .arrow {
    transform: rotate(180deg);
}

.dropdown-menu {
    display: none;
    position: absolute;
    left: 0;
    top: 100%;
    background: #222;
    min-width: 140px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
    border-radius: 0 0 8px 8px;
    z-index: 20;
    padding: 0.5em 0;
}

.navbar-account-dropdown:hover .dropdown-menu,
.navbar-account-dropdown:focus-within .dropdown-menu {
    display: block;
}

.dropdown-item {
    color: #fff;
    padding: 0.7em 1.5em;
    display: block;
    text-decoration: none;
    font-size: 1rem;
    transition: background 0.2s;
}

.dropdown-item:hover {
    background: #ffe066;
    color: #222;
}

/* ==========================================================================
   UPDATED FIGMA INLINE FOOTER STYLES (CLEAN & CENTERED RESETS)
   ========================================================================== */
.footer {
    background: rgba(34, 34, 34, 0.85);
    color: #fff;
    padding: 0.8rem 2rem;
    margin-top: 0; /* 🔥 FIXED: Removed the 4rem margin gap entirely */
    flex-shrink: 0;
    font-family: 'Montserrat', Arial, sans-serif;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.footer-container {
    display: flex;
    align-items: center;
    justify-content: center; /* 🔥 FIXED: Changed from space-between to center */
    width: 100%;
    max-width: 1400px;
    gap: 1.5rem; /* 🔥 FIXED: Ensures completely unified, even spacing between all items */
    flex-wrap: nowrap;
}

.footer-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    -o-object-fit: cover;
       object-fit: cover;
    flex-shrink: 0;
}

.footer-text {
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
}

.footer-divider {
    color: #fff;
    opacity: 0.6;
    font-weight: 300;
}

.footer-link-item {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: color 0.2s;
}

.footer-link-item:hover {
    color: #ffe066;
    text-decoration: underline;
}

.footer-contact-label {
    font-weight: bold;
    font-size: 0.95rem;
    color: #fff;
    white-space: nowrap;
}

.footer-socials {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.social-icon {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s, transform 0.2s;
}

.social-icon.facebook:hover { color: #1877f2; }
.social-icon.instagram:hover { color: #c13584; }
.social-icon.gmail:hover { color: #ea4335; }
.social-icon i { font-size: 1.2rem; }

/* 🔥 FIXED: Removed margin-left: auto so the right-hand team logo aligns evenly */
.team-logo-right { 
    margin-left: 0; 
}

/* ==========================================================================
   RESPONSIVE MEDIA BREAKPOINTS
   ========================================================================== */
@media (max-width: 1050px) {
    .footer-container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    .footer-socials {
        flex-direction: column;
        gap: 0.6rem;
    }
    .footer-divider {
        display: none;
    }
    .team-logo-right {
        margin-left: 0;
    }
}

@media (max-width: 850px) {
    .hero-title { font-size: 3rem; }
    .hero-subtitle { font-size: 1.1rem; }
    .hero-action-buttons {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
    }
    .hero-btn { width: 100%; box-sizing: border-box; }
}

@media (max-width: 700px) {
    .main-title { font-size: 2.2rem; }
    .main-btn { font-size: 1.2rem; padding: 0.7rem 1.5rem; }
}

/* ==========================================================================
   SURVEY DISPLAY LAYOUT SECTION
   ========================================================================== */
.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    width: 100%;
}

.survey-showcase-box {
    width: 100%;
    max-width: 900px; /* Big display window for legible QR scanning */
    margin: 1.5rem auto 2rem auto;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    background: #fff;
    padding: 10px; /* Clean framing border */
}

.survey-qr-image {
    width: 100%;
    height: auto;
    display: block;
    -o-object-fit: contain;
       object-fit: contain;
    border-radius: 6px;
}

@media (max-width: 950px) {
    .survey-showcase-box {
        max-width: 90%; /* Scale down gracefully on tablets/mobile devices */
    }
}

/* ==========================================================================
   GALLERY MODE SWITCHER STYLES (2D Art vs 3D Model)
   ========================================================================== */
.view-mode-toggle-container {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.toggle-mode-btn {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.2rem;
    background: #222;
    color: #fff;
    border: 2px solid #ffe066;
    border-radius: 6px;
    padding: 0.5rem 1.5rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, transform 0.1s;
    box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.4);
}

.toggle-mode-btn:hover {
    background: #ffe066;
    color: #222;
    transform: translateY(-2px);
}

.toggle-mode-btn.active {
    background: #ffe066;
    color: #222;
    box-shadow: inset 2px 2px 5px rgba(0,0,0,0.4);
    transform: none;
}

/* 2D Art Display Mode Layout Rules */
.gallery-2d-view-image {
    width: 100%;
    max-width: 400px;
    height: 400px;
    -o-object-fit: contain;
       object-fit: contain;
    border-radius: 12px;
    background: #222;
    border: 2px solid #ffe066;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    display: block;
    margin: 0 auto;
}