/* ========================================
   CODLAB Professional Enhancements
   Subtle, purposeful micro-interactions
   ======================================== */

/* ----------------------------------------
   1. CARD HOVER — Subtle lift + glow
   ---------------------------------------- */
.card {
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 1rem 3rem rgba(30, 34, 40, 0.12) !important;
}

/* ----------------------------------------
   2. BUTTONS — Micro lift + glow
   ---------------------------------------- */
.btn {
  transition: transform 0.25s ease,
              box-shadow 0.25s ease,
              background-color 0.25s ease,
              border-color 0.25s ease !important;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn:active {
  transform: translateY(0) scale(0.98);
}

/* Primary CTA glow */
.btn-yellow:hover,
.btn[style*="d7752e"]:hover {
  box-shadow: 0 0.5rem 1.5rem rgba(215, 117, 46, 0.35) !important;
}

/* Soft button hover */
.btn-soft-yellow:hover {
  box-shadow: 0 0.4rem 1.2rem rgba(215, 117, 46, 0.2) !important;
}

/* ----------------------------------------
   3. LINKS — Animated underline
   ---------------------------------------- */
.more.hover {
  position: relative;
  text-decoration: none !important;
}

.more.hover::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.more.hover:hover::after {
  width: 100%;
}

/* ----------------------------------------
   4. SERVICE ICONS — Subtle bounce on hover
   ---------------------------------------- */
.card-body img[class*="w-[5rem]"] {
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.card:hover .card-body img[class*="w-[5rem]"] {
  transform: scale(1.1) translateY(-4px);
}

/* ----------------------------------------
   5. SECTION ILLUSTRATIONS — Parallax feel
   ---------------------------------------- */
figure img,
.wrapper > .container img[class*="w-full"],
.wrapper > .container img[class*="w-auto"] {
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

figure:hover img {
  transform: scale(1.02);
}

/* ----------------------------------------
   6. NAVBAR — Glassmorphism on stick
   ---------------------------------------- */
.navbar-stick {
  backdrop-filter: blur(12px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(12px) saturate(180%) !important;
  background-color: rgba(255, 255, 255, 0.92) !important;
  box-shadow: 0 1px 15px rgba(30, 34, 40, 0.08) !important;
}

/* ----------------------------------------
   7. PROCESS STEP CARDS — Stagger offset
   ---------------------------------------- */
.accordion-button {
  transition: color 0.25s ease !important;
}

/* Number badge pulse on hover */
.icon .number {
  transition: transform 0.3s ease;
}

.card:hover .icon .number {
  transform: scale(1.15);
}

/* ----------------------------------------
   8. FEATURE CHECKMARKS — Pop effect
   ---------------------------------------- */
.flex.items-center.gap-2 span[class*="text-[#22c55e]"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: rgba(34, 197, 94, 0.1);
  border-radius: 50%;
  font-size: 0.85rem;
  transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55),
              background-color 0.3s ease;
}

.flex.items-center.gap-2:hover span[class*="text-[#22c55e]"] {
  transform: scale(1.2);
  background: rgba(34, 197, 94, 0.2);
}

/* ----------------------------------------
   9. SECTION HEADINGS — (removed accent line)
   ---------------------------------------- */

/* ----------------------------------------
   10. SMOOTH SCROLL BEHAVIOR
   ---------------------------------------- */
html {
  scroll-behavior: smooth;
}

/* ----------------------------------------
   11. SELECTION COLOR
   ---------------------------------------- */
::selection {
  background: rgba(245, 166, 35, 0.2);
  color: inherit;
}

/* ----------------------------------------
   12. FOCUS RING — Brand color
   ---------------------------------------- */
:focus-visible {
  outline: 2px solid #F5A623 !important;
  outline-offset: 3px;
  border-radius: 4px;
}

/* ----------------------------------------
   13. FOOTER NEWSLETTER INPUT — Polish
   ---------------------------------------- */
footer input[type="email"]:focus {
  border-color: #F5A623 !important;
  box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.15) !important;
}

/* ----------------------------------------
   14. SCROLL PROGRESS — Brand color
   ---------------------------------------- */
.progress-wrap svg.progress-circle path {
  stroke: #F5A623 !important;
}

/* ----------------------------------------
   15. IMAGE LOADING — Graceful fade-in
   ---------------------------------------- */
img[loading="lazy"] {
  opacity: 0;
  animation: imgFadeIn 0.6s ease forwards;
}

@keyframes imgFadeIn {
  to { opacity: 1; }
}

img[loading="eager"],
img.svg-inject {
  opacity: 1 !important;
  animation: none !important;
}

/* ----------------------------------------
   16. PRINT — Clean output
   ---------------------------------------- */
@media print {
  .card:hover { transform: none; box-shadow: none !important; }
  .btn:hover { transform: none; }
  [data-cue] { opacity: 1 !important; transform: none !important; }
}

/* ----------------------------------------
   17. REDUCED MOTION — Respect preferences
   ---------------------------------------- */
/* ========================================
   18. MOBILE OPTIMIZATIONS — iOS & Android
   ======================================== */

/* ----------------------------------------
   18a. MOBILE NAVBAR & HAMBURGER
   ---------------------------------------- */
@media (max-width: 991px) {
  /* Ensure hamburger button is visible and touchable */
  button.hamburger {
    display: flex !important;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  /* Better hamburger lines for mobile */
  button.hamburger span,
  button.hamburger::before,
  button.hamburger::after {
    height: 2.5px;
    border-radius: 2px;
  }

  /* Navbar container: prevent overflow, better spacing */
  .navbar > .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
    gap: 0.25rem;
  }

  /* Logo sizing */
  .navbar-brand img {
    width: 160px !important;
    height: auto;
  }

  /* Offcanvas mobile menu improvements */
  .offcanvas-nav {
    width: 85vw !important;
    max-width: 320px !important;
  }

  .offcanvas-nav .offcanvas-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .offcanvas-nav .offcanvas-body {
    padding: 1rem 0;
  }

  /* Mobile nav links: large touch targets */
  .offcanvas-nav .navbar-nav .nav-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }

  .offcanvas-nav .navbar-nav .nav-link {
    padding: 14px 1.5rem !important;
    font-size: 1rem !important;
    min-height: 48px;
    display: flex;
    align-items: center;
  }

  .offcanvas-nav .navbar-nav .nav-link:active {
    background: rgba(245, 166, 35, 0.15);
  }

  /* Offcanvas footer */
  .offcanvas-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
  }

  /* Navbar-other: compact layout on mobile */
  .navbar-other {
    flex-shrink: 0 !important;
    width: auto !important;
    max-width: none !important;
  }

  .navbar-other .navbar-nav {
    flex-wrap: nowrap !important;
    gap: 0.15rem !important;
  }

  /* Touch-friendly nav items in navbar-other */
  .navbar-other .nav-item .nav-link,
  .navbar-other .nav-item button {
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.3rem !important;
  }
}

