/*
Theme Name: Trelle Tech Blog
Description: WordPress blog theme matching the Trelle Tech static site design. Optimized for enterprise technology content, SEO, and conversions.
Version: 2.0
Author: Trelle Tech
Text Domain: trelle-tech-blog
Requires at least: 6.0
Tested up to: 6.8.1
Requires PHP: 8.0
*/

/* =============================================================================
   CSS VARIABLES - Matching static site
   ============================================================================= */
   :root {
    --primary-blue: #3b82f6;
    --primary-blue-dark: #2563eb;
    --secondary-green: #10b981;
    --accent-green: #059669;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --white: #ffffff;
    --error: #ef4444;
    --success: #10b981;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
}

/* =============================================================================
   RESET & BASE STYLES
   ============================================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* =============================================================================
   HEADER & NAVIGATION - Matching static site exactly
   ============================================================================= */
   header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #e5e7eb;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
    height: 70px;
}
.logo-image {
    transition: filter 0.3s ease;
}

.logo-image.scrolled {
    filter: grayscale(100%);
}
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: #3b82f6;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 18px;
    margin-right: 10px;
}

.logo-text {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: #3b82f6;
    background: #f1f5f9;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    color: #374151;
}

.mobile-nav {
    display: none;
    flex-direction: column;
    gap: 0;
    background: white;
    border-top: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav .nav-link {
    padding: 16px 20px;
    border-bottom: 1px solid #f3f4f6;
    font-weight: 500;
    text-decoration: none;
    color: #6b7280;
    transition: all 0.3s ease;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active {
    background: #f8fafc;
    color: #3b82f6;
}

/* =============================================================================
   BREADCRUMBS
   ============================================================================= */
.breadcrumbs-wrapper {
    margin-top: 70px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}

.breadcrumbs {
    font-size: 0.9rem;
    color: var(--gray-600);
}

.breadcrumbs a {
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumbs a:hover {
    color: var(--primary-blue-dark);
}

/* =============================================================================
   MAIN CONTENT
   ============================================================================= */
main {
    margin-top: 70px;
    flex: 1;
}

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

/* =============================================================================
   BLOG HEADER SECTION
   ============================================================================= */
.blog-header {
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    padding: 80px 0 60px 0;
    position: relative;
    overflow: hidden;
}

.blog-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.02), rgba(16, 185, 129, 0.02));
    z-index: 1;
}

.blog-header .container {
    position: relative;
    z-index: 2;
    text-align: center;
}

.blog-header h1 {
    font-size: 3.8rem;
    font-weight: 900;
    color: #1f2937;
    line-height: 1.05;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.blog-header p {
    font-size: 1.3rem;
    color: #374151;
    margin-bottom: 40px;
    font-weight: 500;
    line-height: 1.5;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* =============================================================================
   BLOG POSTS GRID
   ============================================================================= */
.blog-posts {
    padding: 80px 0;
    background: #ffffff;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 32px;
    margin-bottom: 3rem;
}

.post-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.post-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    transform: translateY(-4px);
    text-decoration: none;
    color: inherit;
}

.post-featured-image {
    width: 100%;
    height: 200px;
    position: relative;
    overflow: hidden;
    background: var(--gray-100);
}

.post-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-featured-image img {
    transform: scale(1.05);
}

.post-placeholder-image {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f1f5f9, #f8fafc);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    font-size: 2rem;
    position: relative;
    border: 1px solid #e2e8f0;
}

.post-placeholder-image::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: #e2e8f0;
    border-radius: 8px;
    opacity: 0.5;
}

.post-placeholder-image::after {
    content: '📰';
    font-size: 1.5rem;
    position: relative;
    z-index: 1;
}

.post-content {
    padding: 32px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 20px;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.post-category {
    background: #3b82f6;
    color: white;
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
}

.post-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 12px;
    line-height: 1.3;
    flex-grow: 1;
}

.post-excerpt {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 20px;
}

.read-more {
    color: #3b82f6;
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    margin-top: auto;
}

.read-more:hover {
    transform: translateX(5px);
}

/* =============================================================================
   SINGLE POST STYLES
   ============================================================================= */
   .single-post {
    padding: 80px 0 0;
    background: var(--white);
    margin-bottom: 0;
    position: relative;
    z-index: 1;
}

.post-header {
    max-width: 800px;
    margin: 0 auto 3rem;
    text-align: center;
    position: relative;
    z-index: 1;
}

.post-header .post-category {
    margin-bottom: 1rem;
    display: inline-block;
}

.post-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.post-header .post-meta {
    justify-content: center;
    margin-bottom: 2rem;
}

.post-body {
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    font-size: 1.1rem;
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius-lg);
    margin-bottom: 0;
    padding-bottom: 2rem;
}

.post-body h2,
.post-body h3,
.post-body h4 {
    color: var(--gray-900);
    font-weight: 600;
    margin: 2rem 0 1rem;
}

.post-body h2 {
    font-size: 2rem;
}

.post-body h3 {
    font-size: 1.5rem;
}

.post-body p {
    margin-bottom: 1.5rem;
}

.post-body ul,
.post-body ol {
    margin-bottom: 1.5rem;
    padding-left: 2rem;
}

.post-body li {
    margin-bottom: 0.5rem;
}

