/* Trybus Solutions — Custom Styles */
/* Tailwind CDN handles utility classes; this file covers animations, components, and brand overrides */

:root {
  --trybus-dark: #242424;
  --trybus-green: #32E384;
  --trybus-green-hover: #25AF82;
  --trybus-body: #868686;
  --trybus-heading: #111111;
  --trybus-copper: #C68D76;
  --trybus-light-bg: #F2F2F2;
  --trybus-icon-bg: #274550;
}

/* ── Scroll-triggered animations ── */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}
.fade-up:nth-child(2) { transition-delay: 0.1s; }
.fade-up:nth-child(3) { transition-delay: 0.2s; }
.fade-up:nth-child(4) { transition-delay: 0.3s; }
.fade-up:nth-child(5) { transition-delay: 0.4s; }
.fade-up:nth-child(6) { transition-delay: 0.5s; }

/* Additional stagger delays for larger grids */
.fade-up:nth-child(7) { transition-delay: 0.6s; }
.fade-up:nth-child(8) { transition-delay: 0.7s; }
.fade-up:nth-child(9) { transition-delay: 0.8s; }
.fade-up:nth-child(10) { transition-delay: 0.9s; }
.fade-up:nth-child(11) { transition-delay: 1.0s; }

/* Fade-in-left animation variant */
.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Fade-in-right animation variant */
.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Scale-up animation variant */
.scale-up {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}
.scale-up.visible {
  opacity: 1;
  transform: scale(1);
}

/* ── Hero background — people photo with dark overlay ── */
.hero-pattern {
  background:
    linear-gradient(135deg, rgba(26,26,26,0.82) 0%, rgba(36,36,36,0.78) 40%, rgba(42,42,42,0.80) 60%, rgba(26,26,26,0.82) 100%),
    url('images/people-hero-desktop.webp');
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* Geometric grid overlay */
.geo-overlay {
  background-image:
    linear-gradient(rgba(50,227,132,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(50,227,132,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
}

/* Ambient glow orbs */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: glow-breathe 8s ease-in-out infinite;
}
@keyframes glow-breathe {
  0%, 100% { opacity: 0.06; transform: scale(1); }
  50% { opacity: 0.14; transform: scale(1.15); }
}

/* ── Section backgrounds with image overlays ── */
.section-bg-why-trybus {
  background: linear-gradient(rgba(36,36,36,0.90), rgba(36,36,36,0.90)), url('images/about-bg.webp');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

.section-bg-contact {
  background: linear-gradient(rgba(36,36,36,0.88), rgba(36,36,36,0.88)), url('images/services-bg.webp');
  background-size: cover;
  background-position: center;
}

.section-bg-footer {
  background: linear-gradient(rgba(17,17,17,0.95), rgba(17,17,17,0.95)), url('images/bg-footer.webp');
  background-size: cover;
  background-position: center;
}

/* ── Navbar ── */
.nav-scrolled {
  background-color: rgba(36, 36, 36, 0.97) !important;
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

/* ── Service/Solution cards ── */
.solution-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.solution-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.12);
}

/* ── Industry pills ── */
.industry-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.industry-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}

/* ── Partner logos ── */
.partner-item {
  transition: transform 0.25s ease, opacity 0.25s ease;
  opacity: 0.85;
}
.partner-item:hover {
  transform: scale(1.05);
  opacity: 1;
}

.partner-logo-img {
  max-height: 48px;
  width: auto;
  object-fit: contain;
  filter: grayscale(20%);
  transition: filter 0.3s ease;
}
.partner-item:hover .partner-logo-img {
  filter: grayscale(0%);
}

.partner-cisco-featured .partner-logo-img {
  max-height: 80px;
}

/* ── Mobile menu ── */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}
.mobile-menu.open {
  max-height: 500px;
}

/* ── Chat widget (desktop) ── */
.chat-panel {
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.chat-panel.open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

@keyframes gentle-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(50, 227, 132, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(50, 227, 132, 0); }
}
.chat-bubble-pulse {
  animation: gentle-pulse 3s ease-in-out infinite;
}

/* ── Mobile chat panel dvh fix for Android keyboard ── */
@supports (height: 1dvh) {
  #chat-panel-mobile .chat-panel-mobile-inner {
    height: 75dvh;
  }
}

