/* ==========================================================================
   Felipe Alcici - Portfolio de Design de Interiores
   CSS Principal
   ========================================================================== */

/* Reset e Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    background-color: #000;
    color: #fff;
    font-family: Arial, Helvetica, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    color: inherit;
}

/* ==========================================================================
   Header / Navegação
   ========================================================================== */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #000;
    border-top: 1px solid #2a2a2a;
    border-bottom: 1px solid #2a2a2a;
}

.nav-menu {
    display: flex;
    justify-content: space-evenly;
    align-items: center;
    list-style: none;
    flex-wrap: wrap;
}

.nav-menu li {
    position: relative;
}

.nav-menu li a {
    display: block;
    padding: 16px;
    font-size: 11px;
    letter-spacing: 2.5px;
    text-transform: uppercase;
    color: #888;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: #fff;
}

/* ==========================================================================
   Layout Principal
   ========================================================================== */

.main-content {
    flex: 1;
    padding-top: 52px;
    padding-bottom: 80px;
    min-height: 100vh;
}

/* ==========================================================================
   Home - Slideshow
   ========================================================================== */

.home-slideshow {
    position: relative;
    width: 900px;
    max-width: 100%;
    margin: 0 auto;
    height: calc(100vh - 150px);
    max-height: 600px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    pointer-events: none;
}

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

.slide-grid-item {
    overflow: hidden;
    position: relative;
}

.slide-grid-item[data-span="2"] {
    grid-column: span 2;
}

.slide-grid-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1);
    transition: transform 6s ease-out;
}

.slide.active .slide-grid-item img {
    transform: scale(1.03);
}

/* ==========================================================================
   Galeria - Layout
   ========================================================================== */

.gallery-container {
    display: flex;
    padding-top: 20px;
    min-height: calc(100vh - 150px);
}

/* Sidebar Esquerda */
.gallery-sidebar {
    width: 380px;
    min-width: 380px;
    padding: 30px 40px 30px 60px;
    display: flex;
    flex-direction: column;
}

.gallery-title {
    font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 3px;
    color: #ccc;
    margin-bottom: 20px;
    text-transform: uppercase;
}

/* Números de Projeto */
.project-numbers {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 30px;
}

.project-number {
    font-size: 14px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 2px 6px;
    font-weight: 400;
    letter-spacing: 0.5px;
}

.project-number:hover {
    color: #ccc;
}

.project-number.active {
    color: #fff;
    font-weight: 700;
}

/* Grid de Miniaturas */
.thumbnail-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.thumbnail-item {
    cursor: pointer;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
    background: #111;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    transform: scale(1);
}

.thumbnail-item:hover img {
    filter: grayscale(50%);
    opacity: 0.85;
    transform: scale(1.05);
}

.thumbnail-item.active {
    border-color: #fff;
}

.thumbnail-item.active img {
    filter: grayscale(0%);
    opacity: 1;
}

/* Área Principal da Imagem */
.gallery-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 40px 20px 20px;
    position: relative;
    overflow: hidden;
}

.main-image-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-image {
    max-width: 100%;
    max-height: calc(100vh - 200px);
    width: auto;
    height: auto;
    object-fit: contain;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.main-image.visible {
    opacity: 1;
    transform: scale(1);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.95);
    padding: 10px 60px;
    display: flex;
    flex-direction: column;
}

.footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-row-top {
    padding-bottom: 8px;
}

.footer-row-bottom {
    padding-top: 6px;
}

.footer-divider {
    height: 1px;
    background: #2a2a2a;
    width: 100%;
}

.footer-logo {
    font-family: 'Cinzel', 'Trajan Pro', Georgia, 'Times New Roman', serif;
    font-size: 41px;
    font-weight: 400;
    letter-spacing: 4px;
    color: #fff;
    text-transform: uppercase;
    cursor: pointer;
    display: inline-block;
    transition: color 0.2s;
}

