/* Curly IT - Custom Styles */

html { overflow-x: hidden; }

body { overflow-x: hidden; }

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInPage {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-10px); }
  100% { transform: translateY(0px); }
}
@keyframes blob {
  0% { transform: translate(0px, 0px) scale(1); }
  33% { transform: translate(30px, -50px) scale(1.1); }
  66% { transform: translate(-20px, 20px) scale(0.9); }
  100% { transform: translate(0px, 0px) scale(1); }
}

.animate-slideDown { animation: slideDown 0.3s ease-out; }
.animate-fadeInPage { animation: fadeInPage 0.4s ease-in; }
.animate-float { animation: float 3s ease-in-out infinite; }
.animate-blob { animation: blob 7s infinite; }
.animation-delay-2000 { animation-delay: 2s; }
.animation-delay-4000 { animation-delay: 4s; }

/* ── Navigation ─────────────────────────────────── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: #fff;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  box-shadow: 0 1px 12px rgba(0,0,0,0.06);
  z-index: 1000;
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.nav-logo img { height: 62px; width: auto; display: block; }

/* Menu list */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Shared link / button style */
.nav-link,
.dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.75rem;
  font-size: 0.9375rem;
  font-weight: 500;
  color: #346d85;
  text-decoration: none;
  border-radius: 0.375rem;
  background: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s;
  font-family: inherit;
}
.nav-link:hover, .dropdown-toggle:hover { background: rgba(52,109,133,0.07); }
.nav-link.active { color: #d4a800; }

/* CTA button */
.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 1.2rem;
  margin-left: 0.5rem;
  background: #ffcf06;
  color: #1c3d50 !important;
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: 2rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s, transform 0.15s;
}
.nav-cta:hover { background: #346d85; color: #fff !important; transform: translateY(-1px); }

/* Dropdown trigger chevron */
.dropdown-toggle svg { transition: transform 0.18s ease; }
.has-dropdown.open .dropdown-toggle svg { transform: rotate(180deg); }

/* Dropdown panel */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute;
  top: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #fff;
  border: 1px solid rgba(0,0,0,0.09);
  border-radius: 0.75rem;
  box-shadow: 0 8px 30px rgba(0,0,0,0.11), 0 2px 8px rgba(0,0,0,0.06);
  padding: 0.5rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.16s ease, transform 0.16s ease;
  z-index: 200;
  min-width: 180px;
}
.dropdown::before {
  content: '';
  position: absolute;
  top: -5px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px; height: 10px;
  background: #fff;
  border-left: 1px solid rgba(0,0,0,0.09);
  border-top: 1px solid rgba(0,0,0,0.09);
}
.has-dropdown.open .dropdown {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

/* Two-column dropdown (Services) */
.dropdown.two-col {
  display: flex;
  min-width: 360px;
  padding: 0.75rem;
  gap: 0.5rem;
}
.dropdown-col { flex: 1; }
.dropdown-col + .dropdown-col { border-left: 1px solid #f0f0f0; padding-left: 0.75rem; }
.dropdown-heading {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #94a3b8;
  padding: 0.2rem 0.5rem 0.5rem;
  margin: 0;
}

/* Dropdown links */
.dropdown a, .dropdown-col a {
  display: block;
  padding: 0.5rem 0.75rem;
  font-size: 0.9rem;
  color: #334155;
  text-decoration: none;
  border-radius: 0.375rem;
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.dropdown a:hover, .dropdown-col a:hover {
  background: rgba(52,109,133,0.08);
  color: #346d85;
}

/* Hamburger toggle */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px; height: 36px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: #346d85;
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.nav-mobile {
  position: fixed;
  top: 68px; left: 0; right: 0; bottom: 0;
  background: rgba(28, 61, 80, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  z-index: 999;
  padding: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.nav-mobile[hidden] {
  display: block !important;
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
}
.nav-mobile ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.nav-mobile a { display: block; padding: 0.75rem 1rem; color: #fff !important; text-decoration: none; font-weight: 500; font-size: 1rem; border-radius: 0.5rem; transition: background 0.12s; }
.nav-mobile a:hover { background: rgba(255,255,255,0.1) !important; }
.mobile-group-label { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: rgba(255,255,255,0.45); padding: 1rem 1rem 0.4rem; }
.mobile-cta { display: block; text-align: center; margin-top: 1rem; padding: 0.875rem !important; background: #ffcf06 !important; color: #1c3d50 !important; font-weight: 700; border-radius: 2rem; }

@media (max-width: 900px) {
  .nav-menu { display: none; }
  .nav-toggle { display: flex; }
}

/* Cookie consent */
#cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; background: #1f2937; color: white; padding: 1rem 1.5rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; z-index: 9999; }
#cookie-banner.hidden { display: none; }

/* Chat widget */
#chat-widget { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9998; }
#chat-window { display: none; position: absolute; bottom: 4rem; right: 0; width: 20rem; background: white; border-radius: 1rem; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); overflow: hidden; }
#chat-window.active { display: block; animation: slideDown 0.3s ease-out; }

/* Scroll to top */
#scroll-top { position: fixed; bottom: 5rem; right: 1.5rem; width: 2.5rem; height: 2.5rem; background: #346d85; color: white; border-radius: 50%; display: none; align-items: center; justify-content: center; cursor: pointer; z-index: 9997; transition: all 0.3s; }
#scroll-top.visible { display: flex; }
#scroll-top:hover { background: #ffcf06; color: #346d85; }

/* Details/Summary (FAQ) */
details summary { cursor: pointer; list-style: none; }
details summary::-webkit-details-marker { display: none; }

/* Page top padding for fixed navbar (68px nav height) */
.page-content { padding-top: 4.5rem; }
@media (max-width: 900px) { .page-content { padding-top: 4.5rem; } }

/* Prose styles for blog */
.prose h2 { font-size: 1.5rem; font-weight: 700; color: #111827; margin-top: 2rem; margin-bottom: 1rem; }
.prose h3 { font-size: 1.25rem; font-weight: 600; color: #1f2937; margin-top: 1.5rem; margin-bottom: 0.75rem; }
.prose p { margin-bottom: 1rem; color: #374151; line-height: 1.75; }
.prose ul { list-style-type: disc; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose ol { list-style-type: decimal; padding-left: 1.5rem; margin-bottom: 1rem; }
.prose li { margin-bottom: 0.5rem; color: #374151; }
.prose strong { font-weight: 700; color: #111827; }
.prose a { color: #346d85; text-decoration: underline; }

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Mobile Optimisations ────────────────────────────────────────────────── */
@media (max-width: 767px) {

  /* Reduce excessive section padding */
  .py-20 { padding-top: 3rem !important; padding-bottom: 3rem !important; }
  .py-16 { padding-top: 2.5rem !important; padding-bottom: 2.5rem !important; }
  .pt-32 { padding-top: 5.5rem !important; }
  .pb-20 { padding-bottom: 2.5rem !important; }
  .mb-12 { margin-bottom: 2rem !important; }
  .mb-14 { margin-bottom: 2rem !important; }

  /* Tighter container padding */
  .container { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-6 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .px-8 { padding-left: 1rem !important; padding-right: 1rem !important; }
  .p-8 { padding: 1.25rem !important; }
  .p-6 { padding: 1rem !important; }

  /* Hero heading */
  .text-4xl { font-size: 1.875rem !important; line-height: 1.2 !important; }
  .text-5xl { font-size: 2rem !important; line-height: 1.2 !important; }
  .text-3xl { font-size: 1.5rem !important; }
  .text-2xl { font-size: 1.25rem !important; }
  .text-xl  { font-size: 1rem !important; }

  /* Hero description text — smaller on mobile */
  .text-xl.text-white\/85 { font-size: 0.9375rem !important; }

  /* Full-width CTA buttons in hero */
  .flex-col.sm\:flex-row a,
  .flex-col.sm\:flex-row button {
    width: 100% !important;
    justify-content: center !important;
  }

  /* Trust badges — wrap tightly */
  .flex-wrap.gap-3 { gap: 0.5rem !important; }
  .flex-wrap.gap-3 > div { font-size: 0.8125rem !important; padding: 0.4rem 0.75rem !important; }

  /* Section headings spacing */
  .text-center.mb-12 { margin-bottom: 1.5rem !important; }

  /* Step numbers — horizontal scroll on mobile */
  .grid.grid-cols-1.md\:grid-cols-4 { gap: 1.5rem !important; }

  /* Home/Business cards — reduce inner padding */
  .rounded-2xl.p-8 { padding: 1.25rem !important; }

  /* CTA section buttons — stack and full width */
  .flex.flex-col.sm\:flex-row.gap-4 { flex-direction: column !important; }
  .flex.flex-col.sm\:flex-row.gap-4 a { text-align: center !important; }

  /* Footer — 2-column grid for link sections */
  footer .grid.grid-cols-1.md\:grid-cols-5 {
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
  }
  footer .md\:col-span-1 {
    grid-column: 1 / -1 !important;
  }

  /* Cookie banner — stack vertically */
  #cookie-banner {
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 1rem !important;
    gap: 0.75rem !important;
  }
  #cookie-banner > div {
    width: 100% !important;
    display: flex !important;
    gap: 0.5rem !important;
  }
  #cookie-banner button { flex: 1 !important; }

  /* Blog sidebar — hide on mobile, show full-width article */
  .grid.lg\:grid-cols-3 { grid-template-columns: 1fr !important; }
  aside { display: none !important; }
  article.lg\:col-span-2 { grid-column: 1 !important; }

  /* Blog cards grid */
  .grid.md\:grid-cols-2,
  .grid.md\:grid-cols-3 { grid-template-columns: 1fr !important; }

  /* Scroll to top — move up slightly to avoid WhatsApp */
  #scroll-top { bottom: 1.5rem !important; right: 1.5rem !important; }

  /* Reduce hero blob decorations size */
  .w-96 { width: 12rem !important; height: 12rem !important; }
  .w-64 { width: 8rem !important; height: 8rem !important; }

  /* Support ticket / contact form padding */
  .max-w-4xl.mx-auto { padding: 0 !important; }

  /* FAQ section */
  details summary { padding: 1rem !important; font-size: 0.9375rem !important; }
  details > div { padding: 0 1rem 1rem !important; }
}
