/*
Theme Name: QAS Blog Novo
Description: Tema WordPress completamente novo para QAS Consultoria - Layout simples lado a lado
Author: QAS Consultoria
Version: 1.0.0
*/

/* Reset básico */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f9f9f9;
}

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

/* Header idêntico ao site principal */
#main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

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

.logo img {
    height: 50px;
    width: auto;
}

.main-nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    font-size: 16px;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.main-nav a:hover,
.main-nav a.active {
    color: #2E7D32;
}

.dropdown {
    position: relative;
}

.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 10px 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.dropdown:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    padding: 0;
}

.submenu a {
    padding: 10px 20px;
    display: block;
    font-size: 14px;
}

.submenu a:hover {
    background: #f5f5f5;
}

.contact-btn .btn {
    background: #2E7D32;
    color: white;
    padding: 12px 24px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.contact-btn .btn:hover {
    background: #1B5E20;
}

.social-icons {
    margin-left: 15px;
}

.social-icons a {
    color: #333;
    font-size: 20px;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: #2E7D32;
}

.mobile-menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    margin-left: 15px;
}

/* Menu Mobile */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: white;
    z-index: 9999;
    transition: right 0.3s ease;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1);
    overflow-y: auto;
    display: none; /* Escondido por padrão */
}

.mobile-menu.active {
    right: 0;
    display: block; /* Mostrar quando ativo */
}

.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.5);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    display: none; /* Escondido por padrão */
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    display: block; /* Mostrar quando ativo */
}

.mobile-menu-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-logo img {
    height: 40px;
    width: auto;
}

.mobile-menu-close {
    font-size: 24px;
    cursor: pointer;
    color: #333;
}

.mobile-nav {
    padding: 20px 0;
}

.mobile-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-nav > ul > li {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-nav a {
    display: block;
    padding: 15px 20px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: background 0.3s ease;
}

.mobile-nav a:hover,
.mobile-nav a.active {
    background: #f5f5f5;
    color: #2E7D32;
}

.mobile-dropdown .dropdown-toggle {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.mobile-dropdown .dropdown-toggle i {
    transition: transform 0.3s ease;
}

.mobile-dropdown.active .dropdown-toggle i {
    transform: rotate(180deg);
}

.mobile-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #f9f9f9;
}

.mobile-dropdown.active .mobile-submenu {
    max-height: 500px;
}

.mobile-submenu a {
    padding: 12px 40px;
    font-size: 14px;
    color: #666;
}

.mobile-submenu a:hover {
    background: #f0f0f0;
    color: #2E7D32;
}

.mobile-contact-btn {
    padding: 20px;
    border-top: 1px solid #eee;
}

.mobile-contact-btn .btn {
    display: block;
    text-align: center;
    background: #2E7D32;
    color: white;
    padding: 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.3s ease;
}

.mobile-contact-btn .btn:hover {
    background: #1B5E20;
}

.mobile-social {
    padding: 20px;
    text-align: center;
    border-top: 1px solid #eee;
}

.mobile-social a {
    color: #333;
    font-size: 24px;
    transition: color 0.3s ease;
}

.mobile-social a:hover {
    color: #2E7D32;
}

/* Espaçamento após header */
main {
    margin-top: 0;
}

/* Hero Banner Section */
.hero-banner {
    position: relative;
    height: 400px;
    background: linear-gradient(135deg, #2E7D32 0%, #1B5E20 100%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 40px;
}

/* Imagem padrão caso não seja definida */
.hero-banner:not([style*="background-image"]) {
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><defs><linearGradient id="bg" x1="0%" y1="0%" x2="100%" y2="100%"><stop offset="0%" style="stop-color:%232E7D32;stop-opacity:0.9"/><stop offset="100%" style="stop-color:%231B5E20;stop-opacity:1"/></linearGradient><pattern id="grid" width="60" height="60" patternUnits="userSpaceOnUse"><path d="M 60 0 L 0 0 0 60" fill="none" stroke="rgba(255,255,255,0.05)" stroke-width="1"/></pattern></defs><rect width="1200" height="400" fill="url(%23bg)"/><rect width="1200" height="400" fill="url(%23grid)"/><g transform="translate(150,120)"><rect x="0" y="0" width="200" height="120" fill="rgba(255,255,255,0.1)" rx="15" stroke="rgba(255,255,255,0.2)" stroke-width="2"/><circle cx="100" cy="60" r="25" fill="rgba(255,255,255,0.9)"/><path d="M85,60 L95,70 L115,50" stroke="%232E7D32" stroke-width="3" fill="none"/></g><g transform="translate(400,140)"><rect x="0" y="0" width="120" height="80" fill="rgba(255,255,255,0.1)" rx="8"/><rect x="15" y="15" width="90" height="12" fill="rgba(255,255,255,0.3)" rx="2"/><rect x="15" y="35" width="70" height="8" fill="rgba(255,255,255,0.2)" rx="2"/><rect x="15" y="50" width="80" height="8" fill="rgba(255,255,255,0.2)" rx="2"/></g><g transform="translate(580,130)"><circle cx="40" cy="50" r="35" fill="rgba(255,255,255,0.1)" stroke="rgba(255,255,255,0.2)" stroke-width="2"/><path d="M25,50 a15,15 0 0,1 30,0" stroke="rgba(255,255,255,0.4)" stroke-width="2" fill="none"/><circle cx="32" cy="42" r="3" fill="rgba(255,255,255,0.6)"/><circle cx="48" cy="42" r="3" fill="rgba(255,255,255,0.6)"/></g><text x="750" y="180" font-family="Arial,sans-serif" font-size="28" fill="rgba(255,255,255,0.9)" font-weight="bold">Formação Empresarial</text><text x="750" y="210" font-family="Arial,sans-serif" font-size="18" fill="rgba(255,255,255,0.7)">Qualidade • Ambiente • Segurança</text></svg>');
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="rgba(255,255,255,0.03)" points="0,1000 1000,800 1000,1000"/><polygon fill="rgba(255,255,255,0.02)" points="0,600 1000,400 1000,600 0,800"/></svg>');
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(46, 125, 50, 0.3) 0%, rgba(27, 94, 32, 0.6) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    line-height: 1.2;
}

.hero-description {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.95;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Logo customizado */
.custom-logo {
    height: 50px;
    width: auto;
}

/* Grid de posts - LADO A LADO */
.posts-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 30px;
}

.post-card {
    flex: 0 0 calc(50% - 10px);
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    position: relative;
    height: 300px;
}

.post-card:hover {
    transform: translateY(-5px);
}

.post-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
    position: relative;
}

.post-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

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

/* Sobreposição escura na parte inferior */
.post-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.3), rgba(0,0,0,0.8));
    color: white;
    z-index: 2;
}

