/* ============================================
   MODERN MINIMAL THEME - SHOGIME TRADING
   Clean white design with subtle accents
   ============================================ */

/* Variables */
:root {
  --color-white: #ffffff;
  --color-off-white: #fafafa;
  --color-light-gray: #f5f5f5;
  --color-gray: #e0e0e0;
  --color-dark-gray: #e3e5e7;
  --color-charcoal: #374151;
  --color-dark: #1f2937;
  --color-black: #111827;
  --color-accent: #2d3436;
  --color-accent-light: #636e72;
  
  --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
.modern-theme {
  font-family: var(--font-primary);
  color: var(--color-charcoal);
  background-color: var(--color-white);
  line-height: 1.6;
  overflow-x: hidden;
  padding-top: 0;
}

.modern-theme *::selection {
  background: var(--color-dark);
  color: var(--color-white);
}

/* ============================================
   NAVIGATION - Apple Liquid Glass Style
   ============================================ */
.navbar-modern {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 2rem);
  max-width: 1400px;
  z-index: 1000;
  padding: 0.75rem 1.5rem;
  /* Liquid Glass Effect */
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.7) 0%,
    rgba(255, 255, 255, 0.5) 50%,
    rgba(255, 255, 255, 0.6) 100%
  );
  backdrop-filter: blur(40px) saturate(180%);
  -webkit-backdrop-filter: blur(40px) saturate(180%);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50px;
  /* Frosted glass border */
  border: 1px solid rgba(255, 255, 255, 0.6);
  /* Layered glass shadows */
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.08),
    0 2px 8px rgba(0, 0, 0, 0.04),
    inset 0 1px 1px rgba(255, 255, 255, 0.8),
    inset 0 -1px 1px rgba(255, 255, 255, 0.3);
}

/* Subtle glow effect on hover */
.navbar-modern:hover {
  box-shadow: 
    0 8px 40px rgba(0, 0, 0, 0.1),
    0 2px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(255, 255, 255, 0.4);
}

.navbar-modern.scrolled {
  padding: 0.5rem 1.5rem;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(255, 255, 255, 0.7) 50%,
    rgba(255, 255, 255, 0.8) 100%
  );
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 4px 12px rgba(0, 0, 0, 0.06),
    inset 0 1px 2px rgba(255, 255, 255, 0.9),
    inset 0 -1px 1px rgba(255, 255, 255, 0.5);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo img {
  height: 50px;
  width: auto;
  transition: var(--transition);
}

.navbar-modern.scrolled .nav-logo img {
  height: 40px;
}

.nav-menu {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 2.5rem;
}

.nav-link {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-charcoal);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  position: relative;
  padding: 0.5rem 0;
  transition: var(--transition);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-dark);
  transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
  color: var(--color-dark);
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 5px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--color-dark);
  transition: var(--transition);
}

@media (max-width: 991px) {
  .nav-menu {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-actions .btn-modern {
    display: none;
  }
}

/* Mobile Menu: slide-in panel from the right over a dimmed backdrop.
   Rules use #mobileMenu so they win over the site-wide link colour in style.css. */
.mobile-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1001;
  background: rgba(17, 24, 39, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.mobile-menu-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 1002;
  width: min(86vw, 360px);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 1.25rem 1.5rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  background: var(--color-white);
  border-radius: 24px 0 0 24px;
  box-shadow: -20px 0 50px rgba(0, 0, 0, 0.15);
  overflow-y: auto;
  transform: translateX(100%);
  visibility: hidden;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0.45s;
}

.mobile-menu.active {
  transform: translateX(0);
  visibility: visible;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1), visibility 0s;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--color-gray);
}

.mobile-menu-logo {
  height: 40px;
  width: auto;
}

.mobile-menu-close {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: var(--color-light-gray);
  color: var(--color-dark);
  font-size: 1.1rem;
  cursor: pointer;
  transition: var(--transition);
}

.mobile-menu-close:hover,
.mobile-menu-close:focus-visible {
  background: var(--color-dark);
  color: var(--color-white);
}

.mobile-nav {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0 0;
}

/* Links fade and slide in one after another when the menu opens */
.mobile-nav li {
  opacity: 0;
  transform: translateX(16px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.mobile-menu.active .mobile-nav li {
  opacity: 1;
  transform: none;
  transition-delay: calc(0.12s + var(--i) * 0.04s);
}

#mobileMenu .mobile-nav a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0.25rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--color-dark);
  text-decoration: none;
  border-bottom: 1px solid var(--color-light-gray);
  transition: var(--transition);
}

#mobileMenu .mobile-nav a i {
  font-size: 0.8rem;
  color: var(--color-accent-light);
  opacity: 0.5;
  transition: var(--transition);
}

#mobileMenu .mobile-nav a:hover,
#mobileMenu .mobile-nav a.current {
  color: #044e38;
}

#mobileMenu .mobile-nav a:hover i,
#mobileMenu .mobile-nav a.current i {
  color: #044e38;
  opacity: 1;
  transform: translateX(4px);
}

.mobile-menu-footer {
  margin-top: auto;
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.mobile-menu-cta {
  justify-content: center;
  margin-bottom: 0.25rem;
}

#mobileMenu .mobile-menu-contact {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-charcoal);
  text-decoration: none;
  word-break: break-all;
}

#mobileMenu .mobile-menu-contact i {
  width: 1rem;
  color: #044e38;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu,
  .mobile-menu-backdrop,
  .mobile-nav li {
    transition: none !important;
  }
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-modern {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-decoration: none;
  border: 2px solid transparent;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
}

/* Main call-to-action buttons (Get Quote, Work With Us, Send Message) use the brand dark green */
.btn-dark {
  background: #054030 !important;
  color: var(--color-white) !important;
  border-color: #054030 !important;
}

.btn-dark:hover {
  background: transparent !important;
  color: #054030 !important;
  border-color: #054030 !important;
}

