:root {
    --primary-color: #007bff;
    --primary-dark: #1a3c5e;
    --accent-yellow: #f1c40f;
    --dark-bg: #1a1a1a;
    --light-gray: #f8f9fa;
    --border-color: #ddd;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* --- CONTAINER E FUNDO --- */
.ficha-tecnica-container {
    background-color: #fdfdfd;
    background-image:
        linear-gradient(90deg, transparent 79px, #ab4442 79px, #ab4442 81px, transparent 81px),
        linear-gradient(#e1e9f0 0.1em, transparent 0.1em);
    background-size: 100% 30px;
    background-attachment: local;
    min-height: 100vh;
}

/* --- CABEÇALHO LADO A LADO --- */
.header-notebook {
    background: rgba(255, 255, 255, 0.4);
    padding-top: 40px;
    padding-bottom: 20px;
}

.topo-fichatecnica {
    display: flex !important;
    flex-direction: row !important;
    /* Força lado a lado */
    align-items: center;
    justify-content: space-between;
    padding-left: 120px !important;
    /* Espaço para a margem vermelha */
    padding-right: 60px !important;
    padding-top: 5%;
}

.header-text-group {
    flex: 1;
}

.doc-number {
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #888;
    font-size: 0.8rem;
    display: block;
    margin-bottom: 5px;
}

.empresa-nome-principal {
    color: #1a3c5e;
    font-weight: 800;
    margin: 0;
    line-height: 1.1;
    font-size: 2.5rem;
}

@media (max-width: 991px) {
    .header-text-group {
        margin-bottom: 50px;
    }

    .empresa-nome-principal {
        font-size: 2.0rem;
    }
}

.empresa-subtitulo {
    font-size: 1.2rem;
    font-style: italic;
    color: #555;
    margin-top: 5px;
}

/* LOGO À DIREITA */
.header-logo-group {
    margin-left: 40px;
    flex-shrink: 0;
}

.logo-sticker {
    padding: 10px;
    /* Reduzi um pouco para ficar mais elegante */
    background: #fff;
    border: 1px solid #ccc;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.05);
    transform: rotate(2deg);
    position: relative;
    display: inline-block;
    /* Importante: faz a moldura abraçar a imagem */
    line-height: 0;
    /* Remove espaços fantasmas abaixo da imagem */
    transition: transform 0.3s ease;
}

.logo-sticker:hover {
    transform: rotate(0deg) scale(1.05);
}

.technical-logo {
    /* Respeita proporções originais sem esticar */
    max-height: 180px;
    /* Limite de altura */
    max-width: 280px;
    /* Limite de largura */
    width: auto !important;
    height: auto !important;
    display: block;
    object-fit: contain;
}

.logo-sticker .img-hover-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 60, 94, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    z-index: 2;
}

.logo-sticker:hover .img-hover-hint {
    opacity: 1;
}

.logo-sticker .img-hover-hint i {
    font-size: 1.5rem;
}

/* --- AJUSTE DAS SECÇÕES PARA RESPEITAR A MARGEM --- */
section.py-5 {
    padding-left: 0 !important;
    padding-right: 0 !important;
    background: transparent !important;
    padding-bottom: 5%;
}

section.py-5 .container-fluid {
    padding-left: 120px !important;
    /* Alinha todo o conteúdo com o texto do header */
    padding-right: 60px !important;
}

/* Títulos de Secção */
.custom-section-title {
    margin-bottom: 30px;
    display: inline-block;
    padding-right: 50px;
}

/* Responsividade */
@media (max-width: 991px) {
    .topo-fichatecnica {
        flex-direction: column !important;
        /* Empilha em mobile */
        padding-left: 40px !important;
        text-align: center;
    }

    .header-notebook {
        padding-top: 100px;
    }

    .header-logo-group {
        margin-left: 0;
        margin-top: 20px;
    }

    .ficha-tecnica-container {
        background-image: linear-gradient(#e1e9f0 0.1em, transparent 0.1em);
        /* Remove linha vermelha no mobile */
    }

    section.py-5 .container-fluid {
        padding-left: 30px !important;
        padding-right: 30px !important;
    }
}

.header-text-group {
    flex: 1;
    text-align: left;
}

.header-logo-group {
    flex-shrink: 0;
    margin-left: 30px;
}

.technical-logo {
    max-height: 160px;
    max-width: 300px;
    object-fit: contain;
    filter: drop-shadow(0 10px 15px rgba(0, 0, 0, 0.1));
}

.custom-section-title {
    font-size: 2.2rem;
    color: var(--primary-dark);
    font-weight: 800;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 40px;
    display: inline-block;
}

.custom-section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 5px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-yellow));
    border-radius: 3px;
}