.post-title {
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 8px;
    color: white;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.post-excerpt {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    line-height: 1.4;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.post-meta {
    font-size: 12px;
    color: rgba(255,255,255,0.8);
    margin-bottom: 8px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.read-more {
    background: rgba(46, 125, 50, 0.9);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    display: inline-block;
    text-shadow: none;
    border: 1px solid rgba(255,255,255,0.3);
}

.read-more:hover {
    background: #2E7D32;
}

/* Paginação */
.pagination {
    text-align: center;
    margin: 40px 0;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 10px 15px;
    margin: 0 5px;
    background: white;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.pagination .current {
    background: #2E7D32;
    color: white;
    border-color: #2E7D32;
}

.pagination a:hover {
    background: #f5f5f5;
}

/* Footer */
.site-footer {
    background: #333;
    color: white;
    text-align: center;
    padding: 20px 0;
    margin-top: 50px;
}

/* Footer idêntico ao site principal */
footer {
    background: #1a1a1a;
    color: white;
    margin-top: 60px;
}

.footer-bottom {
    padding: 40px 0;
}

.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-column h3 {
    color: #2E7D32;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
}

.footer-logo {
    width: 60px;
    height: auto;
    margin-bottom: 15px;
}

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

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #2E7D32;
}

.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-info .info-item i {
    color: #2E7D32;
    font-size: 20px;
    margin-right: 15px;
    margin-top: 2px;
}

.contact-info h4 {
    color: white;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 600;
}

.contact-info p {
    color: #ccc;
    font-size: 14px;
    line-height: 1.5;
}

.copyright {
    background: #111;
    padding: 20px 0;
    text-align: center;
    border-top: 1px solid #333;
}

.copyright p {
    color: #999;
    font-size: 14px;
}

/* Mobile responsivo para header e footer */
@media (max-width: 768px) {
    #main-header .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }
    
    .main-nav {
        display: none;
    }
    
    .contact-btn {
        display: none;
    }
    
    .social-icons {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
    }
    
    /* Mostrar menu mobile apenas no mobile */
    .mobile-menu {
        display: block;
        right: -100%;
    }
    
    .mobile-menu.active {
        right: 0;
        display: block;
    }
    
    .mobile-menu-overlay {
        display: block;
    }
    
    .mobile-menu-overlay.active {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Posts responsivos mobile */
    .posts-grid {
        gap: 15px;
    }
    
    .post-card {
        flex: 0 0 100%;
        height: 250px;
    }
    
    .post-content {
        padding: 15px;
    }
    
    .post-title {
        font-size: 16px;
        margin-bottom: 6px;
    }
    
    .post-excerpt {
        font-size: 13px;
        margin-bottom: 8px;
    }
    
    .read-more {
        padding: 5px 10px;
        font-size: 11px;
    }
    
    /* Hero Banner Mobile */
    .hero-banner {
        height: 300px;
        margin-bottom: 30px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    .hero-description {
        font-size: 1rem;
        padding: 0 20px;
    }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-description {
        font-size: 1.1rem;
    }
}