/* ============================================================
   Custom Styles — Gati Packers and Movers
   Supplements Tailwind with component-specific styles
   ============================================================ */

/* ── Typography Scale ───────────────────────────────── */
/* Base sizes: 14px, 15px, 16px, 18px, 21px, 24px (hero max 28px) */
:root {
  --text-xs: 14px;
  --text-sm: 15px;
  --text-base: 16px;
  --text-lg: 18px;
  --text-xl: 21px;
  --text-2xl: 24px;
  --text-hero: clamp(24px, 5vw, 28px);
}

/* Apply base paragraph size */
p {
  font-size: var(--text-xs) !important;
  line-height: 1.6;
}

/* Apply base button size - ALL buttons must be 14px */
button,
.btn,
input[type="submit"],
input[type="button"],
a[role="button"],
.hero a,
.cta a,
.nav-cta-scroll,
.float-btn,
[class*="button"],
[class*="btn"],
#cta a,
#hero-quote-form button,
#main-quote-form button,
#modal-quote-form button,
.inline-flex,
.font-heading.font-bold {
  font-size: 14px !important;
}

/* Specific overrides for stubborn buttons */
[class*="px-8"],
[class*="px-7"],
[class*="px-6"] {
  font-size: 14px !important;
}

/* Section spacing (except hero) */
section:not(#hero) {
  padding-top: 50px !important;
  padding-bottom: 50px !important;
}

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Poppins:wght@400;500;600;700;800;900&display=swap");

/* ── Scroll Behavior ─────────────────────────────────────── */
html {
  scroll-behavior: smooth;
}
[id] {
  scroll-margin-top: 80px;
}

/* ── Navbar Transparent → Solid Transition ───────────────── */
#navbar {
  transition:
    background-color 0.3s ease,
    box-shadow 0.3s ease,
    height 0.3s ease;
}
#navbar.scrolled {
  background-color: #ffffff !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}
#navbar.scrolled .nav-link-scroll {
  color: #1a2332 !important;
}
#navbar.scrolled .nav-link-scroll:hover {
  color: #1781a0 !important;
}
#navbar.scrolled .logo-text {
  color: #1781a0 !important;
}
#navbar.scrolled .logo-sub {
  color: #6b7280 !important;
}
#navbar.scrolled .nav-cta-scroll {
  background: linear-gradient(135deg, #ff6b00, #cc5500) !important;
  color: #fff !important;
}

/* ── Hero Section ────────────────────────────────────────── */
.hero-section {
  background: linear-gradient(135deg, #0d1b2a 0%, #1781a0 55%, #115f77 100%);
  min-height: 100vh;
  position: relative;
  overflow: hidden;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(23, 129, 160, 0.15) 0%, transparent 40%),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.02'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ── Counter Animation ───────────────────────────────────── */
.counter-number {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ── Service Card Hover ──────────────────────────────────── */
.service-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.service-card:hover {
  transform: translateY(-8px);
}
.service-card .service-icon {
  transition:
    background-color 0.3s ease,
    transform 0.3s ease;
}
.service-card:hover .service-icon {
  background-color: #1781a0;
  transform: scale(1.05);
}
.service-card:hover .service-icon svg {
  color: #fff !important;
}
.service-card:hover .service-icon .icon-emoji {
  filter: brightness(10);
}

/* ── Why Card Hover ──────────────────────────────────────── */
.why-card {
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.why-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.1);
  border-color: #1781a0;
}

/* ── Testimonial Slider ──────────────────────────────────── */
.testimonials-track {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}
.testimonial-card {
  flex: 0 0 100%;
}
@media (min-width: 768px) {
  .testimonial-card {
    flex: 0 0 50%;
  }
}
@media (min-width: 1024px) {
  .testimonial-card {
    flex: 0 0 33.333%;
  }
}
.stars-filled {
  color: #f59e0b;
}

/* ── FAQ Accordion ───────────────────────────────────────── */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    padding 0.3s ease;
}
.faq-answer.open {
  max-height: 300px;
}
.faq-icon {
  transition: transform 0.3s ease;
}
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

/* ── Gallery ─────────────────────────────────────────────── */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  cursor: pointer;
}
.gallery-item img {
  transition: transform 0.5s ease;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.gallery-item:hover img {
  transform: scale(1.08);
}
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(13, 27, 42, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 1.25rem;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* ── Floating Buttons ────────────────────────────────────── */
.floating-btns {
  position: fixed;
  bottom: 28px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 70;
}
.float-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
  position: relative;
  text-decoration: none;
}
.float-btn:hover {
  transform: scale(1.12) translateY(-2px);
}
.float-btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.45);
}
.float-btn-call {
  background: linear-gradient(135deg, #1781a0, #115f77);
  box-shadow: 0 6px 24px rgba(23, 129, 160, 0.45);
}
.float-btn-whatsapp:hover {
  box-shadow: 0 8px 32px rgba(37, 211, 102, 0.6);
}
.float-btn-call:hover {
  box-shadow: 0 8px 32px rgba(23, 129, 160, 0.55);
}

/* Pulse ring animation */
.float-btn::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid currentColor;
  opacity: 0;
  animation: pulse-ring 2.5s ease-out infinite;
}
.float-btn-whatsapp {
  color: #25d366;
}
.float-btn-call {
  color: #1781a0;
}
@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.6;
  }
  100% {
    transform: scale(1.6);
    opacity: 0;
  }
}