.btn-white {
  background: var(--color-white);
  color: var(--color-dark);
  border-color: var(--color-white);
}

.btn-white:hover {
  background: transparent;
  color: var(--color-white);
}

.btn-outline {
  background: transparent !important;
  color: var(--color-white) !important;
  border-color: var(--color-white) !important;
}

.btn-outline:hover {
  background: var(--color-white) !important;
  color: var(--color-dark) !important;
}

.btn-full {
  width: 100%;
  justify-content: center;
}

/* ============================================
   HERO SECTION
   ============================================ */
.hero-modern {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(17, 24, 39, 0.85) 0%,
    rgba(31, 41, 55, 0.75) 100%
  );
}

.hero-modern .container {
  position: relative;
  z-index: 2;
}

.hero-content {
  max-width: 800px;
  text-align: center;
  margin: 0 auto;
  padding: 6rem 1rem;
}

.hero-tag {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--color-white);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 2rem;
}

.hero-content h1 {
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 800;
  color: var(--color-white);
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.hero-content h1 span {
  color: rgba(255, 255, 255, 0.6);
}

.hero-content p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  transition: var(--transition);
}

.hero-scroll a:hover {
  color: var(--color-white);
}

.scroll-text {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.scroll-icon {
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(10px);
  }
  60% {
    transform: translateY(5px);
  }
}

/* ============================================
   STATS SECTION
   ============================================ */
