@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

body {
  font-family: 'Poppins', sans-serif;
  overflow-x: hidden;
  background-color: #f8fafc;
}

/* Hero section */
.hero-gradient {
  background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
}

/* Cards */
.service-card {
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Animations */
.pulse {
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }

  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }

  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

.floating {
  animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
  0% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-15px);
  }

  100% {
    transform: translateY(0px);
  }
}

.wave {
  animation: wave 8s cubic-bezier(0.36, 0.45, 0.63, 0.53) infinite;
}

@keyframes wave {
  0% {
    margin-left: 0;
  }

  100% {
    margin-left: -1600px;
  }
}

/* Modals */
.modal,
.popup-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  overflow-y: auto;
  padding: 20px;
  box-sizing: border-box;
}

.modal-content,
.popup-content {
  background: white;
  margin: 5% auto;
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3);
  position: relative;
  animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(-50px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal,
.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #6b7280;
  cursor: pointer;
  transition: color 0.3s;
}

.close-modal:hover,
.popup-close:hover {
  color: #374151;
}

/* Fade-in animations */
.active-link {
  position: relative;
  color: #1e40af !important;
}

.active-link::after {
  content: '\2713';
  /* check mark */
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: -18px;
  color: #1e40af;
  font-weight: 700;
}

.fade-in {
  opacity: 0;
  transform: translateY(20px);
}

.slide-in-left {
  opacity: 0;
  transform: translateX(-50px);
}

.slide-in-right {
  opacity: 0;
  transform: translateX(50px);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
}

.rotate-in {
  opacity: 0;
  transform: rotate(-5deg) scale(0.95);
}