.post-body blockquote {
    border-left: 4px solid var(--primary-blue);
    padding-left: 2rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--gray-600);
}

.post-body code {
    background: var(--gray-100);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
}

.post-body pre {
    background: var(--gray-900);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    overflow-x: auto;
    margin: 2rem 0;
}

.post-body pre code {
    background: none;
    padding: 0;
}

/* =============================================================================
   POST NAVIGATION
   ============================================================================= */
.post-navigation {
    margin: 3rem 0 0 0 !important;
    padding: 2rem 0 0 0 !important;
    border-top: 1px solid var(--gray-200);
    background: transparent !important;
}

.post-navigation div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.post-navigation a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.post-navigation a:hover {
    color: var(--primary-blue-dark);
}

/* =============================================================================
   PAGINATION
   ============================================================================= */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.page-numbers {
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: var(--border-radius);
    color: var(--gray-600);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.page-numbers:hover,
.page-numbers.current {
    background: var(--primary-blue);
    color: white;
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* =============================================================================
   SEARCH FORM
   ============================================================================= */
.search-form {
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    font-size: 1rem;
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background: var(--primary-blue);
    color: white;
    border: none;
    border-radius: var(--border-radius);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: var(--primary-blue-dark);
}

/* =============================================================================
   CTA SECTIONS - From static site
   ============================================================================= */
.blog-cta-section {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin: 80px 0 0 0;
}

.blog-cta-section h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.blog-cta-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.blog-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.btn-white {
    background: white;
    color: #3b82f6;
    padding: 16px 32px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-white:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    color: #3b82f6;
    text-decoration: none;
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 14px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline:hover {
    background: white;
    color: #3b82f6;
    text-decoration: none;
}

/* =============================================================================
   FOOTER - Matching static site exactly
   ============================================================================= */
footer {
    background: #1f2937 !important;
    color: white;
    padding: 60px 20px 20px;
    margin-top: 0 !important;
    position: relative;
    flex-shrink: 0;
}

footer * {
    background: transparent !important;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
    background: transparent !important;
}

.footer-section {
    background: transparent !important;
}

.footer-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white !important;
    background: transparent !important;
}

.footer-section p {
    color: #9ca3af !important;
    line-height: 1.6;
    margin-bottom: 16px;
    font-size: 0.9rem;
    background: transparent !important;
}

.footer-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #d1d5db !important;
    font-size: 0.9rem;
    background: transparent !important;
}

.footer-services {
    list-style: none;
    background: transparent !important;
}

.footer-services li {
    margin-bottom: 10px;
    background: transparent !important;
}

.footer-services a {
    color: #9ca3af !important;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    background: transparent !important;
}

.footer-services a:hover {
    color: #10b981 !important;
}

.emergency-section {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.emergency-title {
    color: #f87171 !important;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.emergency-number {
    color: white !important;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid #374151;
    padding-top: 20px;
    text-align: center;
    color: #9ca3af !important;
    font-size: 0.9rem;
    background: transparent !important;
}

/* =============================================================================
   FLOATING ELEMENTS
   ============================================================================= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    font-size: 24px;
}

.whatsapp-float:hover {
    background: #128C7E;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.6);
    color: white;
    text-decoration: none;
}

.whatsapp-float::before {
    content: "💬";
    font-size: 1.3rem;
}

.scroll-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    background: #3b82f6;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
    z-index: 1000;
    border: none;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
    font-size: 18px;
    font-weight: bold;
}

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

.scroll-to-top:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
}

/* =============================================================================
   MOBILE RESPONSIVE
   ============================================================================= */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }

    .blog-header h1 {
        font-size: 2.6rem !important;
        line-height: 1.1;
    }

    .blog-header p {
        font-size: 1.15rem !important;
    }

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

    .post-content {
        padding: 24px;
    }

    .blog-cta-section {
        padding: 60px 0;
    }
    
    .blog-cta-section h2 {
        font-size: 2rem;
    }

    .blog-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn-white,
    .btn-outline {
        width: 100%;
        max-width: 300px;
        text-align: center;
        justify-content: center;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .single-post {
        padding: 60px 0 0;
    }

    .post-body {
        padding: 1.5rem;
    }

    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
        font-size: 22px;
    }

    .scroll-to-top {
        bottom: 85px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .blog-header {
        padding: 60px 0 40px 0;
    }

    .blog-header h1 {
        font-size: 2.2rem !important;
    }

    .blog-posts {
        padding: 60px 0;
    }

    .post-content {
        padding: 20px;
    }

    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 20px;
    }

    .scroll-to-top {
        width: 42px;
        height: 42px;
        font-size: 14px;
    }
}

/* =============================================================================
   UTILITIES & HELPERS
   ============================================================================= */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.mt-4 {
    margin-top: 2rem;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
/* Botões de compartilhamento melhorados */
.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.share-twitter:hover {
    background: #1991db !important;
}

.share-linkedin:hover {
    background: #005885 !important;
}

.copy-link:hover {
    background: var(--gray-700) !important;
}

@media (max-width: 768px) {
    .post-meta-enhanced > div:first-child {
        flex-direction: column !important;
        gap: 1rem !important;
        text-align: center;
    }
    
    .share-btn {
        flex: 1;
        justify-content: center !important;
        min-width: 140px;
    }
}