﻿/* ==========================================================================
   1. ROOT VARIABLES & THEME SETUP
   ========================================================================== */
:root {
    /* Bootstrap Overrides */
    --bs-primary: #ee322e;
    /* Cores da Marca GAF */
    --brand-red: #ee322e;
    --brand-red-hover: #d42a26;
    --brand-dark: #0f172a;
    --brand-dark-hover: #1e293b;
    /* Custom UI */
    --custom-ring: rgba(238, 50, 46, 0.5);
}

/* Simular o outline-ring global para acessibilidade */
*:focus-visible {
    outline: 2px solid var(--custom-ring);
    outline-offset: 2px;
}

.nav-link-custom-pp {
    color: #ee322e !important;
}

/* ==========================================================================
   2. PRELOADER
   ========================================================================== */
#preloader {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    background: #fff;
    opacity: 1;
    z-index: 9999;
    touch-action: none;
    transition: all .3s;
}

    #preloader .spinner-border {
        width: 4rem;
        height: 4rem;
        border: var(--bs-spinner-border-width) solid var(--bs-primary);
        border-right-color: transparent;
    }

.preloader-done {
    opacity: 0 !important;
    visibility: hidden;
    pointer-events: none;
}

/* ==========================================================================
   3. MENU / NAVBAR (NOVO DESIGN GAF + LEGACY)
   ========================================================================== */

/* Novo Cabeçalho Branco (Blur Effect) */
.custom-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid #e2e8f0;
    z-index: 1040;
    transition: all 0.3s ease;
}

/* Links de Navegação Customizados (Desktop) */
@media (min-width: 768px) {
    .nav-link-custom {
        position: relative;
        color: #475569 !important;
        font-weight: 500;
        transition: color 0.2s ease;
        padding: 0.5rem 0.75rem !important;
    }

    .nav-link-custom:hover {
        color: var(--brand-red) !important;
    }

    /* Linha vermelha no link ativo (Desktop) */
    .nav-link-custom.active {
        color: var(--brand-red) !important;
    }

        .nav-link-custom.active::after {
            content: '';
            position: absolute;
            bottom: 0;
            left: 0;
            width: 100%;
            height: 2px;
            background-color: var(--brand-red);
        }
}

/* Links de Navegação Customizados (Mobile) */
@media (max-width: 767.98px) {
    .custom-header .navbar-collapse {
        background-color: white;
        border-top: 1px solid #e2e8f0;
        padding: 1rem;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .nav-link-custom {
        padding: 0.75rem 1rem !important;
        border-radius: 0.375rem;
        color: #334155 !important;
        margin-bottom: 0.25rem;
        font-weight: 500;
    }

    .nav-link-custom:hover {
        background-color: #f3f4f6;
    }

    /* Bloco vermelho no link ativo (Mobile) */
    .nav-link-custom.active {
        background-color: var(--brand-red) !important;
        color: white !important;
    }
}

/* Legacy Navbar Styles (Apenas mantidos caso utilizes em páginas antigas) */
.navbar.legacy {
    background-color: rgb(0 79 93 / 90%);
    width: 100%;
    border-radius: 14px;
    transition: all 1s ease;
    z-index: 1040;
}

    .navbar.legacy.sticky {
        background-color: rgb(0 79 93 / 95%);
        position: fixed;
        padding-top: 8px;
        padding-bottom: 8px;
        top: 0;
        left: 0;
        right: 0;
        width: 100%;
        border-radius: 0;
        transform: translateY(-100%);
    }

        .navbar.legacy.sticky.show {
            transform: translateY(0);
        }

@media (min-width: 992px ) {
    .navbar.legacy {
        position: absolute;
        top: 20px;
        left: 0;
        right: 0;
        width: calc(100vw - 35px);
        margin: 0 auto;
    }
}

/* Botão Hamburguer Legacy */
.navbar-toggler.collapsed {
    border: none;
    background: transparent !important;
}

.navbar-toggler:focus {
    box-shadow: none;
}

.navbar-toggler .icon-bar {
    background-color: #0f172a;
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 1px;
    transition: all 0.2s;
}

    .navbar-toggler .icon-bar + .icon-bar {
        margin-top: 4px;
    }

/* Dropdowns e Menus Umbraco */
.dropdown-menu {
    background-color: #ffffff;
    margin-top: 15px !important;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.dropdown-item {
    color: #475569;
    padding: 10px 20px;
    font-size: 14px;
    transition: all 0.2s;
}

    .dropdown-item.active,
    .dropdown-item:active,
    .dropdown-item:hover {
        background-color: #f1f5f9;
        color: var(--brand-red);
    }

@media (max-width: 1399px) {
    #navbarContent .nav-item.dropdown {
        flex-wrap: wrap;
    }

        #navbarContent .nav-item.dropdown > .dropdown-menu {
            position: static;
            flex: 0 0 100%;
            width: 100%;
            box-shadow: none;
            border: none;
            background-color: #f8fafc;
        }

    .dropdown-toggle-split {
        padding-left: 10px !important;
        padding-right: 10px !important;
        margin-left: 10px;
    }
}