.stats-modern {
  padding: 5rem 0;
  background: var(--color-white);
  border-bottom: 1px solid var(--color-light-gray);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

@media (max-width: 991px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.stat-card {
  text-align: center;
  padding: 2rem;
}

.stat-icon {
  font-size: 2rem;
  color: var(--color-accent-light);
  margin-bottom: 1rem;
}

.stat-number {
  font-size: 3rem;
  font-weight: 800;
  color: var(--color-dark);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #474763;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Phones: keep two per row, scaled down so the numbers and labels fit */
@media (max-width: 575px) {
  .stats-modern {
    padding: 3rem 0;
  }

  .stats-grid {
    gap: 1.5rem 0.75rem;
  }

  .stat-card {
    padding: 1rem 0.25rem;
  }

  .stat-icon {
    font-size: 1.6rem;
    margin-bottom: 0.75rem;
  }

  .stat-number {
    font-size: 2.25rem;
  }

  .stat-label {
    font-size: 0.72rem;
    letter-spacing: 0.03em;
  }
}

/* ============================================
   SECTION COMMON STYLES
   ============================================ */
.section-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-accent-light);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 1rem;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.section-header p {
  font-size: 1.125rem;
  color: #474763;
  max-width: 600px;
  margin: 0 auto;
}

/* ============================================
   ABOUT SECTION
   ============================================ */
.about-modern {
  padding: 8rem 0;
  background: var(--color-white);
}

/* About and Contact columns slide in from the side (data-aos="fade-left/right").
   Before they animate they sit 100px off to the side, which made the page
   wider than the screen on phones. clip cuts that off without adding scrollbars. */
.about-modern,
.contact-modern {
  overflow-x: clip;
}

.about-images {
  position: relative;
}

.about-img-main {
  position: relative;
  z-index: 1;
}

/* A single portrait photo; the crop keeps the barge and tug in view */
.about-img-main img {
  width: 100%;
  height: 560px;
  object-fit: cover;
  object-position: center 70%;
}

.about-content {
  padding-left: 2rem;
}

.about-content h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1.5rem;
  line-height: 1.2;
}

.about-content .lead {
  font-size: 1.125rem;
  color: var(--color-charcoal);
  margin-bottom: 1rem;
}

/* Last intro paragraph: keep the larger gap before the feature list */
.about-content .lead + .lead {
  margin-bottom: 2rem;
}

.about-content p {
  color: var(--color-dark-gray);
  margin-bottom: 2rem;
}

.about-features {
  margin-bottom: 2rem;
}

.about-feature {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.about-feature i {
  font-size: 1.5rem;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 0.25rem;
}

.about-feature h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.about-feature p {
  font-size: 0.875rem;
  color: var(--color-dark-gray);
  margin: 0;
}

/* ---------- About: scroll-in animation ----------
   js/main.js adds .about-anim to #about (so nothing is hidden if the script
   does not run) and .about-in to each column when it scrolls into view. */
.about-images::before {
  content: '';
  position: absolute;
  top: 24px;
  left: -24px;
  right: 24px;
  bottom: -24px;
  border: 2px solid #054030;
  z-index: 0;
  pointer-events: none;
}

.about-img-main {
  overflow: hidden;
}

.about-img-main img {
  display: block;
  transform: translateY(var(--about-shift, 0px)) scale(1.08);
}

.about-badge {
  position: absolute;
  left: -20px;
  bottom: 48px;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: #054030;
  color: #ffffff;
  box-shadow: 0 12px 30px rgba(5, 64, 48, 0.35);
}

.about-badge-number {
  font-size: 2.25rem;
  font-weight: 800;
  line-height: 1;
}

.about-badge-label {
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Hidden "before" states, only once the script has switched animation on */
.about-anim .about-img-main {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s cubic-bezier(0.77, 0, 0.18, 1);
}

.about-anim .about-img-main img {
  transform: translateY(var(--about-shift, 0px)) scale(1.3);
  transition: transform 1.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-anim .about-images::before {
  opacity: 0;
  transform: translate(24px, -24px);
  transition: opacity 0.8s ease 0.7s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.7s;
}

.about-anim .about-badge {
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition: opacity 0.6s ease 1s, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1s;
}

.about-anim .about-content > *,
.about-anim .about-feature {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.about-anim .about-feature i {
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* "After" states */
.about-anim .about-in .about-img-main {
  clip-path: inset(0 0 0 0);
}

.about-anim .about-in .about-img-main img {
  transform: translateY(var(--about-shift, 0px)) scale(1.08);
}

.about-anim .about-in .about-images::before,
.about-anim .about-in .about-badge,
.about-anim .about-in .about-content > *,
.about-anim .about-in .about-feature,
.about-anim .about-in .about-feature i {
  opacity: 1;
  transform: none;
}

/* Text appears one piece after another */
.about-anim .about-in .about-content > :nth-child(1) { transition-delay: 0.1s; }
.about-anim .about-in .about-content > :nth-child(2) { transition-delay: 0.2s; }
.about-anim .about-in .about-content > :nth-child(3) { transition-delay: 0.3s; }
.about-anim .about-in .about-content > :nth-child(4) { transition-delay: 0.4s; }
.about-anim .about-in .about-content > :nth-child(5) { transition-delay: 0.5s; }
.about-anim .about-in .about-content > :nth-child(6) { transition-delay: 0.9s; }
.about-anim .about-in .about-feature:nth-child(1) { transition-delay: 0.55s; }
.about-anim .about-in .about-feature:nth-child(2) { transition-delay: 0.7s; }
.about-anim .about-in .about-feature:nth-child(1) i { transition-delay: 0.75s; }
.about-anim .about-in .about-feature:nth-child(2) i { transition-delay: 0.9s; }

/* Once the zoom-out has finished, the scroll drift moves the photo without easing lag */
.about-anim .about-in.about-done .about-img-main img {
  transition: none;
}

@media (max-width: 575px) {
  .about-images::before {
    top: 14px;
    left: -10px;
    right: 14px;
    bottom: -14px;
  }

  .about-badge {
    left: 12px;
    bottom: 24px;
    padding: 0.75rem 1rem;
  }

  .about-badge-number {
    font-size: 1.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-anim .about-img-main,
  .about-anim .about-img-main img,
  .about-anim .about-images::before,
  .about-anim .about-badge,
  .about-anim .about-content > *,
  .about-anim .about-feature,
  .about-anim .about-feature i {
    clip-path: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

@media (max-width: 991px) {
  .about-images {
    margin-bottom: 3rem;
  }

  .about-img-main img {
    height: 420px;
  }
  
  .about-content {
    padding-left: 0;
  }
}

/* ============================================
   SERVICES SECTION - ENHANCED MINIMALIST
   ============================================ */

.services-modern {
  padding: 8rem 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  position: relative;
  overflow: hidden;
}

/* Sophisticated grid pattern */
.services-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(31, 41, 55, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 41, 55, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
  z-index: 0;
  pointer-events: none;
}

/* Accent line at top */
.services-modern::after {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(31, 41, 55, 0.1), transparent);
  z-index: 0;
}

.services-modern .container {
  position: relative;
  z-index: 1;
}

/* Enhanced Section Header */
.services-modern .section-header {
  margin-bottom: 5rem;
}

.services-modern .section-tag {
  position: relative;
  padding: 0.5rem 1.5rem;
  background: var(--color-white);
  border: 1px solid var(--color-gray);
  color: var(--color-charcoal);
  display: inline-block;
  margin-bottom: 1.5rem;
}

.services-modern .section-tag::before {
  content: '';
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border: 1px solid var(--color-dark);
  z-index: -1;
}

/* Grid with better spacing */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 4rem;
}

@media (max-width: 1199px) {
  .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 991px) {
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 575px) {
  .services-grid {
    grid-template-columns: 1fr;
  }
}

/* Service Card - Clean & Minimal */
.service-card {
  position: relative;
  background: var(--color-white);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

/* Number badge - appears on hover */
.service-card::before {
  content: attr(data-number);
  position: absolute;
  top: 1rem;
  left: 1rem;
  width: 32px;
  height: 32px;
  background: #054030;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 3;
  opacity: 0;
  transform: scale(0.8) translateY(-5px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover::before {
  opacity: 1;
  transform: scale(1) translateY(0);
}

/* Minimal corner accent */
.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 0 0 60px 60px;
  border-color: transparent transparent var(--color-off-white) transparent;
  transition: var(--transition);
  opacity: 0;
}

.service-card:hover::after {
  opacity: 1;
  border-width: 0 0 80px 80px;
}

/* Enhanced hover effect */
.service-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--color-gray);
}

/* Image Container */
.service-img {
  height: 200px;
  overflow: hidden;
  position: relative;
  background: var(--color-light-gray);
}

/* Minimal gradient overlay */
.service-img::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.15) 0%, transparent 100%);
  z-index: 2;
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover .service-img::before {
  opacity: 1;
}

.service-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  filter: grayscale(20%);
}

.service-card:hover .service-img img {
  transform: scale(1.08);
  filter: grayscale(0%);
}

/* Hover video: sits over the photo and fades in once it is actually playing
   (js/main.js adds .video-playing to the card). It only loads on first hover. */
.service-video {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  filter: grayscale(20%);
  transition: opacity 0.4s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Same zoom and colour as the photo on hover, so the crossfade doesn't jump.
   The card photos are each video's first frame, so the two line up exactly. */
.service-card:hover .service-video {
  transform: scale(1.08);
  filter: grayscale(0%);
}

/* Touch screens: tapping a card plays its video (js/main.js) */
@media (hover: none), (pointer: coarse) {
  .service-card {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
}

.service-card.video-playing .service-video {
  opacity: 1;
}

/* Icon - Minimal square design */
.service-icon {
  position: absolute;
  top: -1.25rem;
  right: 1.5rem;
  width: 2.5rem;
  height: 2.5rem;
  background: #054030;
  color: var(--color-white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  z-index: 3;
  transition: var(--transition);
}

.service-card:hover .service-icon {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.service-icon i {
  transition: var(--transition);
}

.service-card:hover .service-icon i {
  transform: scale(1.1);
}

/* Content */
.service-content {
  padding: 1.75rem 1.5rem 1.5rem;
  position: relative;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.service-content h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.75rem;
  line-height: 1.4;
  transition: var(--transition);
  position: relative;
  display: inline-block;
  width: fit-content;
}

/* Minimal underline effect */
.service-content h3::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--color-dark);
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-content h3::after {
  width: 100%;
}

.service-content p {
  font-size: 0.875rem;
  color: var(--color-dark-gray);
  line-height: 1.7;
  margin-bottom: 1rem;
  flex-grow: 1;
}

/* "View Details" Link */
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--color-charcoal);
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: auto;
  opacity: 0;
  transform: translateY(5px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover .service-link {
  opacity: 1;
  transform: translateY(0);
}

.service-link::after {
  content: '→';
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.service-link:hover::after {
  transform: translateX(3px);
}

/* Mobile adjustments */
@media (max-width: 767px) {
  .services-modern {
    padding: 5rem 0;
  }
  
  .services-grid {
    gap: 1.25rem;
  }
  
  .service-card::before {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  
  .service-link {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================
   PROJECTS SECTION
   ============================================ */
.projects-modern {
  padding: 8rem 0;
  background: var(--color-off-white);
}

.projects-masonry {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 4rem;
}

@media (max-width: 991px) {
  .projects-masonry {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 575px) {
  .projects-masonry {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.project-card-modern {
  background: var(--color-white);
  overflow: hidden;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.project-card-modern:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
}

.project-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-slow);
}

.project-card-modern:hover .project-image img {
  transform: scale(1.08);
}

.project-info {
  padding: 1.5rem;
}

.project-info h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
  line-height: 1.4;
  transition: var(--transition);
}

.project-card-modern:hover .project-info h3 {
  color: var(--color-accent-light);
}

.project-info p {
  font-size: 0.875rem;
  color: var(--color-dark-gray);
  line-height: 1.6;
  margin: 0;
}

/* ============================================
   STAFF SECTION - OUR PEOPLE (MODERN)
   ============================================ */
.staff-modern {
  padding: 8rem 0;
  background: linear-gradient(180deg, var(--color-white) 0%, var(--color-off-white) 100%);
  position: relative;
  overflow: hidden;
}

/* ORG CHART: Chairman > Managing Director > the three chiefs (each over one
   department) plus Procurement, Administration and IT under the MD directly.
   The markup is a nested list (index.html "Organization chart"), so screen
   readers get the reporting lines.
   Desktop: a 6-column grid. The MD sits in the chiefs' row, only slightly
   raised because they are siblings, with his three departments below him:
     row 1        Chairman (col 4)
     row 3   CFO  CMO   .   [MD]   .   COO        (MD raised by --org-raise)
     row 5   Fin  Mkt  Proc Admin  IT  Ops
   Rows 2 and 4 are the gaps the connecting lines run through. Card heights
   are fixed so every line can be measured exactly.
   Below 992px: the same list as an indented tree. */

/* ---------- Cards (all sizes) ---------- */
.org-chart {
  --org-line: #b9cfc3;
  --org-dot: #2e8b57;
  margin: 3.5rem auto 0;
}

.org-tree,
.org-tree ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.org-node {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  padding: 0.6rem 0.5rem;
  text-align: center;
  background: var(--color-white);
  border: 1px solid var(--color-gray);
  box-shadow: var(--shadow-md);
  transition: box-shadow 0.3s ease;
}

.org-node:hover {
  box-shadow: var(--shadow-lg);
}

.org-node strong {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-dark);
}

.org-node span {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  color: var(--color-accent-light);
}

/* Green dot where a line meets a card (every card but the Chairman) */
.org-node:not(.org-chair)::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 50%;
  width: 11px;
  height: 11px;
  margin-left: -5.5px;
  border-radius: 50%;
  background: var(--org-dot);
  border: 2px solid var(--color-white);
  z-index: 2;
}

/* Chairman: solid green */
.org-lead {
  background: #054030;
  border-color: #054030;
}

.org-lead strong {
  color: var(--color-white);
  font-size: 1.05rem;
}

.org-lead span {
  color: rgba(255, 255, 255, 0.75);
}

/* Managing Director and chiefs: white with a green bar on top */
.org-chief {
  border-top: 4px solid #2e8b57;
}

/* Departments: light green, with the department icon */
.org-dept {
  background: #e9f3ee;
  border-color: #cfe3d7;
  box-shadow: var(--shadow-sm);
}

/* ".org-dept" in front: Font Awesome's own ".fas { display: inline-block }"
   loads later and would otherwise win, leaving the glyph off-centre */
.org-dept .org-dept-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  margin-bottom: 0.3rem;
  border-radius: 50%;
  background: #054030;
  color: var(--color-white);
  font-size: 0.85rem;
}

.org-dept strong {
  color: #054030;
}

/* Clickable cards (people and departments): the whole card is a button
   that opens a profile or description below it
   (js/main.js "ORG CHART PROFILES") */
.org-clickable {
  padding: 0;
}

.org-toggle {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0.6rem 0.5rem;
  font: inherit;
  color: inherit;
  text-align: inherit;
  background: none;
  border: 0;
  border-radius: 0;
  cursor: pointer;
}

.org-toggle:focus-visible {
  outline: 2px solid #2e8b57;
  outline-offset: 3px;
}

/* Small arrow in the corner that shows the card opens; it flips when open */
.org-toggle-icon {
  position: absolute;
  right: 9px;
  bottom: 8px;
  font-size: 0.6rem;
  color: #2e8b57;
  transition: transform 0.3s ease;
}

.org-lead .org-toggle-icon {
  color: rgba(255, 255, 255, 0.7);
}

.org-toggle[aria-expanded="true"] .org-toggle-icon {
  transform: rotate(180deg);
}

.org-clickable.is-open {
  z-index: 10;              /* the open profile floats above the other cards */
  box-shadow: var(--shadow-lg);
}

/* The profile: two short points with green bullets */
.org-bio {
  text-align: left;
  background: var(--color-white);
}

.org-bio p {
  position: relative;
  margin: 0;
  padding-left: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  line-height: 1.5;
}

.org-bio p + p {
  margin-top: 0.5rem;
}

.org-bio p::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #2e8b57;
}

/* A department has one sentence, so no bullet */
.org-dept .org-bio p {
  padding-left: 0;
}

.org-dept .org-bio p::before {
  content: none;
}

/* The profiles drop below the bottom row of the chart, so let them show
   past the section's edge (style.css hides overflow on section#staff;
   nothing in this section needs that) */
section#staff.staff-modern {
  overflow: visible;
}

/* ---------- Desktop: the grid ---------- */
@media (min-width: 992px) {
  /* Sizes grow with the screen; the six columns fill the page container */
  .org-chart {
    --org-w: 148px;         /* column (and card) width */
    --org-cg: 8px;          /* gap between columns */
    --org-lead-w: 200px;    /* the Chairman's card is a little wider */
    --org-h: 98px;          /* Chairman, MD and chief cards */
    --org-dept-h: 104px;    /* department cards */
    --org-v1: 60px;         /* gap under the Chairman */
    --org-v2: 50px;         /* gap above the departments */
    --org-raise: 26px;      /* how far the MD sits above his siblings */
    margin-top: 4rem;
  }

  .org-node strong { font-size: 1rem; }
  .org-node span { font-size: 0.72rem; }
  .org-lead strong { font-size: 1.1rem; }

  .org-tree {
    display: grid;
    grid-template-columns: repeat(6, var(--org-w));
    grid-template-rows: var(--org-h) var(--org-v1) var(--org-h) var(--org-v2) var(--org-dept-h);
    column-gap: var(--org-cg);
    justify-content: center;
  }

  /* Flatten the list so every card is a grid item */
  .org-tree ul,
  .org-tree li {
    display: contents;
  }

  .org-node {
    width: var(--org-w);
    height: var(--org-h);
    justify-self: center;
  }

  .org-lead {
    width: var(--org-lead-w);
  }

  .org-dept {
    height: var(--org-dept-h);
  }

  /* Placement: grid-area is row / column.
     The Chairman and MD span columns 3-4 and sit centred on the page;
     the MD's line meets the bar over his departments between Procurement
     and Administration. */
  .org-chair { grid-area: 1 / 3 / 2 / 5; }
  .org-md    { grid-area: 3 / 3 / 4 / 5; margin-top: calc(var(--org-raise) * -1); }
  .org-c1    { grid-area: 3 / 1; }
  .org-c2    { grid-area: 3 / 2; }
  .org-c6    { grid-area: 3 / 6; }
  .org-d1    { grid-area: 5 / 1; }
  .org-d2    { grid-area: 5 / 2; }
  .org-d3    { grid-area: 5 / 3; }
  .org-d4    { grid-area: 5 / 4; }
  .org-d5    { grid-area: 5 / 5; }
  .org-d6    { grid-area: 5 / 6; }

  /* Vertical lines, drawn from each card. "top" is measured from inside the
     card's border, hence the border widths in the sums. */
  .org-chair::after,
  .org-md::after,
  .org-chief::after,
  .org-dept::after {
    content: '';
    position: absolute;
    left: 50%;
    margin-left: -1px;
    border-left: 2px solid var(--org-line);
    z-index: -1;
  }

  /* Chairman down to the (raised) MD */
  .org-chair::after {
    top: 100%;
    height: calc(var(--org-v1) - var(--org-raise));
  }

  /* MD down to the bar over his three departments (top: 100% is inside his 1px bottom border) */
  .org-md::after {
    top: calc(100% + 1px);
    height: calc(var(--org-raise) + var(--org-v2) / 2 - 1px);
  }

  /* Bar from the MD's sides across to the chiefs, half way up his raise.
     :not(.org-md) because the MD shares the chief style but has his own line down. */
  .org-chief:not(.org-md)::after {
    top: calc(var(--org-raise) / -2 - 4px);
    height: calc(var(--org-raise) / 2 + 4px);
  }

  /* Chief down to their department */
  .org-d1::after,
  .org-d2::after,
  .org-d6::after {
    top: calc(var(--org-v2) * -1 - 1px);
    height: var(--org-v2);
  }

  /* MD's bar down to each of his departments */
  .org-d3::after,
  .org-d4::after,
  .org-d5::after {
    top: calc(var(--org-v2) / -2 - 1px);
    height: calc(var(--org-v2) / 2);
  }

  /* Horizontal bars (grid items of their own, behind the cards) */
  .org-bus {
    display: block;
    height: 0;
    border-top: 2px solid var(--org-line);
    align-self: start;
    z-index: 0;
  }

  /* From the centre of column 1 to the centre of column 6, passing behind the MD */
  .org-bus-chiefs {
    grid-row: 3;
    grid-column: 1 / -1;
    margin: calc(var(--org-raise) / -2 - 1px) calc(var(--org-w) / 2) 0;
  }

  /* Over the MD's three departments (columns 3 to 5) */
  .org-bus-md {
    grid-row: 4;
    grid-column: 3 / 6;
    align-self: center;
    margin: 0 calc(var(--org-w) / 2);
  }

  /* Profile: a panel floating just below the card, over the chart,
     so nothing else moves when it opens */
  .org-chart {
    --org-bio-w: 250px;
  }

  .org-bio {
    --org-caret: 50%;
    position: absolute;
    top: calc(100% + 14px);
    left: 50%;
    width: var(--org-bio-w);
    margin-left: calc(var(--org-bio-w) / -2);
    padding: 1rem 1.1rem;
    border: 1px solid var(--color-gray);
    border-top: 3px solid #2e8b57;
    box-shadow: var(--shadow-xl);
    cursor: default;
  }

  /* Pointer up to the card */
  .org-bio::before {
    content: '';
    position: absolute;
    top: -12px;
    left: var(--org-caret);
    width: 18px;
    height: 9px;
    margin-left: -9px;
    background: #2e8b57;
    clip-path: polygon(50% 0, 100% 100%, 0 100%);
  }

  /* Outer columns: line the panel up with the card's outer edge so it
     stays on screen, and keep the pointer under the card's centre */
  .org-c1 .org-bio,
  .org-d1 .org-bio {
    --org-caret: calc(var(--org-w) / 2);
    left: -1px;
    margin-left: 0;
  }

  .org-c6 .org-bio,
  .org-d6 .org-bio {
    --org-caret: calc(100% - var(--org-w) / 2);
    left: auto;
    right: -1px;
    margin-left: 0;
  }
}

@media (min-width: 992px) and (prefers-reduced-motion: no-preference) {
  .org-bio:not([hidden]) {
    animation: orgBioIn 0.25s ease both;
  }

  @keyframes orgBioIn {
    from { opacity: 0; transform: translateY(-6px); }
    to   { opacity: 1; transform: none; }
  }
}

@media (min-width: 1200px) {
  .org-chart {
    --org-w: 176px;
    --org-cg: 12px;
    --org-lead-w: 240px;
    --org-h: 108px;
    --org-dept-h: 116px;
    --org-v1: 66px;
    --org-v2: 56px;
    --org-raise: 30px;
  }

  .org-node:not(.org-clickable),
  .org-toggle {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .org-chart { --org-bio-w: 270px; }

  .org-node strong { font-size: 1.08rem; }
  .org-node span { font-size: 0.75rem; }
  .org-lead strong { font-size: 1.2rem; }
  .org-dept strong { font-size: 1rem; }

  .org-dept .org-dept-icon {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }
}

@media (min-width: 1400px) {
  .org-chart {
    --org-w: 200px;
    --org-cg: 16px;
    --org-lead-w: 270px;
    --org-h: 118px;
    --org-dept-h: 128px;
    --org-v1: 72px;
    --org-v2: 60px;
    --org-raise: 32px;
  }

  .org-chart { --org-bio-w: 290px; }

  .org-node strong { font-size: 1.15rem; }
  .org-node span { font-size: 0.8rem; }
  .org-lead strong { font-size: 1.3rem; }
  .org-dept strong { font-size: 1.05rem; }
  .org-bio p { font-size: 0.9rem; }

  .org-dept .org-dept-icon {
    width: 40px;
    height: 40px;
    font-size: 0.95rem;
  }
}

/* ---------- Phones and tablets: indented tree ---------- */
@media (max-width: 991.98px) {
  .org-chart {
    --org-indent: 22px;
    --org-mid: 36px;          /* where the line meets a card: half the card height */
    max-width: 420px;
    margin-top: 2.5rem;
  }

  .org-tree ul {
    padding-left: var(--org-indent);
  }

  .org-tree li {
    position: relative;
    padding: 10px 0 0 var(--org-indent);
  }

  .org-tree > li {
    padding: 0;
  }

  /* Line down the left of each level... */
  .org-tree li::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    border-left: 2px solid var(--org-line);
  }

  /* ...and across to each card */
  .org-tree li::after {
    content: '';
    position: absolute;
    top: calc(10px + var(--org-mid));
    left: 0;
    width: var(--org-indent);
    border-top: 2px solid var(--org-line);
  }

  /* The last item's line stops at its card */
  .org-tree li:last-child::before {
    bottom: auto;
    height: calc(10px + var(--org-mid));
  }

  .org-tree > li::before,
  .org-tree > li::after,
  .org-bus {
    display: none;
  }

  .org-node {
    min-height: calc(var(--org-mid) * 2);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0;
    padding: 0.6rem 1rem;
    text-align: left;
  }

  .org-node strong,
  .org-node span {
    flex-basis: 100%;
  }

  .org-dept strong {
    flex-basis: auto;
  }

  .org-dept .org-dept-icon {
    margin-bottom: 0;
  }

  /* Dot on the left edge, where the line meets the card. Measured from the
     top (not 50%) so it stays on the line when a profile opens the card up. */
  .org-node:not(.org-chair)::before {
    top: var(--org-mid);
    left: 0;
    margin: -5.5px 0 0 -6px;
  }

  /* Clickable cards: the button is the card's top part, the profile opens below it */
  .org-clickable {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    padding: 0;
  }

  .org-toggle {
    min-height: calc(var(--org-mid) * 2 - 2px);
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-items: center;
    align-content: center;
    column-gap: 0.75rem;
    row-gap: 0;
    padding: 0.6rem 2.25rem 0.6rem 1rem;
  }

  /* Chief cards have a 4px top border instead of 1px */
  .org-chief .org-toggle {
    min-height: calc(var(--org-mid) * 2 - 5px);
  }

  .org-chief::before {
    top: calc(var(--org-mid) - 4px) !important;
  }

  .org-chief .org-toggle-icon {
    top: calc(var(--org-mid) - 4px);
  }

  .org-toggle-icon {
    top: var(--org-mid);
    bottom: auto;
    right: 14px;
    margin-top: -0.35rem;
    font-size: 0.7rem;
  }

  .org-bio {
    margin: 0 1rem 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid #e3e7e5;
  }

  .org-lead .org-bio {
    margin: 0;
    padding: 0.75rem 1rem 0.9rem;
    border-top: 0;
  }

  /* Department description: on the card's light green, lined up with the
     department name (icon width + gap) */
  .org-dept .org-bio {
    background: transparent;
    border-top-color: #cfe3d7;
  }

  .org-dept .org-bio p {
    padding-left: calc(34px + 0.75rem);
  }
}

/* ============================================
   AFFILIATIONS SECTION
   ============================================ */
.affiliations-modern {
  padding: 8rem 0;
  background: var(--color-white);
}

.affiliations-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2rem;
  margin-top: 4rem;
  align-items: center;
}

@media (max-width: 1199px) {
  .affiliations-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 767px) {
  .affiliations-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
}

@media (max-width: 480px) {
  .affiliations-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.affiliation-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: var(--color-off-white);
  border: 1px solid var(--color-light-gray);
  transition: var(--transition);
  aspect-ratio: 3/2;
}

.affiliation-item:hover {
  background: var(--color-white);
  box-shadow: var(--shadow-md);
  transform: translateY(-5px);
}

.affiliation-item img {
  /* js/main.js "LOGO SIZES" sets each logo's height (same as the clients) */
  max-width: 100%;
  max-height: 100px;
  width: auto;
  height: auto;
  object-fit: contain;
  /* Logos show in full colour */
  transition: var(--transition);
}

/* ============================================
   CONTACT SECTION
   ============================================ */
.contact-modern {
  padding: 8rem 0;
  background: var(--color-white);
}

.contact-info {
  padding-right: 3rem;
}

.contact-info h2 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  color: var(--color-dark);
  margin-bottom: 1rem;
}

.contact-info > p {
  color: var(--color-dark-gray);
  margin-bottom: 2.5rem;
}

.contact-details {
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--color-off-white);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon i {
  font-size: 1.25rem;
  color: var(--color-accent);
}

.contact-item h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.25rem;
}

.contact-item p {
  font-size: 0.875rem;
  color: var(--color-dark-gray);
  margin: 0;
  line-height: 1.6;
}

/* Phone and email rows are links (tel: / mailto:) */
a.contact-item {
  text-decoration: none;
  color: inherit;
}

a.contact-item .contact-icon {
  transition: var(--transition);
}

a.contact-item:hover .contact-icon,
a.contact-item:focus-visible .contact-icon {
  background: var(--color-dark);
}

a.contact-item:hover .contact-icon i,
a.contact-item:focus-visible .contact-icon i {
  color: var(--color-white);
}

a.contact-item:hover p,
a.contact-item:focus-visible p {
  text-decoration: underline;
}

/* Email row: the mailto link plus a "Copy" button beside it */
.contact-item-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end; /* button sits on the same line as the address */
  column-gap: 0.75rem;
  row-gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.contact-item-row .contact-item {
  margin-bottom: 0;
}

/* Small square button in the same style as the contact icons */
.copy-email-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 26px;
  padding: 0 0.6rem;
  margin-bottom: 5px; /* centres it on the address line, not the icon box */
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--color-dark);
  background: var(--color-off-white);
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: var(--transition);
}

.copy-email-btn i {
  font-size: 0.75rem;
  color: var(--color-accent);
  transition: var(--transition);
}

.copy-email-btn:hover,
.copy-email-btn:focus-visible {
  color: var(--color-white);
  background: var(--color-dark);
}

.copy-email-btn:hover i,
.copy-email-btn:focus-visible i {
  color: var(--color-white);
}

.copy-email-btn.is-copied,
.copy-email-btn.is-copied i {
  color: var(--color-white);
  background: #054030;
}

.contact-social {
  display: flex;
  gap: 0.75rem;
}

.contact-social a {
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-dark) !important;
  color: var(--color-white) !important;
  text-decoration: none;
  transition: var(--transition);
}

