/**
 * ============================================
 * BOOTSTRAP 5 CUSTOM THEME
 * ============================================
 * Place this AFTER Bootstrap 5 CDN
 */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/**
 * ============================================
 * FONT SYSTEM
 * ============================================
 */

/* Font class variables - define available fonts */
.font-inter { --bs-body-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.font-poppins { --bs-body-font-family: "Trebuchet MS", Helvetica, sans-serif; }
.font-avenir { --bs-body-font-family: Avenir, "Helvetica Neue", sans-serif; }
.font-muli { --bs-body-font-family: "Muli", sans-serif; }
.font-ubuntu { --bs-body-font-family: "Ubuntu", sans-serif; }

/* Font Selector Sidebar */
.font-sidebar {
  width: 250px;
  background: #fff;
  border-left: 3px solid var(--bs-border-color);
  position: fixed;
  right: 0;
  top: 0;
  bottom: 0;
  overflow-y: auto;
  z-index: 1050;
}

.font-sidebar .font-option {
  background: white;
  border: 3px solid var(--bs-border-color);
  cursor: pointer;
  transition: all 0.2s ease;
}

.font-sidebar .font-option:hover {
  border-color: var(--bs-primary);
  transform: translateY(-2px);
}

.font-sidebar .font-name {
  background: var(--bs-primary);
  color: white;
  font-size: 0.8125rem;
  font-weight: 600;
}

.font-sidebar .characteristics {
  color: var(--bs-secondary);
  font-style: italic;
}

/* Apply font system to body */
body {
  font-family: var(--bs-body-font-family, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif) !important;
}

/**
 * ============================================
 * LOGO STYLING
 * ============================================
 */

.logo-rounded {
  border-radius: 12px;
}

.logo-full-rounded {
  border-radius: 12px;
  height: auto;
  max-width: 100%;
}

/**
 * ============================================
 * BOOTSTRAP VARIABLE OVERRIDES
 * ============================================
 */

:root {
  /* Color System */
  --bs-primary: #0f172a;
  --bs-secondary: #64748b;
  --bs-light: #e2e8f0;
  --bs-gray-100: #f8fafc;
  --bs-success: #10b981;

  /* Typography */
  --bs-body-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --bs-body-font-size: 1rem;
  --bs-body-line-height: 1.6;
  --bs-body-color: #0f172a;
  --bs-body-bg: #f8fafc;

  /* Headings */
  --bs-heading-color: #0f172a;

  /* Shadows */
  --bs-box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --bs-box-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --bs-box-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Border radius */
  --bs-border-radius: 0.5rem;
  --bs-border-radius-sm: 0.25rem;
  --bs-border-radius-lg: 0.75rem;
  --bs-border-radius-xl: 1rem;
}

/**
 * ============================================
 * COMPONENT CUSTOMIZATIONS
 * ============================================
 */

/* Enhanced Buttons */
.btn {
  font-weight: 500;
  transition: all 0.2s ease;
  border-radius: var(--bs-border-radius);
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--bs-box-shadow-lg);
}

.btn-accent {
  --bs-btn-bg: var(--bs-success);
  --bs-btn-border-color: var(--bs-success);
  --bs-btn-hover-bg: #059669;
  --bs-btn-hover-border-color: #059669;
  --bs-btn-active-bg: #047857;
  --bs-btn-active-border-color: #047857;
  --bs-btn-color: white;
}

/* Enhanced Cards */
.card {
  border: none;
  box-shadow: var(--bs-box-shadow);
  border-radius: var(--bs-border-radius-lg);
  transition: all 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--bs-box-shadow-lg);
}

/* Enhanced Navbar */
.navbar-dark {
  background-color: var(--bs-primary) !important;
  box-shadow: var(--bs-box-shadow);
}

.navbar-brand {
  font-weight: 700;
  font-size: 1.25rem;
}

/* Enhanced Forms */
.form-control:focus {
  border-color: var(--bs-success);
  box-shadow: 0 0 0 0.2rem rgba(16, 185, 129, 0.25);
}

.form-control.is-invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Enhanced Modals */
.modal-content {
  border: none;
  border-radius: var(--bs-border-radius-xl);
  box-shadow: var(--bs-box-shadow-lg);
}

/**
 * ============================================
 * CUSTOM COMPONENTS
 * ============================================
 */

