/* styles.css */

/* Resetting default browser styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Crimson Text', serif;
    background-color: #000; /* Set background color to black */
    color: #fff; /* Set text color to white */
    overflow-x: hidden; /* Hide horizontal overflow */
}

header {
    background-color: #000;
    color: white;
    padding: 40px;
    width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

h1.crimson-text-semibold {
    margin-bottom: 40px;
    font-size: 32px;
    text-align: center;
}

nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    margin-bottom: 10px;
}

nav ul li a {
    display: block;
    padding: 10px 20px;
    color: white;
    text-decoration: none;
    font-size: 16px;
}

nav ul li a:hover {
    background-color: #555;
}

#nav-symbol {
    margin-top: auto;
    width: 50%;
    max-width: 120px;
}

main {
    margin-left: 250px;
    padding: 20px;
    background-color: #000; /* Set background color to black */
}

.content {
    background-color: #000; /* Ensure content area background is black */
    color: #fff; /* Set text color to white */
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-family: 'Crimson Text', serif;
    font-size: 18px;
}

.submenu {
    display: none; /* Hidden by default */
    position: absolute; /* Position the submenu */
    background-color: black; /* Background color for submenu */
    padding-left: 25px; /* Adjust the left padding for indentation */
}

.submenu li {
    padding: 0px 0; /* Add padding to submenu items */
    line-height: 1; /* Set the line height to 1 for tighter spacing */
}

.submenu a {
    font-size: 14px; /* Adjust font size to your preference */
}

.submenu.show {
    display: block; /* Display when the show class is present */
}

/* ====================================================
   ABOUT PAGES STYLING
   ==================================================== */

.about-page .about-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.about-page .menu-spacer {
    width: 250px;
    flex-shrink: 0;
}

.about-page .about-text {
    flex: 1;
    max-width: 800px;
    padding: 2rem;
    font-size: 1.3rem;
    line-height: 1.7;
}

.about-page .text-section {
    margin-bottom: 3rem;
}

.about-page .text-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.about-page .text-section p {
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
    line-height: 1.7;
    color: #fff;
}

.about-page .about-images {
    flex: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.about-page .image-item img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 4px;
}

.about-page .image-caption {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-top: 0.5rem;
    font-style: italic;
}

.about-page .about-media {
    flex: 0 0 500px;
    padding: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    position: sticky;
    top: 2rem;
    height: calc(100vh - 4rem);
}

.about-page .media-item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-page .media-item video {
    width: 100%;
    max-width: 600px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
    opacity: 0.8;
}

/* ====================================================
   CONTACT PAGE STYLING
   ==================================================== */

.contact-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.contact-container .menu-spacer {
    width: 250px;
    flex-shrink: 0;
}

.contact-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    font-family: 'Crimson Text', serif;
    line-height: 1.6;
    width: calc(100vw - 250px);
    margin-left: calc(-250px / 2 - 40px);
}

.contact-section {
    margin-bottom: 3rem;
    max-width: 500px;
    width: 100%;
}

.contact-section:last-child {
    margin-bottom: 0;
}

.contact-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.contact-section p {
    margin-bottom: 1.5rem;
    color: #fff;
    font-size: 1.3rem;
}

.email-section {
    margin: 2rem 0;
}

.email-reveal {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 1rem 2rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Crimson Text', serif;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    margin-bottom: 1rem;
}

.email-reveal:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
}

.email-display {
    font-size: 1.4rem;
    color: #fff;
    font-weight: 600;
    display: none;
    padding: 1.5rem 0;
    word-break: break-all;
}

.email-display a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.email-display a:hover {
    color: #fff;
    text-decoration: underline;
}

