/* Reset e Estilos Básicos */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

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

/* Header */
.site-header {
    background: linear-gradient(135deg, #0f2557 0%, #1a4d8f 100%);
    color: white;
    padding: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.logo a {
    color: white;
    text-decoration: none;
    transition: transform 0.3s ease;
    display: inline-block;
}

.logo a:hover {
    transform: translateY(-2px);
}

.logo h1 {
    font-size: 1.3rem;
    margin-bottom: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    line-height: 1.2;
}

.logo .tagline {
    font-size: 0.75rem;
    color: #b8d4f1;
    font-weight: 400;
    letter-spacing: 0.5px;
    line-height: 1.2;
    margin-top: 0.1rem;
}

/* Navigation */
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 0.3rem;
    align-items: center;
}

.main-nav li {
    position: relative;
}

.main-nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 0.7rem;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    font-size: 0.85rem;
    display: inline-block;
    letter-spacing: 0.2px;
    position: relative;
    overflow: hidden;
}

.main-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
}

.main-nav a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.main-nav a:hover::before {
    width: 80%;
}

/* Dropdown Submenu */
.main-nav .dropdown {
    position: relative;
}

/* Área invisível para manter hover entre menu e dropdown */
.main-nav .dropdown::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    height: 10px;
    display: none;
}

.main-nav .dropdown:hover::after {
    display: block;
}

.main-nav .dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: white;
    min-width: 220px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
}

.main-nav .dropdown:hover .dropdown-menu,
.main-nav .dropdown-menu:hover {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
    transition-delay: 0s;
}

.main-nav .dropdown-menu li {
    list-style: none;
}

.main-nav .dropdown-menu a {
    color: #2c3e50;
    padding: 0.75rem 1.25rem;
    display: block;
    border-radius: 0;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.main-nav .dropdown-menu a::before {
    display: none;
}

.main-nav .dropdown-menu a:hover {
    background: #f8f9fa;
    color: #1a4d8f;
    transform: translateX(5px);
    box-shadow: none;
}

.main-nav .dropdown > a::after {
    content: ' ▼';
    font-size: 0.7rem;
    margin-left: 0.3rem;
    opacity: 0.7;
}

/* Search Box */
.search-box form {
    display: flex;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 24px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.search-box form:focus-within {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.search-box input {
    padding: 0.4rem 0.8rem;
    border: none;
    outline: none;
    min-width: 120px;
    font-size: 0.85rem;
    background-color: transparent;
    color: white;
    font-weight: 500;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
    font-weight: 400;
}

.search-box button {
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.search-box button:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.05);
}

/* Main Content */
.main-content {
    padding: 2rem 0;
    background-color: white;
    min-height: 70vh;
}

/* Home Page */
.featured-section, .recent-section {
    margin-bottom: 3rem;
}

.featured-section h2, .recent-section h2, .all-articles-section h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: #2c3e50;
    border-bottom: 3px solid #1a4d8f;
    padding-bottom: 0.5rem;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.article-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.article-image img {
    width: 100%;
    height: auto;
    object-fit: contain;
    max-height: 250px;
    background: #f8f9fa;
}

.article-content {
    padding: 1.5rem;
}

.article-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: #7f8c8d;
    align-items: center;
}

.article-meta .category a {
    color: #1a4d8f;
    text-decoration: none;
}

.article-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.article-card h3 a {
    color: #2c3e50;
    text-decoration: none;
}

.article-card h3 a:hover {
    color: #1a4d8f;
}

.article-intro {
    color: #555;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.article-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.tag {
    background-color: #ecf0f1;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    color: #555;
    display: inline-block;
}

.tag-link {
    text-decoration: none;
    transition: all 0.3s ease;
}

.tag-link:hover {
    background-color: #1a4d8f;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 2px 6px rgba(26, 77, 143, 0.3);
}

.read-more {
    color: #1a4d8f;
    text-decoration: none;
    font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
}

/* Articles List */
.articles-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.article-item {
    display: flex;
    gap: 1.5rem;
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.article-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-left-color: #1a4d8f;
    transform: translateX(5px);
}

.article-thumbnail img {
    width: 150px;
    height: 100px;
    object-fit: cover;
    border-radius: 4px;
}

.article-info {
    flex: 1;
}

.category-label a {
    color: #1a4d8f;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.article-info h3,
.article-info h4 {
    margin: 0.5rem 0;
    line-height: 1.4;
}

.article-info h3 a,
.article-info h4 a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.3rem;
    font-weight: 600;
    transition: color 0.3s ease;
    display: inline-block;
}

.article-info h3 a:hover,
.article-info h4 a:hover {
    color: #1a4d8f;
    text-decoration: none;
}

.article-meta-small {
    font-size: 0.85rem;
    color: #7f8c8d;
    margin-top: 0.5rem;
}

/* Search Page Specific Styles */
.search-page {
    padding: 2rem 0;
}

.search-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #1a4d8f;
}

.search-header h1 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.search-count {
    color: #7f8c8d;
    font-size: 1rem;
    margin-top: 0.5rem;
}

.article-intro-search {
    color: #555;
    line-height: 1.6;
    margin: 0.75rem 0;
}

.no-results,
.empty-search {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 2rem 0;
}

