:root {
    --cor-destaque: #d92525;
    --cor-destaque-hover: #b01e1e;
    --cor-texto: #ffffff;
    --font-serif: 'Cinzel', serif;
}

* {
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--cor-texto);
    background-image: url('../imagens/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(circle, rgba(12, 12, 12, 0.8) 0%, rgba(3, 3, 3, 0.95) 100%);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: -1;
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #080808;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
    transition: opacity 0.4s ease, visibility 0s 0.4s;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

.preloader-content {
    text-align: center;
}

#preloader img {
    max-width: 110px;
}

.preloader-bar-container {
    width: 150px;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    margin: 20px auto 0;
    overflow: hidden;
}

#preloader-bar {
    width: 0%;
    height: 100%;
    background-color: var(--cor-destaque);
    transition: width 0.4s ease-out;
}

/* --- Header --- */
.header {
    text-align: center;
    padding: 20px 20px 10px;
    flex-shrink: 0;
}

.main-logo {
    max-width: 100px;
    height: auto;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.9));
}

.botoes-topo-container {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.instagram-link {
    background: rgba(255, 255, 255, 0.03);
    color: var(--cor-texto);
    padding: 8px 20px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, transform 0.2s;
    backdrop-filter: blur(5px);
}

.instagram-link i {
    color: var(--cor-destaque);
}

.instagram-link:active {
    transform: scale(0.96);
}

/* --- Abas de Categorias --- */
.categories-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 15px 0 5px;
    flex-shrink: 0;
}

.tab-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    font-family: var(--font-serif);
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 6px 15px;
    position: relative;
    transition: color 0.3s ease;
}

.tab-btn.active {
    color: var(--cor-texto);
    font-weight: 700;
}

.tab-btn::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--cor-destaque);
    transition: width 0.3s ease, left 0.3s ease;
}

.tab-btn.active::after {
    width: 40%;
    left: 30%;
}

/* --- Seletor de Modo --- */
.mode-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 8px 0 15px;
    flex-shrink: 0;
}

.mode-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.4);
    padding: 6px 14px;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.mode-btn.active {
    background: var(--cor-destaque);
    color: var(--cor-texto);
    border-color: var(--cor-destaque);
    box-shadow: 0 4px 10px rgba(217, 37, 37, 0.2);
}

/* --- Container e Exibições --- */
.container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0;
    overflow: hidden;
}

.scroll-instruction {
    text-align: center;
    margin-bottom: 12px;
    flex-shrink: 0;
}

.scroll-instruction span {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: rgba(255, 255, 255, 0.3);
    font-weight: 600;
}

/* Base Comum */
.lookbook-wrapper {
    display: flex;
    transition: opacity 0.25s ease;
}

/* [1] MODO DESLIZAR */
.lookbook-wrapper.mode-deslizar {
    gap: 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    padding: 0 50px 20px;
    cursor: grab;
    -webkit-overflow-scrolling: touch;
}

.lookbook-wrapper.mode-deslizar::-webkit-scrollbar {
    display: none;
}

.lookbook-wrapper.mode-deslizar.active-drag {
    cursor: grabbing;
    user-select: none;
    scroll-snap-type: none !important;
    scroll-behavior: auto !important;
}

.lookbook-wrapper.mode-deslizar .lookbook-item {
    flex: 0 0 auto;
    /* LARGURA INTELIGENTE: Se adapta de acordo com a altura da tela do aparelho */
    width: clamp(160px, 35vh, 250px); 
    scroll-snap-align: center;
    display: flex;
    justify-content: center;
}

.lookbook-wrapper.mode-deslizar img {
    -webkit-user-drag: none;
    user-select: none;
}

/* [2] MODO LISTA (Grid Vertical de 2 Colunas) */
.lookbook-wrapper.mode-lista {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    overflow-y: auto;
    max-height: 52vh; /* Limita a altura com base na tela do celular atual */
    padding: 0 16px 20px;
    width: 100%;
}

.lookbook-wrapper.mode-lista::-webkit-scrollbar {
    display: none;
}

.lookbook-wrapper.mode-lista .lookbook-item {
    width: 100%;
}

.lookbook-wrapper.mode-lista .lookbook-info h3 {
    font-size: 1rem;
}

.lookbook-card {
    text-decoration: none;
    color: var(--cor-texto);
    display: block;
    width: 100%;
}

/* Cartão A4 */
.card-inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1.414;
    border-radius: 16px;
    overflow: hidden;
    background-image: url('../imagens/textura.jpg');
    background-size: cover;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0) 50%, rgba(0,0,0,0.4) 100%);
    box-shadow: inset 0 0 30px rgba(0,0,0,0.3);
    pointer-events: none;
}

