/* ═══════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --black:       #111;
    --white:       #fff;
    --grey-light:  #f5f5f5;
    --grey-mid:    #ccc;
    --grey-dark:   #666;
    --font-sans:   'Helvetica Neue', Helvetica, Arial, sans-serif;
    --header-h:    60px;
    --gap:         2px;
}

html { font-size: 16px; scroll-behavior: smooth; }
body { font-family: var(--font-sans); background: var(--white); color: var(--black);
       line-height: 1.5; -webkit-font-smoothing: antialiased; }
a    { color: inherit; text-decoration: none; }
img  { display: block; max-width: 100%; height: auto; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* ═══════════════════════════════════════════════════
   HEADER
═══════════════════════════════════════════════════ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-h);
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(6px);
    z-index: 100;
    border-bottom: 1px solid rgba(0,0,0,0.06);
}
.site-header-inner {
    max-width: 1400px;
    margin: 0 auto;
    height: 100%;
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.site-name {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

/* Nav */
.site-nav { display: flex; align-items: center; }
.nav-list {
    list-style: none;
    display: flex;
    gap: 28px;
}
.nav-list a {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-dark);
    transition: color 0.2s;
}
.nav-list a:hover,
.nav-list a.active { color: var(--black); }

/* Transparent header (slideshow) */
.site-header--transparent {
    background: transparent;
    backdrop-filter: none;
    border-bottom: none;
}
.site-header--transparent .site-name,
.site-header--transparent .nav-list a,
.site-header--transparent .nav-toggle span { color: var(--white); }
.site-header--transparent .nav-list a:hover,
.site-header--transparent .nav-list a.active { color: var(--white); opacity: 0.7; }
.site-header--transparent .nav-toggle span { background: var(--white); }

/* Nav dropdown */
.nav-list li { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255,255,255,0.97);
    backdrop-filter: blur(8px);
    min-width: 180px;
    padding: 10px 0;
    list-style: none;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border-radius: 4px;
    z-index: 110;
    margin-top: 12px;
}
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0; right: 0;
    height: 12px;
}
.has-dropdown:hover > .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--grey-dark);
    white-space: nowrap;
    transition: color 0.15s, background 0.15s;
}
.dropdown-menu li a:hover {
    color: var(--black);
    background: rgba(0,0,0,0.03);
}

/* Transparent header dropdown */
.site-header--transparent .dropdown-menu {
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
}
.site-header--transparent .dropdown-menu li a { color: rgba(255,255,255,0.7); }
.site-header--transparent .dropdown-menu li a:hover {
    color: #fff;
    background: rgba(255,255,255,0.08);
}

/* Hamburger (mobile) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 28px;
    height: 28px;
    padding: 2px;
}
.nav-toggle span {
    display: block;
    height: 1.5px;
    background: var(--black);
    transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ═══════════════════════════════════════════════════
   HOME — GALLERY GRID
═══════════════════════════════════════════════════ */
.home-main {
    padding-top: var(--header-h);
}
.home-main:has(.slideshow) {
    padding-top: 0;
}
.galleries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: var(--gap);
}
.gallery-cover-link { display: block; }
.gallery-cover {
    position: relative;
    overflow: hidden;
    aspect-ratio: 3/2;
    background: var(--grey-light);
}
.gallery-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease, opacity 0.4s;
    opacity: 0;
}
.gallery-cover img.loaded { opacity: 1; }
.gallery-cover-link:hover .gallery-cover img { transform: scale(1.03); }
.gallery-cover-label {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 40px 20px 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.55), transparent);
    color: var(--white);
    font-size: 0.82rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity 0.3s;
}
.gallery-cover-link:hover .gallery-cover-label { opacity: 1; }
/* Folder page: labels always visible */
.folder-page .gallery-cover-label { opacity: 1; }
.gallery-cover-empty { width: 100%; height: 100%; background: var(--grey-light); }

.home-empty {
    min-height: calc(100vh - var(--header-h));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-dark);
    font-size: 0.9rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

