/* =========================
   RESET & BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f5f7fa;
    background-size: cover;
    background-attachment: fixed;
    color: #333;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}


/* =========================
   HEADER
========================= */
header {
    height: 150px;
    min-height: 450px;
    background-image: url(../assets/img/bkgDef.png);
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    animation: fadeInDown 0.6s ease-in-out;
}

header h1 {
    font-size: 2rem;
    font-weight: 600;
    padding-top: 100px;
}

.esquerda,
.direita {
    width: 50%;
    display: inline-block;
    float: left;
}

.centro {
    display: block;
    text-align: center;
}

.logo {
    height: 50px;
    margin: 10px;
}

header a.btn.btn-home {
    background-color: transparent;
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: white;
    font-size: large;
    display: inline-block;
    float: right;
    transition: all 0.3s ease;
}

header a.btn.btn-primary:hover {
    background-color: #0071e3;
}


/* =========================
   BOTÕES
========================= */
button {
    font-family: inherit;
    margin: 5px;
    padding: 0.6rem 1.4rem;
    font-size: 1rem;
    background-color: #0056b3;
    color: white;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease, transform 0.2s ease;
}

button:hover {
    background-color: #0071e3;
    transform: translateY(-2px) scale(1.02);
}

button.btn-quadrado {
    border-radius: 8px;
    font-weight: 600;
    background-color: transparent;
    color: #ffffff;
}

