@import url('https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Oswald:wght@200..700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    font-size: 16px;
    background-color: #f0f0f0;
    color: #333;
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Header Fixo */
.main-header {
    position: fixed;
    min-height: 90px;
    display: flex;
    align-items: center;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 10px 0;
    margin-bottom: 5px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 10px; /* Reduced from 15px to save space */
    flex-wrap: nowrap; /* Prevent line breaks */
    overflow-x: auto; /* Enable horizontal scrolling if needed */
    white-space: nowrap; /* Prevent text wrapping */
}

.header-form-group {
    display: flex;
    align-items: left;
    gap: 10px;
}

.header-form-group select {
    max-width: 400px;
    min-width: 200px;
}



.header-buttons {
    display: flex;
    align-items: center;
    gap: 8px; /* Reduced from 10px */
    flex-wrap: nowrap; /* Keep buttons in one line */
}

.home-button {
    margin-right: auto; /* Align Home button to the left */
    background-color: #fff;
}

/* Botão de Menu Hambúrguer */
.menu-toggle {
    display: none; /* Hidden on large screens */
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

.tab-pane {
    display: none;
    min-height: 40vh;
    padding: 20px;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 5px 5px;
}

/* Responsividade */
@media (max-width: 600px) {
    .main-header {
        padding: 5px 0;
    }

    .menu-toggle {
        display: block; /* Show hamburger menu */
        position: absolute;
        top: 10px;
        right: 20px;
    }

    .header-container {
        display: none; /* Hide menu by default */
        flex-direction: row; /* Keep horizontal layout when visible */
        align-items: center;
        gap: 6px;
        padding: 10px;
        background-color: #fff;
        width: 100%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        overflow-x: auto; /* Enable horizontal scrolling */
    }

    .header-container.active {
        display: flex; /* Show menu when active */
    }

    .header-form-group {
        flex-direction: row; /* Keep select and buttons in one line */
        gap: 6px;
        width: auto; /* Allow natural width */
    }

    .header-form-group select {
        max-width: 150px; /* Further reduced for small screens */
        min-width: 100px;
        font-size: 12px;
        padding: 4px;
    }

    .header-buttons {
        gap: 6px;
        flex-wrap: nowrap; /* Ensure buttons stay in one line */
    }

    .button {
        font-size: 12px; /* Smaller font */
        padding: 6px 10px; /* Smaller padding */
        width: auto; /* Allow buttons to shrink */
    }

    .home-button {
        font-size: 12px;
        padding: 6px 10px;
        background-color: #fff;
        color: white;
        border: 2px solid #454545;
        width: auto;
    }
}

@media (max-width: 420px) {
    .header-container {
        gap: 5px;
    }

    .header-form-group {
        gap: 5px;
    }

    .header-form-group select {
        max-width: 120px;
        min-width: 80px;
        font-size: 11px;
        padding: 3px;
    }

    .header-buttons {
        gap: 5px;
    }

    .button {
        font-size: 11px;
        padding: 5px 8px;
    }

    .home-button {
        font-size: 11px;
        padding: 5px 8px;
    }
}

@media (max-width: 375px) {
    .header-container {
        gap: 4px;
    }

    .header-form-group {
        gap: 4px;
    }

    .header-form-group select {
        max-width: 100px;
        min-width: 70px;
        font-size: 10px;
        padding: 2px;
    }

    .header-buttons {
        gap: 4px;
    }

    .button {
        font-size: 10px;
        padding: 4px 6px;
    }

    .home-button {
        font-size: 10px;
        padding: 4px 6px;
    }
}

/* Botão de Menu Hambúrguer */
.menu-toggle {
    display: none; /* Escondido em telas grandes */
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
    color: #333;
    padding: 10px;
}

/* Bloco Principal */
.bloco {
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 1400px;
    width: 100%;
    margin-top: 80px; /* Espaço para o header fixo */
}

/* Container */
.container {
    max-width: 1400px;
    width: 100%;
    padding: 0 20px;
    margin: 0 auto;
}

/* Welcome Section */
.welcome {
    text-align: center;
}

h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 60px;
    line-height: 70px;
    font-weight: 700;
    margin: 0;
    margin-bottom: 20px;
}

h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    line-height: 45px;
    font-weight: 700;
    margin: 20px 0;
}

