/* Layout Fixes - Melhorias de Qualidade */

/* Correções Gerais de Layout */
* {
    box-sizing: border-box;
}

body {
    overflow-x: hidden;
}

/* Melhorias no Header */
.header-modern {
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Melhorias no Hero Section */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.hero-content {
    align-items: center;
    justify-content: center;
}

/* Melhorias na Seção About */
.about-section-modern {
    padding: 100px 0;
    position: relative;
}

.about-container-modern {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.about-content-grid {
    align-items: flex-start;
    gap: 4rem;
}

/* Melhorias nos Botões */
.btn-primary,
.btn-secondary {
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    white-space: nowrap;
}

.btn-primary:focus,
.btn-secondary:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Melhorias na Tipografia */
.section-title {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 1rem;
}

.section-description {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 3rem;
}

/* Melhorias no Espaçamento */
.services-section,
.projects-section,
.contact-section {
    padding: 100px 0;
}

.services-container,
.projects-container,
.contact-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Melhorias na Responsividade */
@media (max-width: 1024px) {
    .about-content-grid {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .about-text-column {
        padding-right: 0;
    }
    
    .tech-stack-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .hero-section,
    .about-section-modern,
    .services-section,
    .projects-section,
    .contact-section {
        padding: 80px 0 60px;
    }
    
    .section-title {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .section-description {
        font-size: 1rem;
        padding: 0 10px;
    }
    
    .tech-stack-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .hero-container,
    .about-container-modern,
    .services-container,
    .projects-container,
    .contact-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .hero-section,
    .about-section-modern,
    .services-section,
    .projects-section,
    .contact-section {
        padding: 60px 0 40px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .hero-container,
    .about-container-modern,
    .services-container,
    .projects-container,
    .contact-container {
        padding: 0 10px;
    }
}

/* Melhorias na Acessibilidade */
.btn-primary:focus-visible,
.btn-secondary:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Melhorias na Performance */
.profile-image,
.project-image img {
    will-change: transform;
}

/* Correções de Z-index */
.header-modern {
    z-index: 1000;
}

.hero-bg-overlay {
    z-index: 1;
}

.hero-content {
    z-index: 2;
}

/* Melhorias no Footer */
.footer-modern {
    background: var(--secondary);
    color: white;
    padding: 60px 0 30px;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Correções de Overflow */
.hero-section,
.about-section-modern,
.services-section,
.projects-section,
.contact-section {
    overflow: hidden;
}

/* Melhorias na Consistência Visual */
.service-card,
.project-card,
.feature-item,
.tech-category-card {
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.service-card:hover,
.project-card:hover,
.feature-item:hover,
.tech-category-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Melhorias no Dark Mode */
[data-theme="dark"] .service-card,
[data-theme="dark"] .project-card,
[data-theme="dark"] .feature-item,
[data-theme="dark"] .tech-category-card {
    background: var(--gray-100);
    border-color: var(--gray-200);
}

[data-theme="dark"] .service-card:hover,
[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .feature-item:hover,
[data-theme="dark"] .tech-category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}


/* Schedule Section Styles */
.schedule-section {
    padding: 100px 0;
    background: var(--gray-50);
    position: relative;
    overflow: hidden;
}

.schedule-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.schedule-content {
    margin-top: 3rem;
}

.schedule-benefits {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 3rem;
}

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--gray-200);
    transition: all 0.3s ease;
}

.benefit-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
    border-color: var(--primary);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
    box-shadow: 0 4px 15px rgba(10, 32, 199, 0.3);
}

.benefit-card h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.benefit-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.5;
}

.schedule-calendar-wrapper {
    background: white;
    border-radius: 20px;
    padding: 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--gray-200);
    margin-bottom: 3rem;
    min-height: 700px;
    overflow: hidden;
}

.cal-embed-container {
    width: 100%;
    height: 700px;
    overflow: hidden;
    border-radius: 20px;
    background: white;
}

/* Force Cal.com iframe to have white background */
.cal-embed-container iframe {
    background: white !important;
    border-radius: 20px;
}

/* Override Cal.com dark styles */
.schedule-calendar-wrapper * {
    color-scheme: light !important;
}

.schedule-alternative {
    text-align: center;
    padding: 2rem;
    background: rgba(10, 32, 199, 0.05);
    border-radius: 16px;
    border: 2px dashed var(--primary);
}

.alternative-text {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.alternative-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.alternative-buttons .btn-primary,
.alternative-buttons .btn-secondary {
    min-width: 150px;
    justify-content: center;
}

/* Dark Theme for Schedule Section */
[data-theme="dark"] .schedule-section {
    background: var(--gray-50);
}

[data-theme="dark"] .benefit-card {
    background: #1a1a1a;
    border-color: #2a2a2a;
}

[data-theme="dark"] .benefit-card:hover {
    background: #222222;
    border-color: #3b82f6;
}

[data-theme="dark"] .schedule-calendar-wrapper {
    background: white !important;
    border-color: var(--gray-200);
}

/* Force light theme for calendar even in dark mode */
[data-theme="dark"] .cal-embed-container {
    background: white !important;
    color-scheme: light !important;
}

[data-theme="dark"] .cal-embed-container * {
    color-scheme: light !important;
}

[data-theme="dark"] .cal-embed-container iframe {
    background: white !important;
    color-scheme: light !important;
}

[data-theme="dark"] .schedule-alternative {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
}

/* Responsive Schedule Section */
@media (max-width: 768px) {
    .schedule-section {
        padding: 80px 0;
    }
    
    .schedule-benefits {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .schedule-calendar-wrapper {
        padding: 0;
        min-height: 600px;
    }
    
    .cal-embed-container {
        height: 600px;
    }
    
    .alternative-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .alternative-buttons .btn-primary,
    .alternative-buttons .btn-secondary {
        width: 100%;
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .schedule-section {
        padding: 60px 0;
    }
    
    .schedule-calendar-wrapper {
        padding: 0;
        min-height: 550px;
        border-radius: 16px;
    }
    
    .cal-embed-container {
        height: 550px;
        border-radius: 16px;
    }
    
    .benefit-card {
        padding: 1.5rem;
    }
    
    .benefit-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}


/* Blog Section Additional Styles */
.blog-loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

.blog-loading i {
    font-size: 2rem;
    margin-bottom: 1rem;
    display: block;
    color: var(--primary);
}

.blog-cta {
    text-align: center;
    margin-top: 3rem;
}

.btn-blog {
    min-width: 200px;
    justify-content: center;
}

/* Blog Responsive */
@media (max-width: 768px) {
    .blog-section {
        padding: 80px 0;
    }
    
    .blog-articles-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .blog-section {
        padding: 60px 0;
    }
    
    .blog-article-card {
        margin: 0 10px;
    }
}