/* Tooltip */
.float-tooltip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  transform: translateY(-50%);
  background: #0d1b2a;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  padding: 5px 12px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.float-tooltip::after {
  content: "";
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 5px solid transparent;
  border-left-color: #0d1b2a;
}
.float-btn:hover .float-tooltip {
  opacity: 1;
}

/* ── Mobile Menu ─────────────────────────────────────────── */
#mobile-menu {
  transition:
    max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.3s ease;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
}
#mobile-menu.open {
  max-height: 600px;
  opacity: 1;
}

/* ── Section Animations (Intersection Observer) ──────────── */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 {
  transition-delay: 0.1s;
}
.reveal-delay-2 {
  transition-delay: 0.2s;
}
.reveal-delay-3 {
  transition-delay: 0.3s;
}
.reveal-delay-4 {
  transition-delay: 0.4s;
}
.reveal-delay-5 {
  transition-delay: 0.5s;
}
.reveal-delay-6 {
  transition-delay: 0.6s;
}

/* ── Quote Form ──────────────────────────────────────────── */
.form-input {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid #e2e8f0;
  border-radius: 10px;
  font-size: 0.9375rem;
  color: #1a2332;
  background: #fff;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease;
  outline: none;
}
.form-input:focus {
  border-color: #1781a0;
  box-shadow: 0 0 0 3px rgba(23, 129, 160, 0.12);
}
.form-input::placeholder {
  color: #a0aec0;
}
.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* ── Back to Top Button ──────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 80px;
  left: 32px;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #1781a0, #115f77);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  cursor: pointer;
  z-index: 65;
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    box-shadow 0.2s ease;
  box-shadow: 0 4px 16px rgba(23, 129, 160, 0.35);
}
#back-to-top.visible {
  opacity: 1;
  transform: translateY(0);
}
#back-to-top:hover {
  box-shadow: 0 6px 24px rgba(23, 129, 160, 0.5);
  transform: translateY(-2px);
}

/* ── Gradient Text ───────────────────────────────────────── */
.gradient-text {
  background: linear-gradient(135deg, #1781a0, #ff6b00);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Section label accent ────────────────────────────────── */
.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff6b00;
}
.section-badge::before {
  content: "";
  display: block;
  width: 28px;
  height: 3px;
  background: #ff6b00;
  border-radius: 99px;
  flex-shrink: 0;
}

/* ── Process connector line ──────────────────────────────── */
.process-connector {
  position: absolute;
  top: 36px;
  left: calc(50% + 36px);
  right: calc(-50% + 36px);
  height: 2px;
  background: linear-gradient(90deg, #1781a0, #e2e8f0);
  z-index: 0;
}

/* ── Client logos strip ──────────────────────────────────── */
.clients-scroll {
  display: flex;
  gap: 2rem;
  animation: scroll-logos 20s linear infinite;
  width: max-content;
}
.clients-scroll:hover {
  animation-play-state: paused;
}
@keyframes scroll-logos {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ── Image placeholder ───────────────────────────────────── */
.img-placeholder {
  background: linear-gradient(135deg, #e8f6fa 0%, #d1ecf5 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

/* ════════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
════════════════════════════════════════════════════════════ */

/* ── Large Desktop (1280px+) ─────────────────────────────── */
@media (min-width: 1280px) {
  .hero-section {
    min-height: 100vh;
  }
}

/* ── Desktop (1024px – 1279px) ───────────────────────────── */
@media (max-width: 1279px) {
  .clients-scroll {
    animation-duration: 15s;
  }
}

/* ── Tablet Landscape (768px – 1023px) ───────────────────── */
@media (max-width: 1023px) {
  /* Topbar hidden on tablet/mobile */
  #topbar {
    display: none !important;
  }

  /* Hero: stack layout */
  .hero-section {
    min-height: auto;
    padding-top: 7rem;
    padding-bottom: 4rem;
  }

  /* Process connector line hidden on mobile */
  .process-connector {
    display: none;
  }

  /* Gallery full height on tablet */
  .gallery-item {
    height: 220px !important;
  }

  /* Floating buttons slightly smaller */
  .float-btn {
    width: 50px;
    height: 50px;
  }
  .floating-btns {
    bottom: 20px;
    right: 16px;
    gap: 10px;
  }
}

/* ── Tablet Portrait (640px – 767px) ─────────────────────── */
@media (max-width: 767px) {
  /* Section padding tighter */
  section {
    padding-top: 4rem !important;
    padding-bottom: 4rem !important;
  }

  /* Testimonials: single card on mobile */
  .testimonial-card {
    flex: 0 0 100% !important;
  }

  /* Gallery: 2 columns on mobile */
  .gallery-grid-mobile {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* FAQ sticky left col — not sticky on mobile */
  .faq-sticky {
    position: static !important;
  }

  /* Counter cards: 2 col */
  .counter-grid-mobile {
    grid-template-columns: repeat(2, 1fr) !important;
  }

  /* Floating buttons closer to edge */
  .floating-btns {
    bottom: 16px;
    right: 12px;
  }
  .float-btn {
    width: 48px;
    height: 48px;
  }
  .float-tooltip {
    display: none;
  }

  /* Back to top closer on mobile */
  #back-to-top {
    bottom: 70px;
    left: 16px;
    width: 40px;
    height: 40px;
  }

  /* Hero quote form: single column */
  #hero-quote-form .grid {
    grid-template-columns: 1fr !important;
  }

  /* CTA buttons: full width stack */
  #cta .flex-col {
    flex-direction: column;
  }
  #cta a {
    width: 100%;
    justify-content: center;
  }
}

/* ── Mobile (max 639px) ──────────────────────────────────── */
@media (max-width: 639px) {
  /* Tighter section padding */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  /* Stats: 1 col on very small */
  #stats .grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1rem !important;
  }

  /* Hero headline smaller on small phones */
  .hero-section h1 {
    font-size: 1.875rem !important;
  }

  /* About: floating badge repositioned */
  .about-floating-badge {
    right: 0 !important;
    left: auto;
  }

  /* Why-us cards: full width stack */
  .why-card {
    flex-direction: column;
    gap: 1rem;
  }
  .why-card__icon-wrap {
    align-self: flex-start;
  }

  /* Process steps: 1 col */
  #process .grid {
    grid-template-columns: 1fr !important;
  }

  /* Gallery: 1 col on very small */
  #gallery .grid {
    grid-template-columns: 1fr !important;
  }
  #gallery .gallery-item {
    height: 200px !important;
  }

  /* Clients scroll slower on mobile */
  .clients-scroll {
    animation-duration: 12s;
  }

  /* Trust strip: 2 col */
  #stats .trust-strip {
    flex-direction: column;
    gap: 0.75rem;
  }

  /* Contact form: full column */
  #main-quote-form .grid {
    grid-template-columns: 1fr !important;
  }
}

