/* TeleWorld AI - Responsive Optimization CSS */
/* Fixes content scaling issues and optimizes layout for all screen sizes */

/* Base container optimization */
.container {
  max-width: 1400px; /* matches design-system --container-max-width */
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

/* Responsive typography — fluid clamp() scaling (RES-4 FIX: replaces !important step breakpoints) */
h1 {
  font-size: clamp(2rem, 1.4rem + 2.5vw, 3.5rem);
}
h2 {
  font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
}
h3 {
  font-size: clamp(1.3rem, 1rem + 1.5vw, 2rem);
}
p {
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.125rem);
}

/* Navigation optimization */
.main-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2rem;
}

@media (max-width: 768px) {
  .nav-menu {
    gap: 1rem;
  }

  .nav-menu li a {
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Logo scaling fix */
.teleworld-logo {
  transform: scale(1);
  transition: transform 0.3s ease;
}

@media (max-width: 768px) {
  .teleworld-logo {
    transform: scale(0.9);
  }

  .teleworld-icon {
    width: 50px !important;
    height: 50px !important;
  }

  .teleworld-text {
    font-size: 24px !important;
  }
}

@media (max-width: 480px) {
  .teleworld-logo {
    transform: scale(0.8);
  }

  .teleworld-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .teleworld-text {
    font-size: 20px !important;
  }
}

/* Header optimization */
.site-header {
  padding: 1rem 0;
  position: fixed;
  top: 0;
  z-index: 9999;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(10px);
}

.header-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

@media (max-width: 900px) {
  .header-content {
    gap: 1rem;
  }

  .header-cta {
    display: none;
  }
}

/* Button scaling */
.btn,
.btn-primary,
.btn-outline {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: 8px;
  transition: all 0.3s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

@media (max-width: 768px) {
  .btn,
  .btn-primary,
  .btn-outline {
    padding: 0.6rem 1.2rem;
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .btn,
  .btn-primary,
  .btn-outline {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Content sections optimization */
section {
  padding: 4rem 0;
}

@media (max-width: 768px) {
  section {
    padding: 3rem 0;
  }
}

@media (max-width: 480px) {
  section {
    padding: 2rem 0;
  }
}

/* Grid layouts optimization */
.benefits-grid,
.agent-types-grid,
.features-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

@media (max-width: 768px) {
  .benefits-grid,
  .agent-types-grid,
  .features-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .benefits-grid,
  .agent-types-grid,
  .features-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Card optimization */
.benefit-card,
.agent-card,
.feature-card {
  padding: 2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
  border: 1px solid rgba(139, 92, 246, 0.1);
  transition: all 0.3s ease;
}

@media (max-width: 768px) {
  .benefit-card,
  .agent-card,
  .feature-card {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .benefit-card,
  .agent-card,
  .feature-card {
    padding: 1rem;
  }
}

/* Hero section optimization */
.agents-hero {
  padding: 6rem 0;
  text-align: center;
}

@media (max-width: 768px) {
  .agents-hero {
    padding: 4rem 0;
  }
}

@media (max-width: 480px) {
  .agents-hero {
    padding: 3rem 0;
  }
}

.hero-content {
  max-width: 1000px;
  margin: 0 auto;
  text-align: center;
  width: 100%;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-features {
    gap: 1rem;
    margin: 1.5rem 0;
  }
}

.feature-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(139, 92, 246, 0.1);
  border-radius: 20px;
  font-size: 0.9rem;
}

@media (max-width: 480px) {
  .feature-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* CTA buttons optimization */
.hero-cta {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero-cta {
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero-cta {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
  }
}

/* Stats optimization */
.benefit-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #8b5cf6;
}

@media (max-width: 768px) {
  .stat-number {
    font-size: 1.5rem;
  }
}

.stat-label {
  font-size: 0.9rem;
  color: #94a3b8;
  margin-top: 0.25rem;
}

@media (max-width: 768px) {
  .stat-label {
    font-size: 0.8rem;
  }
}

/* Section headers optimization */
.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

@media (max-width: 768px) {
  .section-header {
    margin-bottom: 2rem;
  }
}

/* Fix for system-wide scaling issues */
html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

body {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Ensure proper viewport scaling */
/* RES-12 FIX: Large desktop (1440px+) — prevent excessive whitespace */
@media (min-width: 1440px) {
  .container {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-section,
  .content-section {
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
  }
}

@media screen and (max-width: 320px) {
  html {
    font-size: 14px;
  }
}

/* Fix for high DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .teleworld-icon::before {
    border-width: 2px;
  }

  .teleworld-dot {
    width: 6px;
    height: 6px;
  }
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .teleworld-tele {
    color: #ffffff !important;
  }

  .teleworld-world {
    color: #ff6b35 !important;
  }

  .btn-primary {
    background: #ffffff !important;
    color: #000000 !important;
  }
}
/* Tablet-specific optimizations: 769px – 900px (portrait tablets) */
@media (min-width: 769px) and (max-width: 900px) {
  /* Ensure body has enough padding for the fixed header */
  body {
    padding-top: var(--header-height);
  }

  /* Page sections: reduce vertical padding on tablets */
  section {
    padding: 3rem 0;
  }

  /* Container: tighter horizontal padding on small tablets */
  .container {
    padding: 0 16px;
  }

  /* Grid: switch to 2-col on small tablets */
  .benefits-grid,
  .agent-types-grid,
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  /* Typography: slightly smaller on small tablets */
  h1 {
    font-size: 2.5rem !important;
  }
  h2 {
    font-size: 1.9rem !important;
  }
  h3 {
    font-size: 1.5rem !important;
  }
}