/* ==========================================================================
   4. UI COMPONENTS (BOTÕES, CARDS, FOOTER)
   ========================================================================== */

/* Botões Personalizados GAF */
.btn-brand {
    background-color: var(--brand-red);
    color: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

    .btn-brand:hover {
        background-color: var(--brand-red-hover);
        color: white;
        box-shadow: 0 .5rem 1rem rgba(0,0,0,.15);
    }

.btn-outline-brand {
    border: 2px solid white;
    color: white;
    transition: all 0.3s ease;
    font-weight: 500;
}

    .btn-outline-brand:hover {
        background-color: white;
        color: var(--brand-dark);
    }

/* Botão CTA Mobile (Dark) */
.btn-mobile-cta {
    background-color: var(--brand-dark);
    color: white;
    width: 100%;
    padding: 0.75rem 1rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

    .btn-mobile-cta:hover {
        background-color: var(--brand-dark-hover);
        color: white;
    }

/* Cartões de Serviço (Efeitos de Hover) */
.service-card {
    transition: all 0.3s ease;
    border-color: #f8f9fa;
}

    .service-card:hover {
        box-shadow: 0 1rem 3rem rgba(0,0,0,.175) !important;
        border-color: rgba(238, 50, 46, 0.2) !important;
    }

.service-icon-box {
    transition: background-color 0.3s ease;
    background-color: rgba(238, 50, 46, 0.1);
}

.service-icon {
    transition: color 0.3s ease;
    color: var(--brand-red);
}

.service-card:hover .service-icon-box {
    background-color: var(--brand-red);
}

.service-card:hover .service-icon {
    color: #ffffff !important;
}

/* Footer GAF */
.footer-bg {
    background-color: #0f172a;
}

.footer-link {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

    .footer-link:hover {
        color: #ee322e;
    }

/* ==========================================================================
   5. BANNERS, SLIDERS & UTILITIES (MANTIDO DO ORIGINAL)
   ========================================================================== */

.swiper .slide-bg {
    position: relative;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    min-height: 95vh;
}

.swiper .overlay {
    background-image: radial-gradient(at center center, rgb(0 0 0 / 80%) 0%, transparent);
}

.swiper .content {
    margin-top: 90px;
    padding-top: 150px;
    padding-bottom: 310px;
    position: relative;
    color: #fff;
    z-index: 10;
}

.swiper .title {
    font-size: 114px;
    line-height: 1.1;
}

.swiper .text {
    font-size: 20px;
}

.bg-img {
    position: relative;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.header-banner {
    padding-top: 250px;
}

    .header-banner .bg-overlay {
        background: rgb(0 0 0 / 60%);
    }

    .header-banner .description {
        color: rgb(255 255 255 / 85%);
    }

.breadcrumb a {
    color: #fff;
    padding: 4px 8px;
    text-decoration: none;
    border-radius: 3px;
    transition: all ease-in-out .3s;
}

    .breadcrumb a:hover {
        background: rgb(255 255 255 / 35%);
        color: #fff;
    }

.breadcrumb-item + .breadcrumb-item::before {
    color: rgb(255 255 255 / 50%);
}

.breadcrumb-item + .breadcrumb-item.active {
    color: rgb(255 255 255 / 80%);
}

/* Utilitários de Espaçamento */
.my-10 {
    margin-top: 6rem;
    margin-bottom: 6rem;
}

.mt-10 {
    margin-top: 6rem;
}

.mb-10 {
    margin-bottom: 6rem;
}

img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

/* Swiper Controls */
.swiper .swiper-pagination-bullet {
    background: var(--bs-primary);
    opacity: .2;
}

.swiper .swiper-pagination-bullet-active {
    background: var(--bs-primary);
    opacity: 1;
}

.swiper .swiper-slide:hover {
    cursor: grab;
}

.swiper-pagination-bullet {
    margin: 0 2px !important;
}

.swiper-pagination-bullet-active {
    background: rgb(0,0,0, .5);
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    text-shadow: 0 0 5px black;
}

    .swiper-button-next:after,
    .swiper-button-prev:after {
        font-size: 20px;
        transition: all ease-in-out .15s;
    }

    .swiper-button-next:hover:after,
    .swiper-button-prev:hover:after {
        font-size: 30px;
    }

.swiper.dots-white .swiper-pagination-bullet {
    background: #fff;
    opacity: .2;
}

.swiper.dots-white .swiper-pagination-bullet-active {
    background: #fff;
    opacity: .85;
}


/* ==========================================================================
   6. SECTION: SOBRE NÓS
   ========================================================================== */

/* Fundo da Secção */
.bg-light-slate {
    background-color: #f8fafc;
}

/* Tipografia de Cabeçalho */
.subtitle-sm {
    color: var(--brand-red);
    font-size: 0.85rem;
    letter-spacing: 0.1em;
}

.title-lg {
    font-size: calc(1.375rem + 1.5vw);
    font-weight: 800;
    color: var(--brand-dark) !important;
}

.title-lg-white {
    font-size: calc(1.375rem + 1.5vw);
    font-weight: 800;
    color: white;
}

.divider-brand {
    width: 60px;
    height: 3px;
    background-color: var(--brand-red);
}

/* Efeitos e Molduras da Imagem */
.img-frame-accent {
    top: -16px;
    left: -16px;
    width: 100%;
    height: 100%;
    border: 3px solid var(--brand-red);
    z-index: 0;
}

.about-img {
    height: 420px;
    object-fit: cover;
    z-index: 1;
}

/* Badge flutuante de Anos de Experiência */
.badge-experience {
    bottom: 1.5rem;
    right: -0.5rem;
    z-index: 2;
    background-color: var(--brand-red);
    min-width: 140px;
    box-shadow: 0 8px 32px rgba(238, 50, 46, 0.4);
}

.badge-experience-text {
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* Tipografia de Texto e Listas */
.text-lg-slate {
    color: #475569;
    line-height: 1.8;
    font-size: 1.05rem;
}

.list-text-slate {
    color: #475569;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Ícones e Stats */
.stat-icon-box {
    width: 44px;
    height: 44px;
    background-color: rgba(238, 50, 46, 0.1);
    color: var(--brand-red);
}

.stat-value {
    font-size: 1rem;
}

.stat-label {
    color: #94a3b8;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

/* ==========================================================================
   7. SECTION: OS NOSSOS PRODUTOS (IGUAL À IMAGEM)
   ========================================================================== */

/* Estrutura do Cartão */
.product-card {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
    min-height: 280px; /* Ajustado para a proporção da imagem */
    display: block;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

/* Imagem Base */
.product-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Zoom suave ao passar o rato (opcional, dá um efeito moderno) */
.product-card:hover .product-img {
    transform: scale(1.05);
}

/* Gradiente Escuro no fundo da imagem */
.product-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.4) 40%, transparent 100%);
    z-index: 1;
}

/* Conteúdo de Texto sobre a Imagem */
.product-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Badge 'PRODUTO' Vermelha */
.product-tag {
    background-color: #f44336; /* Ou var(--brand-red) */
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: 0.2rem;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

/* Título Branco */
.product-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

/* Descrição */
.product-desc {
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 0;
}

/* ==========================================================================
   8. SECTION: PORTFOLIO GRID (MOSAICO)
   ========================================================================== */

/* Link "Ver Todos" no cabeçalho */
.link-view-all {
    color: #9ca3af; /* Cinzento claro */
    transition: color 0.3s ease;
}

    .link-view-all:hover {
        color: #ffffff;
    }

/* O Layout em Grelha (Mosaico) */
.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 colunas iguais */
    grid-template-rows: repeat(2, 280px); /* 2 linhas de 280px de altura */
    gap: 8px; /* Espaço entre as imagens (equivalente ao gap-2 do Tailwind) */
}

/* O Segredo: Faz com que a primeira div ocupe duas linhas de altura! */
.item-main {
    grid-row: span 2;
}

/* Base de cada Cartão */
.portfolio-item {
    position: relative;
    overflow: hidden;
    display: block;
    background-color: #1f2937;
    text-decoration: none;
}

/* Imagem Base e Animação de Zoom */
.portfolio-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
}

.portfolio-item:hover .portfolio-img {
    transform: scale(1.05);
}

/* Sombra ligeira no fundo (Visível por defeito) */
.portfolio-gradient {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-gradient {
    opacity: 0; /* Desaparece no hover para dar lugar ao overlay total */
}

/* Fundo azul escuro que aparece no Hover */
.portfolio-hover-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.85); /* brand-dark com opacidade */
    opacity: 0;
    transition: opacity 0.3s ease;
}

.portfolio-item:hover .portfolio-hover-overlay {
    opacity: 1;
}

/* Ano no canto superior esquerdo (Visível por defeito) */
.portfolio-year {
    position: absolute;
    top: 1rem;
    left: 1rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    transition: opacity 0.2s ease;
}

.portfolio-item:hover .portfolio-year {
    opacity: 0; /* Oculta no hover */
}

/* Conteúdo de Texto que sobe no Hover */
.portfolio-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(1.5rem);
    opacity: 0;
    transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-content {
    transform: translateY(0);
    opacity: 1;
}

/* Tipografia dentro do Hover */
.portfolio-tag {
    color: var(--brand-red);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.portfolio-title {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.portfolio-desc {
    color: #d1d5db;
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.portfolio-link {
    color: var(--brand-red);
    font-size: 0.875rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 1rem;
}

/* ==========================================================================
   9. PAGE: PROJETOS (CARDS V2 E PILLS DE CATEGORIA)
   ========================================================================== */

/* Efeitos de Sombra nos Cartões Brancos */
.project-card-v2 {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

    .project-card-v2:hover {
        box-shadow: 0 1.5rem 3rem rgba(0,0,0,0.15) !important;
        transform: translateY(-5px);
    }

/* Animação da Imagem no Cartão */
.project-img-v2 {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card-v2:hover .project-img-v2 {
    transform: scale(1.1);
}

/* Pills (Etiquetas) de Categorias */
.category-pill {
    padding: 0.75rem 1.5rem;
    background-color: #f8fafc; /* bg-gray-50 */
    border: 2px solid #e2e8f0; /* border-gray-200 */
    border-radius: 50rem;
    color: #475569;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

    .category-pill:hover {
        border-color: var(--brand-red);
        color: var(--brand-red);
        background-color: #ffffff;
    }

/* ==========================================================================
   BOTÕES DE FILTRO DO PORTFOLIO
   ========================================================================== */

.filter-btn {
    padding: 0.5rem 1.25rem;
    background-color: #ffffff;
    border: 1px solid #e2e8f0; /* Borda cinzenta clara */
    border-radius: 50rem; /* Formato de "comprimido" */
    color: #475569; /* Texto cinzento escuro */
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.filter-btn:hover {
    border-color: var(--brand-red);
    color: var(--brand-red);
}

/* O estado ativo do botão ("Todos" ou a categoria selecionada) */
.filter-btn.active {
    background-color: var(--brand-red);
    border-color: var(--brand-red);
    color: #ffffff;
}

/* Garante que, ao esconder/mostrar itens com JS, o Bootstrap adapta a grelha suavemente */
.portfolio-item-wrapper {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.about-description p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.badge-experience p {
    margin-bottom: 0;
}

.contact-link {
    transition: color 0.2s ease;
}

    .contact-link:hover {
        color: var(--brand-red) !important;
    }

/* Sombra nos cartões de Contacto */
.hover-shadow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

    .hover-shadow:hover {
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
        transform: translateY(-3px);
    }

/* Formulário: Foco com anel vermelho */
.form-control:focus, .form-select:focus {
    border-color: var(--brand-red);
    box-shadow: 0 0 0 0.25rem rgba(238, 50, 46, 0.25);
    background-color: #fff;
}

/* ==========================================================================
   10. PAGE: CATÁLOGO DE PRODUTOS
   ========================================================================== */

/* Cartões do Catálogo */
.catalog-card {
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

    .catalog-card:hover {
        box-shadow: 0 1rem 3rem rgba(0,0,0,0.1) !important;
    }

/* Imagens do Catálogo com Efeito Zoom */
.catalog-img {
    object-fit: cover;
    transition: transform 0.5s ease;
}

.catalog-card:hover .catalog-img {
    transform: scale(1.05);
}

.catalog-desc p {
    margin-bottom: 0;
    line-height: 1.6;
}

/* Botão de Orçamento no Catálogo */
.btn-outline-brand-catalog {
    border: 2px solid var(--brand-red);
    color: var(--brand-red);
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 0.375rem;
}

    .btn-outline-brand-catalog:hover {
        background-color: var(--brand-red);
        color: #fff;
    }

/* Garante que os Itens aparecem suavemente após filtrar */
.product-item {
    animation: fadeInCatalog 0.3s ease-in-out;
}

@keyframes fadeInCatalog {
    from {
        opacity: 0;
        transform: scale(0.98);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ==========================================================================
   11. PAGE: SOBRE NÓS (ABOUT)
   ========================================================================== */

.fw-black {
    font-weight: 900 !important;
}

.stat-desc p {
    margin-bottom: 0;
}

.timeline-desc p {
    margin-bottom: 0;
}

.sentence-rich-text p {
    margin-bottom: 0;
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
    color: inherit;
}

.value-rich-text p {
    margin-bottom: 0;
}

.area-rich-text p {
    margin-bottom: 0;
}

/* --- Hero Section --- */
.about-hero {
    min-height: 92vh;
    background-color: var(--brand-dark);
}

.about-hero-stats {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background-color: var(--brand-dark);
}

.about-hero-stat-item {
    padding: 1.75rem 2rem;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
}

@media (max-width: 767.98px) {
    .about-hero-stat-item:nth-child(even) {
        border-right: none;
    }

    .about-hero-stat-item:nth-child(1), .about-hero-stat-item:nth-child(2) {
        border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    }
}

@media (min-width: 768px) {
    .about-hero-stat-item:last-child {
        border-right: none;
    }
}

/* --- Grelhas de 1px (Efeito de Bordas) --- */
.grid-gap-px-light {
    display: grid;
    gap: 1px;
    background-color: #f3f4f6; /* bg-gray-100 */
}

.grid-gap-px-dark {
    display: grid;
    gap: 1px;
    background-color: rgba(255, 255, 255, 0.05); /* bg-white/5 */
}

/* Responsividade das Grelhas customizadas */
@media (min-width: 992px) {
    .grid-cols-lg-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .grid-cols-lg-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .grid-cols-lg-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-lg-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-cols-md-2 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 767.98px) {
    .grid-cols-lg-3, .grid-cols-lg-4, .grid-cols-md-2 {
        grid-template-columns: 1fr;
    }

    .grid-cols-3-mobile {
        grid-template-columns: repeat(3, 1fr);
    }
    /* Para os stats da história */
}

/* --- Cartões e Efeitos Hover --- */
.timeline-card, .area-card {
    background-color: var(--brand-dark);
    transition: background-color 0.3s ease;
    padding: 2rem;
}

    .timeline-card:hover, .area-card:hover {
        background-color: var(--brand-dark-hover); /* #1e293b */
    }

.timeline-line {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.08);
    transition: background-color 0.3s ease;
}

.timeline-card:hover .timeline-line {
    background-color: rgba(238, 50, 46, 0.4);
}

.area-line {
    height: 1px;
    background-color: rgba(255, 255, 255, 0.05);
    transition: background-color 0.3s ease;
}

.area-card:hover .area-line {
    background-color: rgba(238, 50, 46, 0.3);
}

.value-card {
    background-color: #ffffff;
    transition: all 0.4s ease;
    padding: 2.5rem;
    cursor: default;
}

    .value-card:hover {
        background-color: var(--brand-dark);
    }

    .value-card .value-n {
        color: #c2c3c4;
        transition: color 0.4s ease;
    }

    .value-card:hover .value-n {
        color: var(--brand-red);
    }

    .value-card .value-title {
        color: var(--brand-dark);
        transition: color 0.4s ease;
    }

    .value-card:hover .value-title {
        color: #ffffff;
    }

    .value-card .value-desc {
        color: #6c757d;
        transition: color 0.4s ease;
    }

    .value-card:hover .value-desc {
        color: #9ca3af;
    }

/* Botão branco CTA */
.btn-white-brand {
    background-color: #ffffff;
    color: var(--brand-red);
    transition: background-color 0.3s ease;
}

    .btn-white-brand:hover {
        background-color: #f3f4f6;
        color: var(--brand-red);
    }


/* ==========================================================================
   12. PAGE: DETALHE DO PROJETO (PROJECT DETAIL)
   ========================================================================== */

/* --- Variáveis e Utilitários --- */
.border-white-5 {
    border-color: rgba(255,255,255,0.06) !important;
}

.bg-white-4:hover {
    background-color: rgba(255,255,255,0.04);
}

.text-xs {
    font-size: 0.75rem;
}

/* --- Meta Strip --- */
.meta-strip {
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.meta-item {
    border-right: 1px solid rgba(255,255,255,0.06);
}

@media (max-width: 767.98px) {
    .meta-item:nth-child(even) {
        border-right: none;
    }

    .meta-item {
        border-bottom: 1px solid rgba(255,255,255,0.06);
    }
}

@media (min-width: 768px) {
    .meta-item:last-child {
        border-right: none;
    }
}

/* --- Galeria --- */
.gallery-item {
    cursor: zoom-in;
    transition: all 0.3s ease;
}

.gallery-img {
    object-fit: cover;
    transition: transform 0.7s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.05);
}

.gallery-overlay {
    background-color: rgba(0,0,0,0);
    transition: background-color 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    background-color: rgba(0,0,0,0.2);
}

/* --- Projetos Relacionados --- */
.related-card {
    height: 320px;
    display: block;
}

.related-overlay-default {
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%);
    transition: opacity 0.3s ease;
}

.related-card:hover .related-overlay-default {
    opacity: 0;
}

.related-overlay-hover {
    background-color: rgba(15,23,42,0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.related-card:hover .related-overlay-hover {
    opacity: 1;
}

.related-content-default {
    transition: opacity 0.2s ease;
}

.related-card:hover .related-content-default {
    opacity: 0;
}

.related-content-hover {
    opacity: 0;
    transform: translateY(15px);
    transition: all 0.3s ease;
}

.related-card:hover .related-content-hover {
    opacity: 1;
    transform: translateY(0);
}

/* --- Lightbox --- */
#lightbox {
    background: rgba(0,0,0,0.96);
    backdrop-filter: blur(5px);
}

.lightbox-thumb {
    width: 48px;
    height: 32px;
    opacity: 0.35;
    transition: all 0.2s ease;
    border: none;
    padding: 0;
}

    .lightbox-thumb.active {
        opacity: 1;
        outline: 2px solid var(--brand-red);
        outline-offset: 2px;
    }