.contact-social a:hover {
  background: var(--color-accent-light) !important;
  color: var(--color-white) !important;
}

.contact-social a i {
  color: var(--color-white) !important;
}

.contact-form-wrapper {
  background: var(--color-off-white);
  padding: 3rem;
}

.contact-form .form-group {
  margin-bottom: 1.5rem;
}

.contact-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.contact-form .form-control {
  width: 100%;
  padding: 1rem;
  font-size: 0.875rem;
  border: 1px solid var(--color-gray);
  border-radius: 0;
  background: var(--color-white);
  transition: var(--transition);
}

.contact-form .form-control:focus {
  outline: none;
  border-color: var(--color-dark);
  box-shadow: none;
}

.contact-form textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.success-message {
  text-align: center;
  padding: 2rem;
}

.success-message i {
  font-size: 3rem;
  color: #10b981;
  margin-bottom: 1rem;
}

.success-message h3 {
  font-size: 1.5rem;
  color: var(--color-dark);
  margin-bottom: 0.5rem;
}

.success-message i {
  color: #054030;
}

.thankyou_message:focus {
  outline: none;
}

.btn-link-send-another {
  margin-top: 0.5rem;
  padding: 0;
  border: 0;
  background: none;
  font-size: 0.875rem;
  font-weight: 600;
  color: #054030;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.btn-link-send-another:hover {
  color: #0a6b50;
}

