@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Outfit:wght@500;600;700;800&family=Oswald:wght@400;700&display=swap');

:root {
    --bg-obsidian: #1A1A1D;
    --accent-sanguine: #6F2232;
    --ui-iron-ore: #4E4E50;
    --text-parchment: #C5C6C7;
    --cta-ethereal: #950740;

    /* Dynamic Theme Variables */
    --bg-header: rgba(26, 26, 29, 0.85);
    --text-header-flat: #CCCCCC;
    --text-body-flat: #AAAAAA;

    /* Dynamic Shadows & Gradients */
    --bg-gradient-start: #1e1e22;
    --text-shadow-h1: 0 2px 10px rgba(0, 0, 0, 0.8);
    --text-shadow-p: 0 1px 4px rgba(0, 0, 0, 0.9);

    --header-height: 80px;
    --max-width: 1800px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    margin-left: 20px;
    color: var(--text-parchment);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle:hover {
    color: var(--cta-ethereal);
    transform: rotate(15deg);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.light-mode {
    --bg-obsidian: #F5F5F7;
    /* Light Paper Background */
    --text-parchment: #333333;
    /* Dark Charcoal Text */
    --bg-header: rgba(245, 245, 247, 0.85);
    /* Light Translucent Header */
    --text-header-flat: #333333;
    /* Dark Gray Headers */
    --text-body-flat: #555555;
    /* Light Mode Overrides */
    --bg-gradient-start: rgba(30, 30, 34, 0.1);
    --text-shadow-h1: 0 0 15px rgba(255, 255, 255, 1);
    --text-shadow-p: 0 0 10px rgba(255, 255, 255, 1);
    /* Medium Gray Body */
}

/* Force buttons to keep light text in light mode */
.light-mode .btn {
    color: #C5C6C7;
}

.light-mode .header-logo {
    background: var(--text-parchment);
}

.light-mode .logo a {
    color: var(--text-parchment);
}

.light-mode .logo a:hover .header-logo {
    background: #6f2232;
}

.light-mode .logo a:hover {
    color: #6f2232;
}

#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-sanguine);
    box-shadow: 0 0 10px var(--cta-ethereal);
    width: 0%;
    z-index: 2000;
    transition: width 0.4s ease, opacity 0.3s ease;
    pointer-events: none;
    opacity: 0;
}

#loading-bar.active {
    opacity: 1;
    width: 30%;
    /* Initial jump */
}

#loading-bar.finish {
    width: 100% !important;
    transition: width 0.3s ease-out;
}

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

html,
body {
    overflow-x: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text-parchment);
    background: radial-gradient(circle at top center, var(--bg-gradient-start) 0%, var(--bg-obsidian) 100%);
    background-color: var(--bg-obsidian);
    line-height: 1.7;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header & Nav */
header {
    background-color: var(--bg-header);
    /* Obsidian with transparency */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    height: var(--header-height);
    color: var(--text-parchment);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    display: flex;
    align-items: center;
    border-bottom: 1px solid rgba(78, 78, 80, 0.3);
    /* iron-ore transparent */
}

.nav-container {
    max-width: var(--max-width);
    margin: 0 auto;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
}