.copy-button {
    background: none;
    border: 2px solid #fff;
    color: #fff;
    padding: 0.8rem 1.8rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.copy-button:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.copy-button.copied {
    background-color: rgba(76, 175, 80, 0.2);
    border-color: #4caf50;
    color: #4caf50;
}

.copy-button i {
    font-size: 0.9rem;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1rem;
    align-items: center;
}

.social-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.social-link {
    color: #f52063;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.social-link:hover {
    color: #20f59c;
}

.social-link i {
    font-size: 1.5rem;
    width: 24px;
    text-align: center;
}

/* ====================================================
   GALLERY STYLES
   ==================================================== */

#gallery-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#media-container {
    position: relative;
    width: 80vw;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.8);
    margin: 0 auto;
    padding: 20px;
    box-sizing: border-box;
}

#media-container img,
#media-container video {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
    margin: auto;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(32, 25, 25, 0.5);
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

.media-info {
    text-align: center;
    margin-top: 20px;
}

.media-info h2 {
    color: rgba(255, 255, 255, 0.8);
    font-size: calc(1.25em - 2px);
    transform: skew(-10deg);
}

.media-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: calc(1em - 2px);
}

/* Navigation controls */
.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    display: none;
    justify-content: space-between;
    transform: translateY(-50%);
    pointer-events: none;
}

.gallery-controls.active {
    display: flex;
}

.gallery-controls button {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 2rem;
    cursor: pointer;
    pointer-events: all;
    padding: 0 20px;
}

.gallery-controls button:hover {
    color: rgba(255, 255, 255, 0.8);
}

.gallery-controls button:disabled {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gallery-controls button {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Arrow styles */
.gallery-controls button::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-right: none;
    border-bottom: none;
    transform: rotate(-45deg);
}

.gallery-controls button#next-btn::before {
    transform: rotate(135deg);
}

/* Grid gallery styles */
.grid-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px;
    width: 100%;
}

.grid-item {
    position: relative;
    aspect-ratio: 1;
    cursor: pointer;
    overflow: hidden;
    border-radius: 4px;
    transition: transform 0.3s ease;
}

.grid-item:hover {
    transform: scale(1.02);
}

.grid-item img,
.grid-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s ease;
    opacity: 0;
    background-color: rgba(30, 30, 30, 0.7);
}

.grid-item img.loaded,
.grid-item video.loaded {
    opacity: 1;
}

.grid-item-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    padding: 10px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.grid-item:hover .grid-item-info {
    transform: translateY(0);
}

.grid-item-info h3 {
    color: white;
    font-size: 16px;
    margin: 0;
}

.grid-gallery-container {
    display: none;
}

.grid-gallery-container.active {
    display: block;
}

/* Loading spinner */
.grid-item.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    animation: loading-spinner 0.8s linear infinite;
    z-index: 0;
}

@keyframes loading-spinner {
    to {
        transform: rotate(360deg);
    }
}

.loading-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 20px 40px;
    border-radius: 5px;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.loading-indicator span {
    position: relative;
}

.loading-indicator span:after {
    content: "...";
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
    right: -8px;
    animation: loading-dots 1.5s infinite steps(4);
}

@keyframes loading-dots {
    0% { width: 0; }
    20% { width: 0.25em; }
    40% { width: 0.5em; }
    60% { width: 0.75em; }
    80% { width: 1em; }
    100% { width: 0; }
}

.error-message {
    text-align: center;
    margin: 50px auto;
    max-width: 500px;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px;
    border-radius: 5px;
    color: white;
}

.error-message button {
    background-color: #333;
    color: white;
    border: none;
    padding: 10px 20px;
    margin-top: 15px;
    cursor: pointer;
    border-radius: 3px;
}

.error-message button:hover {
    background-color: #555;
}

.tooltip {
    position: absolute;
    bottom: 18%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.7);
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 16px;
    border-radius: 4px;
    font-family: 'Crimson Text', serif;
    font-size: 18px;
    font-weight: 600;
    z-index: 100;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
    white-space: nowrap;
}

.tooltip.show {
    opacity: 1;
}

#gallery-container.hidden {
    display: none;
}

/* ====================================================
   ANALYSIS PAGE STYLING
   ==================================================== */

.analysis-page {
    display: flex;
    min-height: 100vh;
    width: 100%;
    font-family: 'Crimson Text', serif;
}