/* Error under the form, shown when the message could not be sent */
#contact .contact-form .form-error {
  margin: 0 0 1rem;
  padding: 0.75rem 1rem;
  border-left: 3px solid #c0392b;
  background: #fdecea;
  font-size: 0.875rem;
  color: #a12a1f !important;
}

/* Spam trap field: kept off screen so only bots fill it in */
.contact-form .form-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-form button[disabled] {
  opacity: 0.7;
  cursor: wait;
}

@media (max-width: 991px) {
  .contact-info {
    padding-right: 0;
    margin-bottom: 3rem;
  }
  
  .contact-form-wrapper {
    padding: 2rem;
  }
}

/* ============================================
   FOOTER
   ============================================ */
.footer-modern {
  background: #054030;
  color: var(--color-white);
  padding: 5rem 0 0;
}

.footer-content {
  display: grid;
  grid-template-columns: 2fr 1fr 1.5fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 991px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 575px) {
  .footer-content {
    grid-template-columns: 1fr;
  }
}

.footer-brand img {
  height: 50px;
  margin-bottom: 1rem;
  filter: brightness(0) invert(1);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  max-width: 300px;
}

.footer-links h4,
.footer-contact h4 {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.5rem;
  color: var(--color-white);
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--color-white) !important;
}

.footer-contact p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  margin-bottom: 0.5rem;
}

