/* CORREÇÃO: @import movido para o topo, onde deve estar */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@200;300;400;500;700;900&display=swap');

/* FONTES E RESET BÁSICO */
:root {
    --navy: #0A1628;
    --orange: #FF6B35;
    --white: #FAFAF9;
    --navy-light: #1A2942;
    /* Adicionando a variável --gold que faltava para o footer */
    --gold: #FFD700; 
}

/* CORREÇÃO: Reset único */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

/* CORREÇÃO: Regra 'body' única */
body {
    background-color: var(--white); /* Fundo claro para páginas de conteúdo */
    color: whitesmoke;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex-grow: 1; /* Garante que o main ocupe o espaço e empurre o footer para baixo */
}

a {
    text-decoration: none;
    color: inherit;
}


/* ============ HERO (VERSÃO CURTA) ============ */
.hero.short-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    inset: 0;
    background-color: var(--navy);
}
.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.hero-overlay-dark {
    position: absolute;
    inset: 0;
    background-image: linear-gradient(to bottom, rgba(10, 22, 40, 0.667), rgba(10, 22, 40, 0.486), var(--navy));
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 1.5rem;
    /* Garante que o conteúdo do hero não fique atrás do navbar */
    padding-top: 74px; 
}

.hero-content p {
    margin-top: 1.5rem ;
}

.short-hero h1 {
    font-size: 4rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
}

.short-hero p {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 40rem;
    margin: 0 auto;
}

/* ============ GALERIA DE FILMES ============ */
.gallery-wrapper {
    padding-top: 0.3rem; /* Adicionado espaço superior */
    padding-bottom: 8rem; /* pb-32 */
    padding-left: 1.5rem; /* px-6 */
    padding-right: 1.5rem;
    background-color: var(--navy); /* Fundo escuro para a galeria */
}

.gallery-container {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr); /* Padrão mobile: 1 coluna */
    gap: 2.5rem; /* gap-6 md:gap-8 lg:gap-10 */
}

/* ============ CARD DE FILME INDIVIDUAL ============ */
.film-card {
    position: relative;
    display: block;
    aspect-ratio: 2 / 3;
    border-radius: 0.125rem; /* rounded-sm */
    overflow: hidden; /* Importante para o hover e bordas */
    
    /* Estado inicial da animação de entrada */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Classe que será adicionada pelo JS para animar a entrada */
.film-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}


/* Imagem do Pôster */
.film-poster {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #F3F4F6; /* bg-gray-100 */
    border-radius: 0.5rem;
}

.film-poster img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease-out;
}

.film-card:hover .film-poster img {
    transform: scale(1.1);
    
}

/* Overlay (Aparece no Hover) */
.overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.5s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem; /* p-6 */
}

.film-card:hover .overlay {
    opacity: 1;
}

.overlay h3,
.overlay .tags,
.overlay .details-button {
    /* Animação de "deslizar para cima" */
    transform: translateY(1rem);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.film-card:hover h3,
.film-card:hover .tags,
.film-card:hover .details-button {
    transform: translateY(0);
    opacity: 1;
}

.overlay h3 {
    color: white;
    font-weight: 500; /* font-medium */
    font-size: 1.5rem; /* text-xl md:text-2xl */
    margin-bottom: 0.75rem; /* mb-3 */
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem; /* gap-2 */
    margin-bottom: 1rem; /* mb-4 */
    transition-delay: 75ms; /* delay-75 */
}

.tag {
    padding: 0.25rem 0.75rem; /* px-3 py-1 */
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 0.3rem; /* rounded-sm */
    color: white;
    font-size: 0.75rem; /* text-xs */
    font-weight: 300; /* font-light */
    letter-spacing: 0.025em; /* tracking-wide */
}

.details-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* gap-2 */
    background-color: rgb(249, 107, 55);
    color: whitesmoke;
    padding: 0.625rem 1.25rem; /* px-5 py-2.5 */
    border-radius: 0.3rem; /* rounded-sm */
    font-size: 0.875rem; /* text-sm */
    font-weight: 500; /* font-medium */
    transition: all 0.3s;
    transition-delay: 100ms; /* delay-100 */
}

.details-button:hover {
    background-color: orangered; /* hover:bg-gray-100 */
}

.details-button svg {
    width: 1rem; /* w-4 */
    height: 1rem; /* h-4 */
}

/* =====================================================
   MENSAGEM DE SUCESSO
   ===================================================== */
.success-card {
    max-width: 768px;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    border-color: rgba(30, 58, 138, 0.5);
    animation: fade-in-scale 0.5s ease-out forwards;
}

.success-icon-wrapper {
    width: 3rem;
    height: 3rem;
    background-color: rgba(37, 99, 235, 0.2);
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.success-icon-wrapper .icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--blue-400);
}

.success-text h3 {
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.success-text p {
    color: var(--slate-400);
    font-weight: 300;
}


/* Telas médias (lg) */
@media (min-width: 1024px) {
    .grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2.5rem; /* lg:gap-10 */
    }
    .short-hero h1 {
        font-size: 5rem; /* lg:text-8xl */
    }
}

/* Telas grandes (xl) */
@media (min-width: 1280px) {
    .grid {
        grid-template-columns: repeat(4, 1fr);
    }
}