.analysis-page .menu-spacer {
    width: 250px;
    flex-shrink: 0;
}

.analysis-content {
    flex: 1;
    max-width: 1200px;
    padding: 2rem;
    /* TRUE CENTER: Account for 250px nav bar by shifting left 125px */
    margin: 0 auto;
    transform: translateX(-125px);
}

.analysis-image {
    width: 100%;
    margin: 0 auto 2rem auto;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Set a max height that leaves room for title, back button, and start of text */
    max-height: 55vh;
}

.analysis-image img,
.analysis-image video {
    max-width: 100%;
    max-height: 55vh; /* This controls the size - adjust as needed */
    height: auto;
    width: auto;
    border-radius: 4px;
    box-shadow: 0 0 10px rgba(32, 25, 25, 0.5);
    object-fit: contain;
}

.analysis-title-section {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.analysis-title-section h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #fff;
}

.analysis-description {
    font-size: 1.3rem;
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    margin: 0;
}

.analysis-back-button {
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: #fff;
    padding: 0.8rem 1.5rem;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    margin-bottom: 2rem;
    display: inline-block;
}

.analysis-back-button:hover {
    border-color: rgba(255, 255, 255, 0.8);
    background-color: rgba(255, 255, 255, 0.1);
}

.analysis-text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.3rem;
    line-height: 1.7;
}

.analysis-section {
    margin-bottom: 3rem;
}

.analysis-section:last-child {
    margin-bottom: 0;
}

.analysis-section h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #fff;
}

.analysis-section p {
    font-size: 1.3rem;
    margin-bottom: 1.8rem;
    line-height: 1.7;
    color: #fff;
    text-align: justify;
}

/* Style the analysis icon in gallery view */
.analysis-icon {
    color: rgba(255, 255, 255, 0.6);
    margin-left: 0.5em;
    transition: color 0.3s ease;
}

.analysis-icon:hover {
    color: rgba(255, 255, 255, 0.9);
}


/* ====================================================
   ANALYSIS PAGE RESPONSIVE DESIGN
   ==================================================== */

@media (max-width: 1024px) {
    .analysis-page .menu-spacer {
        width: 200px;
    }
    
    .analysis-content {
        /* Adjust for smaller nav bar */
        transform: translateX(-100px);
    }
    
    .analysis-image {
        width: 50%;
    }
	
    .analysis-image img,
    .analysis-image video {
        max-height: 50vh;
    }
    
    .contact-content {
        transform: translateX(-100px);
    }
    
    #media-container {
        transform: translateX(-100px);
    }
}

@media (max-width: 480px) {
    .analysis-content {
        padding: 0.75rem;
    }
    
    .analysis-image {
        max-height: 40vh;
    }
	
    .analysis-image img,
    .analysis-image video {
        max-height: 40vh;
    }
    
    .analysis-title-section h1 {
        font-size: 1.6rem;
    }
    
    .analysis-description {
        font-size: 1.1rem;
    }
    
    .analysis-text {
        font-size: 1.1rem;
    }
    
    .analysis-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .analysis-section p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .analysis-back-button {
        padding: 0.7rem 1.2rem;
        font-size: 1rem;
    }
}


/* ====================================================
   RESPONSIVE DESIGN
   ==================================================== */

	.media-info i.fas {
		color: rgba(255, 255, 255, 0.6);
		font-size: 0.8em;
		margin-left: 0.5em;
	}

@media (max-width: 1024px) {
    .about-page .menu-spacer,
    .contact-container .menu-spacer {
        width: 200px;
    }
    
    .about-page .about-media {
        flex: 0 0 250px;
    }
    
    .about-page .media-item video {
        max-width: 220px;
    }
    
    .contact-content {
        width: calc(100vw - 200px);
        margin-left: calc(-200px / 2 - 30px);
    }
}

