/* =========================
   HEADER & FOOTER
========================= */
.header, .footer {
    width: 100%;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1.5rem;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
}

/* Gradiente animado via pseudo-elemento para performance */
.header::before, .footer::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,   
        #162d5a 0%,
        #2f2a6d 40%,
        #4a2a7a 70%,
        #6b2d8f 100%
    );
    background-size: 200% 200%;
    z-index: -1;
    animation: gradientFlow 5s ease infinite;
}

@keyframes gradientFlow {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.header-content, .footer-content {
    max-width: 960px;
    width: 100%;
}

.footer {
    border-radius: 30px 30px 0 0;
}

/* =========================
   HEADLINES
========================= */
.headline-top {
    font-size: 1.2rem;
    font-weight: 600;
    opacity: 0.9;
    margin-bottom: 0.5rem;
    text-align: left;
}

.headline-main {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    line-height: 1.2;
    margin: 0.5rem 0 0.75rem;
    text-align: center;
}

.headline-bottom {
    font-size: 1.25rem;
    font-weight: 500;
    opacity: 0.95;
    text-align: right;
}

/* =========================
   CATEGORY CARDS
========================= */
.category-wrapper {
    position: relative;
    height: 100%;
    padding: 3px;
    border-radius: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.category-wrapper .card {
    height: 100%;
    border-radius: calc(1rem - 3px);
    background: #ffffff;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
    will-change: transform, box-shadow;
}

.category-wrapper:hover {
    box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.category-wrapper:hover .card {
    transform: scale(1.04);
    background: linear-gradient(180deg, #ffffff, #f2f2f2);
}

/* Ícones coloridos padronizados */
.category-wrapper h5 i {
    font-size: 1.3rem;
    margin-right: 0.5rem;
}

/* =========================
   LINKS RESET
========================= */
.card-link {
    display: block;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.card-link:hover,
.card-link:focus,
.card-link:active {
    color: inherit;
    text-decoration: none;
}

/* =========================
   BACKGROUND SECTIONS
========================= */
.bg-custom-light {
    background-color: #f8f9fa;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.bg-custom {
    background: linear-gradient(
        180deg,
        #f2f7f7 0%,
        #dcdcdd 50%,
        #f2f7f7 100%
    );
}

/* =========================
   COMO FUNCIONA
========================= */
.bg-custom .col-sm-4 i {
    margin-bottom: 1rem;
    display: block;
}

/* =========================
   FOOTER LINKS
========================= */
.footer-link {
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-link:hover {
    color: #fff;
    text-decoration: underline;
    padding-left: 5px;
}

.footer-content {
    text-align: left;
}

@media (max-width: 767px) {
    .footer-content {
        text-align: center !important;
    }
}
/* =========================
   Explore Categorias - linha animada
========================= */
.explore-title {
    display: flex;
    align-items: center;
    font-size: 1.75rem;
    gap: 1rem; /* espaço entre texto e linha */
}

.explore-title::after {
    content: "";
    flex-grow: 1;            /* continua estendendo a linha até o fim */
    height: 2px;             /* espessura da linha */
    border-radius: 1px;
    background: linear-gradient(
        90deg,
        #000000,
        #888888,
        #ffffff
    );
    background-size: 200% 100%; /* gradiente maior para animação */
    animation: slideGradient 3s linear infinite;
}

/* =========================
   Como Funciona - linha animada antes e depois
========================= */
.linha {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    font-weight: 700;
}

/* Linha antes e depois do título centralizado */
.linha::before {
    content: "";
    flex-grow: 1;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, #000, #888, #fff);
    background-size: 200% 100%;
    animation: slideLeft 3s linear infinite; /* vai da direita para esquerda */
}

.linha::after {
    content: "";
    flex-grow: 1;
    height: 2px;
    border-radius: 1px;
    background: linear-gradient(90deg, #000, #888, #fff);
    background-size: 200% 100%;
    animation: slideRight 3s linear infinite; /* vai da esquerda para direita */
}

/* Animações separadas */
@keyframes slideRight {
    0%   { background-position-x: 0%; }
    100% { background-position-x: 200%; }
}

@keyframes slideLeft {
    0%   { background-position-x: 200%; }
    100% { background-position-x: 0%; }
}

/* =========================
   Animação do gradiente
========================= */
@keyframes slideGradient {
    0% {
        background-position-x: 0%;
    }
    100% {
        background-position-x: 200%;
    }
}