/* ========================================
   OTIMIZAÇÃO MOBILE SUAVE - SEM SOBREPOSIÇÕES
   Arquivo: css/mobile-enhancement.css
   ======================================== */

/* 
Este arquivo trabalha EM HARMONIA com o CSS existente
Não usa !important desnecessariamente
Foca apenas em melhorias responsivas
*/

/* ========================================
   BASE RESPONSIVA
   ======================================== */

/* Garantir box-sizing apenas onde necessário */
.curso-card,
.price-card,
.contact-form,
.faq-item {
    box-sizing: border-box;
}

/* Suavizar fontes em mobile */
@media (max-width: 768px) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* ========================================
   HEADER E NAVEGAÇÃO - MELHORIAS SUTIS
   ======================================== */

@media (max-width: 768px) {
    /* Melhorar espaçamento do header sem quebrar layout existente */
    .header {
        padding-top: 12px;
        padding-bottom: 12px;
    }
    
    .nav-container {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    /* Melhorar logo em mobile */
    .logo {
        font-size: 1.3rem;
        line-height: 1.2;
    }
    
    .logo i {
        margin-right: 8px;
    }
    
    /* Melhorar botões de navegação */
    .btn-area-aluno {
        padding: 10px 15px;
        font-size: 0.9rem;
        border-radius: 22px;
    }
    
    .menu-toggle {
        padding: 10px 15px;
        border-radius: 8px;
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Melhorar dropdown sem quebrar funcionalidade */
    .dropdown-menu {
        border-radius: 12px;
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.2);
        backdrop-filter: blur(10px);
    }
    
    .dropdown-menu a {
        padding: 14px 20px;
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .dropdown-menu a i {
        width: 22px;
        text-align: center;
        margin-right: 12px;
    }
}

/* ========================================
   BANNERS - OTIMIZAÇÃO RESPONSIVA
   ======================================== */

@media (max-width: 768px) {
    .hero-banner,
    .course-banner {
        min-height: 65vh;
        padding: 90px 20px 50px;
        background-attachment: scroll; /* Melhor performance mobile */
    }
    
    .hero-content,
    .banner-content {
        text-align: center;
        max-width: 100%;
    }
    
    .hero-title,
    .course-title {
        font-size: 2.2rem;
        line-height: 1.2;
        margin-bottom: 20px;
        text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    }
    
    .hero-subtitle,
    .course-subtitle {
        font-size: 1.15rem;
        line-height: 1.4;
        margin-bottom: 25px;
        opacity: 0.95;
    }
    
    .badge-senatran {
        font-size: 0.95rem;
        padding: 10px 20px;
        border-radius: 25px;
        margin-top: 20px;
        display: inline-block;
    }
}

/* ========================================
   GRIDS - ADAPTAÇÃO RESPONSIVA
   ======================================== */

@media (max-width: 768px) {
    /* Principais grids do site */
    .cursos-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
    
    .course-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Grid específico da homepage */
    .principais-cursos .cursos-grid {
        gap: 20px;
    }
    
    /* Grid para informações do curso */
    .course-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
}

/* ========================================
   CARDS - MELHORIAS VISUAIS
   ======================================== */

@media (max-width: 768px) {
    .curso-card {
        padding: 25px 20px;
        margin-bottom: 20px;
        border-radius: 15px;
        transition: transform 0.3s ease, box-shadow 0.3s ease;
    }
    
    .curso-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 25px rgba(255, 193, 7, 0.25);
    }
    
    .curso-card h3 {
        font-size: 1.25rem;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .curso-card p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .curso-card i {
        font-size: 2.5rem;
        margin-bottom: 15px;
    }
    
    /* Detalhes do curso em mobile */
    .curso-details {
        display: flex;
        flex-direction: column;
        gap: 8px;
        margin-bottom: 20px;
    }
    
    .curso-details span {
        font-size: 0.9rem;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
    }
    
    /* Botões dos cards */
    .btn-curso {
        padding: 12px 25px;
        border-radius: 25px;
        font-size: 1rem;
        font-weight: 600;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .btn-curso:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 15px rgba(255, 193, 7, 0.3);
    }
}

/* ========================================
   LAYOUT DE PÁGINA DE CURSO
   ======================================== */

@media (max-width: 768px) {
    /* Transformar layout de duas colunas em uma */
    .course-layout {
        display: block;
    }
    
    .course-main {
        width: 100%;
        margin-bottom: 30px;
    }
    
    .course-sidebar {
        width: 100%;
        position: static;
    }
    
    /* Card de preço otimizado */
    .price-card {
        border-radius: 15px;
        padding: 25px;
        margin-bottom: 25px;
        text-align: center;
    }
    
    .price-value {
        font-size: 2.5rem;
        margin-bottom: 10px;
    }
    
    .price-installments {
        font-size: 1rem;
        margin-bottom: 20px;
    }
    
    .btn-matricular {
        padding: 15px 30px;
        border-radius: 30px;
        font-size: 1.1rem;
        font-weight: bold;
        width: 100%;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    
    .btn-matricular:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 20px rgba(255, 193, 7, 0.4);
    }
}

/* ========================================
   INFORMAÇÕES DO CURSO
   ======================================== */

@media (max-width: 768px) {
    .info-item {
        padding: 15px;
        border-radius: 10px;
        text-align: center;
        min-height: 100px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .info-item i {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    
    .info-item strong {
        font-size: 0.85rem;
        margin-bottom: 5px;
        display: block;
    }
    
    .info-item span {
        font-size: 0.8rem;
    }
    
    /* Highlight boxes */
    .highlight-box {
        padding: 20px;
        border-radius: 10px;
        margin: 20px 0;
    }
    
    .highlight-box h4 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .highlight-box ul {
        list-style: none;
        padding: 0;
    }
    
    .highlight-box li {
        padding: 6px 0;
        padding-left: 25px;
        position: relative;
        font-size: 0.95rem;
        line-height: 1.4;
    }
    
    .highlight-box li:before {
        content: '✓';
        position: absolute;
        left: 0;
        color: #ffc107;
        font-weight: bold;
    }
}

/* ========================================
   PRÉ-REQUISITOS E SUPORTE
   ======================================== */

@media (max-width: 768px) {
    .prerequisites-card,
    .support-card {
        border-radius: 15px;
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .prerequisites-card h3,
    .support-card h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
        text-align: center;
    }
    
    .prerequisites-list {
        list-style: none;
        padding: 0;
    }
    
    .prerequisites-list li {
        padding: 8px 0;
        padding-left: 25px;
        position: relative;
        font-size: 0.95rem;
    }
    
    .prerequisites-list li:before {
        content: '✓';
        position: absolute;
        left: 0;
        color: #ffc107;
        font-weight: bold;
    }
    
    /* WhatsApp card */
    .whatsapp-card {
        border-radius: 15px;
        padding: 20px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .whatsapp-card h3 {
        font-size: 1.2rem;
        margin-bottom: 10px;
    }
    
    .whatsapp-card p {
        margin-bottom: 15px;
        font-size: 0.95rem;
    }
    
    .btn-whatsapp {
        padding: 12px 25px;
        border-radius: 25px;
        font-weight: bold;
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        gap: 8px;
        transition: all 0.3s ease;
    }
    
    .btn-whatsapp:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    }
}

/* ========================================
   CONTEÚDO PROGRAMÁTICO
   ======================================== */

@media (max-width: 768px) {
    .programa-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .modulo-item {
        padding: 20px;
        border-radius: 12px;
        text-align: center;
        transition: all 0.3s ease;
    }
    
    .modulo-item:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 15px rgba(255, 193, 7, 0.2);
    }
    
    .modulo-item i {
        font-size: 2rem;
        margin-bottom: 12px;
    }
    
    .modulo-item h4 {
        font-size: 1.1rem;
        margin-bottom: 10px;
        line-height: 1.3;
    }
    
    .modulo-item p {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* ========================================
   PRAZO DOS CURSOS
   ======================================== */

@media (max-width: 768px) {
    .prazo-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .prazo-card {
        padding: 18px;
        border-radius: 12px;
        text-align: center;
        min-height: 120px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .prazo-card i {
        font-size: 1.8rem;
        margin-bottom: 10px;
    }
    
    .prazo-card h4 {
        font-size: 1rem;
        margin-bottom: 8px;
        line-height: 1.2;
    }
    
    .prazo-card span {
        font-weight: bold;
        font-size: 0.9rem;
    }
}

/* ========================================
   FORMULÁRIOS
   ======================================== */

@media (max-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-control {
        width: 100%;
        padding: 15px;
        border-radius: 10px;
        font-size: 16px; /* Previne zoom no iOS */
        transition: border-color 0.3s ease, box-shadow 0.3s ease;
    }
    
    .form-control:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.2);
    }
    
    .form-label {
        margin-bottom: 8px;
        font-weight: 600;
        font-size: 1rem;
    }
    
    textarea.form-control {
        min-height: 120px;
        resize: vertical;
    }
    
    .btn-submit {
        padding: 15px 30px;
        border-radius: 25px;
        font-size: 1.1rem;
        font-weight: bold;
        width: 100%;
        min-height: 50px;
        transition: all 0.3s ease;
    }
    
    .btn-submit:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
    }
}

/* ========================================
   FOOTER
   ======================================== */

@media (max-width: 768px) {
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 20px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .footer-section h3 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }
    
    .footer-section p,
    .footer-section li {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .footer-section ul {
        list-style: none;
        padding: 0;
    }
    
    .footer-section li {
        padding: 5px 0;
    }
    
    .footer-bottom {
        margin-top: 30px;
        padding-top: 20px;
        text-align: center;
        font-size: 0.9rem;
    }
}

/* ========================================
   CARROSSEL E DEPOIMENTOS
   ======================================== */

@media (max-width: 768px) {
    .testimonials-carousel {
        padding: 20px;
    }
    
    .testimonial-slide {
        padding: 25px 20px;
        border-radius: 15px;
        margin: 0 10px;
    }
    
    .testimonial-content {
        font-size: 1rem;
        line-height: 1.5;
        margin-bottom: 15px;
        font-style: italic;
    }
    
    .testimonial-author {
        font-weight: bold;
        font-size: 1.1rem;
    }
    
    .carousel-controls {
        text-align: center;
        margin-top: 20px;
    }
    
    .carousel-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        margin: 0 8px;
        font-size: 1.2rem;
        transition: all 0.3s ease;
    }
    
    .carousel-btn:hover {
        transform: scale(1.1);
    }
    
    .carousel-dots {
        text-align: center;
        margin-top: 15px;
    }
    
    .dot {
        width: 12px;
        height: 12px;
        border-radius: 50%;
        margin: 0 6px;
        transition: all 0.3s ease;
    }
    
    .dot.active {
        transform: scale(1.3);
    }
}

/* ========================================
   FAQ
   ======================================== */

@media (max-width: 768px) {
    .faq-item {
        margin-bottom: 15px;
        border-radius: 12px;
        overflow: hidden;
    }
    
    .faq-question {
        padding: 20px;
        font-size: 1.1rem;
        font-weight: 600;
        display: flex;
        justify-content: space-between;
        align-items: center;
        text-align: left;
        width: 100%;
        border: none;
        cursor: pointer;
        transition: all 0.3s ease;
    }
    
    .faq-question i {
        transition: transform 0.3s ease;
    }
    
    .faq-question.active i {
        transform: rotate(180deg);
    }
    
    .faq-answer {
        max-height: 0;
        overflow: hidden;
        transition: all 0.3s ease;
        padding: 0 20px;
    }
    
    .faq-answer.active {
        max-height: 200px;
        padding: 20px;
    }
    
    .faq-answer p {
        line-height: 1.6;
        margin: 0;
    }
}

/* ========================================
   SEÇÕES ESPECÍFICAS
   ======================================== */

/* Homepage específica */
@media (max-width: 768px) {
    .homepage .principais-cursos {
        padding: 40px 0;
    }
    
    .homepage .cursos-online-section {
        padding: 40px 0;
    }
    
    .homepage .features-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 20px;
    }
}

/* Todos os cursos */
@media (max-width: 768px) {
    .all-courses-page .courses-filter {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        margin-bottom: 30px;
        justify-content: center;
        padding: 0 20px;
    }
    
    .filter-btn {
        padding: 10px 20px;
        border-radius: 25px;
        font-size: 0.9rem;
        font-weight: 600;
        transition: all 0.3s ease;
        min-height: 40px;
    }
    
    .filter-btn:hover,
    .filter-btn.active {
        transform: translateY(-2px);
    }
}

/* Sobre nós */
@media (max-width: 768px) {
    .about-page .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .about-page .team-member {
        padding: 25px;
        border-radius: 15px;
        text-align: center;
    }
    
    .about-page .company-stats {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        margin: 30px 0;
    }
    
    .stat-item {
        padding: 20px;
        border-radius: 12px;
        text-align: center;
    }
    
    .stat-number {
        font-size: 2rem;
        font-weight: bold;
        margin-bottom: 5px;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
}

/* Contato */
@media (max-width: 768px) {
    .contact-page .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .contact-info,
    .contact-form {
        padding: 25px;
        border-radius: 15px;
    }
    
    .contact-item {
        display: flex;
        align-items: center;
        gap: 15px;
        padding: 15px 0;
    }
    
    .contact-item i {
        font-size: 1.5rem;
        width: 30px;
        text-align: center;
    }
    
    .contact-details h4 {
        font-size: 1.1rem;
        margin-bottom: 5px;
    }
    
    .contact-details p {
        font-size: 0.95rem;
        margin: 0;
    }
}

/* ========================================
   MELHORIAS DE ACESSIBILIDADE
   ======================================== */

@media (max-width: 768px) {
    /* Melhor contraste para texto pequeno */
    .small-text,
    small {
        font-size: 0.9rem;
        line-height: 1.4;
    }
    
    /* Área de toque adequada */
    button,
    .btn,
    .btn-curso,
    .btn-matricular,
    .btn-whatsapp,
    input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Focus indicators visíveis */
    button:focus,
    .btn:focus,
    input:focus,
    textarea:focus,
    select:focus {
        outline: 3px solid rgba(255, 193, 7, 0.6);
        outline-offset: 2px;
    }
    
    /* Melhor legibilidade */
    p {
        line-height: 1.5;
    }
    
    h1, h2, h3, h4, h5, h6 {
        line-height: 1.3;
    }
}

/* ========================================
   PERFORMANCE OTIMIZADA
   ======================================== */

@media (max-width: 768px) {
    /* Reduzir animações em conexões lentas */
    @media (prefers-reduced-motion: reduce) {
        *,
        *::before,
        *::after {
            animation-duration: 0.01ms;
            animation-iteration-count: 1;
            transition-duration: 0.01ms;
            scroll-behavior: auto;
        }
    }
    
    /* Otimizar imagens */
    img {
        max-width: 100%;
        height: auto;
        object-fit: cover;
    }
    
    /* Suavizar scroll */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========================================
   ORIENTAÇÃO E VIEWPORT
   ======================================== */

/* Ajustes para modo paisagem */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-banner,
    .course-banner {
        min-height: 100vh;
    }
    
    .hero-title,
    .course-title {
        font-size: 2rem;
    }
    
    .hero-subtitle,
    .course-subtitle {
        font-size: 1rem;
    }
}

/* Dispositivos muito pequenos */
@media (max-width: 320px) {
    .curso-card {
        padding: 20px 15px;
    }
    
    .hero-title,
    .course-title {
        font-size: 1.8rem;
    }
    
    .btn-curso,
    .btn-matricular {
        padding: 10px 20px;
        font-size: 0.95rem;
    }
    
    .price-value {
        font-size: 2rem;
    }
}

/* Tablets em modo retrato */
@media (min-width: 769px) and (max-width: 1024px) {
    .cursos-grid {
        grid-template-columns: 1fr 1fr;
        gap: 30px;
    }
    
    .course-layout {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: 40px;
    }
}
@media (max-width: 768px) {
  /* Centralizar logo + botões abaixo */

  .header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .header .logo {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .header .nav-container {
    margin-top: 10px;
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
  }
}


/* ========================================
   NOTAÇÕES IMPORTANTES
   ======================================== */

/*
INSTRUÇÕES DE IMPLEMENTAÇÃO:

1. INCLUIR APÓS O CSS PRINCIPAL:
   <link rel="stylesheet" href="css/style.css">
   <link rel="stylesheet" href="css/mobile-enhancement.css">

2. ESTE ARQUIVO:
   ✅ NÃO usa !important desnecessariamente
   ✅ Trabalha EM HARMONIA com CSS existente
   ✅ Foca apenas em melhorias responsivas
   ✅ Mantém funcionalidades existentes
   ✅ Adiciona melhorias graduais

3. COMPATIBILIDADE:
   ✅ Funciona com CSS existente
   ✅ Não quebra JavaScript existente
   ✅ Mantém design original
   ✅ Adiciona responsividade

4. TESTE:
   ✅ Verificar se nada quebra no desktop
   ✅ Testar funcionalidades existentes
   ✅ Validar em dispositivos reais
   ✅ Confirmar melhorias graduais

5. BENEFÍCIOS:
   ✅ Melhor experiência mobile
   ✅ Mantém estabilidade
   ✅ Fácil manutenção
   ✅ Não interfere no existente
*/

