/* ==========================================================================
   🖥️ COMPORTAMENTO GLOBAL E DESKTOP (PROPORÇÃO PURA FLUIDA)
   ========================================================================== */
.carousel-container { 
    position: relative; 
    width: 100%; 
    /* 🛠️ PROPORÇÃO MATEMÁTICA PURA: Baseada no formato original do teu panfleto 
       Impede que as bordas laterais sejam cortadas em qualquer monitor */
    aspect-ratio: 3.3 / 1 !important; 
    height: auto !important;
    min-height: auto !important;
    overflow: hidden; 
    background-color: transparent; /* Remove fundos rígidos */
    
    /* DIVISÓRIA PREMIUM: Descola o carrossel do Header */
    margin-top: 20px; 
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-radius: 6px;
}

.carousel-slide {
    position: absolute; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%;
    /* 🛠️ CONTROLO DE INTEGRIDADE: 'contain' garante a imagem 100% visível sem cortes */
    background-size: contain !important; 
    background-position: center center !important; 
    background-repeat: no-repeat !important;
    background-color: transparent !important;
    display: flex; 
    align-items: center; 
    justify-content: center;
    opacity: 0; 
    visibility: hidden; 
    transition: opacity 0.8s ease-in-out;
}

.carousel-slide.active { 
    opacity: 1; 
    visibility: visible; 
}

/* CONTENTOR DE CONTEÚDO UNIVERSAL */
.hero-content { 
    color: #ffffff; 
    text-align: center; 
    padding: 0 20px; 
    width: 100%;
    max-width: 1000px;
    z-index: 2;
    height: 100% !important; 
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-end !important; 
    align-items: center !important;
    /* Empurra o botão dinamicamente para o fundo acompanhando a redução do ecrã */
    padding-bottom: 30px !important; 
    box-sizing: border-box !important;
}

/* 📌 BOTÃO FIXO ADAPTÁVEL NA BASE */
.hero-content .btn-primary {
    position: relative !important;
    margin-top: auto !important;
    width: auto !important;
    min-width: 150px;
    text-align: center;
    background-color: #cc0000 !important; /* var(--accent-red) */
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
    font-size: clamp(0.75rem, 1vw, 0.9rem); /* Escala o texto baseado no monitor */
    padding: clamp(6px, 0.8vw, 12px) clamp(16px, 2vw, 28px); /* Padding fluido */
    box-shadow: 0 4px 15px rgba(204, 0, 0, 0.4);
    border-radius: 50px;
    z-index: 5;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.hero-content .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(204, 0, 0, 0.6);
}

/* CONTROLOS COMPACTOS */
.carousel-control {
    position: absolute; 
    top: 50%; 
    transform: translateY(-50%); 
    background: rgba(15, 23, 42, 0.3);
    color: white; 
    border: none; 
    width: clamp(30px, 3vw, 45px); 
    height: clamp(30px, 3vw, 45px); 
    border-radius: 50%; 
    cursor: pointer; 
    z-index: 10;
    display: flex; 
    align-items: center; 
    justify-content: center;
    font-size: clamp(0.7rem, 1vw, 1rem);
}
.prev { left: 15px; } .next { right: 15px; }

.carousel-dots { 
    position: absolute; 
    bottom: 12px; 
    left: 50%; 
    transform: translateX(-50%); 
    display: flex; 
    gap: 6px; 
    z-index: 10; 
}
.dot { width: 8px; height: 8px; background: rgba(255,255,255,0.4); border-radius: 50%; cursor: pointer; }
.dot.active { background: #cc0000; width: 20px; border-radius: 10px; }

.hero-content h1 { font-size: 2.8rem; margin-bottom: 15px; font-weight: 800; text-transform: uppercase; text-shadow: 2px 2px 4px rgba(0,0,0,0.4); }
.hero-content p { font-size: 1.1rem; max-width: 800px; margin: 0 auto 25px; }

/* ==========================================================================
   📱 ADENDA RESPONSIVA EXCLUSIVA - PROPORÇÃO INTEGRAL EM MOBILE (ATÉ 768px)
   ========================================================================== */
@media (max-width: 768px) {
    .carousel-container {
        /* 🛠️ COMPORTAMENTO MOBILE: Passa a encolher proporcionalmente baseado no cartaz físico */
        aspect-ratio: 3 / 1 !important; 
        width: 100% !important;
        height: auto !important;
        min-height: auto !important;
        margin-top: 8px; /* Reduz a divisória ligeiramente no telemóvel */
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    }

    .carousel-slide {
        /* 🛠️ TRATAMENTO EM MOBILE: Contain garante que NENHUMA palavra do panfleto seja cortada */
        background-size: contain !important;
        background-position: center center !important;
        background-repeat: no-repeat !important;
        background-color: transparent !important; 
    }

    .hero-content {
        padding: 0 10px;
        padding-bottom: 22px !important; 
    }

    /* ❌ OCULTAÇÃO DE TEXTOS DUPLICADOS DO PHP EM MOBILE */
    /*.hero-content h1,
    .hero-content p {
        display: none !important;
    }*/

    /* FIXAÇÃO DO BOTÃO EM MOBILE VERTICAL */
    .hero-content .btn-primary {
        font-size: 0.72rem !important;
        padding: 6px 16px !important;
        min-width: 110px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    }

    .carousel-control {
        width: 26px;
        height: 26px;
        font-size: 0.65rem;
    }
    .prev { left: 4px; } .next { right: 4px; }

    .carousel-dots { bottom: 4px; }
    .dot { width: 5px; height: 5px; }
    .dot.active { width: 12px; }
}