/* ═══════════════════════════════════════════════════
   HOMEPAGE SLIDESHOW
═══════════════════════════════════════════════════ */
.slideshow {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    background: var(--black);
}
.slideshow-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1s ease;
}
.slideshow-slide.active { opacity: 1; }
.slideshow-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}
.ss-prev, .ss-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.7);
    font-size: 1.5rem;
    padding: 16px 20px;
    z-index: 10;
    transition: color 0.2s;
}
.ss-prev:hover, .ss-next:hover { color: #fff; }
.ss-prev { left: 16px; }
.ss-next { right: 16px; }
.ss-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.ss-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.35);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: background 0.3s, transform 0.2s;
}
.ss-dot.active { background: #fff; transform: scale(1.3); }
.ss-dot:hover { background: rgba(255,255,255,0.7); }

/* ═══════════════════════════════════════════════════
   GALLERY PAGE — PHOTO GRID
═══════════════════════════════════════════════════ */
.gallery-main {
    padding-top: calc(var(--header-h) + 48px);
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 32px;
    padding-right: 32px;
    padding-bottom: 80px;
}
.gallery-title {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 6px;
}
.gallery-description {
    font-size: 0.82rem;
    color: var(--grey-dark);
    margin-bottom: 32px;
}
.gallery-empty {
    padding: 60px 0;
    color: var(--grey-dark);
    font-size: 0.85rem;
}

/* Masonry-like grid usando CSS columns */
.photo-grid {
    column-count: 3;
    column-gap: var(--gap);
    margin-top: 32px;
}
.photo-item {
    break-inside: avoid;
    margin-bottom: var(--gap);
    overflow: hidden;
    background: var(--grey-light);
    cursor: pointer;
}
.photo-thumb {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.4s, transform 0.4s;
}
.photo-thumb.loaded { opacity: 1; }
.photo-item:hover .photo-thumb { transform: scale(1.02); }

/* ═══════════════════════════════════════════════════
   LIGHTBOX
═══════════════════════════════════════════════════ */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0,0,0,0.95);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}
.lb-img-wrap {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    transition: opacity 0.25s;
    display: block;
}
.lb-loader {
    position: absolute;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lb-close, .lb-prev, .lb-next {
    position: fixed;
    background: none;
    border: none;
    color: rgba(255,255,255,0.8);
    font-size: 1.5rem;
    padding: 12px 18px;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 10;
}
.lb-close { top: 16px; right: 20px; font-size: 1.2rem; }
.lb-prev  { left: 16px;  top: 50%; transform: translateY(-50%); }
.lb-next  { right: 16px; top: 50%; transform: translateY(-50%); }
.lb-close:hover, .lb-prev:hover, .lb-next:hover { color: #fff; }

.lb-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.5);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
}

/* ═══════════════════════════════════════════════════
   FOOTER
═══════════════════════════════════════════════════ */
.site-footer {
    padding: 32px;
    text-align: center;
    font-size: 0.72rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey-mid);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}
.footer-admin-link { color: var(--grey-mid); }
.footer-admin-link:hover { color: var(--grey-dark); }

/* ═══════════════════════════════════════════════════
   LAZY LOAD — anima quando imagem entra na tela
═══════════════════════════════════════════════════ */
/* Handled via JS — class .loaded added on load */

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
    .photo-grid { column-count: 2; }
    .galleries-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
}

@media (max-width: 600px) {
    .site-header-inner { padding: 0 18px; }
    .gallery-main { padding-left: 18px; padding-right: 18px; }

    /* Menu mobile */
    .nav-toggle { display: flex; }
    .nav-list {
        display: none;
        position: fixed;
        top: var(--header-h);
        left: 0; right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        border-top: 1px solid var(--grey-light);
        padding: 12px 0;
        max-height: calc(100vh - var(--header-h));
        overflow-y: auto;
    }
    .nav-list.open { display: flex; }
    .nav-list li a {
        display: block;
        padding: 12px 20px;
        border-bottom: 1px solid var(--grey-light);
    }

    /* Dropdown mobile: inline instead of floating */
    .dropdown-menu {
        position: static;
        transform: none;
        display: none;
        background: var(--grey-light);
        box-shadow: none;
        border-radius: 0;
        min-width: 0;
        margin-top: 0;
        padding: 0;
    }
    .dropdown-menu::before { display: none; }
    .has-dropdown:hover > .dropdown-menu { display: none; }
    .has-dropdown.dd-open > .dropdown-menu { display: block; }
    .dropdown-menu li a {
        padding: 10px 20px 10px 36px;
        font-size: 0.72rem;
        border-bottom: 1px solid rgba(0,0,0,0.04);
    }

    /* Transparent header mobile menu */
    .site-header--transparent .nav-list {
        background: var(--white);
    }
    .site-header--transparent .nav-list a { color: var(--grey-dark); }
    .site-header--transparent .dropdown-menu { background: var(--grey-light); }
    .site-header--transparent .dropdown-menu li a { color: var(--grey-dark); }

    .photo-grid { column-count: 1; }
    .galleries-grid { grid-template-columns: 1fr; }

    .lb-prev  { left: 6px; }
    .lb-next  { right: 6px; }

    /* Slideshow arrows mobile */
    .ss-prev { left: 6px; }
    .ss-next { right: 6px; }
}

