body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f8f8f8; 
    color: #333;
    line-height: 1.6;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('logo2.png');
    background-repeat: no-repeat;
    background-position: center center;
    background-size: 70%;
    opacity: 0.05;
    z-index: -1;
}

main {
    position: relative;
    z-index: 2; 
    padding: 20px;
    max-width: 1000px;
    margin: 30px auto;
    background-color: white;
    box-shadow: 0 0 15px rgba(0,0,0,0.1);
    border-radius: 10px;
}

header {
    background-color: #000000;
    color: white;
    padding: 1.5rem 0;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: relative;
    z-index: 3;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
}

.main-logo {
    height: 80px;
    width: auto;
}

header h1 {
    margin: 0;
    font-size: 2.5em;
    letter-spacing: 1px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    justify-content: center;
    margin-top: 15px;
}

nav ul li {
    margin: 0 20px;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: bold;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

nav ul li a:hover,
nav ul li a.active-nav {
    background-color: #388e3c;
    transform: translateY(-2px);
}

section {
    margin-bottom: 50px;
    padding-top: 70px;
    margin-top: -70px;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

section.active-section {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

section:not(.active-section) {
    display: none;
}

h2 {
    color: #2e7d32;
    border-bottom: 3px solid #e0e0e0;
    padding-bottom: 12px;
    margin-bottom: 25px;
    font-size: 2em;
}

h3 {
    color: #4CAF50;
    margin-top: 30px;
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}

a {
    color: #2e7d32;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #388e3c;
    text-decoration: underline;
}

.content-tabs {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.tab-button {
    background-color: #f0f0f0;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    margin-right: 5px;
    margin-bottom: 5px;
    outline: none;
}

.tab-button:hover:not(.active) {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #2e7d32;
    color: white;
    border-bottom: 3px solid #2e7d32;
    transform: translateY(-2px);
}

.tab-content {
    display: none;
    padding: 25px;
    border: 1px solid #ddd;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #ffffff;
    animation: fadeIn 0.5s ease-out;
}

.tab-content.active {
    display: block;
}

/* Garante que o novo bloco dinâmico use os mesmos estilos */
.tab-content-dynamic {
    display: none;
    padding: 25px;
    border: 1px solid #ddd;
    border-top: none;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background-color: #ffffff;
    animation: fadeIn 0.5s ease-out;
}

.tab-content-dynamic.active {
    display: block;
}

/* O seletor .tab-content continua sendo usado no CSS para o bloco principal */




@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- ESTILOS DE PREÇOS CEPEA --- */
#prices-container {
    background-color: #e8f5e9;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #c8e6c9;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    align-items: center; 
    gap: 10px;
}

.last-updated {
    font-size: 0.85em;
    color: #777;
    text-align: right;
    margin-top: 15px;
    font-style: italic;
}

footer {
    text-align: center;
    padding: 25px;
    background-color: #333;
    color: white;
    margin-top: 40px;
    font-size: 0.9em;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.2);
}

/* ========================================================== */
/* --- ESTILOS PARA SEÇÕES NOVAS (EM TODAS AS TELAS) --- */
/* ========================================================== */

/* --- SEÇÃO NOSSA EQUIPE --- */
#equipe {
    text-align: center;
}

.team-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.team-member {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 250px;
    text-align: center;
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.member-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #4CAF50;
    margin-bottom: 15px;
}

.team-member h3 {
    margin: 10px 0 5px 0;
    color: #007bff;
}

.team-member .role {
    color: #666;
    font-style: italic;
    margin-bottom: 15px;
}

.team-member .bio {
    text-align: justify;
    font-size: 0.9em;
    color: #555;
}

/* --- SEÇÃO NOTÍCIAS --- */
#noticias h2 {
    text-align: center;
    margin-bottom: 30px;
}

#news-feed-container {
    display: flex;
    flex-direction: column;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.news-item {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    border-left: 5px solid #4CAF50;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: box-shadow 0.3s ease;
}

.news-item .news-image {
    width: 100%;
    max-height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 15px;
    display: block;
}


/* --- SEÇÃO LOGÍSTICA (MAPA) --- */
.mapa-container {
    height: 550px;
    width: 100%;
    min-height: 300px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #ccc;
}

/* Estilos para o painel de informações */
#porto-info-panel {
    min-height: 150px;
    padding: 20px;
    background-color: #f0fff0;
    border-left: 5px solid #2e7d32;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    margin-top: 20px;
}

#porto-info-panel h3 {
    color: #2e7d32;
    margin-top: 0;
    padding-bottom: 5px;
    border-bottom: 1px dashed #c8e6c9;
}

#porto-info-panel ul {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

#porto-info-panel ul li {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.95em;
}

/* Estilo do Marcador Customizado (Ponto) */
.custom-porto-icon {
    background-color: #007bff;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    box-shadow: 0 0 5px rgba(0,0,0,0.5);
    transform: translate(-7px, -7px);
}

/* ========================================================== */
/* --- MEDIA QUERIES (RESPONSIVIDADE) --- */
/* ========================================================== */

@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        margin-bottom: 5px;
    }
    .main-logo {
        height: 60px;
    }
    header h1 {
        font-size: 1.8em;
    }
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    nav ul li {
        margin: 5px 0;
    }
    .content-tabs {
        flex-direction: column;
    }
    .tab-button {
        width: 100%;
        margin-right: 0;
        margin-bottom: 8px;
    }
    main {
        margin: 20px 10px;
        padding: 15px;
    }
    body {
        background-size: 100%;
    }

    .conteudo {
        flex-direction: column;
    }
    .conteudo img {
        width: 100%;
        height: auto;
        margin-bottom: 10px;
    }
    .container-noticias {
        padding: 15px;
    }
    .team-member {
        width: 90%;
    }

    /* CORREÇÃO DO WIDGET CEPEA */
    #prices-container {
        align-items: center;
    }
    .cepea-widget-container table {
        width: max-content !important; 
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 1.5em;
    }
    nav ul li a {
        padding: 6px 10px;
        font-size: 0.9em;
    }
    h2 {
        font-size: 1.5em;
    }
    .tab-button {
        font-size: 1em;
        padding: 10px 15px;
    }
}