/* Base Styles */
:root {
    --primary-color: #A234FD;
    --secondary-color: #5d00f7;
    --dark-color: #000;
    --pinky: #FF7FED;
    --light-color: #fff;
    --text-color: #716f73;
    --shadow-deep: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    /* Removed --header-height as globe will be full-screen behind header */
}

body {
    font-family: 'DM Sans', sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    /* Keeping overflow hidden for a full-screen globe experience */
    overflow: hidden;
}

.h1 {
    text-align: center;
    margin: 40px 0;
    width: 100%;
}

h1 {
    text-align: center;
    margin: 40px 0;
    font-family: 'DM Sans', "Century Gothic", sans-serif;
    color: var(--dark-color);
}

.pxl-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Header Positioning */
.pxl-header {
    position: fixed; /* Make the header stick to the top */
    top: 0;
    left: 0;
    width: 100%; /* Span full width */
    z-index: 1001; /* Ensure header is above the globe */
    background-color: var(--light-color); /* Changed to white */
    color: var(--dark-color); /* Ensure text is visible on white background */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

/* Top Bar */
.pxl-top-bar {
    background-color: #f8f8f8; /* Reverted to light background */
    padding: 10px 0;
    font-size: 14px;
    border-bottom: none; /* Removed border */
}

.pxl-anniversary {
    display: flex;
    align-items: center;
    gap: 8px;
}

.pxl-anniversary i {
    color: var(--primary-color);
}

.pxl-contact-social {
    display: flex;
    align-items: center;
    gap: 20px;
}

.pxl-email {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-color); /* Reverted to original text color */
    text-decoration: none;
}

.pxl-social-icons {
    display: flex;
    gap: 12px;
}

.pxl-social-icons a {
    color: var(--text-color); /* Reverted to original text color */
    transition: var(--transition);
}

.pxl-social-icons a:hover {
    color: var(--primary-color);
}

/* Main Header */
.pxl-main-header {
    padding: 20px 0; /* Reverted padding */
    position: relative;
    display: flex; /* Keep flex for alignment */
    justify-content: space-between; /* Keep space out logo and nav */
    align-items: center; /* Keep vertically align items */
}

.pxl-logo img {
    height: 40px;
    width: auto;
}

/* Navigation */
.pxl-nav-menu ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.pxl-nav-menu a {
    text-decoration: none;
    color: var(--dark-color); /* Reverted to original dark color */
    font-weight: 500;
    position: relative;
    transition: var(--transition);
}

.pxl-nav-menu a:hover {
    color: var(--primary-color);
}

/* Mega Menu */
.pxl-mega-menu {
    position: absolute;
    left: 0;
    width: 100%; /* Reverted to 100% */
    /* Removed max-width: unset; */
    background: var(--light-color);
    box-shadow: var(--shadow-deep);
    padding: 30px 0;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 100; /* Reverted z-index */
    top: 100%; /* Position right below the parent menu item */
    transform-origin: top; /* Animation pivot */
    transform: scaleY(0); /* Start scaled down */
}

.menu-item-has-children:hover .pxl-mega-menu {
    opacity: 1;
    visibility: visible;
    transform: scaleY(1); /* Scale up on hover */
}

/* Ensure content within mega menu respects overall page width */
.pxl-mega-menu > .pxl-container {
    /* Removed explicit max-width, margin, padding as they are applied directly to pxl-project-grid */
    display: block; /* Change from flex to block to allow grid inside */
}

.pxl-project-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px; /* Reverted max-width */
    margin: 0 auto; /* Reverted margin */
    padding: 0 20px; /* Reverted padding */
    box-shadow: none; /* Removed shadow from cards, was not in original provided CSS */
}

.pxl-project-card {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
}

.pxl-project-card img {
    width: 100%;
    height: auto; /* Reverted to auto, as per original */
    object-fit: cover; /* Retain object-fit for good image scaling */
    display: block;
    transition: var(--transition);
}

.pxl-project-card h4 {
    margin: 10px 0 5px; /* Reverted margin */
    color: var(--dark-color); /* Keep dark text for light background */
}

.pxl-project-link {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 14px;
    /* Removed extra padding, already handled by original's margin and link styling */
}

.pxl-project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(162, 52, 253, 0.8);
    opacity: 0;
    transition: var(--transition);
    /* Removed display: flex, justify-content, align-items, color, font-size, font-weight as per original */
}

.pxl-project-card:hover .pxl-project-overlay {
    opacity: 0.8; /* Reverted opacity */
}

/* CTA Button */
.pxl-cta {
    /* Removed margin-left, not present in original */
}
.pxl-button {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    /* Removed font-weight, not present in original */
}

.pxl-button:hover {
    background: var(--secondary-color);
    transform: translateY(-2px);
}

/* Mobile Menu Toggle (Hidden on Desktop) */
.pxl-mobile-toggle {
    display: none;
}

