:root {
    --primary: #FFB300;
    --primary-dark: #cc9000;
    --secondary: #333333;
    --bg: #FFFFFF;
    --bg-alt: #fcfcfc;
    --text: #1a1a1a;
    --text-light: #666666;
    --border: #eeeeee;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg-alt);
    color: var(--text);
    line-height: 1.6;
}

/* Header */
header {
    background: #fff;
    border-bottom: 2px solid var(--border);
    padding: 1.2rem 2rem !important;
    /* Alinhado com a linha dos cards (2rem) */
    display: flex;
    justify-content: flex-start;
    /* Marca à esquerda */
    width: 100%;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Linha amarela decorativa logo abaixo do header */
header::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary);
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.vertical-sep {
    height: 35px;
    width: 2px;
    background: #e0e0e0;
    margin: 0 0.5rem;
}

.brand-text h1 {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    color: #222;
    line-height: 1;
}

.brand-text p {
    font-size: 0.7rem;
    font-weight: 600;
    color: #777;
    text-transform: uppercase;
    margin-top: 2px;
    letter-spacing: 0.3px;
    /* white-space: nowrap removido para permitir quebra e não cortar o texto */
}

/* Hanging Badge Design */
.hanging-badge-container {
    position: absolute;
    bottom: -2px;
    /* Alinhado com a linha amarela */
    left: 50%;
    /* Centralizado exatamente no meio da página */
    transform: translate(-50%, 100%);
    z-index: 1001;
}

.municipality-badge {
    background-color: var(--primary);
    color: #fff;
    padding: 10px 50px;
    /* Um pouco mais encorpado */
    border-radius: 0 0 16px 16px;
    font-family: 'Inter', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    /* Aumentado para maior visibilidade */
    letter-spacing: 5px;
    /* Espaçamento levemente maior */
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.3);
    white-space: nowrap;
}

@media (max-width: 600px) {
    .hanging-badge-container {
        left: 50%;
        transform: translate(-50%, 100%);
    }

    .municipality-badge {
        padding: 6px 20px;
        font-size: 0.75rem;
        letter-spacing: 2px;
    }
}

/* Hero Section */
.hero {
    background: var(--bg);
    padding: 10rem 2rem 4rem;
    /* Aumentado para 10rem para dar muito mais espaço */
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero h2 {
    font-size: 2.3rem;
    color: var(--secondary);
    margin-top: 1rem;
    margin-bottom: 2.5rem;
    line-height: 1.35;
    max-width: 950px;
    margin-left: auto;
    margin-right: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    /* Garante centralização do texto interno */
    gap: 1.2rem;
}

.highlight-promaq {
    color: var(--primary-dark);
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.highlight-promaq::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    opacity: 0.3;
    z-index: -1;
}

.highlight-ministerio {
    text-transform: uppercase;
    font-weight: 800;
    color: #1a1a1a;
    background: rgba(255, 193, 7, 0.08);
    /* Fundo super leve amarelado */
    padding: 0.6rem 1.8rem;
    border-radius: 50px;
    border: 2px solid var(--primary);
    letter-spacing: 1px;
    font-size: 1.1rem;
    /* Um pouco menor para dar elegância */
    display: inline-block;
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.15);
    margin-top: 0.5rem;
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Search Bar Styles */
.search-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--border);
    border-radius: 50px;
    padding: 0.5rem 1.5rem;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: 0 4px 15px rgba(255, 179, 0, 0.15);
}

.search-icon {
    color: var(--text-light);
    margin-right: 12px;
}

.search-box input {
    width: 100%;
    border: none;
    outline: none;
    padding: 10px 0;
    font-size: 1rem;
    color: var(--text);
    background: transparent;
}

.search-box input::placeholder {
    color: #aaa;
}

/* CTA Button in Cards */
.btn-item-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary);
    color: #000;
    text-decoration: none;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition);
    margin-top: auto;
}

.btn-item-link:active {
    transform: scale(0.98);
}

/* Call to Action Section (End of Page) */
.cta-section {
    padding: 6rem 2rem;
    display: flex;
    justify-content: center;
    border-top: 1px dashed var(--border);
    margin-top: 4rem;
    background-color: rgba(255, 193, 7, 0.02);
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: var(--primary);
    color: #000;
    text-decoration: none;
    padding: 1.2rem 2.5rem;
    border-radius: 6px;
    /* Alterado de 50px para 6px (formato quadrado) */
    font-weight: 800;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.2);
    text-transform: uppercase;
}

