/* ===== MOBILE OPTIMIZED STYLES - VERSÃO COMPLETAMENTE REESCRITA ===== */

/* Reset específico para mobile */
@media screen and (max-width: 768px) {
  * {
    -webkit-tap-highlight-color: transparent;
  }
  
  body {
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
  }
}

/* ===== HEADER E NAVEGAÇÃO MOBILE ===== */
@media screen and (max-width: 768px) {
  /* Header Mobile */
  .main-header {
    padding: 0.8rem 0;
    background-color: rgba(9, 21, 19, 0.98);
    backdrop-filter: blur(15px);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
  }
  
  .main-header .container {
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
  }
  
  .logo-img {
    height: 40px;
    width: auto;
  }
  
  /* Menu Hambúrguer - Sempre visível no mobile */
  .mobile-menu-toggle {
    display: flex !important;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 2px;
    z-index: 1001;
    position: relative;
  }
  
  .hamburger-line {
    width: 100%;
    height: 3px;
    background-color: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
  }
  
  .mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
  }
  
  /* Navegação Mobile */
  .main-nav {
    position: fixed !important;
    top: 0 !important;
    right: -100% !important;
    width: 280px !important;
    height: 100vh !important;
    background: linear-gradient(135deg, #0a1513 0%, #1a2a26 100%);
    backdrop-filter: blur(20px);
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    padding: 80px 1.5rem 2rem !important;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    z-index: 1000 !important;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    overflow-y: auto;
  }
  
  .main-nav.active {
    right: 0 !important;
  }
  
  .main-nav a {
    width: 100% !important;
    padding: 1.2rem 0 !important;
    font-size: 1.1rem !important;
    font-weight: 600 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    margin: 0 !important;
    display: block !important;
    text-align: left !important;
    transition: all 0.3s ease !important;
    color: #ffffff !important;
  }
  
  .main-nav a:last-child {
    border-bottom: none !important;
  }
  
  .main-nav a:hover {
    color: #ff8c42 !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    padding-left: 1rem !important;
  }
  
  /* Language Menu Mobile */
  .language-menu {
    width: 100% !important;
    margin: 1.5rem 0 !important;
  }
  
  .language-btn {
    width: 100% !important;
    justify-content: flex-start !important;
    padding: 1rem 0 !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
  }
  
  .language-dropdown {
    position: static !important;
    width: 100% !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 12px !important;
    margin-top: 0.8rem !important;
    padding: 0.8rem !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .lang-option {
    width: 100% !important;
    padding: 1rem !important;
    text-align: left !important;
    background: transparent !important;
    border: none !important;
    color: #ffffff !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
  }
  
  .lang-option:hover {
    background-color: rgba(255, 140, 66, 0.1) !important;
    color: #ff8c42 !important;
  }
  
  /* Social Icons Mobile */
  .social-icons {
    width: 100% !important;
    justify-content: flex-start !important;
    margin-top: 2rem !important;
    gap: 1.5rem !important;
  }
  
  .social-icon {
    width: 45px !important;
    height: 45px !important;
    font-size: 1.2rem !important;
  }
}

/* ===== HERO SECTION MOBILE ===== */
@media screen and (max-width: 768px) {
  .hero-section {
    min-height: 100vh !important;
    padding: 120px 0 60px !important;
    background-position: center center !important;
    background-size: cover !important;
    display: flex !important;
    align-items: center !important;
  }
  
  .hero-container {
    padding: 0 1.5rem !important;
    text-align: center !important;
    margin: 0 !important;
    width: 100% !important;
  }
  
  .hero-content {
    max-width: 100% !important;
    margin: 0 auto !important;
  }
  
  .hero-title {
    font-size: 2.5rem !important;
    line-height: 1.1 !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    font-weight: 800 !important;
    letter-spacing: -0.02em !important;
    color: #ffffff !important;
  }
  
  .hero-subtitle {
    font-size: 1.3rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
    font-weight: 600 !important;
    color: #ff8c42 !important;
  }
  
  .hero-highlight {
    font-size: 1.1rem !important;
    line-height: 1.6 !important;
    margin-bottom: 1.5rem !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }
  
  .hero-buttons {
    flex-direction: column !important;
    gap: 1.2rem !important;
    align-items: center !important;
    margin-top: 2rem !important;
    justify-content: center !important;
  }
  
  .btn-primary {
    width: 100% !important;
    max-width: 300px !important;
    padding: 1.2rem 2rem !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    touch-action: manipulation !important;
    min-height: 52px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.3s ease !important;
    background: linear-gradient(135deg, rgba(255, 140, 66, 0.95) 0%, rgba(255, 107, 53, 0.85) 30%, rgba(255, 89, 0, 0.7) 60%, rgba(9, 21, 19, 0.4) 100%) !important;
    border: 2px solid rgba(255, 140, 66, 0.8) !important;
    color: #ffffff !important;
  }
  
  .btn-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 140, 66, 0.3) !important;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.98) 0%, rgba(255, 140, 66, 0.9) 30%, rgba(255, 89, 0, 0.8) 60%, rgba(9, 21, 19, 0.5) 100%) !important;
  }
}

