/* ===== ESG:ONE Website Styles ===== */
/* Inspired by esg-one.co live design */

:root {
  --color-primary: #103755;
  --color-primary-dark: #022845;
  --color-accent: #54C3C3;
  --color-accent-mid: #44A3BD;
  --color-accent-hover: #3d9bb4;
  --color-foreground: #1e293b;
  --color-muted: #64748b;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-bg-subtle: #f8fafc;
  --color-bg-section: #f1f5f9;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Skip Link (WCAG 2.4.1) ===== */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  z-index: 9999;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 0.5rem 0.5rem;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  color: #fff;
}

/* ===== Focus Indicators (WCAG 2.4.7) ===== */
*:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
  box-shadow: none;
}

.form-control:focus-visible,
.form-check-input:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 0;
  box-shadow: none;
}

.nav-link:focus-visible,
.dropdown-item:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -2px;
}

/* ===== Base ===== */
body {
  font-family: var(--font-sans);
  color: var(--color-foreground);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.6;
  background-color: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--color-primary-dark);
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s ease;
}

img, svg {
  max-width: 100%;
  height: auto;
}

/* ===== Navbar ===== */
.navbar {
  background-color: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  transition: box-shadow 0.3s ease;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.navbar.scrolled {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.06);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700 !important;
  font-size: 1.25rem !important;
  color: var(--color-primary-dark) !important;
  letter-spacing: -0.02em;
}

.navbar-brand:hover {
  color: var(--color-primary) !important;
}

.navbar-brand .brand-logo {
  width: 32px;
  height: 33px;
  flex-shrink: 0;
}

.navbar .nav-link {
  color: var(--color-foreground) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 0.875rem !important;
  transition: color 0.15s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
  color: var(--color-accent-mid) !important;
}

.navbar .dropdown-menu {
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
  padding: 0.5rem;
  margin-top: 0.25rem;
}

.navbar .dropdown-item {
  font-size: 0.875rem;
  padding: 0.4rem 0.75rem;
  border-radius: 0.375rem;
  color: var(--color-foreground);
}

.navbar .dropdown-item:hover {
  background-color: var(--color-bg-subtle);
  color: var(--color-primary);
}

.navbar .dropdown-header {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-muted);
  padding: 0.4rem 0.75rem;
}

.navbar-toggler {
  border: 1px solid var(--color-border) !important;
  padding: 0.375rem 0.625rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23103755' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

/* ===== Buttons ===== */
.btn {
  font-weight: 600;
  font-size: 0.875rem;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
  letter-spacing: -0.01em;
}

.btn-sm {
  padding: 0.375rem 1rem;
  font-size: 0.8125rem;
}

.btn-lg {
  padding: 0.75rem 1.75rem;
  font-size: 1rem;
}

.btn-accent {
  background-color: var(--color-accent);
  border-color: var(--color-accent);
  color: #fff;
  font-weight: 600;
}

.btn-accent:hover {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(84,195,195,0.3);
}

.btn-primary {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-primary:hover {
  background-color: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 6px -1px rgba(16,55,85,0.3);
}

.btn-outline-primary {
  color: var(--color-primary);
  border-color: var(--color-primary);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}

.btn-outline-dark {
  color: var(--color-foreground);
  border-color: var(--color-border);
}

.btn-outline-dark:hover {
  background-color: var(--color-bg-subtle);
  border-color: var(--color-muted);
  color: var(--color-primary);
}

/* ===== Hero Sections ===== */
.hero-primary {
  background-color: var(--color-primary);
  position: relative;
  overflow: hidden;
}

.hero-primary::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 60%;
  height: 200%;
  background: radial-gradient(ellipse, rgba(84,195,195,0.12) 0%, transparent 70%);
  pointer-events: none;
}

/* ===== Color Utilities ===== */
.text-accent { color: var(--color-accent) !important; }
.text-primary-custom { color: var(--color-primary) !important; }
.text-muted-custom { color: var(--color-muted) !important; }
.text-white-75 { color: rgba(255,255,255,0.85); }
.text-white-50 { color: rgba(255,255,255,0.7) !important; }

.bg-accent { background-color: var(--color-accent) !important; }
.bg-accent-10 { background-color: rgba(84,195,195,0.1); }
.bg-accent-5 { background-color: rgba(84,195,195,0.05); }
.bg-primary-10 { background-color: rgba(16,55,85,0.1); }
.bg-primary-5 { background-color: rgba(16,55,85,0.05); }
.bg-section { background-color: var(--color-bg-section); }
.bg-subtle { background-color: var(--color-bg-subtle); }
.border-accent { border-color: var(--color-accent) !important; }

/* ===== Cards ===== */
.card {
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  transition: all 0.2s ease;
  background-color: var(--color-bg);
}

.card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
}

