/* Guesbay Legal - Modern Obsidian Dark Theme */

:root {
  --bg-main: #070a11;
  --bg-card: rgba(15, 23, 42, 0.75);
  --bg-card-hover: rgba(22, 33, 56, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.08);
  --bg-card-border-active: rgba(16, 185, 129, 0.4);
  
  --primary: #10b981;
  --primary-hover: #059669;
  --primary-light: rgba(16, 185, 129, 0.12);
  --primary-border: rgba(16, 185, 129, 0.25);

  --text-main: #f1f5f9;
  --text-muted: #94a3b8;
  --text-sub: #cbd5e1;

  --accent-amber: #f59e0b;
  --accent-blue: #38bdf8;
  --accent-red: #ef4444;

  --font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 30px rgba(16, 185, 129, 0.18);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Natural Document Flow - Scroll Anchoring Disabled to prevent snap-back */
html {
  font-size: 16px;
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100%;
  overflow-anchor: none !important;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.65;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
  overflow-anchor: none !important;
  touch-action: pan-y pinch-zoom;
  -webkit-overflow-scrolling: touch;
}

.main-layout,
.content-container,
.legal-content-wrapper,
.sections-stream,
.legal-card {
  overflow-anchor: none !important;
}

/* Ambient Glow Orbs - fixed in viewport background to never stretch scroll dimensions */
.glow-orb {
  position: fixed;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
}
.glow-top-left {
  top: -80px;
  left: -80px;
  background: radial-gradient(circle, #059669 0%, transparent 70%);
}
.glow-top-right {
  top: 120px;
  right: -80px;
  background: radial-gradient(circle, #0b4627 0%, transparent 70%);
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(7, 10, 17, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--bg-card-border);
}

.header-container {
  max-width: 1240px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.brand-logo {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  object-fit: contain;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #ffffff 40%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-tag {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  text-transform: uppercase;
}

.version-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 9999px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Language Switcher */
.lang-selector-wrapper {
  display: flex;
  background: rgba(15, 23, 42, 0.9);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--bg-card-border);
  gap: 2px;
}

.lang-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}

.lang-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
  background: var(--primary);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
}

.lang-btn .flag {
  font-size: 13px;
}

/* External Quick Buttons */
.external-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.nav-btn-outline {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-sub);
  border: 1px solid var(--bg-card-border);
}

.nav-btn-outline:hover {
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

.nav-btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  border: none;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.nav-btn-primary:hover {
  background: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.nav-btn-icon {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-muted);
  border: 1px solid var(--bg-card-border);
  padding: 7px 9px;
}

.nav-btn-icon:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.09);
}

/* Segmented Tabs Bar */
.tabs-nav-bar {
  background: rgba(11, 16, 28, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  padding: 6px 24px;
}

.tabs-container {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}

.tab-btn {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: var(--primary-light);
  color: #34d399;
  border-color: var(--primary-border);
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.15);
}

/* Hero Section */
.hero-section {
  position: relative;
  z-index: 1;
  padding: 36px 24px 24px;
  border-bottom: 1px solid var(--bg-card-border);
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.04) 0%, transparent 100%);
  overflow: visible;
}

.hero-container {
  max-width: 1240px;
  margin: 0 auto;
}

.hero-header h1 {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.6px;
  color: #ffffff;
  margin-bottom: 8px;
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-muted);
  max-width: 860px;
  line-height: 1.5;
  margin-bottom: 20px;
}

/* Compliance Grid */
.compliance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.compliance-pill {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  gap: 10px;
  backdrop-filter: blur(8px);
  transition: border-color 0.2s ease;
}

.compliance-pill:hover {
  border-color: var(--primary-border);
}

.pill-icon {
  font-size: 18px;
}

.pill-info {
  display: flex;
  flex-direction: column;
}

.pill-info strong {
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}

.pill-info span {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* Main Layout: 2 Columns */
.main-layout {
  position: relative;
  z-index: 1;
  padding: 32px 24px 60px;
  overflow: visible;
}

.content-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 36px;
  align-items: start;
  overflow: visible;
}

/* Sidebar TOC */
.legal-sidebar {
  position: relative;
  overflow: visible;
}

