/* ============================================
   RESET E CONFIGURAÇÕES GERAIS
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Scroll personalizado para todo o site (opcional) */
* {
    scrollbar-width: thin;
    scrollbar-color: #bd6016 #4e3c2e;
}

*::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

*::-webkit-scrollbar-track {
    background: #4e3c2e;
}

*::-webkit-scrollbar-thumb {
    background: #bd6016;
    border-radius: 10px;
}

*::-webkit-scrollbar-thumb:hover {
    background: #ddb148;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Funnel Display', sans-serif;
    background-color: #221913;
    color: #c3a287;
    overflow-x: hidden;
    font-weight: 400;
    font-size: 14px;
    line-height: 1.6em;
}

/* ============================================
   TIPOGRAFIA E LINKS
   ============================================ */
a,
a:link,
a:visited,
a:active {
    color: #ddb148;
    text-decoration: none;
}

a:hover {
    color: #f8b002;
}

h1, h2, h3, h4 {
    color: #bd6016;
}

h1, h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #221913;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 500;
}

/* ============================================
   NOME DO AUTOR (LOUISE BOTKAY)
   ============================================ */
.author-name {
    letter-spacing: 3px;
    position: fixed;
    right: 40px;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: upright;
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    z-index: 1000;
}

.author-name.hidden {
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
}

.author-name.visible {
    opacity: 1;
    pointer-events: auto;
}

.author-name a {
    font-family: "Fira Sans", sans-serif;
    font-size: 1.4rem;
    font-weight: 400;
    color: #564232;
}

.author-name a:hover {
    color: #bd6016;
}

/* ============================================
   CONTAINER PRINCIPAL
   ============================================ */
.portfolio-container {
    width: 100%;
    position: relative;
}

/* ============================================
   MODO HORIZONTAL (SLIDES)
   ============================================ */
.horizontal-view {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    width: 100%;
    height: 100vh;
    scrollbar-width: none;
}

.horizontal-view::-webkit-scrollbar {
    display: none;
}

.work-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 100px 40px 60px;
}

.work-content-row {
    width: 100%;
    max-width: 1800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.work-content-row-start {
    align-items: flex-start;
}

.work-content-row-end {
    align-items: flex-end;
}

.work-content-row-center {
    align-items: center;
}

/* Layout das colunas */
.order-left .work-content-row {
    flex-direction: row;
}

.order-right .work-content-row {
    flex-direction: row-reverse;
}

.work-image-col {
    flex: 6;
    min-width: 300px;
}

.work-info-col {
    flex: 4;
    min-width: 300px;
}

.work-image-col img {
    width: auto;
    max-width: 100%;
    border-radius: 6px;
    max-height: calc(100vh - 200px);
    cursor: pointer;
}

.order-left .work-image-col {text-align: right;}
.order-right .work-image-col {text-align: left;}

.work-info-col-content {
    margin: 1.5rem 0;
    max-width: 500px;
    font-size: 0.89rem;
}

.order-right .work-info-col-content {
    float: right;
    text-align: right;
}

/* Texto expansível */
.text-expandable {
    margin: 0.3rem 0;
}

.short-text {
    display: block;
    cursor: pointer;
}

/* Texto expansível */
.full-text {
    display: none;
    max-height: 200px;
    overflow-y: auto;
    padding-right: 10px;
    scroll-behavior: smooth;
}

/* Descrição técnica */
.tech-desc {
    display: inline-block;
    padding: 0;
    margin: 0;
    font-style: italic;
    color: #CCA986;
    font-size: .75rem;
}

/* Botões */
.btn-watch,
.read-more-btn {
    background: transparent;
    border: none;
    color: #ddb148;
    font-weight: 600;
    margin-top: 0.5rem;
    margin-right: 30px;
    cursor: pointer;
    display: inline-block;
    width: auto;
    transition: all 0.2s;
    font-size: 0.8rem;
    text-align: left;
}

.order-right .btn-watch,
.order-right .read-more-btn {
    margin-right: 0;
    margin-left: 30px;
}

.btn-watch:hover,
.read-more-btn:hover {
    background: transparent;
    color: #f8b002;
}

/* ============================================
   MODO VERTICAL (GRID)
   ============================================ */
.vertical-view {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    padding: 60px 100px 60px 40px;
    width: 100%;
    margin: 0 auto;
}

.vertical-view:not(.hidden-view) {
    min-height: 100vh;
    display: grid;
}

.vertical-item {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vertical-item h2 {
    font-size: 1.4rem;
}

.vertical-item img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    object-position:top;
    border-radius: 8px;
    margin-bottom: 16px;
    transition: transform 0.3s ease;
    cursor: pointer;
}

.vertical-item:hover img {
    opacity: 0.9;
}

.vertical-content {
    padding: 0 10px;
    font-size: 0.89rem;
}

.vertical-item .tech-desc {
    margin: 0;
    font-size: 0.8rem;
    display: inline-block;
    align-self: flex-start;
    font-style: italic;
}

.vertical-item .text-expandable {
    margin: 0.3rem 0;
}

.vertical-item .btn-watch {
    margin: 0.5rem 0 0 0;
    align-self: flex-start;
}

/* ============================================
   MODO LISTA
   ============================================ */
.list-view {
    display: flex;
    flex-direction: column;
    padding: 30px 30px 100px;
    min-height: 100vh;
    max-width: 900px;
    margin: auto;
}

.list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 15px 5px;
    border-bottom: 1px solid #4e3c2e;
}

