/* ==========================================
   SMOOTH SCROLLING & BASE STYLES
   ========================================== */
html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", sans-serif;
}

/* ==========================================
   SKIP LINK (accessibility)
   ========================================== */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 9999;
  padding: 0.75rem 1.25rem;
  background: #14b8a6;
  color: white;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: left 0.2s ease;
}

.skip-link:focus {
  left: 1rem;
  outline: 2px solid #0f766e;
  outline-offset: 2px;
}

/* ==========================================
   FOCUS VISIBLE (accessibility)
   ========================================== */
a:focus,
button:focus {
  outline: none;
}

a:focus-visible,
button:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 0;
}

/* ==========================================
   ANIMATIONS - KEYFRAMES
   ========================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ==========================================
   ANIMATION CLASSES
   ========================================== */
.animate-fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.animate-slide-in {
  animation: slideIn 0.6s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.6s ease-out forwards;
}

.animate-pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Delay variants for staggered animations */
.delay-100 {
  animation-delay: 100ms;
}
.delay-200 {
  animation-delay: 200ms;
}
.delay-300 {
  animation-delay: 300ms;
}
.delay-400 {
  animation-delay: 400ms;
}
.delay-500 {
  animation-delay: 500ms;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.text-gradient {
  background: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, #14b8a6 0%, #10b981 100%);
}

/* ==========================================
   BUTTON STYLES
   ========================================== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: #14b8a6;
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  cursor: pointer;
}

.btn-primary:hover {
  background-color: #0f766e;
  transform: scale(1.05);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  display: inline-block;
  background-color: white;
  color: #14b8a6;
  border: 2px solid #14b8a6;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background-color: #14b8a6;
  color: white;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #14b8a6;
  color: #14b8a6;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  min-height: 44px;
  min-width: 44px;
  border-radius: 0.5rem;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-outline:hover {
  background-color: #14b8a6;
  color: white;
}

/* ==========================================
   CARD STYLES
   ========================================== */
.card {
  background-color: white;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  padding: 1.5rem;
}

.card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.card-hover {
  transition: transform 0.3s ease;
}

.card-hover:hover {
  transform: translateY(-0.5rem);
}

/* ==========================================
   LAYOUT UTILITIES
   ========================================== */
.section-padding {
  padding: 4rem 1rem;
}

@media (min-width: 768px) {
  .section-padding {
    padding: 4rem 2rem;
  }
}

@media (min-width: 1024px) {
  .section-padding {
    padding: 4rem 4rem;
  }
}

.container-custom {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .container-custom {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .container-custom {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

/* ==========================================
   NAVIGATION STYLES
   ========================================== */
.nav-link {
  color: #1f2937;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0;
  cursor: pointer;
}

.nav-link:hover {
  color: #14b8a6;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #14b8a6;
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

/* ==========================================
   WHATSAPP BUTTON
   ========================================== */
.whatsapp-float {
  position: fixed;
  width: 60px;
  height: 60px;
  min-width: 44px;
  min-height: 44px;
  bottom: calc(30px + env(safe-area-inset-bottom, 0));
  right: calc(30px + env(safe-area-inset-right, 0));
  background-color: #25d366;
  color: white;
  border-radius: 50px;
  text-align: center;
  font-size: 30px;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.3);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  cursor: pointer;
}

.whatsapp-float:hover {
  background-color: #128c7e;
  transform: scale(1.1);
}

/* ==========================================
   FORM STYLES
   ========================================== */
.form-input {
  width: 100%;
  padding: 0.75rem 1rem;
  min-height: 44px;
  font-size: 16px; /* prevents iOS zoom on focus */
  border-radius: 0.5rem;
  border: 2px solid #e5e7eb;
  transition: border-color 0.2s ease;
}

.form-input:focus {
  border-color: #14b8a6;
}

textarea.form-input {
  min-height: 120px;
}

.form-label {
  display: block;
  color: #374151;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.form-error {
  color: #ef4444;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

.form-success {
  color: #10b981;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* ==========================================
   TOAST/MESSAGE STYLES
   ========================================== */
.toast {
  position: fixed;
  top: 5rem;
  right: 1rem;
  padding: 1rem 1.5rem;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  z-index: 50;
  max-width: calc(100vw - 2rem);
  animation: slideInRight 0.6s ease-out forwards;
}

.toast-success {
  background-color: #10b981;
  color: white;
}

.toast-error {
  background-color: #ef4444;
  color: white;
}

/* ==========================================
   RESPONSIVE UTILITIES
   ========================================== */
@media (max-width: 768px) {
  .whatsapp-float {
    width: 52px;
    height: 52px;
    min-width: 44px;
    min-height: 44px;
    font-size: 24px;
    bottom: calc(20px + env(safe-area-inset-bottom, 0));
    right: calc(20px + env(safe-area-inset-right, 0));
  }
}

/* Back to top: safe area and no overlap with WhatsApp (left side on mobile) */
.back-to-top-btn {
  bottom: calc(1.5rem + env(safe-area-inset-bottom, 0));
  left: calc(1.5rem + env(safe-area-inset-left, 0));
}

@media (min-width: 769px) {
  .back-to-top-btn {
    left: auto;
    right: calc(2rem + env(safe-area-inset-right, 0));
  }
}

/* ==========================================
   LOADING STATES
   ========================================== */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

.spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #14b8a6;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ==========================================
   PRICING CARD STYLES
   ========================================== */
.pricing-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.pricing-card:hover {
  transform: translateY(-0.5rem);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.pricing-card.featured {
  border-color: #14b8a6;
}

.pricing-card.featured::before {
  content: "Most Popular";
  position: absolute;
  top: 1rem;
  right: -2rem;
  background: linear-gradient(135deg, #14b8a6, #10b981);
  color: white;
  padding: 0.25rem 3rem;
  font-size: 0.75rem;
  font-weight: 600;
  transform: rotate(45deg);
}

/* ==========================================
   TESTIMONIAL STYLES
   ========================================== */
.testimonial-card {
  background: white;
  border-radius: 1rem;
  padding: 2rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  border-left: 4px solid #14b8a6;
}

.testimonial-card:hover {
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: translateY(-0.25rem);
}

/* ==========================================
   SERVICE DETAIL CARD
   ========================================== */
.service-detail-card {
  background: white;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.service-detail-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(-0.25rem);
}