/* Formulário */
.form-section {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group-vigencia {
    display: flex;
    flex-direction: row;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.form-group-vigencia label {
    font-weight: bold;
}

.form-group-vigencia input {
    max-width: 200px;
}

.form-group-select {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.form-group label {
    font-weight: bold;
}

.auto-resize {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-family: Arial, sans-serif;
    resize: vertical;
}

.input_cadastro {
    width: 100%;
    max-width: 400px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    text-align: left;
}

.input_cadastro:hover {
    background-color: #f0f0f0;
}

.lesson-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 10px;
}

.lesson_label {
    font-weight: bold;
}

/* Botões */
.button-group {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.button {
    display: inline-block;
    padding: 10px 0px;
    font-weight: 700;
    background-color: #fff;
    border: none;
    border-bottom: 2px solid #454545;
    color: #454545;
    text-decoration: none;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s, color 0.3s;
}

.button:hover {
    background-color: #454545;
    color: #fff;
}

.add_button {
    background-color: #00621d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 15px;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.add_button:hover {
    background-color: #004d17;
}

.btn-remove {
    background-color: #ff4d4d;
    color: white;
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 15px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: fit-content;
}

.btn-remove:hover {
    background-color: #cc0000;
}

/* Linhas Decorativas */
.line {
    background-color: #117050;
    height: 5px;
    margin-bottom: 20px;
}

.bar_footer {
    background-color: #303030;
    height: 5px;
    margin: 20px 0;
}

/* Mensagem */
.message {
    margin: 10px 0;
    font-size: 16px;
    text-align: center;
}

/* Footer */
footer {
    background-color: #333;
    color: #fff;
    padding: 20px;
    text-align: center;
    width: 100%;
    margin-top: 20px;
}

.footer-text {
    font-size: 16px;
    line-height: 1.5;
    font-family: 'Open Sans', sans-serif;
    margin: 5px 0;
}

/* Responsividade */
@media (max-width: 600px) {
    .bloco {
        margin-top: 60px; /* Ajustado para header menor */
        padding: 20px;
    }

    h1 {
        font-size: 40px;
        line-height: 50px;
    }

    h2 {
        font-size: 28px;
        line-height: 36px;
    }

    .form-group-vigencia {
        flex-direction: column;
        gap: 10px;
    }

    .form-group-vigencia input {
        max-width: 100%;
    }

    .main-header {
        padding: 5px 0;
    }

    .menu-toggle {
        display: block; /* Mostra o botão hambúrguer em telas pequenas */
        position: absolute;
        top: 10px;
        right: 20px;
    }

    .header-container {
        display: none; /* Esconde o menu por padrão */
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 10px;
        background-color: #fff;
        width: 100%;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .header-container.active {
        display: flex; /* Mostra o menu quando ativo */
    }

    .header-form-group {
        flex-direction: column;
        width: 100%;
    }

    .header-form-group select {
        max-width: 100%;
        min-width: 0;
        font-size: 14px;
    }

    .header-buttons {
        flex-wrap: wrap;
        width: 100%;
        justify-content: center;
    }

    .button {
        width: 100%;
        text-align: center;
        padding: 8px;
        font-size: 14px;
    }

    .home-button {
        width: 100%;
        text-align: center;
        background-color: #117050;
        color: white;
        border: 2px solid #454545;
        padding: 10px;
        border-radius: 5px;
    }

    .auto-resize, .input_cadastro {
        font-size: 14px;
        padding: 6px;
    }

    .add_button, .btn-remove {
        font-size: 14px;
        padding: 6px 10px;
    }

    footer {
        font-size: 14px;
        padding: 10px;
    }
}