.footer-logo:hover { color: #bbb; }

.btn-sound {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    padding: 0;
    background: none;
    border: none;
    color: inherit;
    transition: opacity 0.2s;
}

.eq-icon {
    display: flex;
    align-items: flex-end;
    gap: 3px;
}

.eq-icon span {
    display: block;
    width: 4px;
    background: #888;
    border-radius: 1px;
    transition: background 0.2s;
}

.btn-sound:hover .eq-icon span { background: #ddd; }
.btn-sound:hover .sound-label  { color: #ddd; }

@keyframes eq1 { 0%,100%{height:4px}  50%{height:18px} }
@keyframes eq2 { 0%,100%{height:16px} 30%{height:4px}  70%{height:22px} }
@keyframes eq3 { 0%,100%{height:8px}  45%{height:20px} 80%{height:3px}  }
@keyframes eq4 { 0%,100%{height:18px} 50%{height:5px}  }
@keyframes eq5 { 0%,100%{height:5px}  35%{height:15px} 65%{height:9px}  }

.eq-playing #bar1 { animation: eq1 0.65s ease-in-out infinite; }
.eq-playing #bar2 { animation: eq2 0.85s ease-in-out infinite; }
.eq-playing #bar3 { animation: eq3 0.55s ease-in-out infinite; }
.eq-playing #bar4 { animation: eq4 0.75s ease-in-out infinite; }
.eq-playing #bar5 { animation: eq5 0.70s ease-in-out infinite; }

.sound-label {
    font-size: 20px;
    letter-spacing: 1.5px;
    color: #777;
    text-transform: lowercase;
    font-family: inherit;
}

.footer-right {
    text-align: right;
}

.footer-contact {
    font-size: 20px;
    color: #999;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.footer-contact a {
    color: #999;
    transition: color 0.3s ease;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-credits {
    font-size: 17px;
    color: #555;
    margin-top: 2px;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Contato
   ========================================================================== */

.contact-page {
    min-height: calc(100vh - 124px);
    display: flex;
    flex-direction: column;
    padding: 24px 0 0 60px;
}

.contact-heading {
    font-family: 'Cinzel', Georgia, 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 400;
    letter-spacing: 3px;
    color: #ccc;
    text-transform: uppercase;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 16px;
    padding-right: 60px;
    padding-bottom: 20px;
}

.contact-email {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 14px;
    letter-spacing: 1.5px;
    color: #bbb;
}

.contact-address {
    font-size: 12px;
    letter-spacing: 0.5px;
    color: #777;
    line-height: 1.8;
}

/* ==========================================================================
   Lazy Loading
   ========================================================================== */

.lazy-image {
    opacity: 0;
    transition: opacity 0.5s ease;
}

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

/* ==========================================================================
   Responsividade
   ========================================================================== */

/* Tablet */
@media (max-width: 1200px) {
    .nav-menu {
        gap: 20px;
        padding: 18px 15px;
    }

    .nav-menu a {
        font-size: 10px;
        letter-spacing: 1px;
    }

    .gallery-sidebar {
        width: 300px;
        min-width: 300px;
        padding: 25px 25px 25px 30px;
    }

    .gallery-title {
        font-size: 22px;
    }

    .gallery-main {
        padding: 15px 20px 15px 15px;
    }

    .site-footer {
        padding: 8px 30px;
    }

    .footer-logo {
        font-size: 30px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-menu {
        gap: 12px;
        padding: 14px 10px;
    }

    .nav-menu a {
        font-size: 9px;
        letter-spacing: 0.5px;
    }

    .main-content {
        padding-top: 60px;
        padding-bottom: 100px;
    }

    /* Home slideshow mobile */
    .home-slideshow {
        height: calc(100vh - 180px);
    }

    .slide img {
        max-width: 95%;
        max-height: 80%;
    }

    /* Galeria mobile - Layout empilhado */
    .gallery-container {
        flex-direction: column;
    }

    .gallery-sidebar {
        width: 100%;
        min-width: 100%;
        padding: 20px;
        order: 1;
    }

    .gallery-title {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .project-numbers {
        margin-bottom: 20px;
    }

    .thumbnail-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4px;
    }

    .gallery-main {
        padding: 10px 15px;
        order: 2;
        min-height: 300px;
    }

    .main-image {
        max-height: 50vh;
    }

    /* Footer mobile */
    .site-footer {
        padding: 8px 20px;
    }

    .footer-logo {
        font-size: 22px;
        letter-spacing: 2px;
    }

    .footer-right {
        text-align: right;
    }
}

/* Telas grandes */
@media (min-width: 1600px) {
    .gallery-sidebar {
        width: 420px;
        min-width: 420px;
        padding: 40px 50px 40px 80px;
    }

    .gallery-title {
        font-size: 30px;
    }

    .gallery-main {
        padding: 30px 60px 30px 30px;
    }
}