/* Responsive Adjustments */
@media (max-width: 1023px) {
    /* Add mobile styles here if needed */
}

/* Global styles for globe and carousel */
body {
    /* Re-added body styles that were previously duplicated at the end */
    font-family: 'Inter', sans-serif; /* Keep Inter for globe related elements if desired */
    background-color: #000; /* Dark background for a space-like feel */
    color: #fff;
    margin: 0; /* Ensures no default body margin */
    padding: 0; /* Ensures no default body padding */
    overflow: hidden; /* Crucial for full-screen globe without scrollbars */
}

#globe-container {
    position: fixed; /* Keep it fixed */
    top: 0; /* Globe starts at the very top */
    left: 0;
    width: 100vw; /* Globe covers full width */
    height: 100vh; /* Globe covers full height */
    z-index: 1; /* Make sure it's below the header (which has z-index 1001) */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-image: radial-gradient(circle at center, #F0E8E8, #ffffff);
}

/* Canvas element for Three.js rendering */
canvas {
    display: block;
    width: 100% !important; /* Ensure canvas fills container */
    height: 100% !important;
}

/* Styles for the Photo Carousel Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8); /* Semi-transparent dark overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000; /* Ensure it's on top of everything, but below header */
    opacity: 0;
    visibility: hidden; /* Hidden by default */
    transition: opacity 0.3s ease, visibility 0.3s ease; /* Smooth transition for showing/hiding */
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible; /* Show when active */
}
.modal-content {
    background: #1a1a1a; /* Dark background for modal content */
    border-radius: 15px; /* Rounded corners */
    padding: 20px;
    max-width: 90vw; /* Max width relative to viewport */
    max-height: 90vh; /* Max height relative to viewport */
    overflow: hidden; /* Hide overflow content */
    display: flex;
    flex-direction: column;
    gap: 15px; /* Spacing between elements */
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 255, 255, 0.3), 0 0 15px rgba(0, 255, 255, 0.15); /* Glowing box shadow */
    border: 1px solid rgba(0, 255, 255, 0.2); /* Subtle border */
    animation: fadeInScale 0.3s ease forwards; /* Animation when modal appears */
}

/* Keyframe animation for modal appearance */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.carousel-title {
    color: #0a0a0a; /* Cyan color for title */
    font-size: 1.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-image-container {
    width: 100%;
    max-width: 600px; /* Max width for carousel images */
    height: 400px; /* Fixed height for image container */
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: inset 0 0 10px rgba(0, 255, 255, 0.2); /* Inner glow for image container */
    background-color: #0d0d0d; /* Dark background for image container */
}

.carousel-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Ensure image fits without cropping */
    transition: opacity 0.5s ease; /* Smooth fade for image changes */
    border-radius: 8px;
}

.carousel-button {
    background-color: rgba(0, 255, 255, 0.1); /* Semi-transparent cyan background */
    border: 1px solid rgba(0, 255, 255, 0.3); /* Subtle border */
    color: #00ffff; /* Cyan arrow color */
    font-size: 2rem;
    padding: 10px 15px;
    border-radius: 50%; /* Circular buttons */
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    transition: background-color 0.3s ease, transform 0.3s ease; /* Hover effects */
    display: flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
}
.carousel-button:hover {
    background-color: rgba(0, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1); /* Slight scale on hover */
}
.carousel-button.prev {
    left: -30px; /* Position previous button */
}
.carousel-button.next {
    right: -30px; /* Position next button */
}

.close-button {
    background: none;
    border: none;
    color: #00ffff; /* Cyan color for close button */
    font-size: 2.5rem;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
    transition: transform 0.2s ease, color 0.2s ease; /* Hover effects */
    z-index: 10; /* Ensure it's above other content */
}
.close-button:hover {
    transform: rotate(90deg); /* Rotate on hover */
    color: #ff00ff; /* Pink on hover */
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
        gap: 10px;
    }
    .carousel-image-container {
        height: 250px; /* Smaller height for mobile images */
    }
    .carousel-title {
        font-size: 1.5rem;
    }
    .carousel-button {
        font-size: 1.5rem;
        padding: 8px 12px;
        width: 40px;
        height: 40px;
    }
    .carousel-button.prev {
        left: -20px;
    }
    .carousel-button.next {
        right: -20px;
    }
    .close-button {
        font-size: 2rem;
        top: 5px;
        right: 10px;
    }

    /* Adjust header for smaller screens if needed */
    .pxl-main-header {
        flex-direction: column; /* Stack logo and nav vertically */
        align-items: center;
        gap: 10px;
    }
    .pxl-nav-menu ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .pxl-cta {
        margin-left: 0;
        margin-top: 10px;
    }
    /* Removed header-height re-evaluation for mobile as globe is full-screen */
}