/* G-2 Middle East - Custom Styles */
/* Monochromatic, Minimalist, Cinematic Aesthetic */

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Base Typography */
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, Garamond, serif;
  font-weight: 700;
  letter-spacing: 0.05em;
}

/* Custom Scrollbar - Refined */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
  background: #B89A6A;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #9A8158;
}

/* Typography Refinements */
.text-shadow {
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}

/* Serif Headings with Architectural Quality */
.heading-serif {
  font-family: 'Playfair Display', Georgia, Garamond, serif;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1.2;
}

/* All-caps headlines with refined spacing */
.heading-caps {
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
}

/* Elegant body text */
.body-text {
  font-family: 'Inter', -apple-system, sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.7;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in {
  animation: fadeIn 0.8s ease-out forwards;
}

.fade-in-delay-1 {
  animation: fadeIn 0.8s ease-out 0.2s forwards;
  opacity: 0;
}

.fade-in-delay-2 {
  animation: fadeIn 0.8s ease-out 0.4s forwards;
  opacity: 0;
}

/* Hero Gallery - Cinematic Treatment */
.hero-gallery {
  position: relative;
  height: 85vh;
  min-height: 650px;
  overflow: hidden;
}

.hero-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 2s ease-in-out;
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Cinematic monochromatic treatment */
  filter: grayscale(100%) contrast(1.1) brightness(0.6);
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* Sophisticated gradient overlay */
  background: linear-gradient(to bottom, 
    rgba(26, 26, 26, 0.2) 0%, 
    rgba(26, 26, 26, 0.6) 60%, 
    rgba(26, 26, 26, 0.95) 100%
  );
}

/* Cards - Minimal Elegance */
.card-hover {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.card-hover:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.4);
  border-color: rgba(184, 154, 106, 0.2);
}

/* Frosted Glass Effect for Service & Perspective Cards */
.service-card,
.perspective-card {
  position: relative;
  isolation: isolate;
}

.service-card::before,
.perspective-card::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  z-index: -1;
  transition: opacity 0.3s ease-in-out;
  pointer-events: none;
}

.service-card:hover::before,
.perspective-card:hover::before {
  opacity: 1;
}

/* Service Card Image Hover Effects - Elegant & Subtle */
.group img {
  transition: filter 0.5s ease-in-out, transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.group:hover img {
  filter: brightness(100%) grayscale(0%) !important;
  opacity: 1 !important;
}

/* Refined Text Effects */
.text-gradient {
  background: linear-gradient(135deg, #FFFFFF 0%, #B89A6A 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Button Styles - Sophisticated & Minimal */
.btn-primary {
  background: #B89A6A;
  color: #1A1A1A;
  padding: 0.875rem 2.5rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
  border: none;
}

.btn-primary:hover {
  background: #9A8158;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(184, 154, 106, 0.25);
}

.btn-secondary {
  border: 1px solid #B89A6A;
  background: transparent;
  color: #B89A6A;
  padding: 0.875rem 2.5rem;
  border-radius: 2px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-block;
}

.btn-secondary:hover {
  background: #B89A6A;
  color: #1A1A1A;
  transform: translateY(-2px);
  box-shadow: 0 12px 24px rgba(184, 154, 106, 0.25);
}

/* Section Divider - Subtle Elegance */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 154, 106, 0.3), transparent);
  margin: 5rem 0;
}

/* Image Overlay Effects - Cinematic */
.image-overlay {
  position: relative;
  overflow: hidden;
}

.image-overlay img {
  /* Cinematic desaturation */
  filter: grayscale(80%) contrast(1.05);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-overlay:hover img {
  filter: grayscale(60%) contrast(1.1);
  transform: scale(1.05);
}

.image-overlay::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(184, 154, 106, 0.15), 
    rgba(26, 26, 26, 0.7)
  );
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-overlay:hover::after {
  opacity: 1;
}

/* Forms - Refined Minimalism */
input, textarea, select {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: white;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: rgba(184, 154, 106, 0.6);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 0 0 1px rgba(184, 154, 106, 0.2);
}

input::placeholder, textarea::placeholder {
  color: rgba(255, 255, 255, 0.35);
  font-weight: 300;
}

/* Loading Spinner - Refined */
.spinner {
  border: 2px solid rgba(255, 255, 255, 0.08);
  border-top: 2px solid #B89A6A;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Additional Utility Classes */
.monochrome-img {
  filter: grayscale(100%) contrast(1.1);
}

.cinematic-img {
  filter: grayscale(80%) contrast(1.05) brightness(0.95);
}

/* Elegant Line Art Icons */
.icon-line {
  font-weight: 300;
  opacity: 0.9;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-gallery {
    height: 60vh;
    min-height: 400px;
  }
}

/* ============================================
   INTERACTIVE MAP STYLES
   ============================================ */

/* City Marker Container */
.city-marker {
  position: absolute;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 10;
}

.city-marker:hover {
  transform: scale(1.2);
  z-index: 20;
}

/* Pulsing Marker Animation */
.pulse-marker {
  animation: pulse 2s infinite;
  box-shadow: 0 0 0 0 rgba(184, 154, 106, 0.7);
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(184, 154, 106, 0.7);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(184, 154, 106, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(184, 154, 106, 0);
  }
}

/* Map Loading Animation */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.city-marker {
  animation: fadeIn 0.6s ease-in;
}

/* Stagger animation for multiple markers */
.city-marker:nth-child(1) { animation-delay: 0.1s; }
.city-marker:nth-child(2) { animation-delay: 0.2s; }
.city-marker:nth-child(3) { animation-delay: 0.3s; }
.city-marker:nth-child(4) { animation-delay: 0.4s; }
.city-marker:nth-child(5) { animation-delay: 0.5s; }
.city-marker:nth-child(6) { animation-delay: 0.6s; }
.city-marker:nth-child(7) { animation-delay: 0.7s; }
.city-marker:nth-child(8) { animation-delay: 0.8s; }
.city-marker:nth-child(9) { animation-delay: 0.9s; }
.city-marker:nth-child(10) { animation-delay: 1.0s; }
.city-marker:nth-child(11) { animation-delay: 1.1s; }
.city-marker:nth-child(12) { animation-delay: 1.2s; }
.city-marker:nth-child(13) { animation-delay: 1.3s; }
.city-marker:nth-child(14) { animation-delay: 1.4s; }
.city-marker:nth-child(15) { animation-delay: 1.5s; }

/* Tooltip Styling */
#city-tooltip,
#city-tooltip-group {
  transition: opacity 0.2s ease;
  white-space: nowrap;
}