/* ===== SOBRE SECTION MOBILE ===== */
@media screen and (max-width: 768px) {
  .sobre-section {
    padding: 4rem 0 !important;
    background: linear-gradient(135deg, #0f1f1c 0%, #1a2a26 100%) !important;
  }
  
  .sobre-container {
    padding: 0 1.5rem !important;
    margin: 0 !important;
  }
  
  .sobre-content {
    max-width: 100% !important;
    text-align: center !important;
  }
  
  .sobre-title {
    font-size: 2.2rem !important;
    margin-bottom: 2rem !important;
    text-align: center !important;
    font-weight: 800 !important;
    color: #ffffff !important;
  }
  
  .sobre-text p {
    font-size: 1.1rem !important;
    line-height: 1.7 !important;
    margin-bottom: 1.5rem !important;
    text-align: left !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }
  
  .sobre-text p:last-child {
    margin-bottom: 0 !important;
  }
}

/* ===== MODALIDADES SECTION MOBILE ===== */
@media screen and (max-width: 768px) {
  .modalidades-section {
    padding: 4rem 0 !important;
    background: linear-gradient(135deg, #1a2a26 0%, #0f1f1c 100%) !important;
    position: relative !important;
  }
  
  .modalidades-section .container {
    padding: 0 1.5rem !important;
    position: relative !important;
    top: 0 !important;
    margin: 0 !important;
  }
  
  .modalidades-grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
  }
  
  .modalidade-card {
    padding: 2rem 1.5rem !important;
    border-radius: 16px !important;
    text-align: center !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    min-height: 180px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
  }
  
  .modalidade-card:hover {
    transform: translateY(-3px) !important;
    background: rgba(255, 140, 66, 0.1) !important;
    border-color: rgba(255, 140, 66, 0.3) !important;
  }
  
  .modalidade-icon {
    margin-bottom: 1.5rem !important;
  }
  
  .modalidade-icon i {
    font-size: 50px !important;
    color: #ff8c42 !important;
  }
  
  .modalidade-title {
    font-size: 1.4rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
  }
}

/* ===== MÓDULOS SECTION MOBILE ===== */
@media screen and (max-width: 768px) {
  .modulos-section {
    padding: 4rem 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 212, 170, 0.1) 100%) !important;
  }
  
  .modulos-section .container {
    padding: 0 1.5rem !important;
    margin: 0 !important;
  }
  
  .modulos-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }
  
  .modulo-card {
  padding: 2rem 1.5rem !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  border: none !important;
  transition: all 0.3s ease !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
}
  
  .modulo-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
}
  
  .modulo-title {
    font-size: 1.6rem !important;
    margin-bottom: 0.8rem !important;
    font-weight: 800 !important;
    color: #ff8c42 !important;
  }
  
  .modulo-subtitle {
    font-size: 1.1rem !important;
    margin-bottom: 1.5rem !important;
    color: #000000 !important;
    font-weight: 600 !important;
  }
  
  .modulo-features {
    list-style: none !important;
    padding: 0 !important;
  }
  
  .modulo-features li {
    font-size: 1rem !important;
    padding: 0.7rem 0 !important;
    color: #000000 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    position: relative !important;
    padding-left: 1.5rem !important;
  }
  
  .modulo-features li:last-child {
    border-bottom: none !important;
  }
  
  .modulo-features li::before {
    content: "✓" !important;
    position: absolute !important;
    left: 0 !important;
    color: #ff8c42 !important;
    font-weight: bold !important;
    font-size: 1.1rem !important;
  }
}

/* ===== FAQ SECTION MOBILE ===== */
@media screen and (max-width: 768px) {
  .faq-section {
    padding: 4rem 0 !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(0, 0, 0, 0.1) 50%, rgba(255, 140, 66, 0.1) 100%) !important;
  }
  
  .faq-section .container {
    padding: 0 1.5rem !important;
  }
  
  .faq-list {
    gap: 1.5rem !important;
  }
  
  .faq-item {
    background: #ffffff !important;
    padding: 2rem !important;
    border-radius: 12px !important;
    transition: all 0.3s ease !important;
    border: none !important;
    position: relative !important;
    overflow: hidden !important;
    z-index: 3 !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1) !important;
    margin-bottom: 1.5rem !important;
  }
  
  .faq-item::before {
    content: '' !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 3px !important;
    background: linear-gradient(90deg, #00d4aa, #00b894) !important;
    transform: scaleX(0) !important;
    transition: transform 0.3s ease !important;
  }
  
  .faq-item:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
  }
  
  .faq-item:hover::before {
    transform: scaleX(1) !important;
  }
  
  .faq-question {
  font-size: 1.2rem !important;
  padding: 0 0 1rem 0 !important;
  font-weight: 700 !important;
  color: #ff8c42 !important;
  background: none !important;
}
  
  .faq-answer {
    font-size: 1rem !important;
    padding: 0 !important;
    line-height: 1.6 !important;
    color: #000000 !important;
  }
}

