/* Media Queries */

/* Better touch targets for mobile */
@media (hover: none) and (pointer: coarse) {
  .btn, 
  .secondary-btn,
  .nav-link,
  .social-icon {
    padding: 15px 30px;
  }
  
  .nav-links {
    gap: 20px;
  }
  
  .mobile-menu-btn {
    padding: 10px;
  }
  
  .back-to-top {
    width: 60px;
    height: 60px;
  }
  
  /* Improve form elements for touch */
  input, select, textarea, button {
    font-size: 16px; /* Prevents iOS zoom on focus */
  }
  
  .checkbox-group input[type="checkbox"] {
    width: 24px;
    height: 24px;
  }
}

/* Large screens */
@media (max-width: 1024px) {
  :root {
    --header-height: 60px;
  }
  
  .container {
    padding: 0 20px;
  }
  
  h1 {
    font-size: 2.8rem;
  }
  
  h2 {
    font-size: 2.2rem;
  }
  
  /* Hero section adjustments for large screens */
  .hero-grid {
    gap: 40px;
  }
  
  .hero h1 {
    font-size: 3.5rem;
  }
  
  .hero-tagline {
    font-size: 1.6rem !important;
  }
  
  .hero-description {
    font-size: 1.2rem !important;
  }
  
  .hero-illustration {
    width: 350px;
    height: 350px;
  }
  
  .testimonial-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
  
  .testimonial-card {
    padding: 30px;
  }
  
  .service-card {
    padding: 30px 20px;
  }
  
  /* Better AI visualization sizing */
  .ai-core-wrapper {
    width: 250px;
    height: 250px;
  }
  
  /* AI core adjustments */
  .ai-core-wrapper {
    max-width: 350px;
    max-height: 350px;
  }
  
  /* Update the icon distance for this breakpoint */
  .ai-icons {
    --icon-distance: 150px;
  }
}

/* Medium screens */
@media (max-width: 768px) {
  section {
    padding: 70px 0;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  h2 {
    font-size: 2rem;
  }
  
  h3 {
    font-size: 1.3rem;
  }
  
  p {
    font-size: 1rem;
  }
  
  /* Hero section for tablets - improved spacing and alignment */
  .hero {
    min-height: auto;
    padding: 120px 0 100px;
  }
  
  /* Hero section centering improvements */
  .hero-grid {
    grid-template-columns: 1fr;
    height: auto;
    text-align: center;
    gap: 30px;
  }
  
  /* Better hero content alignment */
  .hero-content {
    margin: 0 auto;
    padding-top: 0;
    max-width: 500px;
  }
  
  /* Center the subtitle line */
  .hero-subtitle-wrapper::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  /* Properly center the visual */
  .hero-visual {
    margin: 20px auto 0;
    display: flex;
    justify-content: center;
    width: 100%;
    height: 300px;
  }
  
  /* Center the AI visual properly */
  .ai-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 300px;
    margin: 0 auto;
  }
  
  .hero-content {
    margin: 0 auto;
    max-width: 500px;
  }
  
  .hero h1 {
    font-size: 3rem;
  }
  
  .hero h1::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .hero-visual {
    margin-top: 20px;
    max-width: 300px;
    height: 300px;
  }
  
  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-features {
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .scroll-indicator {
    display: none;
  }
  
  .services {
    clip-path: polygon(0 2%, 100% 0, 100% 98%, 0 100%);
    margin: -25px 0;
    padding: 100px 0;
  }
  
  .services-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .cta-buttons {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    width: 100%;
  }
  
  .btn, .secondary-btn {
    width: 100%;
    text-align: center;
  }
  
  .benefit-item {
    padding: 20px;
    flex-direction: column;
  }
  
  .check-icon {
    margin-right: 0;
    margin-bottom: 15px;
  }
  
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .process-step {
    flex-direction: column;
    padding: 25px;
  }
  
  .process-number {
    margin-right: 0;
    margin-bottom: 20px;
  }
  
  .process-connector {
    display: none; /* Remove the connectors in mobile view */
  }
  
  .process-step:hover {
    transform: translateY(-5px);
  }
  
  .back-to-top {
    bottom: 20px;
    right: 20px;
  }
  
  /* Hero illustration adjustments */
  .hero-illustration {
    width: 300px;
    height: 300px;
    margin: 0 auto;
  }
  
  .central-circle {
    width: 100px;
    height: 100px;
  }
  
  .chat-bubble {
    transform: scale(0.8);
  }
  
  .hero-stats {
    position: relative;
    bottom: auto;
    left: auto;
    max-width: 300px;
    margin: 30px auto 0;
  }
  
  /* Value Proposition Section */
  .value-prop {
    padding: 60px 0;
  }
  
  .stats-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 20px;
    margin-top: 40px;
  }
  
  .stat-box:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 300px;
    margin: 0 auto;
  }
  
  .stat-number {
    font-size: 2.8rem;
  }
  
  /* Improved mobile menu */
  .mobile-menu {
    padding: 100px 20px;
  }
  
  .mobile-nav-link {
    margin-bottom: 20px;
  }
  
  .mobile-nav-link a {
    font-size: 1.3rem;
    padding: 15px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.3s ease;
  }
  
  .mobile-nav-link a:active {
    transform: scale(0.95);
    background: rgba(0,226,195,0.1);
  }
  
  /* Improved contact section layout */
  .contact-container {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  
  .contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
  }
  
  /* Form improvements */
  .form-header {
    padding-bottom: 15px;
    margin-bottom: 20px;
  }
  
  .form-group {
    margin-bottom: 20px;
  }
  
  .checkbox-group {
    margin-bottom: 10px;
  }
  
  /* AI core responsive adjustments */
  .ai-core-wrapper {
    max-width: 320px;
    max-height: 320px;
  }
  
  /* Update floating icons to better fit the smaller core size */
  .ai-icons {
    --icon-distance: 130px;
  }
  
  /* Adjust floating icon sizes */
  .floating-icon {
    width: 40px;
    height: 40px;
  }
  
  .floating-icon svg {
    width: 20px;
    height: 20px;
  }
  
  /* Adjust ring sizes */
  .ring-1 {
    min-width: 140px;
    min-height: 140px;
  }
  
  .ring-2 {
    min-width: 220px;
    min-height: 220px;
  }
  
  .ring-3 {
    min-width: 300px;
    min-height: 300px;
  }
  
  /* Core pulse adjustment */
  .core-pulse {
    width: 55px;
    height: 55px;
  }
}