/* Info */
.lookbook-info {
    text-align: center;
    margin-top: 10px;
    padding: 0 5px;
}

.lookbook-info h3 {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: 2px;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.lookbook-action {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--cor-destaque);
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.lookbook-card:active .card-inner {
    transform: scale(0.97);
    transition: transform 0.1s ease;
}

/* --- TripAdvisor --- */
.tripadvisor-section {
    text-align: center;
    padding: 15px 20px 25px;
    flex-shrink: 0;
}

.trip-title {
    font-size: 0.90rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.trip-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 10px;
}

.tripadvisor-img-btn {
    display: inline-block;
    transition: transform 0.2s ease;
}

.tripadvisor-img-btn img {
    max-width: 110px;
    height: auto;
    display: block;
}

.tripadvisor-img-btn:active {
    transform: scale(0.95);
}

/* --- Modal --- */
.modal-container-instagram {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.92);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    padding: 15px;
}

.modal-content-instagram {
    background-color: #121212;
    color: var(--cor-texto);
    padding: 35px 25px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    text-align: center;
    position: relative;
    width: 100%;
    max-width: 350px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.9);
    animation: scaleIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content-instagram h2 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.modal-content-instagram p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 20px;
}

.fechar-modal-instagram {
    position: absolute;
    top: 10px;
    right: 20px;
    color: #555;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin: 20px 0;
}

.social-icons a {
    color: #fff;
    font-size: 32px;
}

.social-icons a:active {
    transform: scale(0.9);
}

.instagram-modal-btn {
    display: inline-block;
    background: var(--cor-destaque);
    color: #fff;
    padding: 12px 20px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 0.85rem;
    text-decoration: none;
    width: 100%;
    box-shadow: 0 4px 15px rgba(217, 37, 37, 0.3);
}

.instagram-modal-btn:active {
    transform: scale(0.97);
}


/* ==================================================================== */
/*          NOVO: SEÇÃO DE CONFRATERNIZAÇÕES (confra.html)              */
/* ==================================================================== */

.main-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 440px;
    margin: auto;
    padding: 40px 20px;
    text-align: center;
    flex-grow: 1;
}

.main-container .main-logo {
    max-width: 120px;
    margin-bottom: 30px;
}

.page-title {
    font-family: var(--font-serif);
    color: var(--cor-texto);
    font-size: 1.7rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.9);
}

.page-subtitle {
    color: #aaa;
    font-size: 0.9rem;
    font-weight: 400;
    margin-bottom: 40px;
    line-height: 1.4;
}

.button-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.confra-button {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--cor-texto);
    padding: 18px 24px;
    border-radius: 16px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.confra-button:active {
    transform: scale(0.97);
    background: rgba(255, 255, 255, 0.08);
}

body:has(.main-container) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
}


/* ==================================================================== */
/*   MÁGICA RESPONSIVA: COMPACTAÇÃO INTELIGENTE PARA TELAS CURTAS       */
/* ==================================================================== */

@media (max-height: 700px) {
    .header {
        padding: 10px 20px 2px; /* Margem sutil na logo */
    }
    .main-logo {
        max-width: 80px; /* Reduz levemente a logo branca */
    }
    .botoes-topo-container {
        margin-top: 4px;
    }
    .instagram-link {
        padding: 6px 16px; /* Botão superior menor */
        font-size: 0.65rem;
    }
    .categories-nav {
        margin: 6px 0 2px; /* Espaço entre categorias compactado */
    }
    .tab-btn {
        font-size: 0.95rem;
        padding: 4px 10px;
    }
    .mode-selector {
        margin: 4px 0 8px; /* Reduz barra de modo */
    }
    .scroll-instruction {
        margin-bottom: 6px;
    }
    .tripadvisor-section {
        padding: 8px 20px 10px; /* TripAdvisor compacto embaixo */
    }
    .tripadvisor-img-btn img {
        max-width: 90px; /* Diminui a imagem do TripAdvisor */
    }
    .lookbook-info h3 {
        font-size: 1.05rem; /* Ajuste sutil do título */
    }
    
    /* Confraternizações Responsivo */
    .main-container {
        padding: 20px;
    }
    .main-container .main-logo {
        max-width: 100px;
        margin-bottom: 15px;
    }
    .page-title {
        font-size: 1.5rem;
    }
    .page-subtitle {
        margin-bottom: 25px;
    }
}