.no-results p,
.empty-search p {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin: 0.5rem 0;
}

/* Article Page */
.breadcrumb {
    color: #7f8c8d;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: #1a4d8f;
    text-decoration: none;
}

.article-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.article-tags-full {
    margin-top: 1rem;
}

/* Estilos de .article-body movidos para typography.css */

/* Related Articles */
.related-articles {
    margin-top: 4rem;
    padding: 2.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.related-articles h3 {
    font-size: 1.75rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid #1a4d8f;
    position: relative;
    font-weight: 700;
}

.related-articles h3::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, #1a4d8f, #0f2557);
    border-radius: 2px;
}

.related-articles .article-card {
    background: white;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.related-articles .article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.12);
    border-color: #1a4d8f;
}

.related-articles .article-content-small {
    padding: 1.5rem;
}

.related-articles .article-content-small h4 {
    font-size: 1.1rem;
    line-height: 1.5;
    margin: 0;
}

.related-articles .article-content-small h4 a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.related-articles .article-content-small h4 a:hover {
    color: #1a4d8f;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-top: 2rem;
}

.pagination a {
    color: #1a4d8f;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border: 1px solid #1a4d8f;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #1a4d8f;
    color: white;
}

/* Sidebar - Removido */

/* Footer */
.site-footer {
    background: linear-gradient(135deg, #0f2557 0%, #1a4d8f 100%);
    color: white;
    padding: 0.5rem 0;
    text-align: center;
    margin-top: 0;
    box-shadow: none;
}

.site-footer a {
    color: #74b9ff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.site-footer p {
    margin: 0.3rem 0;
    font-size: 0.8rem;
}

/* Error Pages */
.error-page {
    text-align: center;
    padding: 4rem 2rem;
}

.error-page h1 {
    font-size: 3rem;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.button {
    display: inline-block;
    background-color: #1a4d8f;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 1rem;
}

.button:hover {
    background-color: #0f2557;
}

/* Contact Page */
.contact-page {
    padding: 3rem 0;
}

.contact-content {
    max-width: 800px;
    margin: 0 auto;
}

.contact-message {
    background: white;
    padding: 2.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 3rem;
    text-align: center;
    border-top: 3px solid #1a4d8f;
}

.message-icon {
    color: #1a4d8f;
    margin-bottom: 1.5rem;
    display: inline-block;
}

.main-message {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin: 1.5rem 0;
}

.main-message strong {
    color: #1a4d8f;
    font-weight: 600;
    display: block;
    margin-bottom: 0.5rem;
}

.contact-email {
    margin: 2rem 0;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 6px;
}

.contact-email span {
    display: block;
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.75rem;
}

.email-link {
    display: inline-block;
    color: #1a4d8f;
    font-weight: 600;
    font-size: 1.2rem;
    text-decoration: none;
    border-bottom: 2px solid #1a4d8f;
    padding-bottom: 2px;
    transition: all 0.3s ease;
}

.email-link:hover {
    color: #0f2557;
    border-bottom-color: #0f2557;
}

.thanks {
    font-size: 0.95rem;
    color: #7f8c8d;
    margin-top: 1.5rem;
}

/* Services Section */
.services-info {
    margin-top: 3rem;
}

.services-info h2 {
    font-size: 1.8rem;
    color: #2c3e50;
    margin-bottom: 2rem;
    text-align: center;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
}

.service-item {
    background: white;
    padding: 1.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    text-align: center;
}

.service-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.service-item h3 {
    font-size: 1.2rem;
    color: #2c3e50;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.service-item p {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

/* Tag Page */
.tag-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 3px solid #1a4d8f;
}

.tag-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

.tag-info {
    color: #7f8c8d;
    font-size: 1.1rem;
    margin-top: 0.5rem;
}

.tag-info strong {
    color: #1a4d8f;
    font-size: 1.3rem;
}

/* Responsive */
@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0.5rem;
    }

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

    .article-item {
        flex-direction: column;
    }

    .article-thumbnail img {
        width: 100%;
        height: 200px;
    }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #0f2557 0%, #1a4d8f 100%);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: linear-gradient(135deg, #1a4d8f 0%, #0f2557 100%);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.back-to-top:active {
    transform: translateY(-1px);
}

@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Menu Styles */
@media (max-width: 968px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: linear-gradient(180deg, #0f2557 0%, #1a4d8f 100%);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    }

    .main-nav.active {
        right: 0;
    }

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

    .main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-nav a {
        display: block;
        padding: 1rem;
        width: 100%;
        text-align: left;
        border-radius: 0;
    }

    .main-nav .dropdown-menu {
        position: static;
        display: none;
        width: 100%;
        background: rgba(0, 0, 0, 0.2);
        box-shadow: none;
        border-radius: 0;
        padding: 0;
        opacity: 1;
        transform: none;
    }

    .main-nav .dropdown.active .dropdown-menu {
        display: block;
    }

    .main-nav .dropdown-menu a {
        padding-left: 2rem;
        font-size: 0.9rem;
    }

    .search-box {
        width: 100%;
        margin-top: 1rem;
    }

    .search-box input {
        min-width: 100%;
    }

    /* Overlay when menu is open */
    .main-nav.active::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 280px;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: -1;
    }

    .site-header .container {
        justify-content: space-between;
    }
}