/* Small screens */
@media (max-width: 480px) {
  section {
    padding: 60px 0;
  }
  
  .container {
    padding: 0 15px;
  }
  
  h1 {
    font-size: 2.2rem;
  }
  
  h2 {
    font-size: 1.8rem;
  }
  
  .hero {
    padding: 100px 0 80px;
  }
  
  /* Hero improvements for mobile */
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 5px;
  }
  
  .hero-tagline {
    font-size: 1.3rem !important;
  }
  
  .hero-description {
    font-size: 1rem !important;
  }
  
  .hero-feature {
    padding: 8px 12px;
  }
  
  .hero-feature span {
    font-size: 0.9rem;
  }
  
  .hero-illustration {
    max-width: 240px;
    height: 240px;
  }
  
  .bubble-1 {
    left: 5%;
  }
  
  .bubble-3 {
    left: 0;
  }
  
  .particle {
    opacity: 0.1;
  }
  
  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }
  
  .btn, .secondary-btn {
    font-size: 1rem;
    padding: 12px 24px;
  }
  
  .stat-box {
    padding: 20px 15px;
    min-width: 100%;
    margin-bottom: 15px;
  }
  
  .stat-number {
    font-size: 2.5rem;
    margin-bottom: 8px;
  }
  
  .stat-label {
    font-size: 1rem;
  }
  
  .cta h2 {
    font-size: 2rem;
  }
  
  .social-links {
    gap: 15px;
  }
  
  .social-icon {
    width: 40px;
    height: 40px;
  }
  
  .shape-1 {
    width: 80px;
    height: 80px;
  }
  
  .shape-2, .shape-3 {
    width: 60px;
    height: 60px;
  }
  
  /* Value Proposition Section small screens */
  .value-prop {
    padding: 50px 0;
  }
  
  .section-intro p {
    font-size: 0.95rem;
    padding: 0 10px;
  }
  
  .stats-container {
    gap: 15px;
  }
  
  .stat-box {
    padding: 20px 15px;
  }
  
  .stat-box:nth-child(3) {
    margin-top: 5px;
    max-width: 100%;
  }
  
  .stat-number {
    font-size: 2.2rem;
    margin-bottom: 8px;
  }
  
  .stat-label {
    font-size: 0.95rem;
  }
  
  .ai-core-wrapper {
    width: 220px;
    height: 220px;
  }
  
  .core-ring.ring-3 {
    width: 200px;
    height: 200px;
  }
  
  .core-pulse {
    width: 50px;
    height: 50px;
  }
  
  /* Improved form touch targets */
  .form-group input,
  .form-group select,
  .form-group textarea {
    padding: 14px 16px;
    margin-bottom: 5px;
  }
  
  .form-submit {
    padding: 16px;
    margin-top: 15px;
  }
  
  .checkbox-group {
    padding: 5px 0;
  }
  
  /* Improved spacing for cards */
  .contact-card,
  .service-card,
  .testimonial-card,
  .benefit-item {
    padding: 25px 20px;
  }
  
  /* Better button sizing */
  .btn, .secondary-btn {
    width: 100%;
    max-width: 320px;
    display: block;
    margin: 0 auto;
    margin-bottom: 15px;
  }
  
  .hero-buttons {
    display: block;
  }
  
  .hero-feature {
    text-align: left;
  }
  
  /* Fix readability issues */
  p, .testimonial-text, .contact-card p {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* Improved card spacing */
  .service-card {
    margin-bottom: 20px;
  }
  
  /* Value proposition spacing */
  .stats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  
  .stat-box {
    width: 100%;
    max-width: 100%;
  }
  
  /* Fix AI graphic centering on mobile */
  .hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 240px;
    margin: 0 auto;
  }
  
  .ai-visual {
    width: 240px;
    height: 240px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
  }
  
  .ai-core-wrapper {
    position: relative;
    width: 220px;
    height: 220px;
    margin: 0 auto;
  }
  
  .ai-core {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  .core-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
  
  /* AI core mobile adjustments */
  .hero-visual {
    height: 280px;
  }
  
  .ai-visual {
    max-width: 280px;
    height: 280px;
  }
  
  .ai-core-wrapper {
    max-width: 280px;
    max-height: 280px;
  }
  
  /* Update floating icons for mobile */
  .ai-icons {
    --icon-distance: 110px;
  }
  
  /* Reduce floating icon size on mobile */
  .floating-icon {
    width: 34px;
    height: 34px;
  }
  
  .floating-icon svg {
    width: 17px;
    height: 17px;
  }
  
  /* Adjust ring sizes for mobile */
  .ring-1 {
    min-width: 120px;
    min-height: 120px;
  }
  
  .ring-2 {
    min-width: 190px;
    min-height: 190px;
  }
  
  .ring-3 {
    min-width: 260px;
    min-height: 260px;
  }
  
  .core-pulse {
    width: 45px;
    height: 45px;
  }
}