.logo {
    font-family: 'Alternate Gothic No1 D', 'Oswald', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.logo a {
    color: var(--text-parchment);
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-logo {
    width: 2.2rem;
    height: 1.25rem;
    background: var(--text-parchment);
    -webkit-mask-image: url('../images/CurrentLogoPNG.png');
    mask-image: url('../images/CurrentLogoPNG.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: var(--transition-smooth);
    transform: translate(3px, 1px);
}

.logo a:hover .header-logo {
    /* transform: scale(1.05); DISABLED as requested */
    background: var(--accent-sanguine);
    /* Turn red on hover */
}

.logo a:hover {
    color: var(--accent-sanguine);
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    color: var(--text-parchment);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    transition: color 0.3s ease, opacity 0.3s ease, text-shadow 0.3s ease;
    opacity: 0.7;
}

nav ul li a:hover {
    opacity: 1;
    color: var(--cta-ethereal);
    font-weight: 700;
    text-shadow: 0 0 1px var(--cta-ethereal);
}

nav ul li a.active {
    opacity: 1;
    color: var(--cta-ethereal);
    border-bottom: 2px solid var(--cta-ethereal);
    font-weight: 700;
    text-shadow: 0 0 1px var(--cta-ethereal);
}

/* Dropdown Navigation */
.nav-item-dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    background: var(--bg-header);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(78, 78, 80, 0.3);
    min-width: 130px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    padding: 5px 0;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.nav-item-dropdown:hover .dropdown-menu,
.nav-item-dropdown.keep-open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li {
    margin: 0 !important;
    display: block !important;
}

.dropdown-menu li a {
    padding: 8px 15px;
    display: block;
    font-size: 0.8rem;
    letter-spacing: 0.1em;
    text-align: center;
    color: var(--text-parchment);
    border-bottom: none !important;
}

.dropdown-menu li a:hover {
    background: rgba(111, 34, 50, 0.1);
    color: var(--cta-ethereal) !important;
}

/* Social Media Icons */
.social-links {
    display: flex;
    gap: 20px;
    align-items: center;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    opacity: 0.7;
}

.social-links a:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: var(--text-parchment);
    transition: var(--transition-smooth);
}

.social-links a:hover svg {
    fill: var(--cta-ethereal);
}

/* Circular Footer Icons (Team Cherry Style) */
.social-links.social-circular {
    gap: 12px;
}

.social-links.social-circular a {
    width: 24px;
    height: 24px;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: var(--transition-smooth);
}

.social-links.social-circular a svg {
    width: 100%;
    height: 100%;
    fill: var(--text-parchment);
}

.social-links.social-circular a:hover {
    transform: scale(1.1);
    opacity: 1;
}

.social-links.social-circular a:hover svg {
    fill: var(--cta-ethereal);
}

/* Main Content */
main {
    flex: 1;
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 80px;
    width: 100%;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.fade-out {
    opacity: 0;
    /* transform removed */
}

.fade-in {
    opacity: 1;
    transform: translateY(0);
}

footer {
    border-top: 1px solid rgba(78, 78, 80, 0.2);
    padding: 60px 0;
    text-align: center;
    font-size: 0.75rem;
    color: var(--ui-iron-ore);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}

.footer-content .social-links {
    justify-content: center;
}

/* Project Detail Page */
.project-detail {
    margin-top: -40px;
    /* Offset main margin to bleed hero to top */
}

.project-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    margin: 0 -40px 60px -40px;
    background: #000;
}

.project-hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 800px;
}

.category-tag {
    display: inline-block;
    padding: 4px 12px;
    background: var(--accent-sanguine);
    color: var(--text-parchment);
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    border-radius: 2px;
    margin-bottom: 20px;
}

.project-subtitle {
    font-size: 1.1rem;
    opacity: 0.8;
    margin-top: 10px;
}

.project-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(26, 26, 29, 0.3) 0%, rgba(26, 26, 29, 0.95) 100%);
    z-index: 1;
}

.project-hero-image-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--ui-iron-ore);
    opacity: 0.3;
}

.project-overview {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.project-specs {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(78, 78, 80, 0.2);
    padding: 30px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: fit-content;
}

.spec-item {
    display: flex;
    flex-direction: column;
}

.spec-item .label {
    font-size: 0.7rem;
    text-transform: uppercase;
    color: var(--ui-iron-ore);
    letter-spacing: 1px;
}

.spec-item .value {
    font-weight: 500;
}

.project-gallery {
    margin-bottom: 80px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.gallery-item-placeholder {
    aspect-ratio: 16 / 9;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(78, 78, 80, 0.2);
    transition: var(--transition-smooth);
}

.gallery-item-placeholder.large {
    grid-column: span 2;
}

.gallery-item-placeholder:hover {
    border-color: var(--accent-sanguine);
}

.project-credits {
    padding: 60px 40px;
    background: rgba(111, 34, 50, 0.03);
    border-radius: 4px;
    margin-bottom: 40px;
}

.credits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.credit-item {
    display: flex;
    flex-direction: column;
}

.credit-item .role {
    font-size: 0.75rem;
    color: var(--ui-iron-ore);
    text-transform: uppercase;
    margin-bottom: 4px;
}

.credit-item .name {
    font-weight: 600;
    color: var(--text-parchment);
}

/* Forms */
.contact-section {
    max-width: 600px;
    margin-top: 40px;
}

#contact-form {
    display: flex;
    flex-direction: column;
}

form div {
    margin-bottom: 24px;
}

label {
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ui-iron-ore);
    margin-bottom: 8px;
    display: block;
}