.list-item h3 {
    font-size: 1.3rem;
    font-weight: 500;
    width: 25%;
    margin: 0 0 0.3rem 0;
}

.list-tech {
    width: 45%;
    font-size: 0.8rem;
    font-style: italic;
    text-align: left;
}

.list-link {
    width: 70px;
}

.list-link .btn-watch {
    margin: 0;
    font-size: 0.8rem;
}

/* ============================================
   MENU BOTTOM (ÍCONES E SETAS)
   ============================================ */
#menu-bottom {
    position: fixed;
    bottom: 30px;
    right: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 25px;
    z-index: 1000;
}

.menu-grid {
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 1500;
    position: relative;
    margin-top: -1px;
    margin-right: -11px;
}

#menu-bottom .view-mode {
    cursor: pointer;
    font-size: 1.2rem;
    color: #CCA986;
    transition: all 0.2s ease;
    padding: 8px 12px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
}

#menu-bottom .menu-grid.light .view-mode {
    color: #4e3c2e;
}

#menu-bottom .view-mode:hover,
#menu-bottom .view-mode.active {
    color: #bd6016;
    background: transparent;
}

/* Setas de navegação */
.nav-arrows {
    bottom: 30px;
    left: 0;
    right: 40px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    z-index: 1000;
    pointer-events: none;
}

.nav-arrows button {
    pointer-events: auto;
    background: transparent;
    border: none;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s;
    color: #c3a287;
}

.nav-arrows button:hover {
    color: #bd6016;
}

.slide-indicator {
    width: 50px;
    text-align: center;
    background: transparent;
    padding: 11px 0 0 0;
    font-size: 0.7rem;
    z-index: 999;
    margin: 0 -20px;
}

/* Botão Play/Pause */
.play-pause-btn {
    background: transparent;
    border: none;
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.play-pause-btn:hover {
    color: #bd6016;
    transform: scale(1.05);
}

/* ============================================
   ÁREA BIO
   ============================================ */
.bio-section {
    min-height: 100vh;
    background: #c3a287;
    padding: 80px 40px;
}

#biobg {
    background: #a1a1a1 url('./images/bio_bg.jpg') no-repeat fixed;
    background-size: cover;
    width: 100%;
    height: 350px;
    background-position: center;
}

.bio-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.bio-inner img {
    display: block;
    width: 98%;
    height: auto;
    max-width: 100%;
    border-radius: 8px;
    margin: 2rem auto;
}

.bio-text {
    width: 100%;
    color: #4e3c2e;
    font-size: 1.142rem;
    text-align: justify;
    line-height: 1.8rem;
}

.social-links {
    margin-top: 40px;
    text-align: right;
}

.social-links a {
    font-size: 1.5rem;
    margin-right: 30px;
    color: #4e3c2e;
    transition: 0.2s;
    display: inline-block;
}