@media (max-width: 768px) {
    header {
        width: 100%;
        height: auto;
    }

    main {
        margin-left: 0;
        padding: 10px;
    }

    .content {
        font-size: 16px;
    }
	
    #media-container {
        transform: none;
        width: 95vw; /* Increased from 80vw */
        height: 70vh; /* Reduced from 80vh */
        padding: 10px; /* Reduced from 20px */
    }
	
    nav ul li a {
        text-align: center;
        padding: 10px 10px; /* Reduce side padding slightly for mobile */
    }
    
    /* Center the main title too */
    h1.crimson-text-semibold {
        text-align: center;
    }
    
    /* Center the nav symbol */
    #nav-symbol {
        margin-left: auto;
        margin-right: auto;
        display: block;
    }

    /* Center the dropdown/submenu text too */
    .submenu a {
        text-align: center;
        padding-left: 0; /* Remove the left indent for centered look */
        padding-right: 0;
    }
    
    .submenu {
        padding-left: 0; /* Remove submenu container left padding */
    }

    /* Center the dropdown box itself */
    .submenu {
        left: 50%;
        transform: translateX(-50%);
        width: 200px; /* Set a consistent width for centered alignment */
    }

    /* Push the nav symbol down further on mobile */
    #nav-symbol {
        margin-top: 50px; /* Increase from the default auto */
    }

    .analysis-page {
        flex-direction: column;
    }
    
    .analysis-page .menu-spacer {
        width: 100%;
        height: 0;
    }
    
    .analysis-content {
        padding: 1rem;
        /* Remove transform on mobile - nav is stacked */
        transform: none;
    }
    
    .contact-content {
        transform: none;
    }
        
    .analysis-image {
        margin-bottom: 1.5rem;
        max-height: 45vh;
    }
	
    .analysis-image img,
    .analysis-image video {
        max-height: 45vh;
    }
    
    .analysis-title-section h1 {
        font-size: 2rem;
    }
    
    .analysis-description {
        font-size: 1.2rem;
    }
    
    .analysis-text {
        font-size: 1.2rem;
    }
    
    .analysis-section h2 {
        font-size: 1.6rem;
    }
    
    .analysis-section p {
        font-size: 1.2rem;
        text-align: left;
    }
    
    .media-info {
        margin-top: 15px; /* Moved inside media query */
    }

    .gallery-controls button {
        padding: 0 10px;
    }
    
    /* About pages responsive - disable sticky on mobile */
    .about-page .about-container {
        flex-direction: column;
    }
    
    .about-page .menu-spacer {
        width: 100%;
        height: 0;
    }
    
    .about-page .about-text {
        flex: 1;
        max-width: 800px;
        padding: 2rem;
        font-size: 1.2rem;
        line-height: 1.7;
    }
    
    .about-page .text-section p {
        font-size: 1.2rem;
        margin-bottom: 1.8rem;
        line-height: 1.7;
        color: #fff;
    }
    
    .about-page .image-caption {
        font-size: 1rem;
    }
    
    .about-page .about-images,
    .about-page .about-media {
        padding: 1.5rem;
        position: static; /* Remove sticky on mobile */
        height: auto; /* Reset height on mobile */
        flex: 1; /* Reset flex on mobile */
    }
    
    .about-page .media-item video {
        max-width: 100%;
        opacity: 1; /* Full opacity on mobile */
    }
    
    /* Contact page responsive */
    .contact-container {
        flex-direction: column;
        padding: 1rem;
    }
    
    .contact-container .menu-spacer {
        width: 100%;
        height: 0;
    }
    
    .contact-content {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
    }
    
    .contact-section h2 {
        font-size: 1.6rem;
    }
    
    .contact-section p {
        font-size: 1.2rem;
    }
    
    .email-reveal {
        padding: 0.8rem 1.6rem;
        font-size: 1.1rem;
    }
    
    .email-display {
        font-size: 1.3rem;
    }
    
    .copy-button {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .social-link {
        font-size: 1.2rem;
    }
    
    .social-link i {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    /* About pages mobile */
    .about-page .about-text {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    .about-page .text-section h2 {
        font-size: 1.5rem;
    }
    
    .about-page .text-section p {
        font-size: 1.1rem;
    }
    
    .about-page .image-caption {
        font-size: 0.95rem;
    }
    
    .about-page .about-images,
    .about-page .about-media {
        padding: 1rem;
    }
    
    /* Contact page mobile */
    .contact-container {
        padding: 0.75rem;
    }
    
    .contact-section {
        margin-bottom: 2rem;
    }
    
    .contact-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .contact-section p {
        font-size: 1.1rem;
    }
    
    .email-reveal {
        padding: 0.7rem 1.3rem;
        font-size: 1rem;
    }
    
    .email-display {
        font-size: 1.2rem;
    }
    
    .copy-button {
        padding: 0.65rem 1.2rem;
        font-size: 0.95rem;
    }
    
    .social-link {
        font-size: 1.1rem;
    }
    
    .social-link i {
        font-size: 1.3rem;
    }
}

/* ====================================================
   MOBILE HAMBURGER MENU
   ==================================================== */

/* ====================================================
   DESKTOP: Hide all mobile elements (NO CHANGES TO EXISTING)
   ==================================================== */
@media (min-width: 769px) {
    .mobile-hamburger,
    .mobile-nav-overlay,
    .mobile-nav-drawer,
    .mobile-gallery-container {
        display: none !important;
    }
}

/* ====================================================
   MOBILE: Complete mobile experience
   ==================================================== */
@media (max-width: 768px) {
    /* Mobile hamburger button - top right */
    .mobile-hamburger {
        display: none; /* FIXED: Hidden by default */
        position: fixed;
        top: 20px;
        right: 20px;
        z-index: 1001;
        background: rgba(0, 0, 0, 0.8);
        border: 2px solid rgba(255, 255, 255, 0.3);
        cursor: pointer;
        padding: 8px;
        width: 48px;
        height: 48px;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 8px;
        transition: all 0.3s ease;
        backdrop-filter: blur(10px);
    }
    
    .mobile-hamburger:hover {
        background-color: rgba(0, 0, 0, 0.9);
        border-color: rgba(255, 255, 255, 0.5);
    }
    
    /* Hamburger lines */
    .mobile-hamburger span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: #fff;
        margin: 3px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    /* Hamburger animation when opened */
    .mobile-hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .mobile-hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    /* Mobile navigation overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.8);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    /* Mobile navigation drawer */
    .mobile-nav-drawer {
        position: fixed;
        top: 0;
        right: 0;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        background-color: #000;
        z-index: 999;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        padding: 80px 20px 20px 20px;
    }
    
    .mobile-nav-drawer.active {
        transform: translateX(0);
    }
    
    /* Mobile navigation content */
    .mobile-nav-content ul {
        list-style: none;
        padding: 0;
        margin: 0;
        width: 100%;
    }
    
    .mobile-nav-content ul li {
        margin-bottom: 10px;
        width: 100%;
    }
    
    .mobile-nav-content ul li a {
        display: block;
        padding: 15px 10px;
        color: white;
        text-decoration: none;
        font-size: 18px;
        border-radius: 4px;
        transition: background-color 0.3s ease;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .mobile-nav-content ul li a:hover,
    .mobile-nav-content ul li a:active {
        background-color: #333;
    }
    
    /* Mobile submenu handling */
    .mobile-nav-content .submenu {
        background-color: #111;
        margin-top: 5px;
        border-radius: 4px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .mobile-nav-content .submenu.show {
        max-height: 500px;
    }
    
    .mobile-nav-content .submenu li {
        margin-bottom: 5px;
    }
    
    .mobile-nav-content .submenu li a {
        padding: 12px 20px;
        font-size: 16px;
        color: rgba(255, 255, 255, 0.8);
        min-height: 44px;
    }
    
    .mobile-nav-content .submenu li a:hover {
        background-color: #222;
        color: white;
    }
    
    /* Mobile nav symbol */
    .mobile-nav-content #nav-symbol {
        margin-top: 2rem;
        width: 80px;
        max-width: 80px;
        opacity: 0.7;
        display: block;
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Prevent scrolling when menu is open */
    body.mobile-nav-open {
        overflow: hidden;
    }
    
    /* FIXED: Mobile header modifications */
    header {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
        display: block;
    }
    
    /* FIXED: Hide regular nav when needed */
    .mobile-nav-hidden nav {
        display: none !important;
    }
    
    /* Mobile main content */
    main {
        margin-left: 0;
        padding: 2px;
    }
    
	
    /* ====================================================
       MOBILE GALLERY LAYOUT
       ==================================================== */

	/* Mobile gallery container - FIXED VIEWPORT */
	.mobile-gallery-container {
		display: flex;
		flex-direction: column;
		height: 100vh;
		width: 100%;
		background-color: #000;
		overflow: hidden;
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		padding-top: 60px; /* Account for mobile header */
		padding-bottom: 0; /* Remove bottom padding since info is fixed */
	}
    
	/* Mobile gallery header */
	.mobile-gallery-header {
		padding: 10px 15px; /* Reduced from 20px */
		text-align: center;
		border-bottom: 1px solid rgba(255, 255, 255, 0.1);
		flex-shrink: 0;
	}
    
    .mobile-gallery-header h1 {
        font-family: 'Crimson Text', serif;
        font-size: 24px;
        font-weight: 600;
        color: #fff;
        margin: 0;
        letter-spacing: 1px;
    }
    
	/* Mobile media wrapper */
	.mobile-media-wrapper {
		flex: 1;
		display: flex;
		align-items: center;
		justify-content: center;
		padding: 10px;
		overflow: hidden;
		min-height: 0;
		margin-bottom: 120px; /* Account for fixed bottom info */
	}
	
	.mobile-media-wrapper img,
	.mobile-media-wrapper video {
		max-width: calc(100% - 20px); /* Account for padding */
		max-height: calc(100vh - 200px); /* Account for header + bottom info + padding */
		width: auto;
		height: auto;
		object-fit: contain;
		border-radius: 4px;
		box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
	}

	/* Mobile gallery info - FIXED TO BOTTOM */
	.mobile-gallery-info {
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		z-index: 100;
		padding: 15px;
		text-align: center;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
		background-color: rgba(0, 0, 0, 0.95);
		backdrop-filter: blur(10px);
		min-height: 80px; /* Ensure consistent height */
		box-sizing: border-box;
	}
    
    .mobile-gallery-info h2 {
        font-family: 'Crimson Text', serif;
        font-size: 22px;
        font-weight: 600;
        color: #fff;
        margin: 0 0 15px 0;
        transform: skew(-5deg);
    }
    
    .mobile-gallery-info p {
        font-family: 'Crimson Text', serif;
        font-size: 18px;
        color: rgba(255, 255, 255, 0.8);
        line-height: 1.5;
        margin: 0;
    }
    
    /* Mobile analysis icon */
    .mobile-gallery-info .analysis-icon {
        color: rgba(255, 255, 255, 0.6);
        margin-left: 0.5em;
        font-size: 16px;
        transition: color 0.3s ease;
        cursor: pointer;
        padding: 8px; /* Larger touch target */
    }
    
    .mobile-gallery-info .analysis-icon:hover {
        color: rgba(255, 255, 255, 0.9);
    }
	
		/* Prevent body scroll when mobile gallery is active */
	body:has(.mobile-gallery-container) {
		overflow: hidden;
		position: fixed;
		width: 100%;
		height: 100%;
	}

	/* Fallback for browsers that don't support :has() */
	body.mobile-gallery-active {
		overflow: hidden;
		position: fixed;
		width: 100%;
		height: 100%;
	}
    
/* ====================================================
	   MOBILE GRID GALLERY IMPROVEMENTS
	   ==================================================== */

	.grid-gallery {
		display: grid;
		grid-template-columns: repeat(3, 1fr); /* 3 columns on mobile */
		gap: 8px; /* Reduced from 15px */
		padding: 50px 5px 5px 5px; /* Added top padding for mobile header */
		width: 100%;
	}
	
	.grid-item {
		aspect-ratio: 1;
		border-radius: 4px;
		overflow: hidden;
	}
	
	.grid-item-info {
		background: rgba(0, 0, 0, 0.8);
		backdrop-filter: blur(5px);
	}
	
	.grid-item-info h3 {
		font-size: 14px;
		font-weight: 600;
	}
    
    /* ====================================================
       MOBILE ANALYSIS PAGE
       ==================================================== */
    
    .analysis-page {
        padding: 0;
    }
    
    .analysis-page .menu-spacer {
        display: none;
    }
    
    .analysis-content {
        transform: none;
        padding: 20px;
        max-width: 100%;
    }
    
    .analysis-image {
        max-height: 50vh;
        margin-bottom: 1.5rem;
    }
    
    .analysis-image img,
    .analysis-image video {
        max-height: 50vh;
    }
    
    .analysis-title-section h1 {
        font-size: 24px;
    }
    
    .analysis-description {
        font-size: 16px;
    }
    
    .analysis-text {
        font-size: 16px;
        line-height: 1.6;
    }
    
    .analysis-section h2 {
        font-size: 20px;
    }
    
    .analysis-section p {
        font-size: 16px;
        text-align: left;
    }
    
    .analysis-back-button {
        padding: 12px 20px;
        font-size: 16px;
        margin-bottom: 1.5rem;
    }
}

/* ====================================================
   MOBILE SPECIFIC RESPONSIVE BREAKPOINTS
   ==================================================== */

@media (max-width: 480px) {
    .mobile-nav-drawer {
        width: 100%;
        max-width: 100%;
    }
    
    .mobile-gallery-header h1 {
        font-size: 20px;
    }
    
    .mobile-gallery-info h2 {
        font-size: 20px;
    }
    
    .mobile-gallery-info p {
        font-size: 16px;
    }
    
    .grid-gallery {
        gap: 10px;
        padding: 10px;
    }
    
    .grid-item-info h3 {
        font-size: 12px;
    }
}

/* ====================================================
   MOBILE HEADER (replaces hamburger positioning)
   ==================================================== */
@media (max-width: 768px) {
    .mobile-header {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 1000 !important;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        display: none; /* Hidden by default */
        height: 50px;
        box-sizing: border-box;
    }
    
    .mobile-title {
        font-family: 'Crimson Text', serif;
        font-size: 18px;
        font-weight: 600;
        color: #fff;
        margin: 0;
        letter-spacing: 1px;
        cursor: pointer;
        transition: color 0.3s ease;
        text-align: center;
        line-height: 20px;
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%, -50%);
        width: calc(100% - 80px); /* Account for hamburger space */
    }
    
    .mobile-title:hover {
        color: rgba(255, 255, 255, 0.8);
    }
    
    .mobile-hamburger {
        background: none !important;
        border: none !important;
        outline: none !important;
        cursor: pointer;
        padding: 8px;
        width: 40px;
        height: 40px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        border-radius: 6px;
        transition: all 0.3s ease;
        position: absolute !important;
        right: 20px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
    }
    
    .mobile-hamburger:hover {
        background-color: rgba(255, 255, 255, 0.1) !important;
    }
    
    .mobile-hamburger span {
        display: block;
        width: 20px;
        height: 2px;
        background-color: #fff;
        margin: 2px 0;
        transition: all 0.3s ease;
        border-radius: 1px;
    }
    
    .mobile-hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    
    .mobile-hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }
    
    /* Content adjustments */
    .mobile-gallery-container {
        padding-top: 60px;
    }
    
    .mobile-gallery-header {
        display: none;
    }
    
    /* When mobile header is showing, adjust content */
    main {
        transition: padding-top 0.3s ease;
    }
    
    body.mobile-header-active main {
        padding-top: 60px;
    }
    
    body.mobile-header-active .content {
        padding-top: 0;
    }
}

@media (max-width: 480px) {
    .grid-gallery {
        gap: 6px; /* Reduced from 10px */
        padding: 50px 10px 10px 10px; /* Adjusted padding */
    }
    
    .grid-item-info h3 {
        font-size: 12px;
    }
}