/* ---------------------------------------- CONFIGURAÇÃO DA MATRIZ ------------------------------------------------------ */
.matrix-horizontal-wrapper {
    width: 100%;
    overflow-x: auto;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: transparent;
    position: relative;
}

.table-matrix-horizontal {
    border-collapse: separate;
    border-spacing: 0;
    width: auto;
    min-width: 100%;
    background: transparent;
}

/* --- COLUNAS FIXAS (STICKY) --- */

/* Célula que fica "invisível" nas linhas que não são de sócios */
.side-empty-cell {
    position: sticky;
    left: 0;
    z-index: 101;
    width: 35px;
    min-width: 35px;
    background: white !important;
    border: none !important;
}

/* Coluna onde aparece o texto vertical "SÓCIOS" */
.side-partner-label-cell {
    position: sticky;
    left: 0;
    z-index: 101;
    width: 35px;
    min-width: 35px;
    background-color: var(--primary-dark) !important;
    border: 1px solid #eee !important;
    border-right: none !important;
    vertical-align: middle !important;
    text-align: center;
    color: #fff;
}

/* Texto Vertical SÓCIOS */
.vertical-text-partner {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-size: 0.6rem;
    font-weight: 800;
    color: #bbb;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Segunda coluna fixa (Etiquetas Principais) */
.sticky-label-col {
    position: sticky;
    left: 35px;
    /* largura da primeira coluna */
    z-index: 100;
    width: 190px;
    min-width: 190px;
    background-color: #f8f9fa !important;
    border-right: 2px solid #1a3c5e !important;
    text-align: right;
    padding: 10px 15px;
    box-shadow: 4px 0 8px rgba(0, 0, 0, 0.03);
}

/* --- ESTILOS DE LINHA E CÉLULA --- */

.label-header {
    font-size: 0.7rem;
    font-weight: 800;
    color: #1a3c5e;
    text-transform: uppercase;
}

.socio-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    background-color: #98bee4 !important;
}

.cell-header-top {
    background-color: #f8f9fa;
    font-size: 0.75rem;
    color: #1a3c5e;
}

/* --- LINHAS DE RODAPÉ (CAPITAL E MOEDA) --- */

.row-compact th,
.row-compact td {
    padding: 5px 12px !important;
    height: 28px !important;
}

.cell-footer-info {
    font-size: 0.65rem !important;
    /* Tamanho discreto igual à moeda */
    color: #999 !important;
    background-color: #ffffff !important;
    font-weight: normal !important;
    text-align: center;
}

.border-top-bold {
    border-top: 2px solid #1a3c5e !important;
}

/* Scrollbar Custom */
.matrix-horizontal-wrapper::-webkit-scrollbar {
    height: 8px;
}

.matrix-horizontal-wrapper::-webkit-scrollbar-track {
    background: transparent;
}

.matrix-horizontal-wrapper::-webkit-scrollbar-thumb {
    background: #1a3c5e;
    border-radius: 10px;
}

/* --------------------------------------------------------------3. LINHA DO TEMPO (ESCALA HORIZONTAL) --------------------------------------------------------------*/
.timeline-scale-wrapper {
    position: relative;
    height: 140px;
    margin: 0px 40px;
}