.btn-cta:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(255, 193, 7, 0.35);
    background: var(--primary-dark);
}

.btn-cta:active {
    transform: scale(0.95);
}

.btn-cta svg {
    flex-shrink: 0;
}

/* Container */
.container {
    padding: 3rem 2rem;
    width: 100%;
    margin: 0;
}

/* Grid */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

/* Cards */
.card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    text-align: center;
    box-shadow: var(--shadow);
    position: relative;
    /* Adicionado para posicionar o badge no topo do card */
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.card-image-container {
    width: 100%;
    height: 250px;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fdfdfd;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.item-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary);
    color: #000;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 800;
    z-index: 5;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-image {
    transform: scale(1.05);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--secondary);
    min-height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.4;
    text-transform: uppercase;
    /* Descrição em maiúsculas */
}

/* Footer Section */
footer {
    background: var(--bg);
    padding: 4rem 2rem;
    border-top: 1px solid var(--border);
    text-align: center;
}

footer p {
    color: #666;
    margin-bottom: 2rem;
    font-weight: 600;
    white-space: nowrap !important;
    display: inline-block !important;
    font-size: 0.9rem;
    /* Leve redução para ajudar a caber em telas menores */
}

.footer-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 2rem;
}

.footer-logo-img {
    height: 50px;
    /* Reduzido de 70px */
    width: auto;
}

.footer-wa-circle {
    position: relative;
    width: 50px;
    /* Reduzido de 70px */
    height: 50px;
}

.wa-photo-badge {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid var(--primary);
    object-fit: cover;
    display: block;
}

.wa-icon-mini {
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 28px;
    height: 28px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.wa-icon-mini svg {
    width: 16px;
    height: 16px;
    fill: white;
}

/* Floating Navigation Button (Scroll to Top) */
.floating-nav {
    position: fixed;
    bottom: 30px;
    right: 25px;
    width: 60px;
    /* Um pouco maior no desktop para melhor visual */
    height: 60px;
    background: var(--secondary);
    color: var(--primary);
    border-radius: 50%;
    display: none;
    /* Controlado pelo JS ao rolar a página */
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid var(--primary);
    opacity: 0.9;
}

.floating-nav:hover {
    transform: scale(1.1);
    background: var(--primary);
    color: var(--secondary);
}

.floating-nav:active {
    transform: scale(0.9);
}

@media (max-width: 600px) {
    .floating-nav {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 600px) {
    header {
        justify-content: flex-start;
        padding: 0.8rem 15px !important;
        /* Alinhado com a margem do card no mobile */
    }

    .hero {
        padding: 7rem 1.5rem 3rem;
        /* Aumentado de 2rem para 7rem no mobile */
        scroll-snap-align: start;
        margin-bottom: 0;
    }

    .hero h2 {
        font-size: 1.6rem;
    }

    .container {
        padding: 0;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .card {
        height: calc(100vh - 40px);
        width: calc(100vw - 30px);
        margin: 20px 15px;
        padding: 1.5rem;
        border-radius: 16px;
        border: 1px solid var(--primary);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: center;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
        scroll-snap-align: center;
    }

    /* Container especial para centralizar o bloco Imagem + Título */
    .card-content-middle {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 100%;
        overflow: hidden;
    }

    .card-image-container {
        height: auto;
        max-height: 40vh;
        width: 100%;
        background: none;
        margin-bottom: 0.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .card-title {
        font-size: 1.2rem;
        margin: 0;
        min-height: auto;
        white-space: normal;
        width: 100%;
        line-height: 1.3;
        padding: 0 10px;
        text-align: center;
        font-weight: 700;
        color: #333;
    }

    .btn-item-link {
        width: 100%;
        padding: 0.8rem 1rem;
        font-size: 1rem;
        margin-top: 1rem;
    }


    .cta-section {
        padding: 4rem 1.5rem;
    }

    .btn-cta {
        width: 100%;
        font-size: 0.95rem;
        padding: 1.2rem 1.5rem;
        text-align: center;
    }
}

/* Scroll adjustments and background for frame effect */
@media (max-width: 600px) {
    .container {
        padding: 1px 0;
    }

    html,
    body {
        scroll-snap-type: y mandatory;
        overflow-y: scroll;
        background-color: #f8f9fa;
        /* Fundo leve cinza para destacar a moldura branca */
    }
}