/* ── Print Styles ────────────────────────────────────────── */
@media print {
  #navbar,
  .floating-btns,
  #back-to-top,
  #topbar {
    display: none !important;
  }
  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }
  a {
    color: #000;
    text-decoration: underline;
  }
  section {
    page-break-inside: avoid;
  }
}

/* ── Reduced Motion ──────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
  }
  .clients-scroll {
    animation: none;
  }
  html {
    scroll-behavior: auto;
  }
}

/* ── High Contrast ───────────────────────────────────────── */
@media (forced-colors: active) {
  .float-btn,
  .btn-primary,
  .nav-cta-scroll {
    border: 2px solid ButtonText;
  }
}

/* ── Stats Section Glass Card ───────────────────────────── */
.stat-glass {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}

/* ── Stats Icon Wrapper ──────────────────────────────────── */
.stat-icon {
  background: rgba(255, 107, 0, 0.18);
  border: 1px solid rgba(255, 107, 0, 0.25);
}

/* ── Stats Counter Number ────────────────────────────────── */
.stat-counter {
  font-size: var(--text-2xl);
  line-height: 1;
}

/* ── Quote Modal Animations ─────────────────────────────── */
#quote-modal {
  transition: all 0.3s ease;
}

#modal-backdrop {
  transition: opacity 0.3s ease;
}

#modal-content {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Modal scrollbar */
#modal-content::-webkit-scrollbar {
  width: 6px;
}

#modal-content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

#modal-content::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

#modal-content::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* Modal form improvements */
#modal-content .form-input {
  padding: 12px 16px !important;
  font-size: 14px !important;
}

#modal-content .space-y-4 > div {
  margin-bottom: 16px;
}

#modal-content button[type="submit"] {
  padding: 12px 24px !important;
  font-size: 14px !important;
  margin-top: 8px;
}

/* Mobile modal adjustments */
@media (max-width: 640px) {
  #modal-content {
    margin: 16px;
    max-height: calc(100vh - 32px);
  }

  #modal-content .form-input {
    padding: 10px 14px !important;
  }
}

/* Targeted button override */
section a,
.font-heading.font-bold,
.inline-flex.items-center.gap {
  font-size: 14px !important;
}

/* Force 14px on any element that looks like a button */
[class*="rounded-full"],
[class*="button"],
[class*="btn"] {
  font-size: 14px !important;
}

/* Final catch-all for buttons */
a[href*="tel"],
a[href*="whatsapp"],
a[href="#contact"],
form button,
.cta a,
.hero a,
.float-btn {
  font-size: 14px !important;
}

/* Button size optimization */
.inline-flex.items-center.gap {
  padding: 10px 20px !important;
}

/* Responsive button sizes */
@media (min-width: 768px) {
  .inline-flex.items-center.gap {
    padding: 12px 24px !important;
  }
}

@media (max-width: 640px) {
  .inline-flex.items-center.gap {
    padding: 8px 16px !important;
  }
}