input,
textarea {
    width: 100%;
    padding: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(78, 78, 80, 0.3);
    border-radius: 4px;
    color: var(--text-parchment);
    font-family: inherit;
    transition: var(--transition-smooth);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--accent-sanguine);
    background: rgba(255, 255, 255, 0.05);
}

/* Press Kit */
.press-facts {
    list-style: none;
    padding: 0;
}

.press-facts li {
    margin-bottom: 12px;
    color: var(--text-parchment);
}

.press-facts li strong {
    color: var(--accent-sanguine);
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-right: 10px;
}

/* Typography */
h1,
h2,
h3 {
    font-family: 'Outfit', sans-serif;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-parchment);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2rem;
    color: var(--accent-sanguine);
}

/* Hero Section */
.hero {
    padding: 80px 0;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.hero p {
    font-size: 1.25rem;
    color: var(--ui-iron-ore);
    margin-bottom: 40px;
    font-weight: 300;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 14px 32px;
    background-color: var(--accent-sanguine);
    color: var(--text-parchment);
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.9rem;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn:hover {
    background-color: var(--cta-ethereal);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}


.hero-home {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 360px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: -40px;
    padding: 0;
    box-sizing: border-box;
}

.page-header {
    text-align: center;
    padding: 60px 0 40px;
    max-width: 800px;
    margin: 0 auto;
}

.page-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3rem;
    margin-bottom: 16px;
    color: var(--text-header-flat);
}

.page-header p {
    font-size: 1.1rem;
    color: var(--text-body-flat);
}

/* Global H1 fallback */
h1 {
    font-family: 'Outfit', sans-serif;
    color: #fff;
}

.hero-banner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
}

.hero-home h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-header-flat);
    /* Flat gray */
    text-shadow: var(--text-shadow-h1);
}

.hero-home p {
    font-size: 1.2rem;
    color: var(--text-body-flat);
    /* Flat gray */
    opacity: 1;
    text-shadow: var(--text-shadow-p);
}

/* Hero Image */
.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures image covers area without distortion */
    opacity: 0.4;
}

/* Expertise Grid */
.expertise-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 60px 0;
    flex-wrap: wrap;
}

.expertise-card {
    background: rgba(78, 78, 80, 0.2);
    border: 1px solid rgba(197, 198, 199, 0.1);
    /* Square corners */
    text-decoration: none;
    transition: var(--transition-smooth);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 350px;
}

.expertise-card:hover {
    transform: translateY(-5px);
    border-color: var(--cta-ethereal);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    filter: grayscale(1);
    transition: var(--transition-smooth);
}

.expertise-card:hover .card-image {
    filter: grayscale(0);
}

.card-content {
    padding: 24px;
}

.card-content h3 {
    color: var(--text-header-flat);
    /* Matched to section header gray */
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    margin-bottom: 8px;
}