/* ----------------------------------------
   18b. MOBILE TOUCH TARGETS (all mobile)
   ---------------------------------------- */
@media (max-width: 767px) {
  /* Minimum touch target size (Apple HIG: 44px) */
  a, button, [role="button"],
  input[type="submit"],
  input[type="button"],
  .nav-link {
    min-height: 44px;
  }

  /* Buttons: full width on mobile when in stacked layout */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
  }

  /* Cards: reduce padding for mobile */
  .card-body {
    padding: 1.5rem !important;
  }

  /* Section spacing: tighter on mobile */
  section .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Headings: responsive sizing */
  h1 { font-size: 1.75rem !important; }
  h2 { font-size: 1.5rem !important; }
  h3 { font-size: 1.25rem !important; }

  /* Lead text: smaller on mobile */
  .lead {
    font-size: 1rem !important;
    line-height: 1.6 !important;
  }

  /* Images: ensure they fit */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
  }

  .wrapper:not(header), section {
    overflow-x: hidden;
    max-width: 100vw;
  }
  .container:not(.navbar .container) {
    overflow-x: hidden;
    max-width: 100vw;
  }

  /* Form inputs: larger on mobile for usability */
  .form-control,
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  textarea,
  select {
    font-size: 16px !important; /* Prevents iOS zoom on focus */
    padding: 0.75rem 1rem;
    min-height: 48px;
    border-radius: 0.5rem;
  }

  /* Footer: stack columns */
  footer .flex-wrap > div {
    margin-bottom: 2rem;
  }

  /* Newsletter form: stack on mobile */
  #newsletter-form {
    flex-direction: column !important;
  }

  #newsletter-form .btn {
    width: 100%;
  }

  /* Cookie banner: mobile-friendly */
  .codlab-cookie-banner {
    padding: 16px 12px !important;
  }

  .codlab-cookie-content {
    flex-direction: column !important;
    gap: 16px !important;
  }

  .codlab-cookie-actions {
    width: 100% !important;
    flex-direction: column !important;
    gap: 8px !important;
  }

  .codlab-btn-cookie {
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
  }

  .codlab-cookie-text h3 {
    font-size: 18px !important;
  }

  .codlab-cookie-text p {
    font-size: 13px !important;
  }

  /* Cookie settings button: smaller on mobile */
  .codlab-cookie-settings-btn {
    width: 48px !important;
    height: 48px !important;
    bottom: 16px !important;
    right: 16px !important;
    font-size: 22px !important;
  }

  /* Cookie modal: full screen on mobile */
  .codlab-cookie-modal-content {
    margin: 0 !important;
    max-height: 100vh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
  }

  .codlab-cookie-modal {
    padding: 0 !important;
  }

  .codlab-cookie-modal-header {
    padding: 16px 20px !important;
  }

  .codlab-cookie-modal-body {
    padding: 16px 20px !important;
  }

  .codlab-cookie-modal-footer {
    padding: 16px 20px !important;
    flex-direction: column !important;
  }

  .codlab-cookie-modal-footer .codlab-btn-cookie {
    width: 100% !important;
  }

  /* Language switcher: hidden on mobile, moved to hamburger menu */

  /* Progress/scroll-to-top: smaller on mobile */
  .progress-wrap {
    width: 2rem !important;
    height: 2rem !important;
    right: 0.75rem !important;
    bottom: 5rem !important; /* Above cookie button */
  }

  .progress-wrap::after {
    font-size: 1rem !important;
    width: 2rem !important;
    height: 2rem !important;
    line-height: 2rem !important;
  }
}

