/* ============================================
   CORREÇÕES ESPECÍFICAS PARA CARDS INFORMATIVOS EM MOBILE
   Aplicar em páginas de cases individuais
   ============================================ */

@media (max-width: 768px) {
  /* Cards informativos - tamanho e espaçamento adequados */
  .glass,
  div[class*="rounded"],
  section > div {
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  /* Títulos em cards informativos */
  section h2,
  section h3,
  .glass h2,
  .glass h3 {
    font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
    line-height: 1.3 !important;
    margin-bottom: 1rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
  }
  
  /* Textos em cards - legibilidade garantida */
  section p,
  .glass p,
  section span,
  .glass span,
  section div:not([class*="grid"]):not([class*="flex"]):not([class*="absolute"]) {
    font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
    line-height: 1.7 !important;
    margin-bottom: 1rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    text-align: left !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    padding: 0 !important;
  }
  
  /* Textos com separadores (•) - garantir quebra de linha */
  /* Como :contains não funciona em CSS, aplicamos em todos os textos */
  section p,
  section span,
  .glass p,
  .glass span {
    word-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.8 !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
    hyphens: auto !important;
    -webkit-hyphens: auto !important;
  }
  
  /* Garantir que textos longos quebrem */
  * {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
  }
  
  /* Listas em cards */
  section ul,
  section ol,
  .glass ul,
  .glass ol {
    padding-left: 1.5rem !important;
    margin-bottom: 1rem !important;
    font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
    line-height: 1.7 !important;
    width: 100% !important;
  }
  
  section li,
  .glass li {
    margin-bottom: 0.75rem !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    line-height: 1.7 !important;
    padding-right: 0.5rem !important;
  }
  
  /* Grids em 1 coluna */
  section .grid {
    grid-template-columns: 1fr !important;
    gap: 1.5rem !important;
    width: 100% !important;
  }
  
  /* Tags/chips - tamanho adequado */
  .rounded-full,
  span[class*="px-"] {
    display: inline-block !important;
    padding: 0.625rem 1.25rem !important;
    margin: 0.375rem 0.375rem 0.375rem 0 !important;
    font-size: clamp(0.8rem, 3vw, 0.95rem) !important;
    line-height: 1.4 !important;
    white-space: normal !important;
    word-wrap: break-word !important;
    max-width: 100% !important;
  }
  
  /* Links em cards */
  section a,
  .glass a {
    display: inline-block !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    line-height: 1.6 !important;
    padding: 0.5rem 0 !important;
    margin: 0.5rem 0 !important;
    font-size: clamp(0.9rem, 3.5vw, 1.1rem) !important;
    text-decoration: underline !important;
  }
  
  /* Garantir que textos não fiquem espremidos */
  * {
    min-width: 0 !important;
  }
  
  /* Cards - altura adequada */
  .glass,
  div[class*="rounded"] {
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
  
  /* Evitar texto cortado */
  section *,
  .glass * {
    overflow: visible !important;
    text-overflow: clip !important;
    white-space: normal !important;
  }
  
  /* Espaçamento entre cards */
  section > div + div {
    margin-top: 1.5rem !important;
  }
  
  /* Container principal */
  .max-w-7xl,
  .max-w-6xl {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    width: 100% !important;
  }
}

/* Correções específicas para iOS */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 768px) {
    section *,
    .glass * {
      -webkit-text-size-adjust: 100% !important;
      text-size-adjust: 100% !important;
    }
    
    section,
    .glass {
      font-size: 16px !important;
    }
  }
}

/* Correções para telas muito pequenas */
@media (max-width: 480px) {
  /* Cards mais compactos */
  .glass,
  div[class*="rounded"] {
    padding: 1rem !important;
    margin-bottom: 1rem !important;
  }
  
  /* Textos menores mas legíveis */
  section p,
  .glass p {
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
  }
  
  /* Títulos menores */
  section h2,
  section h3 {
    font-size: 1.25rem !important;
    line-height: 1.3 !important;
  }
  
  /* Espaçamentos reduzidos */
  section > div + div {
    margin-top: 1rem !important;
  }
}