.footer-contact a {
  color: rgba(255, 255, 255, 0.6) !important;
  text-decoration: none;
  transition: var(--transition);
}

.footer-contact a:hover {
  color: var(--color-white) !important;
}

.footer-bottom {
  padding: 1.5rem 0;
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.4);
  font-size: 0.75rem;
  margin: 0;
}

/* ============================================
   FLOATING CONTACT BUTTONS
   ============================================ */
.floating-buttons {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.floating-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 1.4rem;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  position: relative;
  border: none;
  cursor: pointer;
}

.floating-btn i {
  color: var(--color-white) !important;
  transition: var(--transition);
}

.floating-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.15);
}

.floating-btn:active {
  transform: translateY(-1px) scale(1.02);
}

/* WhatsApp Button */
.floating-btn.whatsapp-btn {
  background: linear-gradient(135deg, #25d366 0%, #128C7E 100%);
}

.floating-btn.whatsapp-btn:hover {
  background: linear-gradient(135deg, #2be170 0%, #159d8d 100%);
}

/* Email Button */
.floating-btn.email-btn {
  background: linear-gradient(135deg, var(--color-dark) 0%, var(--color-charcoal) 100%);
}

.floating-btn.email-btn:hover {
  background: linear-gradient(135deg, var(--color-charcoal) 0%, var(--color-dark) 100%);
}

/* Back to top: at the bottom of the stack, hidden (and taking no space)
   until the page is scrolled down, so the other buttons stay in the corner */
.floating-btn.back-to-top-btn {
  padding: 0;
  background: #054030;
  font-size: 1.2rem;
  height: 0;
  margin-top: -1rem; /* cancels the stack's gap while hidden */
  opacity: 0;
  visibility: hidden;
  transform: scale(0.6);
  pointer-events: none;
  transition: height 0.35s ease, margin-top 0.35s ease, opacity 0.3s ease,
              transform 0.35s ease, visibility 0.35s, background 0.3s ease, box-shadow 0.3s ease;
}

.floating-btn.back-to-top-btn.is-visible {
  height: 56px;
  margin-top: 0;
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
}

.floating-btn.back-to-top-btn.is-visible:hover {
  background: #0a6b50;
  transform: translateY(-3px) scale(1.05);
}

.floating-btn.back-to-top-btn:focus-visible {
  outline: 3px solid #0a6b50;
  outline-offset: 3px;
}

/* Tooltip */
.btn-tooltip {
  position: absolute;
  right: 70px;
  background: var(--color-dark);
  color: var(--color-white);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateX(10px);
  transition: var(--transition);
  pointer-events: none;
  box-shadow: var(--shadow-md);
}

.btn-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border-width: 6px;
  border-style: solid;
  border-color: transparent transparent transparent var(--color-dark);
}

.floating-btn:hover .btn-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .floating-buttons {
    bottom: 1.5rem;
    right: 1.5rem;
    gap: 0.75rem;
  }
  
  .floating-btn {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }

  .floating-btn.back-to-top-btn {
    margin-top: -0.75rem;
    font-size: 1.1rem;
  }

  .floating-btn.back-to-top-btn.is-visible {
    height: 50px;
  }

  .btn-tooltip {
    display: none;
  }
}

