/* ===== FLOTTRIX - MODERN TECH DESIGN ===== */

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1f2937;
    background-color: #ffffff;
}

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

/* ===== NAVIGATION ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(30, 64, 175, 0.1);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #1e40af;
    font-size: 28px;
    font-weight: 700;
    text-decoration: none;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-logo a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: #374151;
    font-weight: 500;
    font-size: 16px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #1e40af;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 120px 0 80px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::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 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="%231e40af" stroke-width="0.5" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    z-index: 1;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #0f172a;
}

.highlight {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.2rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(30, 64, 175, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(30, 64, 175, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #1e40af;
    border: 2px solid #1e40af;
}

.btn-secondary:hover {
    background: #1e40af;
    color: white;
    transform: translateY(-2px);
}

.hero-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: #64748b;
    font-weight: 500;
}

.hero-image {
    position: relative;
}

.hero-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.hero-img:hover {
    transform: scale(1.02);
}

/* ===== SECTIONS ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: #0f172a;
}

/* ===== FEATURED CATEGORIES ===== */
.featured-categories {
    padding: 80px 0;
    background: white;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.category-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(30, 64, 175, 0.15);
    border-color: #3b82f6;
}

.category-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.category-icon i {
    font-size: 24px;
    color: white;
}

.category-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #0f172a;
}

.category-card p {
    color: #64748b;
    line-height: 1.6;
}

/* ===== FEATURED ARTICLES ===== */
.featured-articles {
    padding: 80px 0;
    background: #f8fafc;
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

/* ===== NEWSLETTER ===== */
.newsletter {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 100%);
    color: white;
}

.newsletter-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.newsletter h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.newsletter p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    backdrop-filter: blur(10px);
}

.newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.2);
}

/* ===== FOOTER ===== */
.footer {
    background: #0f172a;
    color: white;
    padding: 60px 0 20px;
}

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

.footer-about h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-about p {
    color: #94a3b8;
    line-height: 1.6;
}

.footer-links h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #e2e8f0;
}

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

.footer-links li {
    margin-bottom: 0.5rem;
}

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

.footer-links a:hover {
    color: #3b82f6;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 40px;
    height: 40px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #94a3b8;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(15px);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 20px 0;
        gap: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-link {
        display: block;
        padding: 15px 20px;
        margin: 0;
        border-bottom: 1px solid rgba(0,0,0,0.05);
        font-size: 18px;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
    }

    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

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

    .newsletter-form {
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (min-width: 769px) {
    .nav-toggle {
        display: none;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-text {
    animation: fadeInUp 0.8s ease-out;
}

.hero-image {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

/* ===== CODE BLOCKS ===== */
code {
    font-family: 'JetBrains Mono', monospace;
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #1e40af;
}

pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1rem 0;
}

pre code {
    background: none;
    padding: 0;
    color: inherit;
}

/* ===== UTILITY CLASSES ===== */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

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

.hidden {
    display: none;
}

.visible {
    display: block;
}



/* ===== IMAGE RESPONSIVENESS FIXES ===== */

/* Global image responsiveness */
img {
    max-width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
}

/* Article images */
.article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Category card images */
.category-card img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
}

/* Hero images */
.hero-img {
    max-width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

/* Author images */
.author-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
}

/* Featured images in articles */
.featured-image {
    width: 100%;
    max-width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 12px;
    margin: 2rem 0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

/* Responsive breakpoints for images */
@media (max-width: 768px) {
    .category-card img {
        height: 180px;
    }
    
    .featured-image {
        height: 200px;
        margin: 1.5rem 0;
    }
    
    .hero-img {
        border-radius: 12px;
    }
    
    .author-image img {
        width: 60px;
        height: 60px;
    }
}

@media (max-width: 480px) {
    .category-card img {
        height: 150px;
    }
    
    .featured-image {
        height: 180px;
        margin: 1rem 0;
    }
    
    .article-content img {
        margin: 1rem 0;
        border-radius: 6px;
    }
    
    .author-image img {
        width: 50px;
        height: 50px;
    }
}

/* Container overflow fixes */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow-x: hidden;
}

.article-content {
    max-width: 100%;
    overflow-x: hidden;
}

.category-card {
    max-width: 100%;
    overflow: hidden;
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* Fix for any oversized elements */
* {
    max-width: 100%;
    box-sizing: border-box;
}

/* Specific fixes for common image containers */
.hero-container,
.section-container,
.content-container {
    max-width: 100%;
    overflow: hidden;
}

/* Image gallery responsiveness */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.image-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.image-gallery img:hover {
    transform: scale(1.05);
}

@media (max-width: 768px) {
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    
    .image-gallery img {
        height: 150px;
    }
}

@media (max-width: 480px) {
    .image-gallery {
        grid-template-columns: 1fr;
    }
    
    .image-gallery img {
        height: 180px;
    }
}


/* ===== SPECIFIC IMAGE CLASSES ===== */

/* Category images */
.category-img {
    max-width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.category-img:hover {
    transform: scale(1.05);
}

/* Author images */
.author-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #e5e7eb;
    transition: transform 0.3s ease;
}

.author-img:hover {
    transform: scale(1.1);
}

/* Article images */
.article-img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.article-img:hover {
    transform: scale(1.02);
}

/* Image containers */
.image-container {
    max-width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin: 1rem 0;
}

/* Responsive adjustments for specific image classes */
@media (max-width: 768px) {
    .category-img {
        height: 180px;
    }
    
    .author-img {
        width: 60px;
        height: 60px;
    }
    
    .article-img {
        margin: 1rem 0;
        border-radius: 6px;
    }
}

@media (max-width: 480px) {
    .category-img {
        height: 150px;
    }
    
    .author-img {
        width: 50px;
        height: 50px;
    }
    
    .article-img {
        margin: 0.8rem 0;
    }
}

/* Fix for images in grid layouts */
.category-grid .category-card img,
.category-grid .category-card .category-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Fix for hero section images */
.hero-section .hero-img {
    max-width: 100%;
    height: auto;
    min-height: 300px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .hero-section .hero-img {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .hero-section .hero-img {
        min-height: 180px;
    }
}

/* Prevent any image from breaking layout */
img[src*="images/"] {
    max-width: 100% !important;
    height: auto !important;
    box-sizing: border-box !important;
}

/* Additional safety for large images */
.container img,
.article-content img,
.category-card img,
.hero-container img {
    max-width: 100% !important;
    height: auto !important;
}

/* All Articles Section */
.all-articles-section {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 4rem 0;
    margin-top: 3rem;
}

.all-articles-section .section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 3rem;
    position: relative;
}

.all-articles-section .section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    border-radius: 2px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.article-card {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px -3px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.article-title {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

.article-title a {
    color: #1e293b;
    text-decoration: none;
    transition: color 0.3s ease;
}

.article-title a:hover {
    color: #3b82f6;
}

.article-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #64748b;
}

.article-date,
.article-read-time {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Responsividade */
@media (max-width: 768px) {
    .articles-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .all-articles-section {
        padding: 2rem 0;
    }
    
    .all-articles-section .section-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .article-card {
        padding: 1rem;
    }
    
    .article-meta {
        flex-direction: column;
        gap: 0.5rem;
    }
}
