/*
 Theme Name:   Hello Elementor Child
 Theme URI:    https://picturesbyevan.com
 Description:  Child theme for Hello Elementor
 Author:       Evan
 Author URI:   https://picturesbyevan.com
 Template:     hello-elementor
 Version:      1.0.0
 License:      GNU General Public License v2 or later
 License URI:  https://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  hello-elementor-child
*/

/* Add your custom styles below this line */

/* =============================================
   CUSTOM VIEWFINDER CURSOR
   ============================================= */

body {
    cursor: url('img/viewfinder.svg') 16 16, auto;
}

a, button, [role="button"], input[type="submit"],
input[type="button"], select, label[for],
.collage-item, .lightbox-close, .lightbox-prev,
.lightbox-next, .lightbox-thumb, .hero-menu-toggle,
.hero-scroll-indicator, .hero-logo {
    cursor: url('img/viewfinder-focus.svg') 16 16, pointer !important;
}

/* =============================================
   HERO SECTION
   ============================================= */

.hero-section {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    height: 100vh;
    overflow: hidden;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

@media (max-width: 768px) {
    .hero-slide {
        transform: scale(1.15);
    }

    .hero-slide.active {
        animation: kenburns 8s ease-in-out forwards;
    }

    @keyframes kenburns {
        0% { transform: scale(1.15); }
        100% { transform: scale(1.35); }
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3) 0%, transparent 30%, transparent 70%, rgba(0,0,0,0.4) 100%);
}

.hero-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    z-index: 10;
}

.hero-logo {
    color: #fff;
    font-size: 1.5rem;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.hero-logo:hover {
    color: #888;
}

.hero-menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hero-menu-toggle span {
    display: block;
    width: 28px;
    height: 2px;
    background: #fff;
    transition: all 0.3s ease;
    box-shadow: 0 1px 5px rgba(0,0,0,0.3);
}

.hero-menu-toggle:hover span {
    background: #888;
}

.hero-menu-toggle,
.hero-menu-toggle:hover,
.hero-menu-toggle:focus,
.hero-menu-toggle:focus-visible,
.hero-menu-toggle:active {
    outline: none !important;
    box-shadow: none !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
}

.hero-scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    opacity: 0.7;
    animation: bounce 2s infinite;
    text-decoration: none;
}

.hero-scroll-indicator:hover {
    opacity: 1;
    color: #888;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(-10px); }
    60% { transform: translateX(-50%) translateY(-5px); }
}

/* Hide default header on homepage */
.home .site-header {
    display: none !important;
}

/* =============================================
   SCATTERED COLLAGE LAYOUT
   ============================================= */

html.home,
body.home {
    background-color: #1a1a1a;
    overflow-x: hidden;
    max-width: 100vw;
}

/* Override Hello Elementor parent theme container width */
.home .site-main,
.home #content,
.home .page-content,
.home .elementor-section-wrap,
.home .e-con,
.home .site-header,
.home .site-header .header-inner,
.home .site-header .site-branding,
.home header,
.home header > *,
.home .container,
.home .page-header {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 20px !important;
    padding-right: 20px !important;
    box-sizing: border-box !important;
}

.scattered-gallery {
    padding: 20px 0;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    min-height: 100vh;
}

.collage-container {
    position: relative;
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* Desktop: verwijder alle padding zodat JS de spacing beheert */
@media (min-width: 1025px) {
    .home .site-main.scattered-gallery {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .collage-container {
        padding-left: 0;
        padding-right: 0;
    }
}

.collage-item {
    position: absolute;
    display: block;
    overflow: hidden;
    transition: opacity 0.3s ease;
}

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

/* Series: accent overlay on hover */
.collage-item.is-series::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--e-global-color-accent, #888);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.collage-item.is-series:hover::after {
    opacity: 0.7;
}

/* Series title overlay */
.series-title {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(10px);
    padding: 10px 20px;
    background: none;
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    z-index: 2;
}

.collage-item.is-series:hover .series-title {
    opacity: 1;
    transform: translate(-50%, -50%);
}

/* All items are clickable */
.collage-item {
    cursor: pointer;
}

/* =============================================
   LIGHTBOX
   ============================================= */

.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.lightbox.active {
    display: flex;
}

.lightbox-content {
    position: relative;
    width: 90vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 15px 0;
    box-sizing: border-box;
}

.lightbox-image {
    max-width: 90vw;
    max-height: calc(100vh - 140px);
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-image.loaded {
    opacity: 1;
}

.lightbox-title {
    color: #fff;
    font-size: 1rem;
    margin-top: 10px;
    text-align: center;
}

.lightbox-counter {
    display: none;
}

#lightbox .lightbox-thumbs {
    display: flex;
    gap: 8px;
    width: min(90vw, 1000px);
    margin-top: 8px;
    margin-left: auto;
    margin-right: auto;
    justify-content: center;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: thin;
}

#lightbox .lightbox-thumb {
    -webkit-appearance: none;
    appearance: none;
    border: 1px solid #fff !important;
    background: rgba(255, 255, 255, 0.05);
    padding: 0;
    width: 56px;
    height: 56px;
    flex: 0 0 auto;
    cursor: pointer;
    opacity: 0.65;
    transition: opacity 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    overflow: hidden;
    outline: none !important;
    box-shadow: none !important;
}

#lightbox .lightbox-thumb:hover {
    opacity: 0.95;
    transform: translateY(-2px);
    border-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45) !important;
}

#lightbox .lightbox-thumb.active {
    opacity: 1;
    border-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45) !important;
}

#lightbox .lightbox-thumb:focus,
#lightbox .lightbox-thumb:focus-visible {
    outline: none !important;
    border-color: #fff !important;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.45) !important;
}

#lightbox .lightbox-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    outline: none !important;
    box-shadow: none !important;
}

#lightbox .lightbox-thumb::-moz-focus-inner {
    border: 0;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    background: none;
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s ease;
    z-index: 10001;
    line-height: 1;
}

.lightbox-close:hover {
    opacity: 1;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 3rem;
    cursor: pointer;
    padding: 20px 25px;
    opacity: 0.7;
    transition: opacity 0.2s ease, background 0.2s ease;
    z-index: 10001;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.2);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

/* Lightbox responsive */
@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 2rem;
        padding: 15px 18px;
    }

    .lightbox-prev {
        left: 10px;
    }

    .lightbox-next {
        right: 10px;
    }

    .lightbox-close {
        top: 15px;
        right: 20px;
        font-size: 2.5rem;
    }

    .lightbox-title {
        font-size: 1rem;
        padding: 0 60px;
    }

    .lightbox-image {
        max-height: 80vh;
    }

    .lightbox-thumbs {
        display: none !important;
    }
}

/* No posts message */
.no-posts {
    color: #fff;
    text-align: center;
    font-size: 1.5rem;
    padding: 100px 20px;
}

/* Hero mobiel: letterbox + Ken Burns */
@media (max-width: 768px) {
    .hero-slide {
        background-size: contain;
    }
}

/* Responsive padding */
@media (max-width: 768px) {
    .scattered-gallery {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .scattered-gallery {
        padding: 0;
        padding-top: 10px;
    }

    .collage-container {
        overflow: visible;
    }

    .collage-item {
        box-shadow: none;
    }

    .collage-item:hover {
        transform: none;
    }
}