.hover-border-accent:hover {
  border-color: var(--color-accent) !important;
}

/* ===== Icon Boxes ===== */
.icon-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.625rem;
}

.icon-box-lg {
  width: 56px;
  height: 56px;
  border-radius: 0.75rem;
}

/* ===== Step Numbers ===== */
.step-number {
  width: 56px;
  height: 56px;
  background-color: var(--color-primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  border-radius: 0.75rem;
}

/* ===== Team Avatars ===== */
.team-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
}

/* ===== Article Content ===== */
.article-content p {
  margin-bottom: 1.25rem;
  line-height: 1.8;
  color: #374151;
}

.article-content h2 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.article-content ul {
  padding-left: 1.5rem;
}

.article-content li {
  line-height: 1.75;
  margin-bottom: 0.25rem;
}

.list-disc {
  list-style: disc;
}

/* ===== Footer ===== */
.site-footer {
  background-color: var(--color-primary-dark);
  color: rgba(255,255,255,0.9);
}

.site-footer a {
  transition: opacity 0.15s ease, color 0.15s ease;
}

.site-footer a:hover {
  opacity: 1 !important;
  color: #fff !important;
}

/* ===== Scroll to Top ===== */
#scrollToTop {
  width: 44px;
  height: 44px;
  border-radius: 0.5rem;
  background-color: var(--color-primary);
  border: none;
  color: white;
  box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
  transition: all 0.2s ease;
}

#scrollToTop:hover {
  background-color: var(--color-primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0,0,0,0.15);
}

/* ===== Spacing / Section ===== */
.section-padding {
  padding-top: 5rem;
  padding-bottom: 5rem;
}

/* ===== Badges ===== */
.badge-accent {
  background-color: rgba(84,195,195,0.15);
  color: var(--color-accent-mid);
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.375rem 0.875rem;
  border-radius: 9999px;
}

/* ===== Responsive ===== */
@media (max-width: 991px) {
  .dropdown-menu-lg {
    min-width: auto !important;
  }

  .navbar .dropdown-menu {
    border: none;
    box-shadow: none;
    padding-left: 1rem;
  }
}

@media (max-width: 767px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
  .section-padding {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }
}

/* ===== Callback Widget ===== */
.callback-fab {
  position: fixed;
  bottom: 1.5rem;
  right: 5rem;
  z-index: 1060;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background-color: var(--color-accent);
  border: none;
  color: #fff;
  font-size: 1.25rem;
  box-shadow: 0 4px 12px rgba(84,195,195,0.4);
  transition: all 0.2s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.callback-fab:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px) scale(1.05);
  box-shadow: 0 6px 20px rgba(84,195,195,0.5);
}

.callback-fab.active {
  background-color: var(--color-primary-dark);
  transform: rotate(135deg);
}

.callback-widget {
  position: fixed;
  bottom: 5.5rem;
  right: 1.5rem;
  z-index: 1061;
  width: 340px;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  background: #fff;
  border-radius: 0.75rem;
  box-shadow: 0 10px 40px rgba(0,0,0,0.15), 0 2px 8px rgba(0,0,0,0.08);
  border: 1px solid var(--color-border);
  animation: callbackSlideUp 0.25s ease-out;
}

@keyframes callbackSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.callback-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 1rem;
  background-color: var(--color-primary);
  color: #fff;
  border-radius: 0.75rem 0.75rem 0 0;
  font-size: 0.9rem;
}

.callback-close-btn {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1rem;
  padding: 0.25rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s ease;
}

.callback-close-btn:hover {
  color: #fff;
}

.callback-widget-body {
  padding: 1rem;
}

.callback-privacy {
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-border);
}

@media (max-width: 480px) {
  .callback-widget {
    right: 0.75rem;
    left: 0.75rem;
    width: auto;
    bottom: 5rem;
  }
  .callback-fab {
    right: 1rem;
    bottom: 1rem;
  }
}

/* ===== Reduced Motion (WCAG 2.3.3) ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}