.timeline-line {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 4px;
    background: #86a7e7;
    transform: translateY(-50%);
    border-radius: 4px;
}

.timeline-point {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 10;
    transition: var(--transition);
    padding: 10px;
}

.point-icon-moto {
    font-size: 1.5rem;
    color: var(--primary-dark);
    padding: 5px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.timeline-point.active .point-icon-moto {
    color: var(--accent-yellow) !important;
    transform: scale(1.8) translateY(-5px);
    filter: drop-shadow(0 5px 10px rgba(0, 0, 0, 0.2));
}

.timeline-point:hover .point-icon-moto {
    color: var(--accent-yellow);
    transform: scale(1.4);
}

.point-year {
    position: absolute;
    top: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 800;
    font-size: 0.9rem;
    color: var(--primary-dark);
    transition: color 0.3s ease;
}

.timeline-point.active .point-year {
    color: var(--accent-yellow);
    font-size: 1rem;
}

/* 4. ROADMAP DETALHADO (LARGURA TOTAL E ADAPTÁVEL) */
#chrono-events-container {
    padding: 40px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: 100%;
}

/* Linha vertical técnica */
.vertical-timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-v-item.centered-event {
    width: 100%;
    /* Esticado ao máximo */
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    z-index: 2;
}

.timeline-v-content {
    background: #fff !important;
    width: 100%;
    /* Ocupa a largura do container-fluid */
    padding: 30px;
    border-radius: 15px;
    border: 2px solid #eee !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    /* Padrão: Tudo empilhado (Data -> Texto -> Foto) */
}

.timeline-v-item:hover .timeline-v-content {
    border-color: var(--accent-yellow) !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1) !important;
}

/* Data sempre centralizada no topo */
.event-card-tag {
    align-self: center;
    background: #e3f2fd;
    color: #0d47a1;
    padding: 6px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.event-main-body {
    display: flex;
    flex-direction: column;
    /* Padrão: Texto em cima, Foto em baixo */
    gap: 20px;
    width: 100%;
}

.event-card-desc {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
    text-align: left;
    /* Texto alinhado à esquerda para leitura técnica */
    flex: 1;
}

.event-v-img-wrapper {
    position: relative;
    display: flex;         /* Adicionado para centrar */
    justify-content: center;
    align-items: center;
    overflow: hidden;
    cursor: pointer;
}

.event-v-img-wrapper img {
    display: block;
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 550px;
    transition: transform 0.5s ease;
}

.event-v-img-wrapper .galeria-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 60, 94, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 2;
}

.event-v-img-wrapper:hover .galeria-overlay {
    opacity: 1;
}