.card-content p {
    color: var(--text-parchment);
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Studio Intro */
.studio-intro {
    text-align: center;
    max-width: 700px;
    margin: 60px auto 20px;
    /* Adjusted spacing as requested */
    padding: 20px;
    /* Reduced padding since box is gone */
}

.about-section {
    text-align: center;
    max-width: 800px;
    margin: 60px auto 30px;
    padding: 0 20px;
}

.about-logo {
    display: block;
    margin: 0 auto 40px;
    width: 250px;
    height: 140px;
    /* Adjusting for logo proportions */
    background: radial-gradient(circle at 35% 35%, #ab4056 0%, #6f2232 100%);
    -webkit-mask-image: url('../images/CurrentLogoPNG.png');
    mask-image: url('../images/CurrentLogoPNG.png');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

.artist-profile {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 50%;
    margin: 32px auto 48px;
    display: block;
    /* Border removed */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Team Grid Structure */
.team-grid {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px;
    margin-top: 20px;
}

.team-member {
    flex: 1;
    min-width: 300px;
    max-width: 600px;
    text-align: center;
}

.team-member p {
    max-width: 480px;
    /* Tighter margins for text */
    margin: 0 auto;
    color: var(--text-parchment);
    font-size: 1rem;
    line-height: 1.6;
}

.about-section h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text-header-flat);
    /* Flat gray */
}

.studio-intro h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 2rem;
    margin-bottom: 16px;
    color: var(--text-header-flat);
    /* Flat gray */
}

.studio-intro p {
    color: var(--text-body-flat);
    /* Darker gray */
    margin-bottom: 24px;
}

.text-link {
    color: var(--cta-ethereal);
    text-decoration: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.text-link:hover {
    color: #fff;
}

.text-link .arrow {
    transition: transform 0.3s ease;
}

.text-link:hover .arrow {
    transform: translateX(4px);
}

/* Portfolio Grid */
.works-filter {
    display: flex;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(78, 78, 80, 0.3);
    border-radius: 100px;
    color: var(--text-parchment);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-smooth);
}

.filter-btn:hover {
    border-color: var(--accent-sanguine);
    color: var(--accent-sanguine);
}

.filter-btn.active {
    background: var(--accent-sanguine);
    border-color: var(--accent-sanguine);
    color: var(--text-parchment);
    box-shadow: 0 4px 15px rgba(111, 34, 50, 0.3);
}

.portfolio-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 24px;
    margin-top: 40px;
}

.project-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(78, 78, 80, 0.2);
    padding: 40px;
    text-align: center;
    transition: var(--transition-smooth);
    border-radius: 8px;
}

.project-card:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-sanguine);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.project-thumbnail {
    background: rgba(0, 0, 0, 0.3);
    height: 200px;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--ui-iron-ore);
}

/* Art Gallery Redesign */
.art-project-card {
    position: relative;
    display: block;
    height: 85px;
    width: calc(17.5% - 24px);
    max-width: 450px;
    min-width: 180px;
    overflow: hidden;
    border: 1px solid rgba(78, 78, 80, 0.2);
    border-radius: 0;
    text-decoration: none;
    transition: var(--transition-smooth);
    cursor: pointer;
}

.art-card-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.art-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.2);
    transition: var(--transition-smooth);
    z-index: 1;
}

.art-card-overlay h3 {
    color: #fff;
    margin: 0;
    font-family: 'Alternate Gothic No1 D', 'Oswald', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    text-align: center;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    pointer-events: none;
}