/* ----------------------------------------
   18c. EXTRA SMALL SCREENS (< 375px)
   ---------------------------------------- */
@media (max-width: 374px) {
  .navbar-brand img {
    width: 85px !important;
  }

  .navbar-other .navbar-nav {
    gap: 0 !important;
  }

  h1 { font-size: 1.5rem !important; }
  h2 { font-size: 1.3rem !important; }

  .card-body {
    padding: 1rem !important;
  }
}

/* ----------------------------------------
   18d. iOS SAFE AREAS & FIXES
   ---------------------------------------- */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  /* Account for iPhone notch and home indicator */
  footer {
    padding-bottom: env(safe-area-inset-bottom);
  }

  .codlab-cookie-banner {
    padding-bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }

  .codlab-cookie-settings-btn {
    bottom: calc(16px + env(safe-area-inset-bottom)) !important;
  }

  .progress-wrap {
    bottom: calc(5rem + env(safe-area-inset-bottom)) !important;
  }

  /* Safe area for offcanvas */
  .offcanvas-nav .offcanvas-footer {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom));
  }
}

/* iOS: prevent text size adjustment */
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* iOS: momentum scrolling */
.offcanvas-body,
.codlab-cookie-modal-body {
  -webkit-overflow-scrolling: touch;
}

/* Disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
  .card:hover {
    transform: none;
    box-shadow: 0 0.25rem 1.75rem rgba(30, 34, 40, 0.07) !important;
  }

  .btn:hover {
    transform: none;
  }

  .card:hover .card-body img[class*="w-[5rem]"] {
    transform: none;
  }

  figure:hover img {
    transform: none;
  }

  .card:hover .icon .number {
    transform: none;
  }

  /* Language switcher: disable hover, keep active feedback */
  .language-switcher .inactive-language:hover {
    opacity: 0.5 !important;
    transform: none !important;
    background: transparent !important;
  }

  .language-switcher .inactive-language:active {
    opacity: 1 !important;
    background: rgba(255, 255, 255, 0.7) !important;
    transform: scale(0.9) !important;
    transition: all 0.1s ease !important;
  }
}

