/*
Theme Name: ECO BIOMAS
Theme URI: https://ecobiomas.com
Author: Seu Nome
Author URI: https://ecobiomas.com
Description: Tema personalizado para ECO BIOMAS - Portal de notícias sobre biomas brasileiros
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ecobiomas
*/

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap');

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

body {
    font-family: "Open Sans", sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

a {
    text-decoration: none;
    color: inherit;
}

.mt-3 {
	margin-top: 24px;
}

/* Container */

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

/* Header */

.site-header {
    border-bottom: 4px solid #4CAF50;
    padding: 15px 0;
	position: sticky;
    top: 0;
    background: white;
    z-index: 1000;
}

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

.site-logo img {
    height: 50px;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

.main-navigation a {
    color: #333;
	font-family: "Barlow Condensed", sans-serif;
    font-weight: 500;
    font-size: 20px;
    text-transform: uppercase;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #4CAF50;
}

.current-menu-item a {
    color: #157F05;
}

.header-search {
    display: flex;
    gap: 10px;
}

.search-form {
	border: 1px solid #ddd;
    border-radius: 4px;
}

.search-input {
    padding: 8px 12px;
    border: none;
    width: 180px;
	font-size: 14px;
}

.search-button {
    padding: 8px 12px;
    background-color: transparent;
    border: none;
    cursor: pointer;
}

/* Banner CTA */
.cta-banner {
    background-color: #F5E6D3;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cta-banner h2 {
    color: #2C5282;
    font-size: 28px;
}

.cta-banner .highlight {
    font-weight: bold;
}

/* 
 * Últimas Notícias 
 */

.ultimas-noticias {
    margin: 24px 0;
}

.section-title {
	display: inline-block;
	margin-bottom: 8px;
	padding: 4px 8px;
	background-color: #4CAF50;
	color: white;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 18px;
	font-weight: 500;
}

.featured-grid {
    display: flex;
    gap: 24px;
}

.featured-post {
  position: relative;
	width: 600px;
	height: 400px;
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.featured-post img {
    width: 100%;
    height: 400px;
    object-fit: cover;
}

.featured-content {
	position: absolute;
	bottom: 24px;
	left: 24px;
	padding-right: 24px;
}

.featured-content h3 {
    font-size: 24px;
	line-height: 1.3;
	color: white;
	text-shadow: 0 0 7px rgba(0, 0, 0, .8);
}

.featured-content .post-date {
    font-size: 14px;
	color: white;
	text-shadow: 0 0 4px rgba(0, 0, 0, .5);
}

.featured-secondary {
	flex: 1;
  display: grid;
	grid-template-columns: repeat(2, 1fr);
  gap: 16px 24px;
}

.secondary-post img {
    aspect-ratio: 2 / 1;
}

.secondary-content {
    color: black;
}

.secondary-content h3 {
  font-size: 16px;
	line-height: 1.2;
	color: #444;
	/* Conter a altura no topo */
	overflow: hidden;
  max-height: 60px;
  text-overflow: ellipsis;
}

.secondary-content .post-date {
    font-size: 14px;
}

/* Grid de Categorias */

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.category-section h3 {
    background-color: #4CAF50;
    color: white;
    padding: 8px;
    display: inline-block;
    margin-bottom: 8px;
	font-family: "Barlow Condensed", sans-serif;
    font-size: 18px;
	font-weight: 500;
	line-height: 1;
}

.category-section.cerrado h3 {
    background-color: #4CAF50;
}

.category-section.mata-atlantica h3 {
    background-color: #4CAF50;
}

.post-item {
	display: flex;
	flex-direction: column;
	margin-bottom: 24px;

	.post-thumbnail {
		width: 266px;
		height: 150px;
		overflow: hidden;

		img {
			object-fit: cover;
			height: 100%;
			width: 100%;
		}
	}

	.post-info {
  	flex: 1;
		min-height: 62px;
		margin-top: 8px;
	}

	/* &:not(:first-child) {
    flex-direction: row;
    gap: 12px;

		.post-thumbnail {
			width: 100px;
			height: 100px;

			img {
				object-fit: cover;
    		height: 100%;
    		width: 100%;
			}
		}

		.post-info {
    	flex: 1;

			h4 {
				font-size: 14px;
				max-height: 92px;
			}
		}
	} */
}

.post-info h4 {
  font-size: 16px;
  line-height: 1.3;
	/* Prevenir texto grande demais */
	max-height: 83px;
  overflow: hidden;
}

.post-date {
    font-size: 14px;
    color: #666;
}

/* Sidebar com Anúncio */

.content-wrapper {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
	margin-bottom: 24px;
}

.sidebar-ad {
    text-align: center;
    height: fit-content;
    position: sticky;
    top: 120px;
}

.sidebar-ad h3 {
    color: #2C5282;
    margin-bottom: 10px;
}

.ad-placeholder {
    width: 100%;
    height: 600px;
    background-color: #E8D5BE;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #2C5282;
    font-size: 18px;
    font-weight: bold;
}

/* Single Post */

.single-post-header {
    margin: 30px 0;
}

.single-post-title {
    font-size: 32px;
		line-height: 1.3;
    margin-bottom: 10px;
}

.post-meta {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 20px;
}

.post-category {
    background-color: #4CAF50;
    color: white;
    padding: 5px 12px;
    border-radius: 3px;
    font-size: 14px;
}

.featured-image {
	& img {
    width: 100%;
    height: auto;
    border-radius: 5px;
		object-fit: cover;
    aspect-ratio: 5 / 3;
	}

	& .wp-caption-text {
    font-size: 12px;
	}
}

.post-content {
	& p {
		margin-bottom: 16px;
		font-size: 18px;
		line-height: 1.6;
	}

	& .wp-caption-text {
		margin-bottom: 24px;
		font-size: 14px;
    font-style: italic;
	}
}

figcaption.wp-element-caption {
    font-size: 14px;
    font-style: italic;
}

.post-navigation {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
    border-top: solid 1px #eee;
    padding-top: 8px;
    margin-bottom: 40px;

		.nav-next {
    	text-align: right;
		}
}

/* Category Page */

.category-header {
    margin-top: 24px;
}

.category-title {
    color: #157F05;
    font-size: 32px;
		line-height: 1;
    margin-bottom: 24px;
}

.category-posts-list {
    display: grid;
    gap: 24px;
}

.category-post-item {
    display: flex;
    gap: 20px;
    padding-bottom: 25px;

		&:not(:last-child) {
    	border-bottom: 1px solid #eee;
		}

		& .post-thumbnail {
				width: 200px;
				overflow: hidden;

				& img {
						object-fit: cover;
				} 
		}

		.post-info {
			flex: 1;

			& h3 {
				font-size: 20px;
			}
		}
}

ul.page-numbers {
    list-style: none;
    display: flex;
    justify-content: flex-end;

		& li {
				padding: 0 8px;
		}

		& a.page-numbers {
				color: blue;
		}

		& a.next.page-numbers {
				margin-left: 24px;
		}
}

/* Footer */

.site-footer {
    background-color: #fff;
    border-top: 4px solid #4CAF50;
    padding: 24px 0;
    margin-top: 16px;
}

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

.footer-logo {
	width: 180px;
}

.footer-logo img {
    height: 60px;
	margin-left: 12px;
}

.footer-tagline {
    color: #666;
	font-family: "Barlow Condensed", sans-serif;
    margin-top: 4px;
    font-size: 16px;
    text-align: center;
	line-height: 1.2;
}

.footer-contact {
	text-align: center;
}

.footer-social {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.social-icon.instagram {
    background: #FF00FB;
}

.social-icon.facebook {
    background-color: #0144CB;
}

.social-icon.twitter {
    background-color: #000;
}

.social-icon.whatsapp {
    background-color: #32BD00;
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        order: 3;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }
    
    .main-navigation li {
        border-top: 1px solid #eee;
        padding: 15px 0;
    }
    
    .featured-grid,
    .category-grid,
    .content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .featured-post img,
    .secondary-post img {
        height: 200px;
    }
    
    .category-post-item {
        flex-direction: column;
    }
    
    .category-post-item .post-thumbnail {
        width: 100%;
        height: 200px;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .sidebar-ad {
        position: static;
    }
}