/* Reset & Base */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; line-height: 1.6; background: #f4f4f4; color: #333; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: #333; }

/* Header */
header { background: #204636; color: #fff; padding: 1rem 0; margin-bottom: 1rem; }
header .container { display: flex; justify-content: space-between; align-items: center; }

/* Clima Widget */
.weather-widget { 
    background: #e8f5e9; 
    color: #204636; 
    padding: 10px 15px; 
    border-radius: 8px; 
    margin-bottom: 20px; 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    font-size: 0.95rem; 
    border: 1px solid #c8e6c9;
}
.weather-widget .city { font-weight: bold; }
.weather-widget .temp { font-size: 1.2rem; font-weight: bold; }

/* Banner Slider */nav a, .actions span, .actions a { color: #fff; margin-left: 20px; font-weight: bold; }

/* Banner Slider */
.slider-container { position: relative; max-width: 100%; margin: auto; border-radius: 8px; overflow: hidden; }
.slide { display: none; animation: fade 1.5s; }
.slide.active { display: block; }
.slide img { width: 100%; height: auto; display: block; }

/* Botões Next/Prev */
.prev, .next { cursor: pointer; position: absolute; top: 50%; width: auto; margin-top: -22px; padding: 16px; color: white; font-weight: bold; font-size: 18px; transition: 0.6s ease; border-radius: 0 3px 3px 0; user-select: none; background-color: rgba(0,0,0,0.3); border: none; }
.next { right: 0; border-radius: 3px 0 0 3px; }
.prev:hover, .next:hover { background-color: rgba(0,0,0,0.8); }

@keyframes fade {
  from {opacity: .4} 
  to {opacity: 1}
}

/* Destaques */
.content-wrapper { display: flex; gap: 30px; align-items: flex-start; }
.main-content { flex: 3; }
.sidebar { flex: 1; min-width: 300px; }

/* Destaques */
.destaque-section { margin-bottom: 40px; background: #fff8f0; padding: 20px; border-radius: 8px; border: 1px solid #ffe0b2; }
.destaque-card { border: 2px solid #e67e22; box-shadow: 0 4px 10px rgba(230, 126, 34, 0.2); }
.destaque-card h3 { color: #d35400; font-size: 1.4rem; }

/* News Grid */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.news-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.news-card img { width: 100%; height: 200px; object-fit: cover; }
.news-card .placeholder-img { width: 100%; height: 200px; background: #ddd; display: flex; align-items: center; justify-content: center; color: #666; }
.news-card .content { padding: 15px; }
.news-card h3 { margin-bottom: 10px; color: #2c3e50; }
.btn-read { display: inline-block; margin-top: 10px; color: #3498db; font-weight: bold; }

/* Eventos Sidebar */
.events-box { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border-top: 5px solid #204636; }
.events-box h3 { margin-bottom: 15px; font-size: 1.2rem; color: #204636; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.events-list { list-style: none; }
.events-list li { display: flex; gap: 15px; margin-bottom: 15px; padding-bottom: 15px; border-bottom: 1px dashed #eee; }
.events-list li:last-child { border-bottom: none; margin-bottom: 0; }
.event-date { background: #f4f4f4; padding: 5px 10px; border-radius: 5px; text-align: center; min-width: 60px; height: fit-content; }
.event-date .day { display: block; font-size: 1.2rem; font-weight: bold; color: #333; }
.event-date .month { display: block; font-size: 0.8rem; text-transform: uppercase; color: #666; }
.event-info h4 { margin: 0 0 5px 0; font-size: 1rem; color: #333; }
.event-info small { color: #777; font-size: 0.85rem; display: block; }

/* External News Sidebar */
.external-news-box { background: #fff; padding: 20px; border-radius: 8px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); border-top: 5px solid #c0392b; }
.external-news-box h3 { margin-bottom: 15px; font-size: 1.2rem; color: #c0392b; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.external-news-list { list-style: none; }
.external-news-list li { margin-bottom: 15px; padding-bottom: 10px; border-bottom: 1px solid #f0f0f0; }
.external-news-list li:last-child { border-bottom: none; margin-bottom: 0; }
.external-news-list a { display: block; text-decoration: none; }
.external-news-list a:hover .ext-title { color: #c0392b; text-decoration: underline; }
.ext-title { display: block; font-weight: 600; color: #333; margin-bottom: 5px; font-size: 0.95rem; }
.ext-date { display: block; font-size: 0.8rem; color: #888; }

/* Post Detail */
.post-detail article { background: #fff; padding: 30px; border-radius: 8px; }
.main-image { max-width: 100%; margin: 20px 0; border-radius: 4px; }
.btn-back { display: inline-block; margin-top: 20px; color: #666; }

/* Login */
.login-container { max-width: 400px; margin: 50px auto; background: #fff; padding: 30px; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; }
.form-group input, .form-group textarea { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 4px; }
button { background: #3498db; color: #fff; border: none; padding: 10px 20px; border-radius: 4px; cursor: pointer; font-size: 16px; }
button:hover { background: #2980b9; }
.alert { background: #ffdddd; color: #d8000c; padding: 10px; margin-bottom: 15px; border-radius: 4px; }

/* Footer */
footer { text-align: center; padding: 20px 0; margin-top: 40px; border-top: 1px solid #ddd; }
footer p { color: #666; }

/* Responsividade */
@media (max-width: 768px) {
    .content-wrapper { flex-direction: column; }
    .sidebar { width: 100%; margin-top: 30px; }
    .news-grid { grid-template-columns: 1fr; }
    header .container { flex-direction: column; gap: 10px; text-align: center; }
    header nav a { margin: 0 10px; }
}

/* Admin */
.admin-header { background: #204636; }
.admin-section { background: #fff; padding: 20px; border-radius: 8px; margin-bottom: 30px; }
.news-table { width: 100%; border-collapse: collapse; }
.news-table th, .news-table td { padding: 12px; text-align: left; border-bottom: 1px solid #eee; }