/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #0a2342;
    --secondary-color: #ffffff;
    --accent-color: #c2a87c;
    --text-color: #333333;
    --light-gray: #f5f5f5;
    --light-primary-color: #0a2342e6;
    --border-color: #e0e0e0;
    --transition: all 0.3s ease;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

body {
    font-family: "Montserrat", sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

p {
    text-align: justify;
}

/* Header Styles */
.header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--accent-color);
    margin-bottom: 0.2rem;
}

.logo-subtitle {
    font-size: 0.75rem;
    font-weight: 300;
    opacity: 0.9;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 3px 0;
    transition: var(--transition);
}

.nav-list {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: var(--secondary-color);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #d4ba8e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(194, 168, 124, 0.3);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--light-gray);
    transform: translateY(-2px);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.btn-full {
    width: 100%;
}

/* Hero Section */
.hero {
    position: relative;
    height: 600px;
    background-image: url("/img/banner.png");
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--secondary-color);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(10, 35, 66, 0.9), rgba(10, 35, 66, 0.7));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

/* Section Styles */
.section {
    padding: 5rem 0;
}

.section:nth-child(even) {
    background-color: var(--light-gray);
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.section-title.center {
    text-align: center;
}

.section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.section-grid.reverse {
    direction: rtl;
}

.section-grid.reverse > * {
    direction: ltr;
}

.section-image {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.section-image img {
    width: 600px;
    height: 400px;
    object-fit: cover;
    transition: all 0.2s ease-in-out;
}

.section-image:hover img {
    transform: scale(1.03);
}

.section-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* News Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.news-card {
    background-color: var(--secondary-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: var(--transition);
}

.news-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.news-description {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: #666;
}

.news-link {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 0.95rem;
}

.news-link:hover {
    color: var(--primary-color);
}

/* Page Header */
.page-header {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
}

.page-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-subtitle {
    font-size: 1.25rem;
    font-weight: 300;
    text-align: center;
}

/* Content Wrapper */
.content-wrapper {
    max-width: 900px;
    margin: 0 auto;
}

.content-text {
    margin-bottom: 3rem;
}

.content-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.content-text p {
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
    line-height: 1.8;
}

/* Board Section */
.board-section {
    background-color: var(--light-gray);
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.board-member {
    text-align: center;
}

.board-image {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 1rem;
    border: 5px solid var(--accent-color);
}

.board-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.board-title {
    font-size: 1rem;
    color: #666;
}

/* Mission Grid */
.mission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-top: 3rem;
}

.mission-card {
    background-color: var(--secondary-color);
    padding: 2.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.mission-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.mission-card-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.mission-card p {
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.8;
}

.commitment-section {
    background-color: var(--primary-color);
    color: var(--secondary-color);
}

.commitment-section .section-title {
    color: var(--secondary-color);
}

.commitment-section p {
    color: var(--secondary-color);
}

.form-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-family: "Montserrat", sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-group small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    font-weight: 400;
    cursor: default;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    margin-top: 0.25rem;
}

.checkbox-label a {
    color: var(--accent-color);
    text-decoration: underline;
}

.map-placeholder {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.map-placeholder img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: all 0.2s ease-in-out;
}

.map-placeholder:hover img {
    transform: scale(1.03);
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.form-intro h2 {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.form-intro p {
    font-size: 1.05rem;
    color: #666;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Admin Login Page */
.login-page {
    background: linear-gradient(135deg, var(--primary-color), #0d3a5f);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-container {
    width: 100%;
    max-width: 450px;
    padding: 20px;
}

.login-box {
    background-color: var(--secondary-color);
    border-radius: 10px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.login-logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.login-logo p {
    font-size: 1rem;
    color: var(--accent-color);
    font-weight: 500;
}

.login-form h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 2rem;
    text-align: center;
}

.login-footer {
    text-align: center;
    margin-top: 1.5rem;
}

.login-footer a {
    color: var(--accent-color);
    font-size: 0.9rem;
}

.login-footer a:hover {
    text-decoration: underline;
}

.login-back {
    text-align: center;
    margin-top: 2rem;
}

.login-back a {
    color: var(--primary-color);
    font-size: 0.9rem;
}

.login-back a:hover {
    color: var(--accent-color);
}

/* Footer Styles */
.footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 3rem 0 1rem;
}

.footer-grid {
    display: flex;
    margin-bottom: 2rem;
    justify-content: space-evenly;
}

.footer-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer-column p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-links a {
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.social-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--primary-color);
        max-height: 0;
        overflow: hidden;
        transition: var(--transition);
    }

    .nav.active {
        max-height: 500px;
        padding: 1rem 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        text-align: center;
        padding: 1rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .hero {
        height: 500px;
        background-image: url('/img/banner-mobile.png');
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-grid,
    .section-grid.reverse {
        grid-template-columns: 1fr;
        gap: 2rem;
        direction: ltr;
    }

    .news-grid {
        grid-template-columns: 1fr;
    }

    .board-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .mission-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .page-title {
        font-size: 2rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .mission-preview .container .section-grid.reverse {
        flex-direction: column-reverse !important;
    }

    .mission-preview .container .section-grid.reverse .section-text {
        width: initial !important;
    }
}

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

    .logo-subtitle {
        font-size: 0.65rem;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .btn {
        padding: 0.6rem 1.2rem;
        font-size: 0.9rem;
    }

    .login-box {
        padding: 2rem;
    }
}

.required {
    color: red;
}

.form-section h2 {
    color: var(--primary-color);
    border-bottom: 2px solid #e0e0e0;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo-site {
    width: 300px;
    max-width: 300px;
    height: 100px;
    max-height: 100px;
    object-fit: contain;
}

.mission-preview .container .section-grid.reverse {
    display: flex;
    flex-direction: row-reverse;
}

.mission-preview .container .section-grid.reverse .section-text {
    width: 50%;
}

.mission-preview .container .section-grid.reverse .section-image {
    max-width: 600px;
    max-height: 400px;
}

.highlight-on-scroll {
    display: inline;
    background-image: linear-gradient(180deg, transparent 65%, var(--accent-color) 65%);
    background-repeat: no-repeat;
    background-size: 0% 100%;
    transition: background-size 1s ease-in-out;
}

.highlight-on-scroll.highlighted {
    background-size: 100% 100%;
}

.error-message {
    color: #d93025;
    font-size: 0.875rem;
    display: block;
    margin-top: 5px;
    min-height: 1em;
}

input.error, select.error {
    border-color: #d93025;
}

.summary-error-message {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #d93025;
    border-radius: 5px;
    background-color: #fce8e6;
    color: #c5221f;
    display: none;
}

.summary-error-message strong {
    display: block;
    margin-bottom: 0.5rem;
}

.summary-error-message ul {
    margin: 0;
    padding-left: 1.5rem;
}

/* --- Estilos para o Dashboard --- */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.table-wrapper {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

th, td {
    padding: 12px 15px;
    border: 1px solid #ddd;
    text-align: left;
    font-size: 0.9rem;
}

th {
    background-color: #0a2342;
    color: white;
}

tr:nth-of-type(even) {
    background-color: #f5f5f5;
}

.expand-col {
    width: 30px;
    text-align: center;
}

.expand-icon {
    cursor: pointer;
    transition: transform 0.2s ease-in-out;
    color: var(--primary-color);
}

.expand-icon.fa-chevron-up {
    transform: rotate(360deg);
}

.main-row {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.main-row:hover {
    background-color: #f2f2f2;
}

.detail-row {
    display: none;
    background-color: #f9f9f9;
    border-bottom: 1px solid #ddd;
}

.detail-row.active {
    display: table-row;
}

.detail-content {
    padding: 1rem 2rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #555;
}

.detail-content p {
    margin-bottom: 0.3rem;
}

.detail-content p:last-child {
    margin-bottom: 0;
}

/* ============================================= */
/* == Correções de Compatibilidade de Browser == */
/* ============================================= */

input[type="date"] {
    -webkit-appearance: none;
    appearance: none;
    min-width: 0;
    display: block;
    line-height: 1.4;
}

/* ================================== */
/* ==    Estilos para Paginação    == */
/* ================================== */
.pagination-container {
    margin-top: 2rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.pagination button {
    color: var(--primary-color);
    background-color: white;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    cursor: pointer;
    transition: background-color 0.2s ease;
    font-weight: 600;
}

.pagination button:hover:not(:disabled) {
    background-color: #f5f5f5;
}

.pagination button:first-child {
    border-top-left-radius: 5px;
    border-bottom-left-radius: 5px;
}

.pagination button:last-child {
    border-top-right-radius: 5px;
    border-bottom-right-radius: 5px;
}

.pagination button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    cursor: default;
}

.pagination button:disabled {
    color: #aaa;
    background-color: #f9f9f9;
    cursor: not-allowed;
}

/* ================================== */
/* == Estilos para Busca no Dashboard == */
/* ================================== */
.search-container {
    margin: 2rem 0;
}

#search-form {
    display: flex;
    gap: 1rem;
}

#search-input {
    flex-grow: 1; /* Faz o input ocupar o máximo de espaço */
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}