/* ============================================================================
   projetos-responsive.css - Correções Responsivas Avançadas
   Rede Transformissão | 100% Mobile-Friendly
   ============================================================================ */

/* ============================================================================
   PREVENÇÃO DE OVERFLOW HORIZONTAL
   ============================================================================ */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

* {
    box-sizing: border-box;
}

/* Força containers a respeitarem limites */
.container-custom,
.hero-section,
.section-context,
.section-projeto-destaque,
.section-timeline,
.section-objetivos,
.section-trilha,
.section-diferenciais,
.section-outros-projetos,
.section-cta-final,
.footer {
    max-width: 100%;
    overflow-x: hidden;
}

/* ============================================================================
   GRID RESPONSIVO UNIVERSAL
   ============================================================================ */
.context-grid,
.objetivos-grid,
.diferenciais-grid,
.projetos-grid {
    width: 100%;
}

/* ============================================================================
   IMAGENS E MÍDIAS RESPONSIVAS
   ============================================================================ */
img, video, iframe {
    max-width: 100%;
    height: auto;
}

.projeto-destaque-image img {
    width: 100%;
    object-fit: cover;
}

/* ============================================================================
   DESKTOP LARGE (1920px+)
   ============================================================================ */
@media (min-width: 1920px) {
    .container-custom {
        max-width: 1600px;
    }
    
    .hero-title {
        font-size: 6rem;
    }
    
    .section-title {
        font-size: 4rem;
    }
}

/* ============================================================================
   DESKTOP (1440px - 1919px)
   ============================================================================ */
@media (min-width: 1440px) and (max-width: 1919px) {
    .container-custom {
        max-width: 1320px;
    }
}

/* ============================================================================
   LAPTOP (1024px - 1439px)
   ============================================================================ */