/* Lazy load trigger — imagens ficam invisíveis até .loaded */
.gallery-cover img,
.photo-thumb { opacity: 0; }
.gallery-cover img.loaded,
.photo-thumb.loaded { opacity: 1; }

/* ═══════════════════════════════════════════════════
   FOLDER PAGE
═══════════════════════════════════════════════════ */
.folder-header {
    padding: calc(var(--header-h) + 32px) 32px 0;
    max-width: 1400px;
    margin: 0 auto;
}
.folder-title {
    font-size: 0.85rem;
    font-weight: 400;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 16px;
    color: var(--grey-dark);
}

/* ═══════════════════════════════════════════════════
   GALLERY BREADCRUMB
═══════════════════════════════════════════════════ */
.gallery-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--grey-dark);
    margin-bottom: 6px;
}
.gallery-breadcrumb a { color: var(--grey-dark); }
.gallery-breadcrumb a:hover { color: var(--black); }
.gallery-breadcrumb span:last-child { color: var(--black); }

/* ═══════════════════════════════════════════════════
   PÁGINA SOBRE — layout 2 colunas
═══════════════════════════════════════════════════ */
.about-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - var(--header-h));
    margin-top: var(--header-h);
}

/* Coluna da foto */
.about-photo-col {
    position: sticky;
    top: var(--header-h);
    height: calc(100vh - var(--header-h));
    overflow: hidden;
    background: var(--grey-light);
}
.about-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.about-photo-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--grey-mid);
    background: var(--grey-light);
}

/* Coluna do texto */
.about-text-col {
    display: flex;
    align-items: flex-start;
    padding: 80px 64px;
    min-height: calc(100vh - var(--header-h));
}
.about-text-inner { max-width: 480px; }
.about-label {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--grey-dark);
    margin-bottom: 40px;
}
.about-body {
    font-size: 0.95rem;
    line-height: 2;
    color: #333;
}

/* ═══════════════════════════════════════════════════
   PÁGINA CONTATO — layout centralizado
═══════════════════════════════════════════════════ */
.contact-layout {
    min-height: calc(100vh - var(--header-h));
    margin-top: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 32px;
}
.contact-inner {
    max-width: 560px;
    width: 100%;
}
.contact-page-label {
    font-size: 0.72rem;
    font-weight: 400;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--grey-dark);
    margin-bottom: 12px;
}
.contact-intro {
    font-size: 0.9rem;
    color: var(--grey-dark);
    line-height: 1.8;
    margin-bottom: 52px;
}
.contact-items {
    display: flex;
    flex-direction: column;
}
.contact-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 28px 0;
    border-bottom: 1px solid #e8e8e8;
    color: inherit;
    transition: opacity 0.2s;
}
.contact-item:first-child { border-top: 1px solid #e8e8e8; }
.contact-item:hover { opacity: 0.5; }
.contact-item-label {
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--grey-dark);
}
.contact-item-value {
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    color: var(--black);
}

@media (max-width: 900px) {
    .about-layout { grid-template-columns: 1fr; }
    .about-photo-col {
        position: relative;
        top: 0;
        height: 55vw;
        min-height: 300px;
    }
    .about-text-col { padding: 52px 40px; }
}

@media (max-width: 600px) {
    .about-text-col { padding: 40px 20px; }
    .folder-header  { padding-left: 18px; padding-right: 18px; }
    .contact-layout { padding: 40px 20px; }
    .contact-item-value { font-size: 1.15rem; }
}