.art-project-card:hover,
.art-project-card.active {
    border-color: var(--accent-sanguine);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.art-project-card:hover .art-card-bg,
.art-project-card.active .art-card-bg {
    opacity: 0.8;
}

.art-project-card:hover .art-card-overlay {
    background: rgba(111, 34, 50, 0.35);
}

.art-project-card.active .art-card-overlay {
    background: rgba(111, 34, 50, 0.7);
}

/* Art Gallery Spacing Refinements */
.art-grid-top {
    margin-top: 0 !important;
    padding-bottom: 20px;
}

/* Dynamic Gallery Sections */
.gallery-section {
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    padding: 20px 5%;
}

.gallery-section.active {
    display: block;
    opacity: 1;
}

.cascading-gallery {
    /* Masonry handles width/columns via JS, but we ensure container is relative */
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.gallery-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 12px;
    break-inside: avoid;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

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

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 1024px) {
    /* Responsive Masonry via CSS fallback removed - handled by JS */
}

@media (max-width: 600px) {
    /* Responsive Masonry via CSS fallback removed - handled by JS */
}

.flavor-text-bottom {
    margin-top: 40px;
    text-align: center;
    color: var(--text-body-flat);
    font-size: 0.95rem;
    opacity: 0.8;
}


/* Gallery Section Transitions */
.gallery-section {
    display: none;
    opacity: 0;
    transition: opacity 0.25s ease-in-out;
    /* Faster transition */
}

.gallery-section.visible {
    display: block;
}

.gallery-section.fade-in {
    opacity: 1;
}

/* Masonry Layout Overrides */
.cascading-gallery {
    /* Masonry handles width/columns via JS, but we ensure container is relative */
    position: relative;
    width: 100%;
    margin: 0 auto;
    opacity: 0;
    /* Hide initially to prevent layout shift visibility */
    transition: opacity 0.4s ease;
}

.cascading-gallery.loaded {
    opacity: 1;
}

.gallery-item {
    /* Fixed width for Masonry to measure. 4 columns approx minus gap */
    width: calc(25% - 12px);
    margin-bottom: 12px;
    float: left;
    /* Fallback */
    cursor: pointer;
    overflow: hidden;
    position: relative;
    /* Reset old styles */
    display: block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.gallery-item img,
.gallery-item video {
    width: 100%;
    display: block;
    transition: transform 0.5s ease, filter 0.3s ease;
}

.gallery-item video {
    object-fit: cover;
}

.gallery-item:hover {
    transform: translateY(-5px);
}

.gallery-item:hover img,
.gallery-item:hover video {
    filter: brightness(0.8);
    transform: scale(1.05);
}

/* Responsive Masonry Widths (Standard 4-Column) */
@media (max-width: 1024px) {
    .gallery-item {
        width: calc(50% - 12px);
    }
}

@media (max-width: 600px) {
    .gallery-item {
        width: 100%;
        float: none;
    }
}

/* Specialized 5-Column Grid (Artbooks) */
.artbooks-grid .gallery-item:not(.is-standalone) {
    width: calc(20% - 12px);
    /* 5 Columns (Desktop) */
}

@media (max-width: 1200px) {
    .artbooks-grid .gallery-item:not(.is-standalone) {
        width: calc(33.33% - 12px);
        /* 3 Columns (Tablet) */
    }
}

@media (max-width: 800px) {
    .artbooks-grid .gallery-item:not(.is-standalone) {
        width: calc(50% - 12px);
        /* 2 Columns (Small Tablet) */
    }
}

@media (max-width: 500px) {
    .artbooks-grid .gallery-item:not(.is-standalone) {
        width: 100%;
        /* 1 Column (Mobile) */
    }
}

/* =========================================
   New Swiper Lightbox Styles
   ========================================= */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    /* Deep dark background */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-swiper {
    width: 100%;
    height: 85vh;
    /* Leave room for header/footer controls */
}

.swiper-slide {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.swiper-slide img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    user-select: none;
}

/* Controls - Top Right */
.lightbox-top-controls {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 10001;
    display: flex;
    gap: 15px;
}

#lb-close {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    width: 36px;
    /* 10% smaller (was 40px) */
    height: 36px;
    /* 10% smaller (was 40px) */
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

#lb-close:hover {
    color: white;
    transform: scale(1.1);
}

/* Custom Navigation Arrows (Mimic Reference) */
.custom-swiper-button {
    color: #ffffffb3 !important;
    /* Force transparent white */
    transition: color 0.3s;
    width: 50px;
    height: 50px;
}

.custom-swiper-button:hover {
    color: white !important;
}

.custom-swiper-button::after {
    font-size: 1.8rem !important;
    /* Force 10% smaller */
    font-weight: 300;
}

/* Move arrows inward */
.swiper-button-prev.custom-swiper-button {
    left: 40px !important;
}

.swiper-button-next.custom-swiper-button {
    right: 40px !important;
}

/* Caption Area */
.lightbox-caption-area {
    text-align: center;
    color: #ccc;
    padding: 20px;
    font-family: 'Inter', sans-serif;
    /* Clean font */
    font-size: 1rem;
    position: absolute;
    bottom: 0;
    width: 100%;
    z-index: 10001;
}

.lightbox-caption-area p {
    margin: 0;
    max-width: 800px;
    margin: 0 auto;
}

/* =========================================
   Page Transitions & Loading Bar
   ========================================= */
#loading-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background-color: #fff;
    /* White accent */
    z-index: 99999;
    transition: width 0.4s ease;
}

body.light-mode #loading-bar {
    background-color: #8B0000;
    /* Dark Red for Light Mode */
}

/* Light Mode Header Branding */
body.light-mode .header-logo {
    background: #888;
}

body.light-mode .logo a {
    color: #888;
}

body.light-mode .logo a:hover .header-logo {
    background: var(--accent-sanguine);
}

body.light-mode .logo a:hover {
    color: var(--accent-sanguine);
}

