/**
 * TEMA 1 - LARANJA VIBRANTE (com logo em fundo branco)
 * Cabeçalho e rodapé laranja com logo destacado em fundo branco circular
 * Corpo verde escuro
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --cor-principal: #f39c12;
    --cor-principal-escura: #e67e22;
    --cor-secundaria: #2d4a2d;
    --cor-secundaria-clara: #3d5a3d;
    --cor-texto-claro: #ffffff;
    --cor-texto-escuro: #2d4a2d;
    --cor-bege: #f5f5dc;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #2d4a2d 0%, #1e3a1e 100%);
    min-height: 100vh;
    color: var(--cor-bege);
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    width: 100%;
}

/* Header - Laranja Vibrante */
header {
    background: linear-gradient(135deg, var(--cor-principal) 0%, var(--cor-principal-escura) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 1rem;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Logo com fundo branco retangular */
.logo {
    height: 60px;
    width: auto;
    padding: 0.5rem 0.75rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.logo:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

header h1 {
    font-size: 1.5rem;
    color: var(--cor-texto-claro);
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.btn-admin {
    background: var(--cor-texto-claro);
    color: var(--cor-principal);
    padding: 0.625rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    border: 2px solid var(--cor-texto-claro);
    transition: all 0.3s;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-admin:hover {
    background: transparent;
    color: var(--cor-texto-claro);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Main */
main {
    flex: 1;
    padding: 3rem 0;
}

.hero {
    text-align: center;
    margin-bottom: 3rem;
}

.hero h2 {
    font-size: 3rem;
    color: var(--cor-bege);
    margin-bottom: 1rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.25rem;
    color: rgba(245, 245, 220, 0.9);
    max-width: 42rem;
    margin: 0 auto;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    color: var(--cor-bege);
    font-size: 1.5rem;
    font-weight: 600;
}

.section-title svg {
    color: var(--cor-principal);
}

/* Subjects Grid */
.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.subject-card {
    background: rgba(61, 90, 61, 0.4);
    border: 2px solid rgba(243, 156, 18, 0.4);
    border-radius: 1rem;
    padding: 1.75rem;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    color: inherit;
    display: block;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.subject-card:hover {
    background: rgba(61, 90, 61, 0.6);
    border-color: var(--cor-principal);
    transform: translateY(-6px);
    box-shadow: 0 8px 24px rgba(243, 156, 18, 0.3);
}

.subject-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.subject-card h3 {
    color: var(--cor-bege);
    font-size: 1.375rem;
    margin-bottom: 0.5rem;
    transition: color 0.2s;
    font-weight: 700;
}

.subject-card:hover h3 {
    color: var(--cor-principal);
}

.subject-card p {
    color: rgba(245, 245, 220, 0.85);
    font-size: 0.9375rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.subject-icon {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--cor-principal);
    flex-shrink: 0;
}

.file-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(245, 245, 220, 0.9);
    font-size: 0.875rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(243, 156, 18, 0.3);
    font-weight: 600;
}

.file-count svg {
    width: 1rem;
    height: 1rem;
    color: var(--cor-principal);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--cor-bege);
    font-size: 1.125rem;
}

.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: rgba(61, 90, 61, 0.3);
    border: 2px solid rgba(243, 156, 18, 0.4);
    border-radius: 1rem;
}

.empty-state svg {
    width: 3rem;
    height: 3rem;
    color: var(--cor-principal);
    margin: 0 auto 1rem;
}

.empty-state h4 {
    color: var(--cor-bege);
    font-size: 1.125rem;
    margin-bottom: 0.5rem;
}

.empty-state p {
    color: rgba(245, 245, 220, 0.7);
    font-size: 0.875rem;
}

/* Footer - Laranja Vibrante */
footer {
    background: linear-gradient(135deg, var(--cor-principal) 0%, var(--cor-principal-escura) 100%);
    padding: 1.75rem 0;
    margin-top: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

footer p {
    text-align: center;
    color: var(--cor-texto-claro);
    font-size: 0.9375rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .logo {
        height: 50px;
        padding: 0.375rem 0.5rem;
    }

    header h1 {
        font-size: 1.125rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .subjects-grid {
        grid-template-columns: 1fr;
    }
}