/* Extra small screens */
@media (max-width: 375px) {
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.6rem;
    margin-bottom: 30px;
  }
  
  h3 {
    font-size: 1.2rem;
  }
  
  .hero-badge {
    font-size: 0.8rem;
    padding: 6px 12px;
  }
  
  .hero-tagline {
    font-size: 1.2rem !important;
  }
  
  .contact-form {
    padding: 25px 15px;
  }
  
  .form-header h3 {
    font-size: 1.3rem;
  }
  
  .form-icon {
    font-size: 1.8rem;
  }
  
  /* Improved spacing */
  section {
    padding: 50px 0;
  }
  
  .section-intro {
    margin-bottom: 40px;
  }
  
  /* Fix nav padding */
  .nav .container {
    padding: 0 15px;
  }
  
  .logo {
    font-size: 1.5rem;
  }
  
  /* Adjust hero height for very small phones */
  .hero-visual {
    height: 260px; 
  }
  
  /* Adjust AI core size for very small screens */
  .ai-visual {
    max-width: 250px;
    height: 250px;
  }
  
  .ai-core-wrapper {
    max-width: 240px;
    max-height: 240px;
  }
  
  /* Make floating icons closer to core on tiny screens */
  .ai-icons {
    --icon-distance: 90px;
  }
  
  /* Smallest floating icon size */
  .floating-icon {
    width: 30px;
    height: 30px;
  }
  
  .floating-icon svg {
    width: 15px;
    height: 15px;
  }
  
  /* Adjust ring sizes for tiny screens */
  .ring-1 {
    min-width: 100px;
    min-height: 100px;
  }
  
  .ring-2 {
    min-width: 170px; 
    min-height: 170px;
  }
  
  .ring-3 {
    min-width: 230px;
    min-height: 230px;
  }
}

