/*
Theme Name: Doug Saltzman
Author: Shoaib Haroon
Version: 1.0
Description: Music Producer Portfolio.
Text Domain: doug-saltzman
*/

/* --- 1. BASE THEME RESET --- */
html { 
    -webkit-text-size-adjust: 100%; 
    -ms-text-size-adjust: 100%; 
    font-family: sans-serif; 
    scroll-behavior: smooth; 
}
body { 
    margin: 0; 
    background-color: #fff; 
    color: #000; 
    font-family: Arial, sans-serif; 
    padding: 0 !important; 
    overflow-x: hidden;
}
* { box-sizing: border-box; }
img { vertical-align: middle; max-width: 100%; display: inline-block; border: 0; }
.container-main { width: 100%; max-width: 90vw; margin: 0 auto; }

/* --- 2. DYNAMIC STICKY HEADER & ADMIN BAR --- */
.fixed-nav-wrapper {
    z-index: 9999;
    position: fixed !important;
    width: 100%;
    top: 0;
    left: 0;
    background-color: #fff !important;
}

/* Adjust for WordPress Admin Bar */
body.admin-bar .fixed-nav-wrapper { top: 32px !important; }
@media screen and (max-width: 782px) {
    body.admin-bar .fixed-nav-wrapper { top: 46px !important; }
    #wpadminbar { position: fixed !important; } 
}

.navbar-logo-center {
    background-color: #fff !important;
    border-bottom: 1px solid #000;
    padding: 15px 0 !important; 
}

@media screen and (max-width: 991px) {
    .navbar-logo-center { padding: 8px 0 !important; }
}

/* --- 3. MASTER CONTENT PUSH (FIXES OVERLAP) --- */
#doug-main-content {
    padding-top: 140px !important; 
}
body.admin-bar #doug-main-content {
    padding-top: calc(140px + var(--wp-admin--admin-bar--height, 32px)) !important;
}

@media screen and (max-width: 991px) {
    #doug-main-content { padding-top: 100px !important; }
    body.admin-bar #doug-main-content {
        padding-top: calc(100px + var(--wp-admin--admin-bar--height, 46px)) !important;
    }
}

/* --- 4. NAVIGATION (DESKTOP & MOBILE) --- */
@media screen and (min-width: 992px) {
    .menu-button { display: none !important; }
    .nav-menu-wrapper-three { display: block !important; opacity: 1 !important; visibility: visible !important; position: static !important; }
    .nav-menu-three, .nav-menu-block { display: flex !important; flex-direction: row !important; align-items: center; }
    .nav-link { font-size: 14px; font-weight: 700; padding: 5px 15px; color: #000; text-transform: uppercase; }
    .nav-link:hover { color: var(--thistle); font-style: italic; }
}

@media screen and (max-width: 991px) {
    .menu-button { display: flex !important; position: relative !important; z-index: 10005 !important; cursor: pointer; }
    .nav-menu-wrapper-three { 
        display: none; position: fixed !important; 
        top: 0; left: 0; width: 100vw; height: 100vh; 
        background-color: #fff !important; z-index: 10000; padding: 0; 
    }
    .nav-menu-wrapper-three.w--open { display: flex !important; flex-direction: column !important; justify-content: center !important; align-items: center !important; }
    .nav-menu-three, .nav-menu-block, .list-item { display: flex !important; flex-direction: column !important; align-items: center !important; }
    .nav-link { font-size: 32px !important; margin: 20px 0 !important; }
    .nav-link.space { display: none !important; }
    .menu-item{ padding-bottom: 20px !important;}
}

/* --- 5. ALBUM FILTERS & DROPDOWN SYSTEM --- */
.album-filter-container { margin-bottom: 60px; padding-bottom: 40px; position: relative; z-index: 1000; overflow: visible !important;}

.filter-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
    align-items: flex-end; /* Aligns all labels/inputs to the same baseline */
    overflow: visible !important;
}

.filter-group { display: flex; flex-direction: column; position: relative; overflow: visible !important; }

/* Global Input/Select/Dropdown Sizing */
.form-input, 
.dropdown-trigger {
    height: 48px !important;
    border: none !important;
    border-bottom: 1px solid #000 !important;
    background: transparent !important;
    padding: 10px 0 !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    width: 100%;
    display: flex;
    align-items: center;
    outline: none !important; /* Removes blue/black selection box */
    box-shadow: none !important;
}

/* Specific Wrapper for Arrows */
.doug-select-wrapper, 
.doug-custom-dropdown { position: relative; width: 100%; display: block; }

/* Arrows (Year & Roles) */
.dropdown-arrow {
    position: absolute !important;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    pointer-events: none; /* Clicking through icon */
    transition: transform 0.3s ease;
    stroke: #000;
}