#loading-bar.active {
    width: 95%;
    transition: width 2s ease-in-out;
    /* Fast initial movement */
}

#loading-bar.finish {
    width: 100% !important;
    transition: width 0.3s ease-out;
}

/* Main Content Transitions */
main {
    padding-top: var(--header-height);
    opacity: 1;
    transition: opacity 0.25s ease-in-out;
    will-change: opacity;
    /* Optimizes for cold-start */
}

main.fade-out {
    opacity: 0;
}

main.fade-in {
    opacity: 1;
}








/* Multi-type Gallery Support */
.gallery-item.text-type {
    background: none !important;
    border: none !important;
    padding: 0;
    display: block;
    text-align: left;
    min-height: auto;
    cursor: default !important;
    box-shadow: none !important;
}

.gallery-item.text-type .card-content h3 {
    color: var(--accent-sanguine);
    margin-bottom: 12px;
}

.video-container iframe {
    width: 100%;
    height: 100%;
}

.text-slide-content {
    max-width: 600px;
    padding: 60px;
    background: rgba(26, 26, 29, 0.95);
    border: 1px solid var(--ui-iron-ore);
    color: var(--text-parchment);
    font-family: 'Inter', sans-serif;
    line-height: 1.8;
    text-align: left;
    border-radius: 4px;
}

.text-slide-content h4 {
    color: var(--accent-sanguine);
    margin-bottom: 20px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}


/* Specific Text Content Grid Styling */
.no-click {
    cursor: default !important;
}

.no-click:hover {
    transform: none !important;
}

.text-content-grid h4 {
    font-family: 'Outfit', sans-serif;
    color: var(--accent-sanguine);
    margin-bottom: 8px;
    font-size: 1.1rem;
    letter-spacing: 0.1em;
}

.text-content-grid p {
    color: var(--text-parchment);
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    opacity: 1;
}






/* =========================================
   Animation Gallery Multi-Media UI 
   ========================================= */

/* Video Player Overlay */
.video-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px !important;
    height: 60px !important;
    background: rgba(149, 7, 64, 0.8);
    border-radius: 50% !important;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition-smooth);
    pointer-events: none;
    z-index: 10;
}

.video-overlay svg {
    width: 30px;
    height: 30px;
    margin-left: 4px;
    fill: currentColor;
}

.gallery-item:hover .video-overlay {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(149, 7, 64, 1);
}

/* Video Containers */
.video-container {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: black;
    position: relative;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    width: 100%;
    height: 100%;
    border: none;
}

/* Local video in lightbox */
.video-container-local {
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-container-local video {
    max-width: 90vw;
    max-height: 80vh;
    width: auto;
    height: auto;
}

/* Lightbox-Specific Video Centering & Sizing */
.swiper-slide .video-container {
    width: 70vw;
    max-width: 800px;
    max-height: 75vh;
    margin: auto;
}

/* Gallery-Grid Text Blocks */
.gallery-item.text-type {
    background: none !important;
    border: none !important;
    padding: 0;
    cursor: default !important;
    box-shadow: none !important;
}

/* Specialized Standalone Row (Shared across all galleries) */
.cascading-gallery .gallery-item.is-standalone {
    width: 100% !important;
    float: none !important;
    clear: both;
    display: flex;
    justify-content: center;
    padding: 5px 0 15px 0;
    pointer-events: none;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    --featured-width: 600px;
}

.cascading-gallery .gallery-item.is-standalone>img,
.cascading-gallery .gallery-item.is-standalone>.video-container,
.cascading-gallery .gallery-item.is-standalone>.text-content-grid,
.cascading-gallery .gallery-item.is-standalone>.etsy-button-row {
    width: var(--featured-width) !important;
    max-width: 100% !important;
    margin: 0 auto;
    pointer-events: auto;
}


/* Teal Highlight for Six Sided Serpent */
.serpent-card:hover,
.serpent-card.active {
    border-color: #008080 !important;
}

.serpent-card:hover .art-card-overlay {
    background: rgba(0, 128, 128, 0.25) !important;
}

.serpent-card.active .art-card-overlay {
    background: rgba(0, 128, 128, 0.5) !important;
}
/* Etsy Button Layout */
.etsy-button-row {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 20px 0 40px;
}