@media (min-width: 1024px) and (max-width: 1439px) {
    .container-custom {
        max-width: 1024px;
        padding: 0 2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .projeto-destaque-grid {
        gap: 3rem;
    }
    
    .projetos-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================================
   TABLET LANDSCAPE (768px - 1023px)
   ============================================================================ */
@media (min-width: 768px) and (max-width: 1023px) {
    .container-custom {
        padding: 0 1.5rem;
    }
    
    .hero-section {
        min-height: 85vh;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Contexto */
    .context-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    /* Projeto Destaque */
    .projeto-destaque-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .projeto-destaque-image img {
        min-height: 350px;
    }
    
    .projeto-stats-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
    
    /* Timeline */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        grid-template-columns: 1fr;
        padding-left: 0;
    }
    
    .timeline-marker {
        left: 30px;
        transform: translateX(0);
    }
    
    .timeline-content {
        margin-left: 80px;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        grid-column: auto;
        grid-row: auto;
    }
    
    /* Objetivos e Projetos */
    .objetivos-grid,
    .projetos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    /* Diferenciais */
    .diferenciais-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Trilha */
    .trilha-passo {
        gap: 1.5rem;
    }
    
    /* CTA */
    .cta-buttons {
        gap: 1rem;
    }
}

/* ============================================================================
   TABLET PORTRAIT (600px - 767px)
   ============================================================================ */
@media (min-width: 600px) and (max-width: 767px) {
    .container-custom {
        padding: 0 1.5rem;
    }
    
    .hero-section {
        min-height: 80vh;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .context-grid,
    .objetivos-grid,
    .projetos-grid {
        grid-template-columns: 1fr;
    }
    
    .diferenciais-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .projeto-stats-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .timeline-content {
        margin-left: 70px;
    }
}

/* ============================================================================
   MOBILE LARGE (480px - 599px)
   ============================================================================ */
@media (min-width: 480px) and (max-width: 599px) {
    .container-custom {
        padding: 0 1rem;
    }
    
    .hero-section {
        min-height: 75vh;
        padding: 1.5rem 1rem;
    }
    
    .hero-title {
        font-size: 2.2rem;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    
    .stat-item {
        padding: 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Seções */
    .section-context,
    .section-projeto-destaque,
    .section-timeline,
    .section-objetivos,
    .section-trilha,
    .section-diferenciais,
    .section-outros-projetos,
    .section-cta-final {
        padding: 4rem 0;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .section-description {
        font-size: 1rem;
    }
    
    /* Cards */
    .context-card,
    .objetivo-card,
    .projeto-card {
        padding: 2rem;
    }
    
    .card-title,
    .objetivo-titulo,
    .projeto-card-titulo {
        font-size: 1.4rem;
    }
    
    /* Projeto Destaque */
    .projeto-titulo {
        font-size: 2rem;
    }
    
    .projeto-stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .projeto-stat {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 1rem;
        text-align: left;
    }
    
    .projeto-stat i {
        grid-row: 1 / 3;
    }
    
    /* Timeline */
    .timeline-marker {
        width: 50px;
        height: 50px;
    }
    
    .timeline-marker i {
        font-size: 1.2rem;
    }
    
    .timeline-content {
        margin-left: 65px;
        padding: 1.5rem;
    }
    
    .timeline-title {
        font-size: 1.3rem;
    }
    
    /* Trilha */
    .trilha-passo {
        flex-direction: column;
        gap: 1rem;
    }
    
    .passo-numero {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .passo-content {
        padding: 1.5rem;
    }
    
    .passo-titulo {
        font-size: 1.5rem;
    }
    
    /* Diferenciais */
    .diferenciais-grid {
        grid-template-columns: 1fr;
    }
    
    /* Botões */
    .cta-buttons {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        width: 100%;
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
}

/* ============================================================================
   MOBILE MEDIUM (375px - 479px)
   ============================================================================ */
@media (min-width: 375px) and (max-width: 479px) {
    .container-custom {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    .section-title {
        font-size: 1.6rem;
    }
    
    .card-title {
        font-size: 1.3rem;
    }
    
    .context-card,
    .objetivo-card,
    .projeto-card {
        padding: 1.5rem;
    }
    
    .projeto-titulo {
        font-size: 1.8rem;
    }
    
    .projeto-chamado {
        font-size: 1rem;
        padding-left: 1rem;
    }
    
    .timeline-content {
        margin-left: 60px;
        padding: 1.2rem;
    }
    
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 0.9rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* ============================================================================
   MOBILE SMALL (320px - 374px)
   ============================================================================ */
@media (max-width: 374px) {
    .container-custom {
        padding: 0 0.8rem;
    }
    
    .hero-section {
        min-height: 70vh;
        padding: 1rem 0.5rem;
    }
    
    .hero-title {
        font-size: 1.8rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .stat-item {
        padding: 0.8rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .stat-label {
        font-size: 0.8rem;
    }
    
    /* Seções */
    .section-context,
    .section-projeto-destaque,
    .section-objetivos,
    .section-trilha,
    .section-diferenciais,
    .section-outros-projetos,
    .section-cta-final {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 0.8rem;
    }
    
    .section-description {
        font-size: 0.9rem;
    }
    
    /* Cards */
    .context-card,
    .objetivo-card,
    .projeto-card {
        padding: 1.2rem;
    }
    
    .card-icon,
    .objetivo-icon {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .card-title,
    .objetivo-titulo,
    .projeto-card-titulo {
        font-size: 1.2rem;
        margin-bottom: 0.8rem;
    }
    
    /* Projeto Destaque */
    .badge-destaque {
        padding: 0.4rem 0.8rem;
        font-size: 0.8rem;
    }
    
    .projeto-titulo {
        font-size: 1.6rem;
    }
    
    .projeto-chamado {
        font-size: 0.95rem;
        padding-left: 0.8rem;
        border-left-width: 3px;
    }
    
    .projeto-versao {
        padding: 1rem;
        font-size: 0.9rem;
    }
    
    .projeto-stats-grid {
        gap: 0.8rem;
    }
    
    .projeto-stat {
        padding: 0.8rem;
    }
    
    .projeto-stat i {
        font-size: 1.5rem;
    }
    
    .projeto-stat .stat-value {
        font-size: 1.5rem;
    }
    
    /* Timeline */
    .timeline::before {
        left: 25px;
    }
    
    .timeline-marker {
        left: 25px;
        width: 45px;
        height: 45px;
    }
    
    .timeline-marker i {
        font-size: 1.1rem;
    }
    
    .timeline-content {
        margin-left: 55px;
        padding: 1rem;
    }
    
    .timeline-year {
        padding: 0.2rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .timeline-title {
        font-size: 1.2rem;
    }
    
    .timeline-content p {
        font-size: 0.9rem;
    }
    
    /* Trilha */
    .passo-numero {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
    
    .passo-content {
        padding: 1.2rem;
    }
    
    .passo-titulo {
        font-size: 1.3rem;
    }
    
    .passo-lista li {
        font-size: 0.9rem;
        gap: 0.6rem;
    }
    
    .passo-requisitos {
        padding: 0.8rem;
        font-size: 0.85rem;
    }
    
    /* Diferenciais */
    .diferencial-card {
        padding: 1.5rem;
    }
    
    .diferencial-card i {
        font-size: 2.5rem;
    }
    
    .diferencial-card h4 {
        font-size: 1.1rem;
    }
    
    .diferencial-card p {
        font-size: 0.85rem;
    }
    
    /* CTA Final */
    .cta-titulo {
        font-size: 1.6rem;
    }
    
    .cta-texto {
        font-size: 1rem;
    }
    
    /* Botões */
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        padding: 0.8rem 1.2rem;
        font-size: 0.85rem;
        gap: 0.6rem;
    }
    
    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: 2rem 0 1rem;
    }
    
    .footer-logo-img {
        max-width: 150px;
    }
    
    .footer-tagline {
        font-size: 0.85rem;
    }
    
    .footer-social a {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .footer-bottom {
        font-size: 0.85rem;
    }
}

/* ============================================================================
   LANDSCAPE ORIENTATION (Mobile Landscape)
   ============================================================================ */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh;
        padding: 2rem 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        margin-top: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* ============================================================================
   PRINT STYLES
   ============================================================================ */
@media print {
    .hero-section,
    .footer,
    .scroll-indicator,
    .btn-primary,
    .btn-secondary,
    .btn-outline {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    .section-title {
        page-break-after: avoid;
    }
    
    .context-card,
    .objetivo-card,
    .projeto-card {
        page-break-inside: avoid;
    }
}

/* ============================================================================
   DARK MODE SUPPORT (Opcional)
   ============================================================================ */
@media (prefers-color-scheme: dark) {
    /* Adicione estilos para dark mode se necessário */
}