/* ── Testimonial slider ── */
.testimonial-track {
  transition: transform 0.5s ease;
}

/* ── Counter animation ── */
@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Smooth scroll ── */
html {
  scroll-behavior: smooth;
}

/* ── Selection color ── */
::selection {
  background: rgba(50, 227, 132, 0.25);
  color: #111;
}

/* ── Focus ring for accessibility ── */
*:focus-visible {
  outline: 2px solid #32E384;
  outline-offset: 2px;
}

/* ── Buttons: square (brand spec) ── */
.btn-primary {
  background-color: #32E384;
  color: #242424;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 32px;
  border-radius: 0;
  transition: background-color 0.25s ease, transform 0.15s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}
.btn-primary:hover {
  background-color: #25AF82;
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  background-color: transparent;
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 0;
  transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.15s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}
.btn-outline:hover {
  border-color: #32E384;
  background-color: rgba(50,227,132,0.08);
  color: #32E384;
  transform: translateY(-1px);
}

.btn-outline-dark {
  background-color: transparent;
  color: #242424;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  padding: 14px 32px;
  border: 2px solid #242424;
  border-radius: 0;
  transition: all 0.25s ease;
  display: inline-block;
  text-align: center;
  text-decoration: none;
}
.btn-outline-dark:hover {
  border-color: #32E384;
  background-color: #32E384;
  color: #242424;
}

/* ── Form inputs (square, brand-spec) ── */
.form-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #F2F2F2;
  border-radius: 0;
  background: #fff;
  font-size: 16px;
  color: #111;
  transition: border-color 0.25s ease;
}
.form-input:focus {
  border-color: #32E384;
  outline: none;
}

/* ── Divider accent line ── */
.accent-line {
  width: 60px;
  height: 3px;
  background: #32E384;
}

/* ── Copper accent underline ── */
.copper-underline {
  position: relative;
  display: inline-block;
}
.copper-underline::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #C68D76;
}

/* ── Responsive breakpoint helpers ── */
/* ── Photo content blocks (Convergence Networks pattern) ── */
.photo-block {
  display: flex;
  min-height: 500px;
  overflow: hidden;
}
.photo-block-image {
  width: 50%;
  background-size: cover;
  background-position: center;
}
.photo-block-content {
  width: 50%;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.photo-block-label {
  color: var(--trybus-green);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.photo-block-heading {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}
.photo-block-body {
  font-size: 0.9375rem;
  line-height: 1.7;
  margin-bottom: 2rem;
}
.photo-block-cta {
  color: var(--trybus-green);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.25s ease;
  display: inline-block;
}
.photo-block-cta:hover {
  color: var(--trybus-green-hover);
}

/* Full-width photo banner with text overlay */
.photo-banner {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-size: cover;
  background-position: center;
}
.photo-banner-overlay {
  position: absolute;
  inset: 0;
  background: rgba(36, 36, 36, 0.80);
}
.photo-banner-content {
  position: relative;
  z-index: 1;
  padding: 3rem 1.5rem;
  max-width: 700px;
}

@media (max-width: 767px) {
  .hero-pattern {
    min-height: auto;
    padding-top: 100px;
    padding-bottom: 60px;
    background-image:
      linear-gradient(135deg, rgba(26,26,26,0.82) 0%, rgba(36,36,36,0.78) 40%, rgba(42,42,42,0.80) 60%, rgba(26,26,26,0.82) 100%),
      url('images/people-hero-mobile.webp');
  }
  /* Disable parallax on mobile */
  .section-bg-why-trybus {
    background-attachment: scroll;
  }
  /* Photo blocks: stack on mobile */
  .photo-block {
    flex-direction: column;
    min-height: auto;
  }
  .photo-block.photo-block-reversed {
    flex-direction: column-reverse;
  }
  .photo-block-image {
    width: 100%;
    min-height: 300px;
  }
  .photo-block-content {
    width: 100%;
    padding: 2.5rem 1.5rem;
  }
  .photo-block-heading {
    font-size: 1.5rem;
  }
  .photo-banner {
    min-height: 350px;
  }
}