.btn-home-topico {
    background-color: #f0f8ff;
    color: #042c5c;
    border: 2px solid #0056b3;
    border-radius: 12px;
    padding: 0.5rem 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-home-topico:hover {
    background-color: #e0f0ff;
    transform: translateY(-2px) scale(1.02);
}


/* =========================
   PESQUISA
========================= */
.pesquisa-container {
    display: flex;
    flex-direction: column; /* botão em cima, input embaixo */
    align-items: center; /* centraliza os dois */
    gap: 0.5rem;
    margin-top: 40px;
}

.pesquisa-container button {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: white;
    transition: transform 0.2s ease, color 0.3s ease;
}

.pesquisa-container button:hover {
    transform: scale(1.1);
    color: #00bfff;
}

.pesquisa-container input {
    max-width: 0;
    opacity: 0;
    padding: 0;
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: white;
    transition: all 0.4s ease;
    pointer-events: none; /* desativa enquanto oculto */
    outline: none; /* remove a borda padrão */
    min-width: 20%;
    max-width: 40%;
}

.pesquisa-container input.ativo {
    min-width: 30%;
    max-width: 80%;
    opacity: 1;
    margin-left: 20px;
    margin-right: 20px;
    border-bottom: 2px solid white;
    pointer-events: auto;
    outline: none;
}

.pesquisa-container input::placeholder {
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
}


/* =========================
   MAIN & SECTIONS
========================= */
main {
    animation: fadeIn 0.8s ease-in-out;
    padding-bottom: 10px;
    background: linear-gradient(135deg, #f7f9fc 0%, #eaf4ff 100%);
}

section {
    background-color: #ffffff;
    margin-bottom: 2rem;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    animation: fadeUp 0.6s ease;
}

section:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
}

section h2 {
    margin-bottom: 1rem;
    color: #042c5c;
    font-size: 1.6rem;
}

section h3 {
    margin-top: 1rem;
    color: #0056b3;
}

.text-gradient {
    font-size: 3rem;
    font-weight: bold;
    background: linear-gradient(270deg, #0071e3, #000000);
    background-size: 600% 600%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientMove 4s ease infinite;
}


/* =========================
   IMAGENS & CARDS
========================= */
#img {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1rem;
    border-radius: 16px;
    background-color: #f5f7fa;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

#img img,
.card-img-top {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    width: 100%;
    display: block;
    border-radius: 12px;
    transition: transform 0.3s ease;
}

#img img:hover {
    transform: scale(1.05);
}

.areaPesquisa {
    width: 100%;
    padding: 10px;
    background: linear-gradient(140deg, rgb(12, 48, 133) 0%, #0f42b9 50%, rgb(11, 60, 185) 100%);
    color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.textGif {
    letter-spacing: 1px;
    margin: 0;
    font-size: 1.5rem;
    font-weight: 500;
}

.cards {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 20px;
    background-color: #ffffff;
}

.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}

.card img {
    transition: transform 0.4s ease;
}

.cardLink {
    flex: 1 1 calc(33% - 20px);
    max-width: calc(33% - 20px);
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .cardLink {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

.cards .cardLink {
  transition: transform 0.8s ease, opacity 0.8s ease;
  opacity: 0;
  transform: translateY(40px);
}

.cards .cardLink.active {
  opacity: 1;
  transform: translateY(0);
}

/* Delay individual usando nth-child */
.cards .cardLink:nth-child(1) { transition-delay: 0.1s; }
.cards .cardLink:nth-child(2) { transition-delay: 0.2s; }
.cards .cardLink:nth-child(3) { transition-delay: 0.3s; }
.cards .cardLink:nth-child(4) { transition-delay: 0.4s; }
.cards .cardLink:nth-child(5) { transition-delay: 0.5s; }
.cards .cardLink:nth-child(6) { transition-delay: 0.6s; }

/* =========================
   CARROSSEL (Bootstrap Custom)
========================= */
.slideDef {
    width: 100%;
    padding: 40px 20px;
    position: relative;
    background: linear-gradient(135deg, #f7f9fc 0%, #eaf4ff 100%);
    border-radius: 12px;
}

.slideDef h4 {
    text-align: center;
    color: #0071e3;
    font-size: 1.8rem;
    font-weight: bold;
    margin-bottom: 25px;
}

/* Container */
.slide-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    background: linear-gradient(135deg, #f7f9fc 0%, #eaf4ff 100%);
}

/* Estrutura principal */
.carousel-custom {
    position: relative;
    padding: 0 !important;
    overflow: hidden;
    border-radius: 12px;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 auto;
}

.carousel-inner {
    width: 100% !important;
    max-width: 100% !important;
    transition: transform 0.6s ease-in-out !important;
    border-radius: 12px;
}

.carousel-item {
    position: relative;
    min-width: 100% !important;
    max-width: 100% !important;
    aspect-ratio: 16 / 9;
    flex-shrink: 0;
    overflow: hidden;
    box-sizing: border-box;
    transition: none;
}

.carousel-item.active {
    opacity: 1 !important;
    z-index: 1;
}

.carousel-item:not(.active) {
    pointer-events: none;
}

.carousel-item-image {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item-image picture,
.carousel-item-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Caption */
.carousel-caption-custom {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 20px 40px 20px;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75) 0%, transparent 100%);
    border-radius: 0 0 12px 12px;
    margin: 0;
    z-index: 2;
    display: block !important; /* Garante sempre visível */
}

.carousel-caption-custom h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: bold;
    line-height: 1.2;
}

.carousel-caption-custom p {
    margin: 8px 0 0;
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.4;
}

/* Controles */
.carousel-control-prev,
.carousel-control-next {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    margin-top: 5px;
    font-size: 32px;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s, background 0.3s;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.25;
    padding: 0;
    text-shadow: none;
    border-radius: 12px;
}

.carousel-control-prev {
    left: 0;
    background: linear-gradient(to right, rgba(0, 123, 255, 0.8) 0%, transparent 100%);
    border-radius: 0 8px 8px 0;
}

.carousel-control-next {
    right: 0;
    background: linear-gradient(to left, transparent 0%, rgba(0, 123, 255, 0.8) 100%);
    border-radius: 8px 0 0 8px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    opacity: 1;
    color: #fff;
    text-decoration: none;
    background: inherit;
    border-radius: 12px;
}

.carousel-control-prev:hover {
    background: linear-gradient(to right, rgba(0, 123, 255, 0.8) 0%, transparent 100%);
}

.carousel-control-next:hover {
    background: linear-gradient(to left, rgba(0, 123, 255, 0.8) 0%, transparent 100%);
}

.control-icon {
    font-size: 32px;
    color: #fff;
    background: none;
    border: none;
    width: auto;
    height: auto;
    display: block;
    line-height: 1;
}

/* Remove ícones padrão */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    display: none !important;
}

/* Indicadores */
.carousel-indicators {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
    display: flex;
    justify-content: center;
    padding: 0;
    margin-bottom: 10px;
    gap: 8px;
    list-style: none;
}

.carousel-indicators li {
    width: 12px;
    height: 12px;
    margin: 0;
    cursor: pointer;
    background-color: rgba(255, 255, 255, 0.5);
    border: 0;
    transition: opacity 0.6s ease, background-color 0.3s ease;
}

.carousel-indicators .active {
    background-color: #0071e3;
    width: 14px;
    height: 14px;
}

.carousel-indicators li:hover {
    background-color: rgba(255, 255, 255, 0.8);
}

/* Responsividade do Carrossel */
@media (max-width: 768px) {
    .carousel-control-prev,
    .carousel-control-next {
        display: none !important;
    }

    .carousel-item {
        min-width: 100% !important;
    }

    .slide-container {
        max-width: 100%;
        margin: 0;
        padding: 0;
    }

    .slideDef {
        padding: 20px 10px;
    }

    .carousel-indicators {
        bottom: 0;
        margin-bottom: 5px;
        gap: 10px;
    }

    .carousel-indicators li {
        width: 14px;
        height: 14px;
    }

    .carousel-indicators .active {
        width: 16px;
        height: 16px;
    }

    .carousel-caption-custom {
        padding: 15px 15px 30px 15px;
    }

    .carousel-caption-custom h2 {
        font-size: 1.4rem;
    }

    .carousel-caption-custom p {
        font-size: 0.9rem;
    }
}


/* =========================
   FOOTER
========================= */
footer {
    background-color: #042c5c;
    color: white;
    text-align: center;
    padding: 2rem;
    border-top: 4px solid #0056b3;
    font-size: 0.95rem;
}


/* =========================
   ERRO
========================= */
#error {
    display: none;
    text-align: center;
    color: red;
    margin-top: 50px;
    padding: 20px;
    background-color: #ffe5e5;
    border: 1px solid #ffaaaa;
    border-radius: 8px;
    font-family: sans-serif;
}


/* =========================
   ANIMAÇÕES
========================= */

.reveal-bottom {
  opacity: 0;
  transform: translateY(40px); /* começa deslocado para baixo */
  transition: all 0.8s ease;
}

.reveal-bottom.active {
  opacity: 1;
  transform: translateY(0); /* volta para a posição normal */
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}


/* =========================
   AJUSTES FINAIS
========================= */
.item picture,
.item picture img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    object-fit: cover;
    object-position: center center;
    border-radius: 0;
    margin: 0;
    padding: 0;
    transform: none !important;
    transition: transform 0.6s ease;
}
