/* Custom Tailwind Directives */
@tailwind base;
@tailwind components;
@tailwind utilities;

@layer base {
  html {
    scroll-behavior: smooth;
  }
}

@layer utilities {
  .perspective-1000 {
    perspective: 1000px;
  }
  .transform-style-3d {
    transform-style: preserve-3d;
  }
  .backface-hidden {
    backface-visibility: hidden;
  }
  .rotate-y-180 {
    transform: rotateY(180deg);
  }
  .saturate-75 {
    filter: saturate(0.75);
  }
}

/* Custom Base Styles */
* {
  box-sizing: border-box;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  width: 100%;
}

/* Animations and Transitions */
.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

.transition-shadow {
  transition-property: box-shadow;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 300ms;
}

/* Interactive Elements */
a, button {
  cursor: pointer;
}

/* ===========================
   MOBILE RESPONSIVE FIXES
   =========================== */

/* Global overflow prevention */
html, body {
  max-width: 100vw;
  overflow-x: hidden;
}

main, section, footer, header {
  max-width: 100vw;
  overflow-x: hidden;
}

/* Ensure all images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Text wrapping */
h1, h2, h3, h4, h5, h6, p, span, a, li, div {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Mobile specific (< 768px) */
@media (max-width: 767px) {
  /* Hero section adjustments */
  #hero {
    min-height: 85vh !important;
  }

  #hero h1 {
    font-size: 2rem;
    line-height: 1.2;
  }

  #hero p {
    font-size: 0.875rem;
    line-height: 1.6;
  }

  /* CTA buttons full width on mobile */
  #hero .flex a {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  /* Credibility bar: 2 columns on mobile */
  #credibilidade .grid {
    gap: 1.25rem;
  }

  #credibilidade h3 {
    font-size: 1rem;
  }

  /* About section */
  #sobre img {
    max-width: 300px;
    margin: 0 auto;
  }

  #sobre h2 {
    font-size: 1.75rem;
  }

  /* Service cards */
  #servicos .grid {
    gap: 2.5rem;
  }

  /* Make service card icon circles align properly */
  #servicos .relative .absolute {
    top: 68px;
  }

  /* Benefits grid */
  #beneficios .grid {
    gap: 0.75rem;
  }

  #beneficios .grid > div {
    padding: 1.25rem;
  }

  /* Process steps - smaller circles */
  #como-funciona .grid {
    gap: 2rem;
  }

  /* Testimonials */
  #depoimentos .grid {
    gap: 2.5rem;
  }

  #depoimentos .grid > div {
    margin-top: 1.5rem;
  }

  /* FAQ */
  #faq button h3 {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  /* CTA final */
  #contato .backdrop-blur-sm {
    padding: 1.5rem;
  }

  #contato h2 {
    font-size: 1.25rem;
  }

  /* Footer */
  footer .grid {
    gap: 1.5rem;
  }

  footer h5 {
    margin-bottom: 1rem;
  }

  /* Better touch targets for all interactive elements */
  button, a {
    -webkit-tap-highlight-color: transparent;
  }
}

/* Extra small screens (< 375px) */
@media (max-width: 374px) {
  #hero h1 {
    font-size: 1.625rem;
  }

  #hero h2 {
    font-size: 0.7rem;
  }

  #credibilidade h3 {
    font-size: 0.875rem;
  }

  #credibilidade p {
    font-size: 0.7rem;
  }

  /* Reduce section padding */
  section {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  /* Process step circles */
  .perspective-1000 {
    width: 200px !important;
    height: 200px !important;
  }
}

/* Medium devices (tablets) */
@media (min-width: 768px) and (max-width: 1023px) {
  #hero {
    min-height: 75vh !important;
  }

  #sobre .flex-col.lg\\:flex-row {
    gap: 2rem;
  }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1; 
}
 
::-webkit-scrollbar-thumb {
  background: #4A6058; 
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #3A4F47; 
}


