/*
Theme Name: Alex Haro Portfolio
Author: Alex Haro
*/

html {
    background-color: #0a0a0a;
}
body {
    font-family: Arial, sans-serif;
    color: #e5e5e5;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 10px;
    background-color: transparent !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

html.light { background-color: #f5f5f5; }
html.light body { color: #1a1a1a; }
html.light ::-webkit-scrollbar-thumb { background: #ccc; }
html.light .themed-bg { background-color: #f5f5f5 !important; }
html.light .themed-border { border-color: #d1d5db !important; }
html.light #case-view .themed-border { border-color: #1a1a1a !important; }
html.light .themed-text { color: #1a1a1a !important; }
html.light .themed-text-secondary { color: #525252 !important; }
html.light .glass-panel::before { background-color: rgba(245, 245, 245, 0.4) !important; }
html.light #theme-toggle-btn div { background-color: #1a1a1a; border-color: #1a1a1a; }
html.light #zoom-slider { background: #8F8F8F; }
html.light #zoom-slider::-webkit-slider-thumb { border-color: #1a1a1a; background-color: #1a1a1a; }
html.light #zoom-slider::-moz-range-thumb { border-color: #1a1a1a; background-color: #1a1a1a; }
html.light #case-view button { color: #1a1a1a; }
html.light #case-content { color: #1a1a1a; }

.themed-bg { background-color: #0a0a0a; }
.themed-border { border-color: #4b5563; }
#theme-toggle-btn div { background-color: #e5e5e5; border-color: #e5e5e5; }
#case-view button { color: #e5e5e5; }
#case-content { color: #e5e5e5; }

body.admin-bar #main-header { top: 32px; }
@media screen and (max-width: 782px) { body.admin-bar #main-header { top: 46px; } }

#header-content {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 15px;
    padding-right: 9px; 
}

.overlay-padding {
    padding-top: 10px;
    padding-bottom: 10px;
    padding-left: 15px;
    padding-right: 15px; 
}

#main-header {
    z-index: 30;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
body.case-view-open #main-header,
body.about-view-open #main-header {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

#preloader { transition: opacity 0.5s ease, visibility 0.5s ease; }
#preloader.hidden { opacity: 0; visibility: hidden; }

.glass-panel {
    position: relative;
}
.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(10, 10, 10, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: -1;
    transition: background-color 0.3s ease, opacity 0.3s ease-out;
}
#case-view.glass-panel::before,
#mobile-menu-overlay.glass-panel::before {
    opacity: 0;
}
#case-view.open.glass-panel::before,
#mobile-menu-overlay.open.glass-panel::before {
    opacity: 1;
}

body, html.light, #theme-toggle-btn div, .themed-bg, .themed-text, #case-view, #mobile-menu-overlay, #case-view button, #case-content {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
#gallery { transition: opacity 0.3s ease; }
#case-image.no-transition { transition: none; }

::-webkit-scrollbar { display: none; }

#case-view, #mobile-menu-overlay {
    visibility: hidden;
    transition: visibility 0s linear 0.3s;
}
#case-view.open, #mobile-menu-overlay.open {
    visibility: visible;
    transition-delay: 0s;
}

#lightbox-container {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    max-width: calc(100vw - 100px);
    max-height: calc(100vh - 100px);
    margin: auto;
    display: flex;
    opacity: 0;
    transition: opacity 0.3s ease;
}

#case-view.open #lightbox-container {
    opacity: 1;
}

#about-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

#about-overlay.open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#about-overlay.open .glass-panel::before {
    opacity: 1;
}

#about-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

#about-overlay.open {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
}

#about-overlay.open .glass-panel::before {
    opacity: 1;
}

#about-overlay h1 {
    position: relative;
    top: -2px;
}

#close-about-btn {
    position: fixed;
    top: 10px;
    right: 9px; 
    z-index: 50;
}

#lightbox-image-container {
    flex-grow: 1;
    min-width: 0;
    background-color: #101010;
    transition: background-color 0.3s ease, width 0.3s ease, height 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

html.light #lightbox-image-container {
    background-color: #ffffff;
}

#case-image-panel {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

#case-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#lightbox-sidebar {
    width: 350px;
    flex-shrink: 0;
    background-color: #101010;
    color: #e5e5e5;
    display: none;
    transition: background-color 0.3s ease, color 0.3s ease;
}

html.light #lightbox-sidebar {
    background-color: #ffffff;
    color: #0a0a0a;
}

body.case-view-open #lightbox-sidebar {
    display: flex;
    flex-direction: column;
}

#lightbox-container.vertical-image-mode {
    top: 50%;
    bottom: auto;
    left: 50%;
    transform: translate(-50%, -50%);
    right: auto;
    width: auto;
    max-height: calc(100vh - 100px);
}

#lightbox-container.vertical-image-mode #case-image {
    object-fit: contain;
}

#case-content {
    padding: 20px;
    font-size: 9px;
    line-height: 1.6;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 0;
    gap: 20px;
}

@media (max-width: 1024px) {
    #lightbox-container {
        flex-direction: column;
        top: 25px;
        left: 25px;
        right: 25px;
        bottom: 25px;
        width: auto;
        height: auto;
        max-width: none;
        max-height: none;
        margin: 0;
    }

    #lightbox-image-container {
        height: 75%;
        flex-grow: 0;
    }

    #lightbox-sidebar {
        width: 100%;
        height: 25%;
        flex-shrink: 1;
    }

    #case-image {
        width: 100%;
        height: 100%;
        max-width: none;
    }

    #lightbox-container.vertical-image-mode {
        top: 25px;
        bottom: 25px;
        left: 25px;
        right: 25px;
        transform: none;
        width: auto;
        height: auto;
    }

    #lightbox-container.vertical-image-mode #case-image {
        object-fit: cover;
    }
}

#case-image-panel, #case-content-wrapper {
    opacity: 0;
    transition: opacity 0.3s ease-in;
    z-index: 1;
}
#case-view.open #case-image-panel,
#case-view.open #case-content-wrapper {
    opacity: 1;
    transition-delay: 0.05s;
}

.description-content p { margin: 0 0 1.5em; }
.description-content p:last-of-type { margin-bottom: 0; }

#gallery { display: grid; gap: 2px; grid-auto-rows: 10px; }

#case-image-panel { overflow: hidden; }
#case-image { transition: transform 0.3s ease; cursor: zoom-in; }
#case-image.zoomed { cursor: zoom-out; }
.gallery-item { overflow: hidden; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity 0.3s ease; }

.active-category, .active-nav { text-decoration: underline; text-underline-offset: 4px; }

#zoom-slider { -webkit-appearance: none; appearance: none; width: 100px; height: 1px; background: #333; outline: none; opacity: 0.7; transition: opacity .2s, width .3s ease, background-color .3s ease; }
#zoom-slider:hover { opacity: 1; }
#zoom-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 8px; height: 8px; background: currentColor; border-radius: 50%; cursor: pointer; transition: background-color .3s ease, border-color .3s ease; }
#zoom-slider::-moz-range-thumb { width: 8px; height: 8px; background: currentColor; border-radius: 50%; cursor: pointer; transition: background-color .3s ease, border-color .3s ease; }

#theme-toggle-btn {
    pointer-events: none;
}
#theme-toggle-btn > div {
    pointer-events: auto;
    cursor: pointer;
}