.event-v-img-wrapper .galeria-overlay i {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.event-v-img-wrapper .galeria-overlay span {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}


/* --- LAYOUT PARA FOTOS VERTICAIS (LADO A LADO) --- */
@media (min-width: 769px) {
    .is-vertical-layout .event-main-body {
        flex-direction: row;
        /* Foto à esquerda, Texto à direita */
        align-items: flex-start;
    }

    .is-vertical-layout .event-v-img-wrapper {
        flex: 0 0 35%;
        /* Foto ocupa 35% da largura */
        order: -1;
        /* Move a foto para o lado esquerdo */
        align-self: flex-start;
    }

    .is-vertical-layout .event-card-desc {
        padding-left: 20px;
    }
}

/* --- RESPONSIVO MOBILE --- */
@media (max-width: 768px) {
    .timeline-v-content {
        padding: 20px;
    }

    .event-main-body {
        flex-direction: column !important;
        /* Sempre empilhado no mobile */
    }

    .event-v-img-wrapper img {
        max-height: 400px;
    }

    .event-card-desc {
        text-align: center;
    }
}

.event-v-img-wrapper:hover .img-hover-hint {
    opacity: 1;
}

.event-v-img-wrapper:hover img {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    /* 1. CENTRAR OS ÍCONES DAS MOTAS */
    .timeline-scale-wrapper {
        justify-content: center !important; /* Centra a grelha de motas */
        margin: 20px 0 !important;
        padding: 0 !important;
    }

    /* 2. REMOVER MARGENS LATERAIS DO CONTAINER NO MOBILE */
    /* Isto remove o espaço de "caderno" (120px) apenas nesta secção */
    section.py-5 .container, 
    section.py-5 .container-fluid {
        padding-left: 15px !important;  /* Margem mínima de segurança */
        padding-right: 15px !important;
    }

    /* 3. ESTICAR O CARD DO ACONTECIMENTO AO MÁXIMO */
    .timeline-v-content {
        width: 100% !important;        /* Ocupa toda a largura disponível */
        max-width: none !important;
        padding: 20px 15px !important; /* Reduz padding interno para dar espaço ao texto */
        border-radius: 10px !important;
    }

    /* 4. AJUSTE DA DATA E TEXTO NO MOBILE */
    .event-card-tag {
        margin-bottom: 15px !important;
    }

    .event-main-body {
        gap: 15px !important;
    }

    .event-card-desc {
        font-size: 0.9rem !important;
        text-align: left !important;   /* Mantém alinhamento à esquerda para leitura */
    }

    /* Ajuste da imagem para não ficar gigante */
    .event-v-img-wrapper img {
        max-height: 350px !important;
    }
}

/* 5. CARROSSEIS */
section.bg-light {
    background-color: #ffffff !important;
}

.ficha-carousel {
    padding: 20px 0 40px 0;
    margin: 0 -15px;
}

.carousel-slide-wrapper {
    padding: 0 15px;
    display: flex;
    flex: 1;
}

.card-zoom {
    background: #fff;
    border-radius: 15px;
    border: 1px solid #eee !important;
    transition: var(--transition);
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
    flex: 1;
}

.card-zoom:hover {
    transform: translateY(-8px);
    border-color: var(--primary-color) !important;
}

.img-container {
    height: 240px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
    border-bottom: 1px solid #eeeeee !important;
}

.img-container img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.6s ease;
}

.card-zoom:hover .img-container img {
    transform: scale(1.05);
}

.card-body {
    padding: 10px !important;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}

.card-body h5 {
    font-size: 1.1rem;
    color: var(--primary-dark);
    font-weight: 700;
    margin-bottom: 10px;
}

/* 6. RESPONSIVIDADE */
@media (max-width: 768px) {
    .topo-fichatecnica {
        flex-direction: column;
        text-align: center;
    }

    .header-logo-group {
        margin-bottom: 20px;
    }

    .vertical-timeline-line {
        left: 30px;
    }

    .timeline-v-dot {
        left: 30px;
    }

    .timeline-v-item {
        justify-content: flex-start !important;
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .timeline-v-content {
        width: 100% !important;
        text-align: left !important;
    }

    .timeline-v-content::after {
        left: -32px !important;
    }

    .display-3 {
        font-size: 2.2rem;
    }
}

.slick-dots li button:before {
    font-size: 8px !important;
    color: var(--primary-dark) !important;
}

/* --- LAYOUT LADO A LADO PARA MARCAS (FIXED) --- */

.marca-container-row {
    display: flex !important;
    flex-direction: row;
    background: #ffffff !important;
    border: 1px solid #ccd0d4 !important;
    box-shadow: 3px 3px 10px rgba(0, 0, 0, 0.05) !important;
    border-radius: 8px;
    overflow: hidden;
    min-height: 380px;
    margin-bottom: 30px !important;
}

/* Lado Esquerdo - Imagem com Fundo Cinza */
.marca-lado-imagem {
    flex: 0 0 320px;
    max-width: 320px;
    background-color: #fcfcfc !important;
    display: flex !important;
    align-items: center;
    /* Centraliza verticalmente se o texto à direita for maior */
    justify-content: center;
    padding: 40px;
    border-right: 1px solid #eee;
    position: relative;
    overflow: hidden;
}

.marca-lado-imagem img {
    /* LARGURA FIXA - ALTURA VARIÁVEL */
    width: 220px !important;
    /* Define a largura exata que todos os logos devem ter */
    height: auto !important;
    /* A altura cresce conforme a proporção do logo */
    max-width: 100%;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.08));
    transition: transform 0.3s ease;
}