/* Hide Default Select Arrow */
select.form-input.select {
    appearance: none !important;
    -webkit-appearance: none !important;
    padding-right: 25px !important;
    cursor: pointer;
}

/* Dropdown Content Logic */
.dropdown-trigger { cursor: pointer; justify-content: space-between; padding-right: 25px !important; }
.doug-custom-dropdown.is-open .dropdown-arrow { transform: translateY(-50%) rotate(180deg); }

.dropdown-content {
    display: none; 
    position: absolute; 
    top: 100%; left: 0; width: 100%;
    background-color: #ffffff !important; 
    border: 1px solid #000; 
    border-top: none;
    z-index: 99999 !important; /* Top of everything */
    padding: 25px 30px !important; /* Padding for items so they don't touch left side */
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

.doug-custom-dropdown.is-open .dropdown-content { display: block; }
.role-checkbox-grid { display: flex; flex-direction: column; gap: 12px; }

/* Individual Items inside Dropdown */
.checkbox-item { 
    display: flex !important; 
    align-items: center !important; 
    cursor: pointer;
    margin-bottom: 4px;
}

.checkbox-item input { 
    margin-right: 12px !important; /* Gutter between box and text */
    accent-color: var(--thistle); 
    width: 14px;
    height: 14px;
}

.checkbox-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #000 !important;
}

@media (max-width: 991px) {
    .filter-top-row { grid-template-columns: 1fr; gap: 20px; }
}