.social-links a:hover {
    color: #bd6016;
    transform: translateY(-3px);
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
.hidden-view {
    display: none !important;
}

/* ============================================
   LIGHTBOX (MAGNIFIC POPUP)
   ============================================ */
.mfp-container {
    padding: 40px !important;
}

.mfp-content {
    max-width: 1000px !important;
    margin: 0 auto !important;
}

.video-popup-wrapper {
    position: relative;
    background: rgba(30, 26, 23, 0.9);
    border-radius: 16px;
    overflow: hidden;
}

.video-popup-wrapper iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
}

.mfp-close {
    color: #CCA986 !important;
    background: transparent;
    border-radius: 50% !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 32px !important;
    position: fixed !important;
    top: 40px !important;
    right: 40px !important;
    left: auto !important;
    bottom: auto !important;
    z-index: 10000 !important;
    opacity: 1 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.mfp-bg {
    opacity: 0.93;
    background: rgb(30, 26, 23);
}

/* ============================================
   MEDIA QUERIES
   ============================================ */

/* Altura - esconder autor em telas muito baixas */
@media (max-height: 860px) {
    .author-name a {
        font-size: 1.1rem;
    }
}

@media (max-height: 640px) {
    .author-name a {
        font-size: 1rem;
    }
}

@media (max-height: 575px) {
    .author-name {
        display: none;
    }
}

/* Largura - até 1200px */
@media (max-width: 1200px) {
    .vertical-view {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
        padding: 50px 30px;
    }

    #menu-bottom {
        right: 30px;
        bottom: 20px;
    }

    .author-name {
        letter-spacing: 10px;
        position: fixed;
        left: 20px;
        top: 15px;
        right: auto;
        transform: none;
        writing-mode: horizontal-tb;
        text-orientation: unset;
    }

    .portfolio-container {margin-top:30px;}
    .horizontal-view {margin-top:-30px;}
    .work-slide {padding-top: 0px;height:calc(100vh - 40px);}
    .list-view {padding-top:10px;}
    .vertical-view {padding: 24px 20px;}
}

/* Largura - até 900px */
@media (max-width: 900px) {
    .vertical-view {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

/* Largura - até 768px (mobile) */
@media (max-width: 790px) {
    .author-name {
        letter-spacing: 5px;
        left: 20px;
        top: 15px;
    }

    #menu-bottom {
        right: 20px;
        bottom: 5px;
        gap: 10px;
    }

    .nav-arrows {
        gap: 5px;
    }

    /* Modo Horizontal */
    .work-slide {
        padding: 30px 24px;
        align-items: center;
    }

    .work-content-row {
        flex-direction: column !important;
        gap: 1rem;
    }

    .work-image-col {
        order: 1 !important;
        width: 100%;
    }

    .work-info-col-content {
        margin-top: 0;
    }

    .work-info-col {
        order: 2 !important;
        width: 100%;
    }

    .order-left .work-image-col {text-align: left;}

    /* Modo Lista */
    .list-view {
        padding-left: 15px;
    }

    .list-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .list-item h3,
    .list-tech {
        width: 100%;
    }

    .list-tech {
        margin-bottom: 8px;
    }

    .list-link {
        width: auto;
    }

    /* Lightbox */
    .mfp-container {
        padding: 20px !important;
    }

    .mfp-close {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 20px !important;
        top: 12px !important;
        right: 12px !important;
    }

    /* Botões */
    .play-pause-btn {
        width: 44px;
        height: 44px;
        font-size: 1rem;
    }

    .nav-arrows button {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
    }

    /* BIO */
    .bio-inner {
        gap: 30px;
        text-align: center;
        justify-content: center;
        flex-direction: column;
    }

    .social-links {
        justify-content: center;
        text-align: center;
    }

    /* Vertical grid mobile */
    .vertical-view {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .vertical-item h2 {
        font-size: 1.3rem;
        margin: 0 0 0.2rem 0;
    }

    .vertical-item .text-expandable, .text-expandable {margin: 0.2rem 0;}
    
    .work-info-col h2 {
        font-size: 1.3rem;
        margin: 0 0 0.2rem 0;
    }
}

/* Largura - até 480px (telas muito pequenas) */
@media (max-width: 480px) {
    .tech-desc {
        font-size: 0.75rem;
    }

}