.marca-lado-imagem:hover img {
    transform: scale(1.05);
}

.marca-lado-imagem .img-hover-hint {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 60, 94, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: 0.3s;
    z-index: 2;
}

.marca-lado-imagem:hover .img-hover-hint {
    opacity: 1;
}

/* Lado Direito - Conteúdo */
.marca-lado-dados {
    flex: 1;
    /* Ocupa o restante do espaço */
    padding: 30px 40px !important;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: white;
}

.marca-titulo-topo {
    color: #1a3c5e;
    font-weight: 800;
    font-size: 1.8rem;
    margin-bottom: 20px;
    border-bottom: 2px solid #f1c40f;
    display: inline-block;
}

.marca-dados-tecnicos {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.item-dado-tecnico {
    border-bottom: 1px solid #f9f9f9;
    padding-bottom: 8px;
}

.dado-label-azul {
    display: block;
    text-transform: uppercase;
    font-size: 0.65rem;
    color: #007bff;
    font-weight: 700;
    margin-bottom: 3px;
}

.item-dado-tecnico p {
    margin: 0;
    line-height: 1.4;
    color: #333;
}

/* RESPONSIVIDADE: Mobile volta a ser vertical */
@media (max-width: 991px) {

    .marca-lado-dados {
        padding: 25px !important;
    }

    .marca-container-row {
        flex-direction: column;
        min-height: auto;
    }

    .marca-lado-imagem {
        max-width: 100%;
        width: 100%;
        flex: none;
        height: auto;
        padding: 50px 20px;
        border-right: none;
        border-bottom: 1px solid #eee;
    }

    .marca-lado-imagem img {
        width: 180px !important;
        /* Um pouco menor no mobile */
    }
}

/* --- ESTILO DOS MODELOS (GRELHA 3 POR LINHA COM ACORDEÃO) --- */

/* --- ESTILO DOS MODELOS (GRELHA FORÇADA 3 POR LINHA) --- */

.row-modelos-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    margin-right: -15px;
    margin-left: -15px;
}

.col-modelo-item {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-bottom: 30px;
    /* Força 3 por linha em Desktop */
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
}

.card-modelo-estatico {
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: hidden;
    background: #fff;
    display: flex;
    flex-direction: column;
    /* 1. Borda azul por padrão */
    border: 2px solid var(--primary-dark) !important;
}

/* 2. Alteração da borda no Hover (Amarelo) */
.card-modelo-estatico:hover {
    border-color: var(--accent-yellow) !important;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Contentor da Imagem - Altura reduzida para aproximar o título */
.img-container-modelo {
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #ffffff;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    overflow: hidden;
}

.img-container-modelo img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.5s ease;
}

/* ÁREA CLICÁVEL DO TÍTULO (ACORDEÃO) */
.modelo-header-toggle {
    display: flex;
    align-items: center;
    /* Alinha verticalmente ao centro */
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    padding: 10px 5px;
    transition: background 0.2s;
    line-height: 1;
    /* Remove espaços extras de linha */
}

.modelo-header-toggle:hover {
    background: rgba(0, 0, 0, 0.03);
    /* Leve destaque no hover do título */
}

/* TÍTULO DO MODELO - Mais pequeno e colado à imagem */
.modelo-titulo-card {
    font-size: 0.85rem !important;
    font-weight: 700;
    color: #1a3c5e;
    text-transform: uppercase;
    margin: 0 !important;
    /* Margem zero absoluta */
    padding: 0;
    display: inline-block;
    /* Para alinhar bem com a seta */
}