/* ----------------------------------------
   18e. LANDSCAPE MOBILE
   ---------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .navbar {
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
  }

  .offcanvas-nav .navbar-nav .nav-link {
    padding: 10px 1.5rem !important;
    min-height: 40px;
  }
}

/* ========================================
   END MOBILE OPTIMIZATIONS
   ======================================== */

/* ----------------------------------------
   18f. FORCE VISIBILITY for contact cards on mobile
   ---------------------------------------- */
@media (max-width: 767px) {
  [data-cues="slideInUp"][data-group="contact-cards"] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ----------------------------------------
   19. NUMBERS/STATS COUNTER SECTION
   ---------------------------------------- */
.stats-section {
  background: #1B2A4A;
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(245, 166, 35, 0.08) 0%, transparent 70%);
  border-radius: 50%;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: #F5A623;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

/* ----------------------------------------
   20. CTA BANNER SECTION
   ---------------------------------------- */
.cta-banner {
  background: linear-gradient(135deg, #d7752e 0%, #F5A623 100%);
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 300px;
  height: 300px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 200px;
  height: 200px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 50%;
}

/* ----------------------------------------
   21. TRUST BAR / TECH LOGOS
   ---------------------------------------- */
.trust-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  opacity: 0.45;
  transition: opacity 0.3s ease;
}

.trust-bar:hover {
  opacity: 0.75;
}

.trust-bar-item {
  font-size: 0.8rem;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* ----------------------------------------
   22. HERO TRUST BADGES
   ---------------------------------------- */
.hero-badges {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #6b7280;
  font-weight: 500;
}

.hero-badge-icon {
  width: 2rem;
  height: 2rem;
  background: rgba(215, 117, 46, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #d7752e;
  font-size: 0.9rem;
  flex-shrink: 0;
}

@media (max-width: 767px) {
  .hero-badges {
    gap: 1rem;
  }
  .hero-badge {
    font-size: 0.78rem;
  }
}

/* ----------------------------------------
   23. IMPROVED SERVICE CARDS
   ---------------------------------------- */
.service-card .more {
  color: #d7752e !important;
  font-weight: 600;
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: gap 0.3s ease;
}

.service-card .more:hover {
  color: #d7752e !important;
  gap: 0.5rem;
}

.service-card .more::after {
  content: '\2192';
  transition: transform 0.3s ease;
}

.service-card .more:hover::after {
  transform: translateX(3px);
}

/* ----------------------------------------
   17. REDUCED MOTION — Respect preferences
   ---------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .card,
  .btn,
  .more.hover::after,
  figure img,
  .icon .number,
  .card-body img {
    transition: none !important;
  }

  .card:hover {
    transform: none;
  }

  .btn:hover,
  .btn:active {
    transform: none;
  }

  img[loading="lazy"] {
    animation: none;
    opacity: 1;
  }

  html {
    scroll-behavior: auto;
  }
}