/* Responsive Map */
@media (max-width: 768px) {
  .city-marker {
    transform: scale(0.8);
  }
  
  .city-marker:hover {
    transform: scale(1.0);
  }
}

/* ============================================
   DIGITAL COMMAND CENTRE MAP STYLES
   ============================================ */

/* Office Pin Container */
.office-pin {
  position: absolute;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 10;
  transform: translate(-50%, -50%);
}

.office-pin:hover {
  z-index: 20;
  transform: translate(-50%, -50%) scale(1.3);
}

/* Pin Marker - Strategic Red */
.pin-marker {
  width: 10px;
  height: 10px;
  background: radial-gradient(circle, #DC143C 0%, #8B0000 100%);
  border-radius: 50%;
  box-shadow: 
    0 0 8px rgba(220, 20, 60, 0.8),
    0 0 16px rgba(220, 20, 60, 0.4),
    0 0 24px rgba(220, 20, 60, 0.2);
  animation: pinPulse 2s ease-in-out infinite;
  position: relative;
}

.pin-marker::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background: inherit;
  border-radius: 50%;
  animation: pinRipple 2s ease-out infinite;
}

/* HQ Pins - Larger */
.pin-marker.global-hq,
.pin-marker.regional-hq {
  width: 14px;
  height: 14px;
  background: radial-gradient(circle, #FF1744 0%, #C62828 100%);
  box-shadow: 
    0 0 12px rgba(255, 23, 68, 1),
    0 0 24px rgba(255, 23, 68, 0.6),
    0 0 36px rgba(255, 23, 68, 0.3);
}

/* Pulse Animation */
@keyframes pinPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 1;
  }
  50% {
    transform: scale(1.15);
    opacity: 0.9;
  }
}

/* Ripple Effect */
@keyframes pinRipple {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(3);
    opacity: 0;
  }
}

/* Hover State Enhancement */
.office-pin:hover .pin-marker {
  animation: pinPulse 0.8s ease-in-out infinite;
  box-shadow: 
    0 0 16px rgba(220, 20, 60, 1),
    0 0 32px rgba(220, 20, 60, 0.8),
    0 0 48px rgba(220, 20, 60, 0.4);
}

.office-pin:hover .pin-marker.global-hq,
.office-pin:hover .pin-marker.regional-hq {
  box-shadow: 
    0 0 20px rgba(255, 23, 68, 1),
    0 0 40px rgba(255, 23, 68, 0.8),
    0 0 60px rgba(255, 23, 68, 0.4);
}

/* Tooltip Pulse Dot */
.pulse-dot {
  animation: pulseDot 1.5s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.6;
    transform: scale(1.2);
  }
}

/* Map Tooltip Styling */
#map-tooltip {
  transition: opacity 0.2s ease, transform 0.2s ease;
  white-space: nowrap;
  pointer-events: none;
}

/* SVG Animation on Load */
svg g {
  animation: fadeInMap 1.5s ease-out forwards;
}

@keyframes fadeInMap {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 0.8;
    transform: scale(1);
  }
}

/* Stagger Pin Entrance */
.office-pin {
  animation: fadeInPin 0.6s ease-out backwards;
}

.office-pin:nth-child(1) { animation-delay: 0.3s; }
.office-pin:nth-child(2) { animation-delay: 0.4s; }
.office-pin:nth-child(3) { animation-delay: 0.5s; }
.office-pin:nth-child(4) { animation-delay: 0.6s; }
.office-pin:nth-child(5) { animation-delay: 0.7s; }
.office-pin:nth-child(6) { animation-delay: 0.8s; }
.office-pin:nth-child(7) { animation-delay: 0.9s; }
.office-pin:nth-child(8) { animation-delay: 1.0s; }
.office-pin:nth-child(9) { animation-delay: 1.1s; }
.office-pin:nth-child(10) { animation-delay: 1.2s; }
.office-pin:nth-child(11) { animation-delay: 1.3s; }
.office-pin:nth-child(12) { animation-delay: 1.4s; }
.office-pin:nth-child(13) { animation-delay: 1.5s; }
.office-pin:nth-child(14) { animation-delay: 1.6s; }
.office-pin:nth-child(15) { animation-delay: 1.7s; }

@keyframes fadeInPin {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
  .pin-marker {
    width: 8px;
    height: 8px;
  }
  
  .pin-marker.global-hq,
  .pin-marker.regional-hq {
    width: 12px;
    height: 12px;
  }
  
  .office-pin:hover {
    transform: translate(-50%, -50%) scale(1.4);
  }
}

@media (max-width: 768px) {
  .pin-marker {
    width: 6px;
    height: 6px;
  }
  
  .pin-marker.global-hq,
  .pin-marker.regional-hq {
    width: 10px;
    height: 10px;
  }
  
  #map-tooltip {
    font-size: 12px;
    px: 4;
    py: 2;
  }
}