/* ============================================
   UTILITIES & ANIMATIONS
   ============================================ */
.text-center {
  text-align: center;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
}

/* GPU acceleration for smoother scrolling */
body {
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: smooth;
}

/* Optimize fixed elements for smooth scroll */
.navbar-modern {
  will-change: transform;
  backface-visibility: hidden;
  /* Note: translateX(-50%) is already applied in the main navbar rule */
}

.floating-buttons {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize hero parallax */
.hero-bg {
  will-change: transform;
  transform: translateZ(0);
  backface-visibility: hidden;
}

/* Optimize animated elements */
[data-aos] {
  will-change: transform, opacity;
}

/* Hide scrollbar but keep functionality */
body::-webkit-scrollbar {
  width: 8px;
}

body::-webkit-scrollbar-track {
  background: var(--color-light-gray);
}

body::-webkit-scrollbar-thumb {
  background: var(--color-dark-gray);
}

body::-webkit-scrollbar-thumb:hover {
  background: var(--color-charcoal);
}

/* ============================================
   SCROLL REVEAL (Services to Affiliations)
   js/main.js ("SCROLL REVEAL") adds .rv-on to <html>, tags elements with
   .rv + an effect class, and adds .rv-in when each scrolls into view.
   Keyframe animations with fill-mode "backwards" are used instead of
   transitions, so once an element has animated in, its normal hover
   effects (lift, zoom, widen) work exactly as before.
   Nothing is hidden if the script doesn't run or reduced motion is on.
   ============================================ */
.rv-on .rv:not(.rv-in) {
  opacity: 0;
}

.rv-on .rv.rv-in {
  animation-duration: 0.9s;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
  animation-fill-mode: backwards;
  animation-delay: calc(var(--rv-i, 0) * 110ms);
}

.rv-on .rv-up.rv-in   { animation-name: rvUp; }
.rv-on .rv-pop.rv-in  { animation-name: rvPop; animation-duration: 0.7s; animation-timing-function: cubic-bezier(0.34, 1.56, 0.64, 1); }
.rv-on .rv-zoom.rv-in { animation-name: rvZoom; animation-duration: 1.1s; }

/* Parts inside a revealed element, a little after their parent */
.rv-on .rv-in .rv-child-wipe {
  animation: rvWipe 1s cubic-bezier(0.77, 0, 0.18, 1) backwards;
  animation-delay: calc(var(--rv-i, 0) * 110ms + 150ms);
}

.rv-on .rv-in .rv-child-pop {
  animation: rvPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
  animation-delay: calc(var(--rv-i, 0) * 110ms + 700ms);
}

@keyframes rvUp {
  from { opacity: 0; transform: translateY(40px); }
}

@keyframes rvPop {
  from { opacity: 0; transform: scale(0.8); }
}

@keyframes rvZoom {
  from { opacity: 0; transform: translateY(60px) scale(0.94); }
}

@keyframes rvWipe {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