.sidebar-sticky {
  position: sticky;
  top: 130px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: visible;
}

.search-box {
  position: relative;
  width: 100%;
}

.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--bg-card-border);
  color: var(--text-main);
  font-family: inherit;
  font-size: 13px;
  padding: 9px 32px 9px 36px;
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.search-box input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.clear-search-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  cursor: pointer;
  line-height: 1;
}

.clear-search-btn:hover {
  color: #fff;
}

.toc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--bg-card-border);
}

.toc-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-muted);
}

.toc-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--primary);
  background: var(--primary-light);
  padding: 2px 7px;
  border-radius: 9999px;
}

.toc-nav {
  max-height: calc(100vh - 350px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  -webkit-overflow-scrolling: touch;
}

/* Custom Scrollbar for TOC */
.toc-nav::-webkit-scrollbar {
  width: 4px;
}
.toc-nav::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}
.toc-nav::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.toc-link {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12px;
  line-height: 1.4;
  border: 1px solid transparent;
  transition: background 0.15s ease, color 0.15s ease;
  cursor: pointer;
}

.toc-num {
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font-mono);
  color: var(--text-sub);
  background: rgba(255, 255, 255, 0.05);
  padding: 1px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}

.toc-text {
  flex: 1;
}

.toc-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-main);
}

.toc-link.active {
  background: var(--primary-light);
  border-color: var(--primary-border);
  color: #34d399;
  font-weight: 600;
}

.toc-link.active .toc-num {
  background: var(--primary);
  color: #000;
}

/* DPO Card */
.dpo-contact-card {
  background: rgba(16, 185, 129, 0.05);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.dpo-icon {
  font-size: 18px;
  line-height: 1;
}

.dpo-details strong {
  font-size: 12px;
  color: #fff;
  display: block;
  margin-bottom: 2px;
}

.dpo-details p {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
  line-height: 1.35;
}

.dpo-email {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: #34d399;
  text-decoration: none;
  font-weight: 600;
  margin-bottom: 2px;
}

.dpo-email:hover {
  text-decoration: underline;
}

.dpo-sla {
  font-size: 10px;
  color: #94a3b8;
  display: block;
}

/* Right Content: Legal Document */
.legal-content-wrapper {
  min-width: 0;
  overflow: visible;
}

.lead-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0.8) 100%);
  border: 1px solid var(--primary-border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 20px;
  font-size: 14.5px;
  line-height: 1.7;
  color: #e2e8f0;
}

.lead-box strong {
  color: #ffffff;
  font-weight: 700;
}

.sections-stream {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: visible;
}

/* Legal Cards */
.legal-card {
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  backdrop-filter: blur(12px);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: visible;
}

.legal-card:hover {
  border-color: rgba(255, 255, 255, 0.15);
}

.legal-card.highlighted-section {
  border-color: var(--primary);
  box-shadow: 0 0 24px rgba(16, 185, 129, 0.25);
}

.legal-card h4 {
  font-size: 16.5px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  line-height: 1.4;
}

.legal-card h4 .rounded-full,
.legal-card h4 span.w-1.5 {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--primary);
  box-shadow: 0 0 8px var(--primary);
  flex-shrink: 0;
}

.legal-card p {
  color: var(--text-sub);
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.65;
}

.legal-card p:last-child {
  margin-bottom: 0;
}

.legal-card ul {
  list-style: none;
  padding-left: 0;
  margin-top: 8px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-card ul li {
  position: relative;
  padding-left: 18px;
  color: var(--text-sub);
  font-size: 13.5px;
  line-height: 1.6;
}

.legal-card ul li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  color: var(--primary);
  font-size: 15px;
  font-weight: bold;
}

.legal-card strong {
  color: #ffffff;
  font-weight: 600;
}

.legal-card code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(16, 185, 129, 0.12);
  color: #6ee7b7;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}

/* Matching Filter Mark */
mark {
  background: rgba(245, 158, 11, 0.35);
  color: #fef3c7;
  padding: 1px 3px;
  border-radius: 3px;
}

/* Bottom Actions */
.bottom-actions-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-card-border);
}