/* ===== CONTACT SECTION MOBILE ===== */
@media screen and (max-width: 768px) {
      .contact-section {
      padding: 4rem 0 !important;
      background: radial-gradient(circle at 124% 80%, rgba(255, 255, 0, 0.3) -23%, transparent 0%), radial-gradient(circle at -20% 20%, rgba(0, 0, 0, 0.4) 0%, transparent 250%), linear-gradient(404deg, rgba(0, 0, 0, 0.2) -38%, rgba(0, 0, 0, 0.1) 41%, rgba(255, 255, 0, 0.1) 118%, rgba(255, 255, 0, 0.2) 100%) !important;
      margin: 0px 0 0 0 !important;
    }
  
  .contact-section .container {
    padding: 0 1.5rem !important;
  }
  
  .contact-content {
    flex-direction: column !important;
    gap: 3rem !important;
  }
  
  .contact-info {
    text-align: center !important;
  }
  
  .contact-subtitle {
    font-size: 1.25rem !important;
    margin-bottom: 1rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
  }
  
  .contact-description {
    color: #ffffff !important;
    font-size: 1.125rem !important;
    line-height: 1.6 !important;
    margin-top: 1rem !important;
  }
  
  .contact-form {
    width: 100% !important;
    padding: 2rem 1.5rem !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .form-group {
    margin-bottom: 1.5rem !important;
  }
  
  .form-group label {
    font-size: 1rem !important;
    margin-bottom: 0.8rem !important;
    color: #ffffff !important;
    font-weight: 600 !important;
    display: block !important;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100% !important;
    padding: 1rem !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    transition: all 0.3s ease !important;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    outline: none !important;
    border-color: #ffff00 !important;
    background: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 0 3px rgba(255, 255, 0, 0.1) !important;
  }
  
  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
  }
  
  .submit-btn {
    width: 100% !important;
    padding: 1.2rem 2rem !important;
    font-size: 1rem !important;
    border-radius: 8px !important;
    touch-action: manipulation !important;
    min-height: 52px !important;
    font-weight: 700 !important;
    background: linear-gradient(135deg, #ffff00 0%, #ffd700 100%) !important;
    border: none !important;
    color: #000000 !important;
    transition: all 0.3s ease !important;
  }
  
  .submit-btn:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(255, 255, 0, 0.3) !important;
  }
}