/* Responsive fixes */
@media (max-width: 768px) {
  nav {
    padding: 0 1rem;
  }

  .hero-content h1 {
    font-size: 2rem;
  }

  .hero-content p {
    font-size: 1rem;
  }

  .hero-buttons a {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Site logo styles: wrapper constrains height; image fills wrapper height */
.nav-brand {
  display: inline-flex;
  align-items: center;
}

/* Larger logo + compatibility tweaks */
.logo-wrap {
  height: 110px;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.logo-wrap img,
.site-logo {
  height: 100%;
  width: auto;
  display: block;
  max-width: 320px;
}

/* Slightly smaller on medium screens (tablets) */
@media (max-width: 1024px) {
  .logo-wrap {
    height: 86px;
  }

  .logo-wrap img,
  .site-logo {
    max-width: 260px;
  }
}

/* Mobile: hide site text and reduce logo height to keep nav compact */
@media (max-width: 768px) {
  .logo-wrap {
    height: 64px;
  }

  .logo-wrap img,
  .site-logo {
    max-width: 180px;
  }

  .nav-brand .brand-text {
    display: none;
  }

  /* make sure nav area is tall enough on mobile */
  nav {
    min-height: 64px;
  }
}

/* Ensure nav brand area centers vertically */
nav .flex-shrink-0 {
  display: flex;
  align-items: center;
}

/* Force the header row to be taller so large logo doesn't overflow */
nav .flex.justify-between.h-20.items-center {
  height: 110px;
}

@media (max-width: 1024px) {
  nav .flex.justify-between.h-20.items-center {
    height: 86px;
  }
}

@media (max-width: 768px) {
  nav .flex.justify-between.h-20.items-center {
    height: 64px;
  }
}

/* Ensure nav brand area centers vertically */
nav .flex-shrink-0 {
  display: flex;
  align-items: center;
}

/* -----------------------------
   Global responsive adjustments
   ----------------------------- */

/* Make media and images scale */
img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Hero: fluid type and spacing */
.hero-content {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 5vw, 4.5rem);
  line-height: 1.05;
}

.hero-content p {
  font-size: clamp(0.95rem, 1.4vw, 1.125rem);
}

/* Video container cap so it doesn't dominate on very large screens */
.video-container {
  max-height: 520px;
}

/* Cards and services: responsive grid if present */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card-image-container {
  height: auto;
  max-height: 320px;
  overflow: hidden;
}

/* Testimonials: make cards stack on small screens */
.testimonial-card {
  grid-template-columns: 1fr 1fr;
}

/* Modals and popups fill available width on small screens */
.modal-content,
.popup-content {
  width: 100%;
  box-sizing: border-box;
}

@media (min-width: 700px) {

  .modal-content,
  .popup-content {
    width: auto;
  }
}

/* Footer / grid fallbacks */
.grid {
  gap: 1.25rem;
}

/* NAV / header adjustments (ensure usable on small screens) */
nav {
  padding: 0 1rem;
}

.nav-brand .brand-text {
  white-space: nowrap;
}

/* Breakpoints: tablet and mobile */
@media (max-width: 1024px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-container {
    max-height: 420px;
  }

  nav .flex.justify-between.h-20.items-center {
    height: 86px;
  }
}

@media (max-width: 768px) {

  /* Stack services and cards */
  .services-grid {
    grid-template-columns: 1fr;
  }

  .testimonial-card {
    grid-template-columns: 1fr;
  }

  /* Hero adjustments */
  .hero-content {
    padding-top: 3rem;
    padding-bottom: 2rem;
  }

  .hero-content h1 {
    font-size: clamp(1.8rem, 7vw, 3rem);
  }

  /* Shrink nav and hide brand text to preserve space */
  nav {
    min-height: 64px;
  }

  .nav-brand .brand-text {
    display: none;
  }

  /* Cards: make them natural height */
  .service-card {
    min-height: 0;
  }

  /* Make hero image/video and other large media smaller */
  .video-container {
    max-height: 320px;
  }
}

@media (max-width: 420px) {

  /* Very small phones: compress spacing */
  .hero-content {
    padding-top: 2rem;
    padding-bottom: 1.5rem;
  }

  .logo-wrap {
    height: 56px;
  }

  .logo-wrap img,
  .site-logo {
    max-width: 140px;
  }
}

/* Additional responsive helpers for full-site compatibility */

/* Services grid: auto-fit columns so number adapts to viewport */
.services-grid.grid,
.services-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

.services-grid.grid.grid-cols-5 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
}

/* Ensure service cards don't force large heights on mobile */
.service-card {
  min-height: 0;
}

.service-card .card-image-container {
  max-height: 240px;
}

/* Hero: center content and cap widths for readability */
.hero-content .max-w-7xl {
  padding-left: 1rem;
  padding-right: 1rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
}

/* Buttons: full-width on small screens */
.hero-buttons a,
.form-button,
.popup-content .form-button {
  white-space: nowrap;
}

@media (max-width: 480px) {
  .hero-buttons a {
    display: block;
    width: 100%;
  }

  .form-button {
    width: 100%;
  }
}

/* Testimonials: ensure images collapse and text flows */
.testimonial-card img {
  width: 100%;
  height: auto;
}

/* Footer grids: stack columns on small screens */
.grid.md\:grid-cols-4.gap-8,
.grid.md\:grid-cols-3.gap-8 {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
}

/* Misc: keep embedded iframes responsive */
.video-container iframe,
.video-container video {
  max-height: 100%;
}

/* Small tweak: reduce large gaps on mobile */
@media (max-width: 420px) {

  .grid,
  .services-grid {
    gap: 0.75rem;
  }

  .ml-10 {
    margin-left: 0 !important;
  }
}

/* Privacy policy specific container for improved readability */
.policy-container {
  background: #ffffff;
  padding: 1.5rem 2rem;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(16, 24, 40, 0.06);
  color: #0f172a;
}

/* Make policy text comfortable to read on narrow screens */
.policy-container p,
.policy-container li,
.policy-container h3,
.policy-container h2 {
  line-height: 1.8;
}

@media (max-width: 768px) {
  .policy-container {
    padding: 1rem 1rem;
    margin: 0 0.25rem;
  }

  .policy-container h2 {
    font-size: 1.5rem;
  }
}

/* Prevent anchored headings from hiding below fixed nav */
:target:before {
  content: '';
  display: block;
  height: 110px;
  /* matches desktop nav height */
  margin-top: -110px;
}

@media (max-width: 1024px) {
  :target:before {
    height: 86px;
    margin-top: -86px;
  }
}

@media (max-width: 768px) {
  :target:before {
    height: 64px;
    margin-top: -64px;
  }
}

/* Print friendly policy: remove heavy decorations and use a single-column layout */
@media print {
  body {
    background: #fff;
    color: #000;
  }

  nav,
  .wave,
  .video-container,
  footer,
  #appointment,
  #contact,
  #hbot-video {
    display: none !important;
  }

  .policy-container {
    box-shadow: none;
    padding: 0;
    border-radius: 0;
  }
}