/* Hero Section */
.hero {
  background: url('/assets/images/hero-background.jpg') no-repeat;
  background-size: auto 110%;
  background-position: calc(50% + 35px) center;
  color: white;
  padding: 3rem 0;
  min-height: 450px;
  max-height: 450px;
  display: flex;
  align-items: center;
  position: relative;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
  pointer-events: none;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  color: white;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

.hero p {
  font-size: 1.1rem;
  opacity: 0.95;
  word-wrap: break-word;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* Service Cards */
.service-card {
  text-align: center;
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-4px);
}

.service-icon {
  width: 60px;
  height: 60px;
  background-color: var(--bs-success);
  border-radius: 50%;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.5rem;
}

/* Case Study Section */
.case-study {
  background-color: var(--bs-light);
}

.case-study-image {
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
  box-shadow: var(--bs-box-shadow-lg);
}

.stat-item {
  text-align: center;
  background: white;
  border-radius: var(--bs-border-radius);
  box-shadow: var(--bs-box-shadow-sm);
}

.stat-number {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--bs-success);
  display: block;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--bs-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Pricing Cards */
.pricing-card {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.pricing-card.featured {
  border: 3px solid var(--bs-success) !important;
  transform: scale(1.05);
}

.pricing-card.featured::before {
  content: 'Most Popular';
  position: absolute;
  top: 1.5rem;
  right: -1.5rem;
  background: var(--bs-success);
  color: white;
  padding: 0.5rem 2.5rem;
  transform: rotate(45deg);
  font-size: 0.875rem;
  font-weight: 600;
}

.price {
  font-size: 2.25rem;
  font-weight: 700;
  color: var(--bs-success);
}

/* Footer Enhancements */
.footer {
  background-color: var(--bs-primary);
  color: white;
}

.footer h4 {
  color: white;
}

.footer a {
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer a:hover {
  opacity: 1;
  color: var(--bs-success);
}

/**
 * ============================================
 * THEME VARIANTS
 * ============================================
 */

.theme-emerald {
  --bs-success: #10b981;
  --bs-primary: #0f172a;
  --bs-secondary: #475569;
  --bs-light: #ecfdf5;
}

.theme-slate {
  --bs-success: transparent;
  --bs-primary: #0f172a;
  --bs-secondary: #64748b;
  --bs-light: #e2e8f0;
}

/**
 * ============================================
 * RESPONSIVE ADJUSTMENTS
 * ============================================
 */

.hero .container {
  padding-left: calc(20px + 2vw);
  padding-right: calc(20px + 2vw);
}

.hero .col-lg-6 {
  max-width: 100%;
  padding-right: 0;
  margin-right: -45px;
}

.hero h1 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  line-height: 1.3;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero p {
  font-size: clamp(0.95rem, 1.8vw, 1.1rem);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.hero .lead {
  font-size: clamp(1rem, 2vw, 1.15rem);
  word-wrap: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 990px) {
  .hero h1 {
    font-size: clamp(1.75rem, 3.2vw, 2.25rem);
  }
}

@media (max-width: 980px) {
  .hero::before {
    background: linear-gradient(90deg, rgba(15, 23, 42, 0.98) 0%, rgba(15, 23, 42, 0.88) 50%, rgba(15, 23, 42, 0.60) 100%);
  }
}

@media (max-width: 970px) {
  .hero .container {
    padding-left: 20px;
  }
}

@media (max-width: 768px) {
  .hero {
    padding: 3rem 0;
  }

  .pricing-card.featured {
    transform: none;
  }

  .font-sidebar {
    display: none;
  }

  .container-fluid {
    padding-right: 15px !important;
  }
}

@media (max-width: 576px) {
  .hero {
    background-image: none !important;
    background-color: #0f172a;
  }

  .hero::before {
    display: none;
  }
}

/* Adjust main content when sidebar is present */
@media (min-width: 769px) {
  .has-font-sidebar {
    padding-right: 270px;
  }
}

/**
 * ============================================
 * UTILITY EXTENSIONS
 * ============================================
 */

/* Additional shadows */
.shadow-soft {
  box-shadow: var(--bs-box-shadow) !important;
}

.shadow-hover:hover {
  box-shadow: var(--bs-box-shadow-lg) !important;
}

/* Transform utilities */
.hover-lift:hover {
  transform: translateY(-2px);
}

.hover-lift-sm:hover {
  transform: translateY(-1px);
}

/* Superscript for service marks */
sup.sm {
  font-size: 0.5em;
  vertical-align: super;
  line-height: 0;
}

/* FAQ scroll padding for better anchor navigation */
.accordion-item {
  scroll-margin-top: 100px;
}

/**
 * ============================================
 * SLANTED DIVIDERS & ANIMATIONS
 * ============================================
 */

/* Slanted divider - 2% slope */
.slant-divider {
  position: relative;
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.slant-divider::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: inherit;
  transform: skewY(-1.15deg);
  transform-origin: top left;
  z-index: -1;
}

.slant-divider.slant-bottom::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: inherit;
  transform: skewY(-1.15deg);
  transform-origin: bottom right;
  z-index: -1;
}

/* Fade-in animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.3s ease-out, transform 0.3s ease-out;
}

.fade-in-up.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger animation delays for child elements */
.fade-in-up:nth-child(1) { transition-delay: 0.05s; }
.fade-in-up:nth-child(2) { transition-delay: 0.1s; }
.fade-in-up:nth-child(3) { transition-delay: 0.15s; }
.fade-in-up:nth-child(4) { transition-delay: 0.2s; }
.fade-in-up:nth-child(5) { transition-delay: 0.25s; }
.fade-in-up:nth-child(6) { transition-delay: 0.3s; }