.back-to-top-btn,
.share-doc-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--bg-card-border);
  color: var(--text-sub);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.back-to-top-btn:hover,
.share-doc-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--bg-card-border);
  background: #04060b;
  position: relative;
  z-index: 1;
  padding: 44px 24px 24px;
  overflow: visible;
}

.footer-container {
  max-width: 1240px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-col-brand .footer-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 19px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 10px;
}

.footer-brand-img {
  width: 30px;
  height: 30px;
  border-radius: 6px;
}

.footer-tagline {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 10px;
}

.footer-legal-entity {
  font-size: 11.5px;
  font-weight: 600;
  color: #64748b;
}

.footer-col-title {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  display: block;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 12.5px;
  transition: color 0.15s ease;
  cursor: pointer;
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-text-sm {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.6;
}

.footer-bottom-bar {
  max-width: 1240px;
  margin: 0 auto;
  padding-top: 18px;
}

.footer-bottom-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-size: 11.5px;
  color: #475569;
}

.footer-bottom-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.pill-sm {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 10px;
  color: #94a3b8;
  font-weight: 600;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #10b981;
  color: #000;
  font-weight: 700;
  font-size: 13px;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive Breakpoints - Mobile-Friendly Flow */
@media (max-width: 1024px) {
  .content-container {
    grid-template-columns: 260px 1fr;
    gap: 24px;
  }
  .footer-container {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .site-header {
    position: relative;
  }
  .header-container {
    flex-wrap: wrap;
    padding: 10px 14px;
    gap: 10px;
  }
  .version-badge {
    display: none;
  }
  .brand-name {
    font-size: 16px;
  }
  .brand-logo {
    width: 30px;
    height: 30px;
  }
  .header-actions {
    width: 100%;
    justify-content: space-between;
  }
  .tabs-nav-bar {
    padding: 4px 14px;
  }
  .tab-btn {
    font-size: 12px;
    padding: 6px 10px;
  }
  .hero-section {
    padding: 20px 14px 16px;
  }
  .hero-header h1 {
    font-size: 22px;
  }
  .compliance-grid {
    grid-template-columns: 1fr;
  }
  .main-layout {
    padding: 16px 14px 40px;
  }
  .content-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
  }
  .legal-sidebar {
    order: 2;
    width: 100%;
  }
  .sidebar-sticky {
    position: static;
  }
  .toc-nav {
    max-height: 240px;
  }
  .legal-card {
    padding: 16px 18px;
  }
  .legal-card h4 {
    font-size: 15px;
  }
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .footer-bottom-container {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Print Stylesheet for Official Filing & PDF Generation */
@media print {
  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.5 !important;
  }

  .glow-orb,
  .site-header,
  .compliance-grid,
  .legal-sidebar,
  .bottom-actions-bar,
  .site-footer,
  .toast {
    display: none !important;
  }

  .hero-section {
    padding: 0 !important;
    border: none !important;
    margin-bottom: 20pt !important;
  }

  .hero-header h1 {
    color: #000000 !important;
    font-size: 18pt !important;
  }

  .hero-subtitle {
    color: #333333 !important;
    font-size: 11pt !important;
  }

  .content-container {
    display: block !important;
  }

  .lead-box {
    background: #f8fafc !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    padding: 12pt !important;
    margin-bottom: 16pt !important;
    border-radius: 4pt !important;
  }

  .lead-box strong {
    color: #000000 !important;
  }

  .legal-card {
    background: #ffffff !important;
    border: 1px solid #e2e8f0 !important;
    padding: 12pt !important;
    margin-bottom: 12pt !important;
    border-radius: 4pt !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .legal-card h4 {
    color: #000000 !important;
    font-size: 12pt !important;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 4pt;
  }

  .legal-card h4 .rounded-full,
  .legal-card h4 span.w-1.5 {
    display: none !important;
  }

  .legal-card p,
  .legal-card ul li {
    color: #1e293b !important;
    font-size: 10pt !important;
  }

  .legal-card strong {
    color: #000000 !important;
  }

  .legal-card code {
    background: #f1f5f9 !important;
    color: #000000 !important;
    border: 1px solid #cbd5e1 !important;
  }
}
