/* ============================================
   VARIÁVEIS E RESET
   ============================================ */
:root {
    --verde: #2f5f46;
    --verde-escuro: #243b2b;
    --verde-claro: #eaf1e7;
    --terra: #d49f2a;
    --fundo: #f7f4ea;
    --texto: #2e3d2f;
    --branco: #ffffff;
    --sombra: 0 10px 30px rgba(0,0,0,.10);
    --sombra-suave: 0 8px 20px rgba(0,0,0,.06);
    --sombra-forte: 0 20px 40px rgba(0,0,0,.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #f7f4ea 0%, #edf4e9 100%);
    color: var(--texto);
    line-height: 1.6;
    min-height: 100vh;
}

/* ============================================
   HEADER E NAVEGAÇÃO
   ============================================ */
header {
    background: rgba(47, 95, 70, .95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 16px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,.08);
    border-bottom: 1px solid rgba(255,255,255,.1);
}

.topo {
    max-width: 1200px;
    margin: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
  max-width: 50px;  /* ou o valor que encaixar */
  height: auto;      /* mantém a proporção */
}

nav {
    display: flex;
    gap: 8px;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    font-weight: 500;
    border-radius: 12px;
    transition: all 0.3s ease;
}

nav a:hover {
    background: rgba(255,255,255,.1);
    color: var(--terra);
    transform: translateY(-2px);
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--verde-escuro);
    color: white;
    text-align: center;
    padding: 48px 24px;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terra), var(--verde), var(--terra));
}

footer p {
    margin: 8px 0;
    position: relative;
    z-index: 1;
}

.autoria {
    font-size: 14px;
    opacity: .9;
    font-weight: 500;
}

.uso {
    font-size: 13px;
    opacity: .8;
}

/* ============================================
   COMPONENTES GLOBAIS REUTILIZÁVEIS
   ============================================ */
/* Botão padrão */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, var(--verde), var(--verde-escuro));
    color: white;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(47, 95, 70, .35);
}

/* Botão laranja (destaque) */
.btn-terra {
    background: linear-gradient(135deg, #d49f2a, #bf8420);
    box-shadow: 0 6px 16px rgba(212,159,42,.35);
}

.btn-terra:hover {
    box-shadow: 0 12px 28px rgba(212,159,42,.45);
}

/* Botão excluir */
.btn-excluir {
    background: linear-gradient(135deg, #dc3545, #c82333);
    box-shadow: 0 4px 12px rgba(220,53,69,.3);
}

.btn-pequeno {
    padding: 10px 20px;
    font-size: 14px;
}

/* Card padrão */
.card {
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(5px);
    border-radius: 24px;
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(47, 95, 70, .08);
    transition: all 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra);
    border-color: rgba(47, 95, 70, .15);
}

/* Título de seção */
.section-title {
    font-size: 42px;
    color: var(--verde);
    text-align: center;
    margin-bottom: 16px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #6a7a6b;
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

/* Aviso */
.aviso {
    border-left: 4px solid var(--terra);
    background: linear-gradient(90deg, rgba(212,159,42,.08), transparent);
    padding: 20px;
    border-radius: 16px;
}

/* Inputs */
input[type="file"],
input[type="text"],
input[type="email"],
textarea,
select {
    width: 100%;
    padding: 14px 16px;
    background: white;
    border: 2px solid #e8ede4;
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--verde);
    box-shadow: 0 0 0 3px rgba(47, 95, 70, .1);
}

/* ============================================
   PÁGINA INICIAL (HOME)
   ============================================ */
.painel-home {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.home-hero {
    text-align: center;
    margin-bottom: 48px;
    padding: 60px 24px;
    background: linear-gradient(135deg, rgba(255,255,255,.95), rgba(234,241,231,.95));
    border-radius: 48px;
    box-shadow: var(--sombra-forte);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,.3);
}

.home-hero h1 {
    font-size: 52px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, var(--verde-escuro), var(--verde));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.home-hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #5a6a5b;
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-top: 20px;
}

