/* === FONT IMPORTS === */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600&family=Pacifico&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;1,400;1,700&display=swap');

/* === COLOR PALETTE & VARIABLES === */
:root {
    --color-dark-bg: #1E1E40;
    --color-primary-blue: #40C9FF;
    --color-secondary-green: #A2FF86;
    --color-text-light: #f0f0f0;
    --color-subtle-light: #c0c0c0;
    --color-secondary-gold: #FFD700;
}

/* === BASIC RESET & BODY STYLING === */
body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    color: var(--color-text-light);
    line-height: 1.6;
    background-color: var(--color-dark-bg);
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

/* === MAIN LAYOUT & RESPONSIVE MARGINS === */
.hero, .galleria-hero, .gallery-main-content, .about-section {
    box-sizing: border-box;
    padding-left: 20px;
    padding-right: 20px;
}

@media (min-width: 769px) {
    .hero, .galleria-hero, .gallery-main-content, .about-section {
        padding-left: 40px;  /* 2x margin on desktop */
        padding-right: 40px;
    }
}

/* === NAVIGATION STYLES (REFACTORED) === */
.main-nav {
    display: flex;
    justify-content: space-between; /* ANCHORS ITEMS: Pushes logo left, links right */
    align-items: center;
    background-color: rgba(30, 30, 64, 0.95);
    backdrop-filter: blur(8px);
    padding: 0.5rem 2rem; /* Consistent padding */
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    border-bottom: 3px solid var(--color-secondary-gold);
    box-sizing: border-box;
}

.nav-logo a {
    text-decoration: none;
    font-size: 1.8rem; /* Base size */
    line-height: 1;
    white-space: nowrap;
}

.logo-name {
    color: var(--color-primary-blue);
    font-family: 'Pacifico', cursive;
}

.logo-suffix {
    color: var(--color-secondary-green);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.7em;
    font-weight: 700;
    vertical-align: top;
}

.nav-links {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
    gap: 10px;
}

.nav-links a {
    display: block;
    padding: 10px 20px;
    border-radius: 8px;
    color: var(--color-text-light);
    text-decoration: none;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--color-primary-blue);
    background-color: rgba(162, 255, 134, 0.1);
    border-color: var(--color-primary-blue);
    transform: translateY(-2px);
}

/* === HAMBURGER MENU & MOBILE NAV (REFACTORED) === */
.nav-toggle {
    display: none; /* Hidden on desktop */
    cursor: pointer;
    background: transparent;
    border: 0;
    padding: 0.5em;
    z-index: 5000; /* High z-index to be on top */
}

.hamburger, .hamburger::before, .hamburger::after {
    content: '';
    display: block;
    position: relative;
    width: 2em;
    height: 3px;
    background: var(--color-text-light);
    border-radius: 2px;
    transition: transform 250ms ease-in-out;
}

.hamburger::before { top: -8px; }
.hamburger::after { bottom: -8px; }

/* Hamburger animation to 'X' */
.nav-open .hamburger { transform: rotate(0.625turn); }
.nav-open .hamburger::before { transform: rotate(90deg) translateX(-8px); }
.nav-open .hamburger::after { opacity: 0; }

@media (max-width: 768px) {
    /* Show hamburger button and hide desktop links */
    .nav-toggle { display: block; }
    .nav-links { display: none; }

    /* Style the slide-out menu */
    .nav-links.nav-open {
        display: flex;
        position: fixed;
        background: rgba(30, 30, 64, 0.95);
        backdrop-filter: blur(15px);
        inset: 0 0 0 30%; /* Slide in from right */
        flex-direction: column;
        justify-content: center;
        gap: 0;
        transform: translateX(0);
    }
    
    /* Gold separator bars for menu items */
    .nav-links li {
        width: 100%;
        text-align: center;
        border-top: 1px solid rgba(255, 215, 0, 0.3);
    }
    .nav-links li:first-child { border-top: none; }
    .nav-links a { padding: 1.5rem 1rem; }

    /* Adjust logo size on mobile */
    .nav-logo a { font-size: 1.5rem; }
}

/* === GALLERIA HERO === */
.galleria-hero {
    position: relative;
    width: 100%;
    min-height: 60vh;
    background: url('https://public-assets.hembling.net/main-site/floridasunset.png') no-repeat center center/cover;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: 140px;
    padding-bottom: 40px;
}

.galleria-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.galleria-header-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
}

.galleria-title {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 3.2em;
    color: var(--color-secondary-gold);
    letter-spacing: 1px;
    text-shadow: 0 8px 30px rgba(0,0,0,.6);
}

.galleria-subtle {
    margin-top: 10px;
    color: var(--color-subtle-light);
    font-style: italic;
}

.critics-area { margin-top: 20px; opacity: .9; }
.critics-static { color: var(--color-text-light); font-weight: 600; }
.critics-marquee-wrap { overflow: hidden; height: 24px; }
.critics-marquee { color: var(--color-primary-blue); animation: marquee 10s linear infinite; white-space: nowrap; }

@keyframes marquee {
    from { transform: translateX(100%); }
    to { transform: translateX(-100%); }
}

/* === GALLERY GRID === */
.gallery-main-content { max-width: 1100px; margin: 40px auto 80px; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) { .gallery-grid { grid-template-columns: repeat(8, 1fr); } }
@media (max-width: 640px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; } }

.gallery-item { grid-column: span 4; }
@media (max-width: 1024px) { .gallery-item { grid-column: span 4; } }
@media (max-width: 640px) { .gallery-item { grid-column: span 4; } }

/* Frame look */
.gallery-frame {
    background: #11142a;
    padding: 14px;
    border-radius: 14px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    box-shadow: 0 10px 25px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,0.03);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}

.gallery-frame:hover { transform: translateY(-4px); border-color: var(--color-secondary-gold); box-shadow: 0 16px 35px rgba(0,0,0,.6); }

.gallery-image {
    width: 100%; height: auto; display: block; border-radius: 10px;
}

.gallery-caption {
    text-align: center; margin-top: 10px; color: var(--color-subtle-light);
}
.gallery-caption .gallery-artist { color: var(--color-primary-blue); }
.gallery-caption .gallery-date { color: var(--color-secondary-green); }

/* === LIGHTBOX / POPOUT === */
.popout-container {
    position: fixed; inset: 0; display: none; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.85); z-index: 4000; backdrop-filter: blur(6px);
}

.popout-image { max-width: 90vw; max-height: 80vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.7); }

.popout-close-button {
    position: absolute; top: 20px; right: 25px; cursor: pointer; color: #fff; font-size: 28px;
    background: rgba(255,255,255,0.08); border-radius: 50%; width: 42px; height: 42px;
    display: grid; place-items: center; transition: transform .2s ease, background .2s ease;
}
.popout-close-button:hover { transform: rotate(90deg); background: rgba(255,255,255,0.15); }

.popout-caption {
    margin-top: 16px; text-align: center; color: var(--color-text-light);
}
.popout-caption-title { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--color-secondary-gold); }
.popout-caption-artist { color: var(--color-primary-blue); }
.popout-caption-date { color: var(--color-secondary-green); }
