/* =========================
    RESET E ESTRUTURA BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100vh;
    overflow: hidden;
}

body {
    font-family: "Segoe UI", "Inter", sans-serif;
    color: #3E2F1C;
    background-color: #F5EFE6;
    line-height: 1.6;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* =========================
    CONTAINER
========================= */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 8%;
    width: 100%;
}

/* =========================
    HEADER (ESTÁTICO NO TOPO)
========================= */
.header {
    flex-shrink: 0;
    height: 72px;
    background-color: #EDE3D2;
    border-bottom: 1px solid #D6C6B2;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(62, 47, 28, 0.05);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo a {
    text-decoration: none;
    color: #3E2F1C;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.menu {
    list-style: none;
    display: flex;
    gap: 32px;
}

.menu a {
    text-decoration: none;
    color: #6B4F2A;
    font-size: 14px;
    font-weight: 500;
    transition: 0.2s ease;
    text-transform: uppercase;
}

.menu a:hover {
    color: #C67C3E;
}

/* =========================
    SEÇÕES (SLIDES)
========================= */
.section {
    height: calc(100vh - 72px - 50px);
    min-height: calc(100vh - 72px - 50px);
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    padding: 60px 0;
}

.section-light {
    background-color: #EDE3D2;
}

.section-title {
    font-size: 30px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 40px;
    color: #3E2F1C;
}

/* =========================
    HERO / HOME
========================= */
.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.2rem;
    letter-spacing: 1px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #3E2F1C;
}

.hero-content h2 {
    font-size: 20px;
    font-weight: 400;
    color: #6B4F2A;
    margin-bottom: 25px;
}

.hero-content p {
    font-size: 18px;
    color: #5C5045;
    margin-bottom: 35px;
    max-width: 650px;
}

/* =========================
    BOTÕES GERAIS
========================= */
.hero-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 14px 28px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s ease;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: #C67C3E;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #A65E2E;
}

.btn-secondary {
    border: 1px solid #C67C3E;
    color: #6B4F2A;
}

.btn-secondary:hover {
    background-color: #E6D5C3;
}

/* =========================
    GRID E BLOCOS (PÁGINA PRINCIPAL)
========================= */
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 60px;
}

.block h3 {
    font-size: 20px;
    margin-bottom: 12px;
    font-weight: 600;
    color: #3E2F1C;
}

.block p {
    font-size: 16px;
    color: #5C5045;
    line-height: 1.7;
}

/* =========================
    FOOTER FIXO
========================= */
.footer-fixo {
    flex-shrink: 0;
    height: 50px;
    background-color: #EDE3D2;
    border-top: 1px solid #D6C6B2;
    display: flex;
    align-items: center;
    width: 100%;
    z-index: 1000;
}

.footer-content {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 12px;
    color: #6B4F2A;
}

.footer-logo {
    height: 18px;
    opacity: 0.6;
}

/* ============================================================
    ESTILOS DO REPOSITÓRIO (SISTEMA DE FERRAMENTAS)
============================================================ */
.repo-container { 
    margin-top: 50px; 
    padding-bottom: 100px; 
}

.back-link { 
    margin-bottom: 30px; 
    display: inline-block; 
    color: #C67C3E; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 14px; 
}

.category-title { 
    font-size: 22px; 
    color: #3E2F1C; 
    margin: 40px 0 20px 0; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
}

.category-title::after { 
    content: ""; 
    flex: 1; 
    height: 1px; 
    background: #D6C6B2; 
}

.repo-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); 
    gap: 30px; 
    margin-bottom: 50px; 
}

.repo-card { 
    background: #EDE3D2; 
    padding: 30px; 
    border-radius: 6px; 
    border-left: 5px solid #C67C3E; 
    display: flex; 
    flex-direction: column; 
    transition: 0.3s; 
}

.repo-card:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05); 
}

.repo-tag { 
    font-size: 10px; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #A65E2E; 
    margin-bottom: 10px; 
}

.btn-repo { 
    padding: 8px 16px; 
    font-size: 12px; 
    border-radius: 4px; 
    text-decoration: none; 
    font-weight: 600; 
    text-align: center;
    display: inline-block;
}

.btn-repo.btn-main { 
    background: #C67C3E; 
    color: #fff; 
}

.btn-repo.btn-outline { 
    border: 1px solid #C67C3E; 
    color: #C67C3E; 
}

.checksum-box { 
    font-family: "Courier New", monospace; 
    font-size: 10px; 
    background: rgba(62, 47, 28, 0.05); 
    padding: 8px; 
    border-radius: 3px; 
    color: #6B4F2A; 
    word-break: break-all;
    border: 1px dashed #D6C6B2;
}

/* ============================================================
    CONVERSOR / DROPZONE (ESTILOS ESPECÍFICOS)
============================================================ */
.converter-box {
    border: 2px dashed #C67C3E;
    border-radius: 10px;
    padding: 40px;
    text-align: center;
    transition: 0.3s;
    background: rgba(255, 255, 255, 0.05);
    margin-top: 20px;
    cursor: pointer;
}

.converter-box.dragover {
    background: rgba(198, 124, 62, 0.15) !important;
    border-style: solid !important;
}

/* Preview da imagem no conversor */
#preview-container { 
    margin-top: 20px; 
    display: none; /* Controlado pelo JS */
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

#preview-img {
    width: 128px;
    height: 128px;
    object-fit: contain; /* Garante que a imagem não distorça */
    border: 2px solid #C67C3E;
    padding: 10px;
    background: #fff;
    border-radius: 8px;
}

.status-msg { 
    margin-top: 15px; 
    font-weight: 600; 
    font-size: 14px;
}

/* Spinner de carregamento */
.loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block !important;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.8;
}

/* =========================
    MEDIA QUERIES
========================= */
@media (max-width: 768px) {
    .grid-2 { grid-template-columns: 1fr; }
    .hero-content h1 { font-size: 2.2rem; }
    .section { height: auto; min-height: calc(100vh - 122px); padding: 40px 0; }
    main { scroll-snap-type: none; }
}