.home-card {
    composes: card;
    padding: 32px;
    text-align: center;
}

.home-card h2 {
    color: var(--verde);
    font-size: 26px;
    margin-bottom: 16px;
}

.home-card p {
    font-size: 16px;
    color: #5a6a5b;
}

/* ============================================
   PÁGINA DE MATERIAIS
   ============================================ */
.painel-materiais {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.materiais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.materiais-card {
    composes: card;
    display: flex;
    flex-direction: column;
}

.materiais-card-header {
    background: linear-gradient(135deg, var(--verde), var(--verde-escuro));
    padding: 20px 24px;
    border-bottom: 3px solid var(--terra);
}

.materiais-card-header h2 {
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-count {
    display: inline-block;
    background: rgba(255, 255, 255, .2);
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
    margin-left: 10px;
}

.materiais-card-content {
    padding: 20px 24px;
    flex: 1;
}

.materiais-list {
    list-style: none;
}

.materiais-list li {
    margin-bottom: 12px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(47, 95, 70, .08);
}

.materiais-list li:last-child {
    border-bottom: none;
}

.materiais-list a {
    color: var(--verde);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: color 0.2s ease;
}

.materiais-list a::before {
    content: "📄";
    opacity: 0.7;
}

.materiais-list a:hover {
    color: var(--terra);
}

.empty-message {
    color: #9aaa9b;
    text-align: center;
    padding: 30px 20px;
}

/* ============================================
   PÁGINA DE PROJETOS
   ============================================ */
.painel-projetos {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.projetos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.projetos-card {
    composes: card;
    display: flex;
    flex-direction: column;
}

.projetos-card-header {
    background: linear-gradient(135deg, var(--verde), var(--verde-escuro));
    padding: 20px 24px;
    border-bottom: 3px solid var(--terra);
}

.projetos-card-header h2 {
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.projetos-card-icon {
    font-size: 32px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}

.projetos-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.projetos-card-description {
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
    flex: 1;
}

.projetos-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--verde);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: auto;
}

.projetos-card-link::after {
    content: "→";
    transition: transform 0.2s ease;
}

.projetos-card-link:hover {
    color: var(--terra);
}

.projetos-card-link:hover::after {
    transform: translateX(4px);
}

/* ============================================
   PÁGINA SOBRE
   ============================================ */
.painel-sobre {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.sobre-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 28px;
}

.sobre-card {
    composes: card;
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sobre-card h2 {
    color: var(--verde);
    font-size: 26px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.sobre-card h2::before {
    content: "";
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--terra), var(--verde));
    border-radius: 2px;
}

.frase-destaque {
    composes: card;
    background: linear-gradient(135deg, rgba(47, 95, 70, .08), rgba(47, 95, 70, .03));
    border-left: 4px solid var(--terra);
    padding: 32px;
    text-align: center;
}

.frase-destaque h2 {
    color: var(--terra);
    justify-content: center;
}

.frase-destaque h2::before {
    background: linear-gradient(180deg, var(--terra), #b8860b);
}

.frase-destaque p {
    font-size: 18px;
    font-style: italic;
    color: var(--verde-escuro);
    font-weight: 500;
}

/* ============================================
   PÁGINA DE CONTATO
   ============================================ */
.painel-contato {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.contato-card {
    composes: card;
    max-width: 700px;
    margin: 0 auto 28px;
    padding: 40px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--verde);
    font-size: 14px;
}

textarea {
    min-height: 130px;
    resize: vertical;
}

.contato-aviso {
    background: linear-gradient(135deg, rgba(212, 159, 42, .08), rgba(212, 159, 42, .03));
    border-left: 4px solid var(--terra);
    border-radius: 28px;
    padding: 24px 32px;
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contato-aviso p {
    font-size: 15px;
    color: #7a8a7b;
}

/* ============================================
   BEMFICA DIGITAL LAB
   ============================================ */
.painel-lab {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.lab-card {
    composes: card;
    padding: 32px;
    margin-bottom: 28px;
}

.lab-card h2 {
    color: var(--verde);
    font-size: 26px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.lab-card h2::before {
    content: "";
    width: 4px;
    height: 28px;
    background: linear-gradient(180deg, var(--terra), var(--verde));
    border-radius: 2px;
}

.lab-card.aviso {
    background: linear-gradient(135deg, rgba(212, 159, 42, .08), rgba(212, 159, 42, .03));
    border-left: 4px solid var(--terra);
}

.lab-card.aviso h2::before {
    background: linear-gradient(180deg, var(--terra), #b8860b);
}

.lab-card.aviso h2 {
    color: var(--terra);
}

/* ============================================
   PAINEL ADMINISTRATIVO
   ============================================ */
.painel-admin {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.admin-card {
    background: rgba(255, 255, 255, .95);
    backdrop-filter: blur(5px);
    padding: 28px;
    border-radius: 24px;
    text-decoration: none;
    color: var(--texto);
    box-shadow: var(--sombra-suave);
    border: 1px solid rgba(47, 95, 70, .08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.admin-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--terra), var(--verde));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.admin-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--sombra);
}

.admin-card:hover::before {
    transform: scaleX(1);
}

.admin-icon {
    font-size: 48px;
    transition: transform 0.3s ease;
}

.admin-card:hover .admin-icon {
    transform: scale(1.1) rotate(5deg);
}

.admin-card h2 {
    font-size: 22px;
    color: var(--verde);
}

.admin-card p {
    font-size: 14px;
    color: #6a7a6b;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-hero,
.section-title,
.painel-materiais h1,
.painel-projetos h1,
.painel-sobre h1,
.painel-contato h1,
.painel-lab h1 {
    animation: fadeInUp 0.5s ease-out;
}

.section-subtitle,
.subtitulo {
    animation: fadeInUp 0.5s ease-out;
    animation-delay: 0.05s;
    animation-fill-mode: both;
}

/* Animações para cards */
.materiais-card,
.projetos-card,
.sobre-card,
.lab-card,
.contato-card,
.admin-card {
    animation: fadeInUp 0.5s ease-out;
    animation-fill-mode: both;
}

.materiais-card:nth-child(1) { animation-delay: 0.05s; }
.materiais-card:nth-child(2) { animation-delay: 0.1s; }
.materiais-card:nth-child(3) { animation-delay: 0.15s; }
.materiais-card:nth-child(4) { animation-delay: 0.2s; }
.materiais-card:nth-child(5) { animation-delay: 0.25s; }
.materiais-card:nth-child(6) { animation-delay: 0.3s; }

.projetos-card:nth-child(1) { animation-delay: 0.05s; }
.projetos-card:nth-child(2) { animation-delay: 0.1s; }
.projetos-card:nth-child(3) { animation-delay: 0.15s; }
.projetos-card:nth-child(4) { animation-delay: 0.2s; }
.projetos-card:nth-child(5) { animation-delay: 0.25s; }
.projetos-card:nth-child(6) { animation-delay: 0.3s; }

.sobre-card:nth-child(1) { animation-delay: 0.05s; }
.sobre-card:nth-child(2) { animation-delay: 0.1s; }
.sobre-card:nth-child(3) { animation-delay: 0.15s; }

/* ============================================
   RESPONSIVIDADE
   ============================================ */
@media (max-width: 768px) {
    .topo {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }

    nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    nav a {
        padding: 6px 12px;
        font-size: 14px;
    }

    .section-title,
    .painel-materiais h1,
    .painel-projetos h1,
    .painel-sobre h1,
    .painel-contato h1,
    .painel-lab h1 {
        font-size: 32px;
    }

    .home-hero {
        padding: 40px 20px;
    }

    .home-hero h1 {
        font-size: 36px;
    }

    .home-hero p,
    .section-subtitle,
    .subtitulo {
        font-size: 16px;
    }

    .materiais-grid,
    .projetos-grid,
    .sobre-grid,
    .admin-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contato-card {
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 24px;
    }

    .section-title,
    .painel-materiais h1,
    .painel-projetos h1,
    .painel-sobre h1,
    .painel-contato h1,
    .painel-lab h1 {
        font-size: 28px;
    }

    .home-hero h1 {
        font-size: 28px;
    }

    .btn,
    .botao-principal,
    .btn-enviar {
        padding: 10px 20px;
        font-size: 14px;
    }

    .contato-card {
        padding: 20px;
    }

    .admin-card {
        padding: 20px;
    }

    .admin-icon {
        font-size: 36px;
    }

    .admin-card h2 {
        font-size: 18px;
    }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */
::selection {
    background: var(--terra);
    color: white;
}

html {
    scroll-behavior: smooth;
}

/* Uploads específicos */
.lista-uploads {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.lista-uploads li {
    background: var(--verde-claro);
    padding: 20px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.lista-uploads li:hover {
    transform: translateX(4px);
}

.miniatura-img {
    width: 100%;
    max-width: 250px;
    height: auto;
    aspect-ratio: 16/10;
    object-fit: cover;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.miniatura-img:hover {
    transform: scale(1.05);
    border-color: var(--terra);
}


.home-hero h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    font-weight: 600;
}

.home-hero p {
    font-size: 1.2em;
    max-width: 600px;
    margin: 0 auto 25px;
    line-height: 1.6;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: white;
    color: #764ba2;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.home-card {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #eef2f7;
}

.home-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.12);
}

.home-card h2 {
    color: #2d3748;
    margin-bottom: 15px;
    font-size: 1.5em;
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-card p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 20px;
}

/* Botão pequeno opcional para os cards */
.btn-pequeno {
    display: inline-block;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.9em;
    transition: opacity 0.3s ease;
}

.btn-pequeno:hover {
    opacity: 0.9;
}

/* Responsividade */
@media (max-width: 768px) {
    .home-hero h1 {
        font-size: 2em;
    }
    
    .home-hero p {
        font-size: 1em;
    }
    
    .home-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .home-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .painel-home {
        padding: 20px 15px;
    }
    
    .home-hero {
        padding: 30px 15px;
    }
    
    .home-hero h1 {
        font-size: 1.6em;
    }
}

/* Animações suaves */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.home-card {
    animation: fadeInUp 0.5s ease-out forwards;
    opacity: 0;
}

.home-card:nth-child(1) { animation-delay: 0.1s; }
.home-card:nth-child(2) { animation-delay: 0.2s; }
.home-card:nth-child(3) { animation-delay: 0.3s; }
.home-card:nth-child(4) { animation-delay: 0.4s; }
.home-card:nth-child(5) { animation-delay: 0.5s; }
.home-card:nth-child(6) { animation-delay: 0.6s; }

/* ============================================
   PÁGINA INICIAL - MESMO ESTILO DA PÁGINA DE MATERIAIS
   ============================================ */
.painel-inicial {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.inicial-hero {
    text-align: center;
    margin-bottom: 48px;
    padding: 60px 24px;
    background: var(--branco);
    border-radius: 48px;
    box-shadow: var(--sombra-forte);
    border: 1px solid rgba(47, 95, 70, .1);
}

.inicial-hero h1 {
    font-size: 52px;
    margin-bottom: 20px;
    color: var(--verde);
}

.inicial-hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 30px;
    color: #5a6a5b;
}

.inicial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
}

.inicial-card {
    background: var(--branco);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--sombra-suave);
    transition: all 0.3s ease;
    border: 1px solid rgba(47, 95, 70, .08);
}

.inicial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--sombra);
}

.inicial-card-header {
    background: linear-gradient(135deg, var(--verde), var(--verde-escuro));
    padding: 20px 24px;
    border-bottom: 3px solid var(--terra);
}

.inicial-card-header h2 {
    color: white;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.inicial-card-content {
    padding: 24px;
}

.inicial-card-content p {
    color: #5a6a5b;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
}