/* Estilo da Seta */
.btn-seta-modelo {
    font-size: 0.7rem;
    color: var(--primary-dark);
    transition: transform 0.3s ease;
}

/* DESCRIÇÃO - Escondida por padrão para o efeito Acordeão */
.modelo-descricao-discreta {
    display: none;
    font-size: 0.7rem;
    /* Texto reduzido de 0.75 para 0.7 */
    color: #999;
    /* Cinza ligeiramente mais claro */
    line-height: 1.3;
    text-align: left;
    margin-top: 5px;
    padding: 10px;
    border-top: 1px solid #f0f0f0;
}

.modelo-descricao-discreta p {
    margin-bottom: 3px;
    font-size: 0.7rem !important;
}

/* --- EFEITOS DE OVERLAY (GALERIA) --- */

.galeria-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 60, 94, 0.8);
    /* Azul escuro translúcido */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff !important;
    opacity: 0;
    transition: all 0.4s ease;
    pointer-events: none;
    /* Deixa o clique passar para o card */
    z-index: 2;
}

.card-modelo-estatico:hover .galeria-overlay {
    opacity: 1;
}

.card-modelo-estatico:hover .img-principal {
    transform: scale(1.1);
}

/* RESPONSIVIDADE */

/* Tablets: 2 por linha */
@media (max-width: 991px) {
    .col-modelo-item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Telemóveis: 1 por linha */
@media (max-width: 575px) {
    .col-modelo-item {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .img-container-modelo {
        height: 250px;
    }
}

/* Quando passamos o rato no card, mostramos o overlay */
.card-modelo-estatico:hover .galeria-overlay {
    opacity: 1;
}

.galeria-overlay i {
    font-size: 2.5rem;
    margin-bottom: 10px;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.galeria-overlay span {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

/* Efeito de subida dos elementos no hover */
.card-modelo-estatico:hover .galeria-overlay i,
.card-modelo-estatico:hover .galeria-overlay span {
    transform: translateY(0);
}

/* Garante que a imagem principal não fica por cima do overlay */
.img-principal {
    position: relative;
    z-index: 1;
    transition: transform 0.5s ease;
}

.card-modelo-estatico:hover .img-principal {
    transform: scale(1.1);
}

.img-container-modelo .img-principal {
    transition: transform 0.5s ease;
}

.card-modelo-estatico:hover .img-principal {
    transform: scale(1.1);
}

/* --- OVERLAY DO FUNDO (Sempre à frente de tudo) --- */
.lightbox-custom {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.9) !important;
    z-index: 99999999 !important;
    /* Valor absurdo para garantir prioridade */
    display: none;
    /* Alternado pelo JS para 'flex' */
    align-items: center;
    justify-content: center;
    font-family: sans-serif;
}

/* --- Contentor Branco --- */
.lightbox-container {
    width: 90%;
    max-width: 1200px;
    height: 85vh;
    background: #fff;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

/* --- Cabeçalho --- */
.lightbox-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.lightbox-titulo {
    font-weight: 800;
    color: #1a3c5e;
    text-transform: uppercase;
    font-size: 1.1rem;
}

.lightbox-btn,
.lightbox-btn-close {
    background: #fff;
    border: 1px solid #ccc;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.2s;
}

.lightbox-btn:hover {
    background: #eee;
}

.lightbox-btn-close {
    background: #dc3545;
    color: white;
    border: none;
}

.lightbox-btn-close:hover {
    background: #bd2130;
}

/* --- Corpo --- */
.lightbox-body {
    display: flex;
    flex: 1;
    overflow: hidden;
    background: #111;
}

/* --- Sidebar --- */
.lightbox-sidebar {
    width: 120px;
    background: #fff;
    padding: 10px;
    overflow-y: auto;
    border-right: 1px solid #ddd;
}

.lightbox-thumbs-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.thumb-item-custom {
    width: 100%;
    height: 75px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid #eee;
    border-radius: 4px;
    transition: 0.2s;
}

.thumb-item-custom.active,
.thumb-item-custom:hover {
    border-color: #007bff;
}

/* --- Visualizador Imagem --- */
.lightbox-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    padding: 20px;
}

.lightbox-viewport {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: auto;
}

.lightbox-img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
    transition: transform 0.2s ease-out;
}

/* --- QUADRO EVOLUTIVO HORIZONTAL --- */

.matrix-horizontal-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    /* Permite o scroll */
    border: 1px solid #ddd;
    border-radius: 12px;
    background: #fff;
    position: relative;
    display: block;
    /* Garante que se comporta como bloco */
}

.table-matrix-horizontal {
    border-collapse: separate;
    /* Necessário para sticky column */
    border-spacing: 0;
    width: auto;
    min-width: 100%;
}

.table-matrix-horizontal th,
.table-matrix-horizontal td {
    padding: 10px 15px;
    white-space: nowrap;
    border-right: 1px solid rgba(0, 0, 0, 0.05);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

/* COLUNA ESQUERDA FIXA */
.table-matrix-horizontal th.sticky-col {
    position: sticky;
    left: 0;
    z-index: 5;
    background-color: #f8f9fa !important;
    border-right: 3px solid #1a3c5e !important;
    text-align: right;
    min-width: 220px;
    width: 220px;
}

.label-header {
    font-size: 0.7rem;
    font-weight: 800;
    color: #1a3c5e;
    text-transform: uppercase;
}

.socio-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #333;
}

.border-top-bold {
    border-top: 2px solid #1a3c5e !important;
}

/* SCROLLBAR PERSONALIZADA */
.matrix-horizontal-wrapper::-webkit-scrollbar {
    height: 10px;
}

.matrix-horizontal-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.matrix-horizontal-wrapper::-webkit-scrollbar-thumb {
    background: #1a3c5e;
    border-radius: 10px;
    border: 2px solid #f1f1f1;
}

/* --- LINHA DO TEMPO RESPONSIVA (3 POR LINHA SEM CONECTOR VERTICAL) --- */

@media (max-width: 767px) {

    /* 1. Ajuste do Container Principal */
    .timeline-scale-wrapper {
        display: flex;
        flex-wrap: wrap;
        height: auto;
        margin: 40px 0;
        padding: 0;
        justify-content: flex-start;
    }

    .timeline-line {
        display: none;
    }

    /* 2. Cada Ponto (Mota + Ano) */
    .timeline-point {
        position: relative !important;
        left: auto !important;
        top: auto !important;
        transform: none !important;
        width: 33.33%;
        height: 120px;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-bottom: 40px;
        z-index: 1;
    }

    /* 3. A Linha Horizontal (Mantida apenas a horizontal) */
    .timeline-point::before {
        content: "";
        position: absolute;
        top: 25px;
        left: 0;
        width: 100%;
        height: 2px;
        background: #ddd;
        z-index: -1;
    }

    /* Remove a sobra da linha no primeiro item da primeira linha */
    .timeline-point:first-child::before {
        width: 50%;
        left: 50%;
    }

    /* BLOCO 4 REMOVIDO: A linha vertical foi retirada daqui */

    /* 5. Ajuste dos Ícones das Motas */
    .point-icon-moto {
        height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: none !important;
        font-size: 1.2rem;
        /* Importante para a linha horizontal não atravessar o ícone */
    }

    /* 6. Ajuste dos Anos */
    .point-year {
        position: relative !important;
        top: 10px !important;
        left: auto !important;
        transform: none !important;
        font-size: 0.8rem;
        font-weight: 800;
        color: var(--primary-dark);
    }

    /* 7. Quando Ativo */
    .timeline-point.active .point-icon-moto {
        border-color: var(--accent-yellow);
        transform: scale(1.2);
    }
}