/* =========================================
   1. CORE SETUP & TYPOGRAPHY
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
    --bg-body: #0a0a0a;
    /* Deep Black */
    --bg-sidebar: #111111;
    /* Slightly lighter for sidebar */
    --text-main: #ffffff;
    --text-muted: #888888;
    --accent: #d4af37;
    /* Gold accent (subtle) */
    --sidebar-width: 280px;
    --gap: 20px;
    /* Spacing between photos */
    --font-stack: "Plus Jakarta Sans", sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--bg-body);
    color: var(--text-main);
    font-family: var(--font-stack);
    font-weight: 400;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

/* =========================================
   2. SIDEBAR NAVIGATION (The "Shailendra" Look)
   ========================================= */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--bg-sidebar);
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 1000;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

/* Logo Area */
.brand {
    margin-bottom: 60px;
}

.brand h1 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.brand span {
    color: var(--text-muted);
    font-size: 12px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
}

/* Menu Links */
.nav-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.nav-menu a {
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--text-main);
    transform: translateX(5px);
}

.nav-menu a.active {
    color: var(--accent);
}

/* Sidebar Footer */
.sidebar-footer {
    font-size: 11px;
    color: #444;
    line-height: 1.5;
}

/* =========================================
   NESTED NAVIGATION (Accordion / Inline Style)
   ========================================= */

/* 1. The Container */
.nav-menu li.has-submenu {
    position: relative;
    /* No overflow:visible needed here for inline style */
}

/* 2. The Submenu (Hidden initially) */
.nav-menu .submenu {
    display: none;
    /* Hidden by default */
    list-style: none;
    padding-left: 20px;
    /* INDENTATION: This creates the "nested" look */
    margin-top: 5px;
    margin-bottom: 5px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    /* Optional: thin guide line */
}

/* 3. Reveal on Hover */
/* When you hover over the Parent (Travel), show the children */
.nav-menu li.has-submenu:hover .submenu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.nav-menu li.has-submenu.open .submenu {
    display: block;
}

/* 4. Submenu Links Styling */
.nav-menu .submenu li a {
    display: block;
    font-size: 12px;
    /* Slightly smaller than main links */
    color: var(--text-muted);
    padding: 5px 0 5px 15px;
    /* Spacing for the text */
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Hover Effect for the Child (Japan) */
.nav-menu .submenu li a:hover {
    color: var(--accent);
    /* Turns Gold */
    transform: translateX(5px);
    /* Slight nudge to the right */
}

/* 5. The Arrow Rotation */
.arrow {
    display: inline-block;
    font-size: 10px;
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.nav-menu li.has-submenu:hover .arrow {
    transform: rotate(180deg);
    /* Flips completely up */
}

.nav-menu li.has-submenu.open .arrow {
    transform: rotate(180deg);
}

/* Optional: Smooth Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =========================================
   3. MAIN CONTENT AREA (Masonry Grid)
   ========================================= */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 40px;
    min-height: 100vh;
}

/* Header for Client/Gallery Pages */
.page-header {
    margin-bottom: 50px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-header h2 {
    font-size: 32px;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.page-header p {
    color: var(--text-muted);
    margin-top: 5px;
    font-size: 14px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* The Masonry Layout */
.masonry-grid {
    column-count: 3;
    /* Creates 3 columns */
    column-gap: var(--gap);
}

.grid-item {
    break-inside: avoid;
    /* Prevents images from being cut in half */
    margin-bottom: var(--gap);
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    background: #1a1a1a;
}

.grid-item img {
    width: 100%;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.3s;
    opacity: 0.9;
}

/* =========================================
   FINAL HOVER EFFECTS (Darken Image + Center Text)
   ========================================= */

/* 1. The Container (Must be black for the darken effect to work) */
.grid-item {
    position: relative;
    background-color: #000000;
    /* When image fades, this black shows through */
    overflow: hidden;
    /* Contains the zoom effect */
    border-radius: 4px;
    display: block;
    /* Ensures no weird inline gaps */
}

/* 2. The Image (Handles the Darkening & Zoom) */
.grid-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 1;
    transition: opacity 0.4s ease, transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    backface-visibility: hidden;
    /* Keeps rendering crisp */
}

/* HOVER STATE: Image fades out (Darkens) and Zooms */
.grid-item:hover img {
    opacity: 0.4;
    /* <--- This is the darken effect you liked */
    transform: scale(1.05);
}

/* 3. The Text Container (Invisible layer sitting on top) */
.grid-overlay {
    position: absolute;
    inset: 0;
    /* Shorthand for top:0, left:0, right:0, bottom:0 */

    /* Perfect Centering Logic */
    display: flex;
    align-items: center;
    /* Vertical Center */
    justify-content: center;
    /* Horizontal Center */

    opacity: 0;
    /* Hidden by default */
    transition: opacity 0.3s ease;
    z-index: 10;
}

/* HOVER STATE: Overlay becomes visible */
.grid-item:hover .grid-overlay {
    opacity: 1;
}

/* 4. The Text Styling */
.grid-overlay span {
    color: #ffffff;
    font-family: var(--font-stack);
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-align: center;

    /* Animation: Slide up slightly */
    transform: translateY(15px);
    transition: transform 0.4s ease;
}

/* HOVER STATE: Text slides into place */
.grid-item:hover .grid-overlay span {
    transform: translateY(0);
}

/* =========================================
   4. MOBILE RESPONSIVENESS
   ========================================= */
@media (max-width: 900px) {
    .masonry-grid {
        column-count: 2;
    }
}

@media (max-width: 600px) {

    /* Turn Sidebar into Top Bar */
    .sidebar {
        position: sticky;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        padding: 20px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        border-bottom: 1px solid #222;
        border-right: none;
        gap: 12px;
        background: var(--bg-sidebar);
        z-index: 1100;
    }

    .brand {
        margin-bottom: 12px;
        width: 100%;
    }

    .brand h1 {
        font-size: 20px;
        width: 100%;
        text-align: center;
    }

    .nav-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 14px;
        justify-content: center;
        width: 100%;
        text-align: center;
    }

    .nav-menu a {
        font-size: 12px;
    }

    .sidebar-footer {
        margin-top: 20px;
        font-size: 10px;
        text-align: center;
    }

    .main-content {
        margin-left: 0;
        padding: 20px;
    }

    .masonry-grid {
        column-count: 1;
    }

    .hide-on-mobile {
        display: none !important;
    }
}

/* =========================================
   HOMEPAGE-SPECIFIC STYLES
   (Makes labels always visible)
   ========================================= */

/* 1. The Overlay Container */
.homepage-grid .grid-overlay {
    /* Always show it */
    opacity: 1 !important;

    /* Move text to the bottom */
    align-items: flex-end !important;
    justify-content: center;
    padding-bottom: 25px;

    /* Add a subtle dark fade at the bottom for readability */
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 50%) !important;
}

/* 2. The Text Itself */
.homepage-grid .grid-overlay span {
    /* No slide-up animation needed */
    transform: translateY(0) !important;

    /* Make it slightly larger and bolder */
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.15em;
}

/* 3. New Hover Effect for Homepage Cards */
/* When hovering, just a subtle zoom and color change to indicate it's a link */

.homepage-grid .grid-item:hover img {
    opacity: 1;
    /* Keep image bright */
    transform: scale(1.03);
    /* Subtle zoom */
}

.homepage-grid .grid-item:hover .grid-overlay span {
    color: var(--accent);
    /* Turn text GOLD on hover */
    transition: color 0.3s ease;
}