/* ===== FOOTER MOBILE ===== */
@media screen and (max-width: 768px) {
  .main-footer {
    padding: 3rem 0 2rem !important;
    background: linear-gradient(135deg, #0a1513 0%, #1a2a26 100%) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
  }
  
  .footer-content {
    flex-direction: column !important;
    gap: 2rem !important;
    text-align: center !important;
  }
  
  .footer-section {
    width: 100% !important;
  }
  
  .footer-section .logo-img {
    height: 45px !important;
    margin-bottom: 1rem !important;
  }
  
  .footer-nav {
    flex-direction: column !important;
    gap: 1rem !important;
    margin: 1.5rem 0 !important;
  }
  
  .footer-nav a {
    padding: 0.7rem 0 !important;
    font-size: 1rem !important;
    color: rgba(255, 255, 255, 0.8) !important;
    transition: all 0.3s ease !important;
  }
  
  .footer-nav a:hover {
    color: #ff8c42 !important;
  }
  
  .footer-text {
    font-size: 0.9rem !important;
    text-align: center !important;
    color: rgba(255, 255, 255, 0.6) !important;
    margin-top: 1.5rem !important;
  }
}

/* ===== SECTION TITLES MOBILE ===== */
@media screen and (max-width: 768px) {
  .section-title {
    font-size: 2.2rem !important;
    margin-bottom: 2.5rem !important;
    text-align: center !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    position: relative !important;
  }
  
  .section-title::after {
    content: '' !important;
    position: absolute !important;
    bottom: -10px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 60px !important;
    height: 4px !important;
    background: linear-gradient(90deg, #ff8c42, #ff6b35) !important;
    border-radius: 2px !important;
  }
}

/* ===== CONTAINER ADJUSTMENTS ===== */
@media screen and (max-width: 768px) {
  .container {
    max-width: 100% !important;
    padding: 0 1.5rem !important;
  }
}

/* ===== SMALL MOBILE OPTIMIZATIONS (320px - 480px) ===== */
@media screen and (max-width: 480px) {
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .hero-highlight {
    font-size: 1rem !important;
  }
  
  .btn-primary {
    padding: 1rem 1.5rem !important;
    font-size: 0.95rem !important;
    max-width: 280px !important;
  }
  
  .sobre-title {
    font-size: 1.8rem !important;
  }
  
  .sobre-text p {
    font-size: 1rem !important;
  }
  
  .section-title {
    font-size: 1.8rem !important;
  }
  
  .modulo-title {
    font-size: 1.4rem !important;
  }
  
  .modalidade-title {
    font-size: 1.2rem !important;
  }
  
  .faq-question {
    font-size: 1.1rem !important;
  }
  
  .contact-subtitle {
    font-size: 1.2rem !important;
  }
  
  .main-nav {
    width: 100% !important;
    right: -100% !important;
  }
  
  .container {
    padding: 0 1rem !important;
  }
  
  .modalidade-card,
  .modulo-card {
    padding: 1.5rem 1rem !important;
  }
  
  .contact-form {
    padding: 1.5rem 1rem !important;
  }
}

/* ===== LANDSCAPE MOBILE OPTIMIZATIONS ===== */
@media screen and (max-width: 768px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh !important;
    padding: 100px 0 40px !important;
  }
  
  .hero-title {
    font-size: 2rem !important;
  }
  
  .hero-subtitle {
    font-size: 1.1rem !important;
  }
  
  .hero-buttons {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 1rem !important;
  }
  
  .btn-primary {
    width: auto !important;
    min-width: 180px !important;
    max-width: none !important;
  }
  
  .modalidades-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .modulos-grid {
    grid-template-columns: repeat(2, 1fr) !important;
  }
  
  .sobre-section,
  .modalidades-section,
  .modulos-section,
  .faq-section,
  .contact-section {
    padding: 3rem 0 !important;
  }
}

/* ===== TOUCH-FRIENDLY IMPROVEMENTS ===== */
@media (hover: none) and (pointer: coarse) {
  .btn-primary,
  .submit-btn,
  .lang-option,
  .main-nav a,
  .footer-nav a {
    min-height: 44px !important;
    touch-action: manipulation !important;
  }
  
  .btn-primary:hover,
  .submit-btn:hover {
    transform: none !important;
  }
  
  .modalidade-card:hover,
  .modulo-card:hover,
  .faq-item:hover {
    transform: none !important;
  }
  
  .btn-primary:active,
  .submit-btn:active {
    transform: scale(0.98) !important;
  }
}

/* ===== HIGH DPI DISPLAYS ===== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .logo-img {
    image-rendering: -webkit-optimize-contrast !important;
    image-rendering: crisp-edges !important;
  }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .main-nav,
  .mobile-menu-toggle,
  .btn-primary,
  .modalidade-card,
  .modulo-card,
  .faq-item {
    transition: none !important;
  }
  
  .hamburger-line {
    transition: none !important;
  }
  
  .hero-section {
    animation: none !important;
  }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media screen and (max-width: 768px) {
  /* Focus indicators */
  .btn-primary:focus,
  .submit-btn:focus,
  .lang-option:focus,
  .main-nav a:focus {
    outline: 2px solid #ff8c42 !important;
    outline-offset: 2px !important;
  }
  
  /* High contrast mode */
  @media (prefers-contrast: high) {
    .btn-primary,
    .submit-btn {
      border: 2px solid #ffffff !important;
    }
    
    .modalidade-card,
    .modulo-card,
    .faq-item,
    .contact-form {
      border: 2px solid rgba(255, 255, 255, 0.3) !important;
    }
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
@media screen and (max-width: 768px) {
  /* Hardware acceleration */
  .main-nav,
  .mobile-menu-toggle,
  .btn-primary,
  .modalidade-card,
  .modulo-card {
    will-change: transform !important;
    transform: translateZ(0) !important;
  }
  
  /* Smooth scrolling */
  html {
    scroll-behavior: smooth !important;
  }
}

/* ===== SAFE AREA SUPPORT (iPhone X and newer) ===== */
@supports (padding: max(0px)) {
  @media screen and (max-width: 768px) {
    .main-header {
      padding-left: max(0.5rem, env(safe-area-inset-left)) !important;
      padding-right: max(0.5rem, env(safe-area-inset-right)) !important;
    }
    
    .main-nav {
      padding-top: max(80px, env(safe-area-inset-top) + 60px) !important;
      padding-left: max(1.5rem, env(safe-area-inset-left) + 1rem) !important;
      padding-right: max(1.5rem, env(safe-area-inset-right) + 1rem) !important;
      padding-bottom: max(2rem, env(safe-area-inset-bottom) + 1rem) !important;
    }
    
    .hero-section {
      padding-top: max(120px, env(safe-area-inset-top) + 100px) !important;
    }
  }
}