/* Contact form responsive adjustments */
@media (max-width: 968px) {
  .contact-container {
    grid-template-columns: 1fr;
  }
  
  .contact-info {
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .contact-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 480px) {
  .contact-form {
    padding: 30px 20px;
  }
  
  .contact-info {
    flex-direction: column;
  }
  
  /* Better spacing for form elements */
  .form-group label {
    margin-bottom: 8px;
  }
  
  /* Fix horizontal scrolling issues */
  html, body {
    max-width: 100%;
    overflow-x: hidden;
  }
  
  /* Fixed position elements for mobile */
  .back-to-top {
    right: 15px;
    bottom: 15px;
  }
}

/* Print Styles */
@media print {
  body {
    background: white;
    color: black;
    font-size: 12pt;
  }
  
  .nav, .back-to-top, .shape {
    display: none;
  }
  
  h1, h2, h3 {
    color: black;
    -webkit-text-fill-color: black;
  }
  
  a {
    color: blue;
    text-decoration: underline;
  }
  
  .hero, section {
    padding: 20px 0;
    min-height: auto;
    page-break-inside: avoid;
  }
  
  .container {
    max-width: 100%;
  }
}

/* Fix for notch devices */
@supports (padding: max(0px)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
  
  .nav {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }
}

/* Dark mode improvements */
@media (prefers-color-scheme: dark) {
  .form-group input::placeholder,
  .form-group textarea::placeholder {
    color: rgba(255,255,255,0.35);
  }
}

/* Responsive styles */

/* Mobile and tablet adjustments for the hero AI visualization */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .hero-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
  }
  
  .hero-subtitle-wrapper::after {
    left: 50%;
    transform: translateX(-50%);
  }
  
  .ai-visual {
    height: 400px;
  }
  
  .ai-core-wrapper {
    transform: scale(0.85);
  }
  
  .floating-icon {
    width: 42px;
    height: 42px;
  }
  
  .floating-icon svg {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 768px) {
  .ai-visual {
    height: 350px;
  }
  
  .ai-core-wrapper {
    transform: scale(0.75);
  }
  
  .core-pulse {
    width: 55px;
    height: 55px;
  }
  
  .core-ring {
    border-width: 1px;
  }
  
  .ring-1 {
    min-width: 140px;
    min-height: 140px;
  }
  
  .ring-2 {
    min-width: 230px;
    min-height: 230px;
  }
  
  .ring-3 {
    min-width: 300px;
    min-height: 300px;
  }
  
  .floating-icon {
    width: 36px;
    height: 36px;
  }
  
  .floating-icon svg {
    width: 18px;
    height: 18px;
  }
}

@media (max-width: 480px) {
  .ai-visual {
    height: 300px;
  }
  
  .ai-core-wrapper {
    transform: scale(0.65);
  }
  
  .floating-icon {
    width: 32px;
    height: 32px;
  }
  
  .floating-icon svg {
    width: 16px;
    height: 16px;
  }
  
  .hero {
    padding-bottom: 100px;
  }
}

/* Special fix for AI core responsiveness */
@media (max-width: 360px) and (max-height: 640px) {
  .hero-visual {
    height: 240px;
  }
  
  .ai-visual {
    max-width: 220px;
    height: 220px;
  }
  
  .ai-core-wrapper {
    max-width: 220px;
    max-height: 220px;
  }
  
  .ai-icons {
    --icon-distance: 85px;
  }
  
  .floating-icon {
    width: 28px;
    height: 28px;
  }
  
  .floating-icon svg {
    width: 14px;
    height: 14px;
  }
}

/* Portrait orientation adjustment */
@media (max-width: 480px) and (orientation: portrait) {
  .hero {
    min-height: 90vh;
    padding-bottom: 50px;
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 80px 0 60px;
  }
  
  .hero-grid {
    grid-template-columns: 1fr 1fr; /* Switch back to 2 columns in landscape */
    gap: 20px;
  }

  .hero-content {
    text-align: left;
  }
  
  .hero-subtitle-wrapper::after {
    left: 0;
    transform: none;
  }
  
  .ai-visual {
    height: 300px;
  }
  
  .ai-core-wrapper {
    max-width: 280px;
    max-height: 280px;
  }
  
  .ai-icons {
    --icon-distance: 110px;
  }
}