/* --- 6. ALBUM GRID --- */
.collection-list.w-dyn-items { display: grid !important; grid-template-columns: 1fr 1fr 1fr !important; gap: 40px !important; }
.album-image { width: 100% !important; height: 100% !important; object-fit: cover !important; aspect-ratio: 1/1; }
.role-wrapper { display: flex !important; flex-wrap: wrap !important; justify-content: flex-end !important; gap: 5px !important; }
.role-text { display: inline-block !important; background-color: var(--thistle) !important; color: #fff !important; padding: 2px 6px !important; font-size: 13px !important; font-weight: 500 !important; text-transform: uppercase !important; border-radius: 2px; }

.album-info-wrapper:hover .album-title{
    color: var(--thistle);
}

@media (max-width: 991px) {
    .collection-list.w-dyn-items { grid-template-columns: 1fr 1fr !important; }
    .role-wrapper { justify-content: flex-start !important; }
}
@media (max-width: 479px) { .collection-list.w-dyn-items { grid-template-columns: 1fr !important; } }

/* --- 7. CONTACT FORM & FOOTER --- */
.contact-wrapper { max-width: 1000px; margin: 80px auto !important; text-align: left; padding: 0 20px; }
.contact-wrapper >h2{ margin-bottom: 80px; font-weight:600; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-bottom: 30px; }
.field-wrapper { margin-bottom: 35px !important; }
.field-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; color: #000; display: block; }
.submit-button { background: #000; color: #fff; border: none; padding: 18px 50px; font-weight: 700; text-transform: uppercase; cursor: pointer; transition: 0.3s; }
.submit-button:hover { background: var(--thistle); color: #000; }

.shortcode-footer-copyright { margin-top: 40px; padding: 40px 0; text-align: center; border-top: 1px solid rgba(0,0,0,0.1); }
.shortcode-footer-copyright p { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.5; }

@media (max-width: 767px) { 
    .form-grid { grid-template-columns: 1fr; gap: 20px; }
    .contact-wrapper { margin: 60px auto !important; }
}

/* --- 8. UTILITIES & GSAP --- */
:root { --thistle: #c0b3e7; }
.h2-textspan:hover { color: var(--thistle) !important; font-style: italic; }
.social-media-link svg { width: 22px; height: 22px; transition: 0.3s; stroke: currentColor !important; }
.social-media-link:hover { color: var(--thistle) !important; }
.social-media-link:hover svg { transform: translateY(-2px); }

/* GSAP Loading Grid */
.load_grid { z-index: 100000; display: grid; grid-template-rows: repeat(10, 1fr); grid-template-columns: repeat(16, 1fr); width: 100%; height: 100vh; position: fixed; top: 0; left: 0; pointer-events: none; }
.load_grid-item { background-color: var(--thistle); }

/* Anchor offsets */
[id] { scroll-margin-top: 120px; }
:target::before { content: ""; display: block; height: 120px; margin: -120px 0 0; }

/* --- 5. ALBUM FILTERS (2-Column Layout) --- */
.album-filter-container { 
    margin-bottom: 60px; 
    padding-bottom: 40px; 
}

.filter-top-row {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Search is gone, so 2 columns now */
    gap: 30px;
    align-items: flex-end;
}

.filter-group { display: flex; flex-direction: column; position: relative; }

.form-input, .dropdown-trigger {
    height: 48px !important;
    border: none !important;
    border-bottom: 1px solid #000 !important;
    background: transparent !important;
    padding: 10px 0 !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
    width: 100%;
    display: flex;
    align-items: center;
    outline: none !important;
}

.doug-select-wrapper, .doug-custom-dropdown { position: relative; width: 100%; display: block; }

.dropdown-arrow {
    position: absolute !important;
    right: 0; top: 50%; transform: translateY(-50%);
    width: 14px; height: 14px; pointer-events: none; transition: transform 0.3s ease;
}

select.form-input.select { appearance: none !important; padding-right: 25px !important; cursor: pointer; }

.doug-custom-dropdown.is-open .dropdown-arrow { transform: translateY(-50%) rotate(180deg); }
.dropdown-content {
    display: none; position: absolute; top: 100%; left: 0; width: 100%;
    background-color: #fff; border: 1px solid #000; border-top: none;
    z-index: 9999; padding: 25px 30px; box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}
.doug-custom-dropdown.is-open .dropdown-content { display: block; }
.role-checkbox-grid { display: flex; flex-direction: column; gap: 12px; }
.checkbox-item { display: flex; align-items: center; cursor: pointer; margin-bottom: 4px; }
.checkbox-item input { margin-right: 12px; accent-color: var(--thistle); width: 14px; height: 14px; }
.checkbox-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #000; }

@media (max-width: 767px) { .filter-top-row { grid-template-columns: 1fr; gap: 20px; } }

/* --- 6. PREMIUM LOAD MORE BUTTON --- */
.load-more-box {
    width: 100% !important; aspect-ratio: 1 / 1 !important;
    background-color: #fff; border: 1px solid #000;
    display: flex !important; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.4s ease;
}
.load-more-content { text-align: center; color: #000; }
.load-text { display: block; font-size: 28px; font-weight: 700; text-transform: uppercase; }
.load-count { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.4; margin-top: 10px; }
.load-more-box:hover { background-color: var(--thistle); color: #fff; border-color: var(--thistle); }
.load-more-box:hover .load-count { color: #fff; opacity: 1; }

.is-extra-album { display: none; opacity: 0; }

/* --- ALBUM GRID --- */
.collection-list.w-dyn-items {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 40px !important;
}

.is-extra-album {
    display: none;
    opacity: 0;
}

/* --- LOAD MORE BOX --- */
.load-more-box {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    background-color: #fff;
    border: 1px solid #000;
    display: flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s ease;
}
.load-more-box:hover { background-color: var(--thistle); color: #fff; border-color: var(--thistle); }
.load-text { display: block; font-size: 28px; font-weight: 700; text-transform: uppercase; }
.load-count { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; opacity: 0.4; margin-top: 10px; }

/* --- LOADING GRID SAFETY FIX --- */
.load_grid {
    z-index: 100000;
    display: grid;
    grid-template-rows: repeat(10, 1fr);
    grid-template-columns: repeat(16, 1fr);
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0; 
    left: 0;
    /* MAGIC LINE: Allows you to click links even if the grid is visible */
    pointer-events: none !important; 
}

.load_grid-item {
    background-color: var(--thistle);
    opacity: 1; /* Starts fully visible */
    will-change: opacity;
}

/* --- DYNAMIC MENU LINK STYLING --- */
.nav-menu-block li {
    display: inline-block;
}

/* Forces WP Menu items to look like Webflow .nav-link */
.nav-menu-block li a {
    color: #000 !important;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 15px;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-menu-block li a:hover {
    color: var(--thistle) !important;
    font-style: italic;
}

/* Mobile adjustments for the new dynamic list */
@media screen and (max-width: 991px) {
    .nav-menu-block {
        display: flex !important;
        flex-direction: column !important;
    }
    .nav-menu-block li a {
        font-size: 32px !important;
        margin: 15px 0;
    }
    .line-div {
    display: block !important;
    margin-top: 4vw;
    margin-bottom: 4vw;
    background-color: var(--thistle) !important;
    width: 100%;
    height: 1px;
    }

}

@media screen and (max-width: 767px) {
    /* If you enable 4 fields, they stack nicely in 1 column on mobile */
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
}

/* --- FORCE YEAR TEXT VISIBILITY --- */
.year-text {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    color: #000 !important; /* Ensure it's not white-on-white */
    font-size: 16px !important;
    font-weight: 700 !important;
}

/* Ensure the container hasn't collapsed */
.year-and-role-wrapper {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    min-height: 30px !important;
    margin-top: 10px !important;
}

.flex-link-wrapper {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    width: 100% !important;
}