/* KidsLearn - Responsive Mobile First */
html {
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
  /* iOS specific fixes */
  -webkit-overflow-scrolling: touch;
}

/* Allow text selection for content */
p, h1, h2, h3, h4, li {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

/* Prevent selection for interactive elements */
button, .btn, .nav a {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  color: #0f172a;
  background: #f8fafc;
  line-height: 1.6;
  /* Prevent horizontal scroll on mobile */
  overflow-x: hidden;
  width: 100%;
  min-height: 100vh;
}
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 12px 0;
  gap: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 0;
  background: #ffffff;
  z-index: 100;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: center;
}
.logo {
  width: 48px;
  height: auto;
  transition: transform 0.3s ease;
}

.titles h1 {
  margin: 0;
  font-size: 1.4rem;
  text-align: center;
  background: linear-gradient(135deg, #2563eb, #8b5cf6);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.subtitle {
  margin: 4px 0 0 0;
  color: #475569;
  font-size: 0.85rem;
  text-align: center;
}
.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.nav a {
  padding: 8px 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
  font-size: 0.9rem;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.nav a:hover {
  color: #8b5cf6;
  background: rgba(139, 92, 246, 0.1);
  transform: translateY(-2px);
}
.hero {
  background: linear-gradient(135deg, #e0f2fe, #f3e8ff, #fef3c7);
  padding: 40px 0;
  margin-bottom: 30px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero h1 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  line-height: 1.3;
  color: #0f172a;
}

.hero h2 {
  margin: 0 0 16px 0;
  font-size: 1.5rem;
  line-height: 1.3;
  color: #0f172a;
}

.hero p {
  margin: 0 auto 20px auto;
  max-width: 600px;
  color: #374151;
  font-size: 0.95rem;
  padding: 0 10px;
}
.cta-group{display:flex;gap:12px;justify-content:center;flex-wrap:wrap}
.btn{display:inline-block;padding:12px 18px;border-radius:10px;text-decoration:none;font-weight:700;border:2px solid #0ea5e9}
.btn.primary{background:#0ea5e9;color:#fff}
.btn.outline{color:#0ea5e9;background:transparent}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:20px 0 36px 0}
.card{background:#fff;border:1px solid #e2e8f0;border-radius:12px;padding:16px;box-shadow:0 2px 8px rgba(0,0,0,0.04)}
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  margin: 24px 0;
}

.grid h2 {
  font-size: 1.4rem;
  margin-bottom: 16px;
  text-align: center;
}

.checklist li, .bullets li {
  margin: 10px 0;
  font-size: 0.9rem;
}

.checklist li::before {
  content: '✨';
  margin-right: 8px;
}

.bullets li::before {
  content: '🎯';
  margin-right: 8px;
}

.contact {
  text-align: center;
  margin: 40px 0 30px 0;
  padding: 24px 16px;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.contact h2 {
  color: #ea580c;
  margin-bottom: 16px;
  font-size: 1.3rem;
}

.footer {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: #e2e8f0;
  padding: 24px 0;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* TABLET RESPONSIVO (768px+) */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }
  
  .header {
    flex-direction: row;
    justify-content: space-between;
    padding: 16px 0;
  }
  
  .brand {
    justify-content: flex-start;
  }
  
  .logo {
    width: 56px;
  }
  
  .titles h1 {
    font-size: 1.6rem;
    text-align: left;
  }
  
  .subtitle {
    font-size: 0.95rem;
    text-align: left;
  }
  
  .nav {
    justify-content: flex-end;
    gap: 12px;
  }
  
  .nav a {
    font-size: 1rem;
  }
  
  .hero {
    padding: 50px 0;
  }
  
  .hero h2 {
    font-size: 1.8rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .cta-group {
    flex-direction: row;
    gap: 16px;
  }
  
  .btn {
    width: auto;
    max-width: none;
    font-size: 1rem;
  }
  
  .cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  
  .card {
    padding: 24px;
  }
  
  .card h3 {
    font-size: 1.3rem;
  }
  
  .card p {
    font-size: 1rem;
  }
  
  .grid h2 {
    font-size: 1.6rem;
    text-align: left;
  }
  
  .checklist li, .bullets li {
    font-size: 1rem;
  }
  
  .contact {
    padding: 32px;
  }
  
  .contact h2 {
    font-size: 1.6rem;
  }
}

/* DESKTOP (1024px+) */
@media (min-width: 1024px) {
  .container {
    padding: 0 32px;
  }
  
  .header {
    padding: 20px 0;
  }
  
  .logo {
    width: 64px;
  }
  
  .logo:hover {
    transform: scale(1.1) rotate(5deg);
  }
  
  .titles h1 {
    font-size: 1.8rem;
  }
  
  .hero {
    padding: 60px 0;
  }
  
  .hero h2 {
    font-size: 2.2rem;
  }
  
  .hero p {
    font-size: 1.1rem;
  }
  
  .cards {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  }
  
  .grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
  
  .grid h2 {
    font-size: 1.8rem;
  }
  
  .contact {
    padding: 40px;
  }
  
  .contact h2 {
    font-size: 1.8rem;
  }
}

/* iPhone e telas muito pequenas (< 375px) */
@media (max-width: 375px) {
  .container {
    padding: 0 12px;
  }
  
  .header {
    padding: 10px 0;
  }
  
  .logo {
    width: 40px;
  }
  
  .titles h1 {
    font-size: 1.2rem;
  }
  
  .subtitle {
    font-size: 0.8rem;
  }
  
  .nav a {
    padding: 6px 10px;
    font-size: 0.85rem;
    min-height: 40px;
  }
  
  .hero {
    padding: 30px 0;
  }
  
  .hero h2 {
    font-size: 1.3rem;
    padding: 0 5px;
  }
  
  .hero p {
    font-size: 0.85rem;
    padding: 0 8px;
  }
  
  .btn {
    padding: 12px 16px;
    font-size: 0.85rem;
    max-width: 100%;
  }
  
  .card {
    padding: 16px;
  }
  
  .card h3 {
    font-size: 1.1rem;
  }
  
  .card p {
    font-size: 0.85rem;
  }
  
  .contact {
    padding: 20px 12px;
  }
}

/* iPhone SE e telas extra pequenas (< 320px) */
@media (max-width: 320px) {
  .container {
    padding: 0 8px;
  }
  
  .titles h1 {
    font-size: 1.1rem;
  }
  
  .hero h2 {
    font-size: 1.2rem;
  }
  
  .hero p {
    font-size: 0.8rem;
  }
  
  .nav {
    gap: 4px;
  }
  
  .nav a {
    padding: 6px 8px;
    font-size: 0.8rem;
  }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
  .hero {
    /* Fix for iOS viewport height issues */
    min-height: auto;
  }
  
  .btn {
    /* Prevent zoom on iOS when clicking buttons */
    font-size: 16px;
  }
  
  input, textarea, select {
    /* Prevent zoom on form fields */
    font-size: 16px;
  }
}

/* Landscape para smartphones */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    padding: 20px 0;
  }
  
  .hero h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
  }
  
  .cta-group {
    flex-direction: row;
    gap: 12px;
  }
}

/* Prevent horizontal overflow */
.container, .hero, .header, .footer {
  max-width: 100%;
  overflow-x: hidden;
}
