/**
 * Base CSS Configuration for Millmann Media Solutions Website
 * This file contains all customizable variables and overrides
 */

:root {
  /* Override Theme Colors */
  --ar-primary: #B22222 !important;
  --ar-primary-rgb: 178, 34, 34 !important;
  --ar-primary-text-emphasis: #8B0000 !important;
  --ar-primary-bg-subtle: #fce8e8 !important;
  --ar-primary-border-subtle: #f5d0d0 !important;
  --ar-link-color: #B22222 !important;
  --ar-link-color-rgb: 178, 34, 34 !important;
  --ar-link-hover-color: #8B0000 !important;
  --ar-link-hover-color-rgb: 139, 0, 0 !important;
  --ar-focus-ring-color: rgba(178, 34, 34, 0.25) !important;
  
  /* Brand Colors */
  --brand-primary: #B22222;           /* Crimson Red */
  --brand-primary-dark: #8B0000;      /* Dark Red */
  --brand-primary-light: #DC143C;     /* Crimson */
  --brand-primary-rgb: 178, 34, 34;  /* RGB values for opacity */
  
  /* Secondary Colors */
  --brand-secondary: #6c757d;
  --brand-success: #28a745;
  --brand-info: #17a2b8;
  --brand-warning: #ffc107;
  --brand-danger: #dc3545;
  
  /* Neutral Colors */
  --brand-dark: #343a40;
  --brand-light: #f8f9fa;
  --brand-white: #ffffff;
  --brand-black: #000000;
  
  /* Typography */
  --font-family-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-extrabold: 800;
  
  /* Transitions */
  --transition-speed: 0.3s;
  --transition-type: ease;
  
  /* Shadows */
  --shadow-sm: 0 .125rem .25rem rgba(0,0,0,.075);
  --shadow-default: 0 .5rem 1rem rgba(0,0,0,.15);
  --shadow-lg: 0 1rem 3rem rgba(0,0,0,.175);
  --shadow-hover: 0 15px 40px rgba(0,0,0,0.1);
  
  /* Border Radius */
  --border-radius-sm: 0.25rem;
  --border-radius: 0.375rem;
  --border-radius-lg: 0.5rem;
  --border-radius-xl: 1rem;
}

/* Dark Mode Theme Color Overrides */
[data-bs-theme="dark"] {
  --ar-primary-text-emphasis: #DC143C !important;
  --ar-primary-bg-subtle: #2d0a0a !important;
  --ar-primary-border-subtle: #4a1515 !important;
  --ar-link-color: #DC143C !important;
  --ar-link-hover-color: #FF6347 !important;
  --ar-link-color-rgb: 220, 20, 60 !important;
  --ar-link-hover-color-rgb: 255, 99, 71 !important;
}

/* Import local fonts */
@import url('inter.css');

/* Bootstrap Primary Color Overrides */
.text-primary {
  color: var(--brand-primary) !important;
}

.bg-primary {
  background-color: var(--brand-primary) !important;
}

.bg-gradient-primary {
  background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%) !important;
}

.border-primary {
  border-color: var(--brand-primary) !important;
}

/* Primary Button Overrides */
.btn-primary {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary:not(:disabled):not(.disabled):active {
  background-color: var(--brand-primary-dark) !important;
  border-color: var(--brand-primary-dark) !important;
  box-shadow: none !important;
}

.btn-outline-primary {
  color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active,
.btn-outline-primary:not(:disabled):not(.disabled):active {
  background-color: var(--brand-primary) !important;
  border-color: var(--brand-primary) !important;
  color: #ffffff !important;
}

/* Opacity Variants */
.bg-primary.bg-opacity-10 {
  background-color: rgba(var(--brand-primary-rgb), 0.1) !important;
}

.bg-primary.bg-opacity-25 {
  background-color: rgba(var(--brand-primary-rgb), 0.25) !important;
}

.bg-primary.bg-opacity-50 {
  background-color: rgba(var(--brand-primary-rgb), 0.5) !important;
}

.bg-primary.bg-opacity-75 {
  background-color: rgba(var(--brand-primary-rgb), 0.75) !important;
}

/* Form Controls */
.form-control:focus,
.form-select:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 0.25rem rgba(var(--brand-primary-rgb), 0.25);
}

/* Links */
a {
  color: var(--brand-primary);
  transition: color var(--transition-speed) var(--transition-type);
}

a:hover {
  color: var(--brand-primary-dark);
}

/* Custom Classes */
.text-brand-primary {
  color: var(--brand-primary);
}

.bg-brand-primary {
  background-color: var(--brand-primary);
}

/* Page Transitions */
.page-transition {
  opacity: 1;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.page-transition.fade-out {
  opacity: 0;
  transform: translateY(20px);
}

/* Language Switcher */
.lang-switch {
  cursor: pointer;
  padding: 0.25rem 0.75rem;
  border-radius: var(--border-radius-sm);
  transition: background-color var(--transition-speed) var(--transition-type);
}

.lang-switch:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* Service Cards */
.service-card {
  transition: transform var(--transition-speed) var(--transition-type), 
              box-shadow var(--transition-speed) var(--transition-type);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Service Items */
.service-item {
  transition: transform var(--transition-speed) var(--transition-type), 
              box-shadow var(--transition-speed) var(--transition-type);
}

.service-item:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

/* Feature Icons */
.feature-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 1.5rem;
}

/* Contact Icons */
.contact-icon {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  font-size: 1.25rem;
}

/* Contact Info Cards */
.contact-info-card {
  transition: transform var(--transition-speed) var(--transition-type), 
              box-shadow var(--transition-speed) var(--transition-type);
}

.contact-info-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

/* Value Cards */
.value-card {
  transition: transform var(--transition-speed) var(--transition-type), 
              box-shadow var(--transition-speed) var(--transition-type);
}

.value-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-hover);
}

/* Hero Section */
.hero-section {
  min-height: 80vh;
  display: flex;
  align-items: center;
}

/* Portfolio Grid */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  background: var(--brand-light);
  aspect-ratio: 16/9;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--transition-speed) var(--transition-type);
}

.portfolio-item:hover {
  transform: scale(1.05);
}

/* Video Showcase */
.video-showcase {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-xl);
}

.video-showcase::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, rgba(var(--brand-primary-rgb), 0.1), rgba(14, 165, 233, 0.1));
  z-index: 1;
}

/* Timeline */
.timeline-item {
  position: relative;
  padding-left: 3rem;
  padding-bottom: 2rem;
}

.timeline-item:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 1rem;
  height: 1rem;
  background: var(--brand-primary);
  border-radius: 50%;
}

.timeline-item:after {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 1.5rem;
  width: 1px;
  height: calc(100% - 1rem);
  background: #e5e7eb;
}

.timeline-item:last-child:after {
  display: none;
}

/* Statistics */
.stat-number {
  font-size: 3rem;
  font-weight: var(--font-weight-bold);
  color: var(--brand-primary);
}

/* Utility Classes */
.text-purple { color: #6f42c1 !important; }
.bg-purple { background-color: #6f42c1 !important; }
.text-teal { color: #20c997 !important; }
.bg-teal { background-color: #20c997 !important; }
.text-cyan { color: #17a2b8 !important; }
.bg-cyan { background-color: #17a2b8 !important; }
.text-indigo { color: #6610f2 !important; }
.bg-indigo { background-color: #6610f2 !important; }

/* Logo Theme Switching */
.navbar-logo-light,
.footer-logo-light {
  display: block;
}

.navbar-logo-dark,
.footer-logo-dark {
  display: none;
}

[data-bs-theme="dark"] .navbar-logo-light,
[data-bs-theme="dark"] .footer-logo-light {
  display: none;
}

[data-bs-theme="dark"] .navbar-logo-dark,
[data-bs-theme="dark"] .footer-logo-dark {
  display: block;
}

/* Footer Logo Specific Styles */
.footer-logo-light,
.footer-logo-dark {
  min-height: 180px !important;
  height: 180px !important;
  width: auto !important;
  max-width: 100% !important;
  object-fit: contain;
}

/* Footer logo container adjustments */
.footer .navbar-brand {
  display: block !important;
  margin-bottom: 1.5rem;
}

/* Responsive footer logos */
@media (max-width: 768px) {
  .footer-logo-light,
  .footer-logo-dark {
    min-height: 120px !important;
    height: 120px !important;
  }
}

@media (max-width: 576px) {
  .footer-logo-light,
  .footer-logo-dark {
    min-height: 100px !important;
    height: 100px !important;
  }
}

/* Footer Navigation Mobile Centering */
@media (max-width: 767px) {
  .footer h6 {
    text-align: center;
    margin-top: 2rem;
  }
  
  .footer .nav.flex-column {
    align-items: center;
  }
  
  .footer .nav-link {
    text-align: center;
  }
  
  .footer .col-lg-4,
  .footer .col-lg-2,
  .footer .col-lg-3 {
    text-align: center;
  }
  
  .footer .text-body-secondary {
    text-align: center;
  }
  
  .footer .mb-4 {
    text-align: center;
  }
}

/* Logo Size Constraints */
.navbar-brand img {
  height: 51px;  /* 36px + 15px = 51px when on top */
  width: auto;
  max-width: 220px;
  object-fit: contain;
  transition: all 0.3s ease;
}

/* Footer navbar-brand img styles removed - see Footer Logo Specific Styles section */

/* Navbar Height and Sticky Behavior */
.navbar {
  min-height: 90px;  /* Erhöht für größeres Logo */
  transition: all 0.3s ease;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.navbar-sticky {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1030;
}

/* Add padding to body to account for fixed navbar */
body {
  padding-top: 90px;  /* Angepasst an neue Navbar-Höhe */
  overflow-x: hidden; /* Prevent horizontal scroll that could cause shifts */
}

/* Navbar when scrolled */
.navbar.scrolled {
  min-height: 60px;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar.scrolled .navbar-brand img {
  height: 36px;  /* Zurück auf normale Größe beim Scrollen */
  max-width: 180px;
}

/* Responsive Design Improvements */
@media (max-width: 768px) {
  body {
    padding-top: 70px;
  }
  
  .navbar {
    min-height: 70px;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }
  
  .navbar.scrolled {
    min-height: 60px;
  }
  
  .navbar-brand img {
    height: 40px;  /* Kleineres Logo auf Mobile, aber trotzdem größer als vorher */
    max-width: 180px;
  }
  
  .navbar.scrolled .navbar-brand img {
    height: 30px;
    max-width: 150px;
  }
  
  /* Mobile navigation padding */
  .navbar-nav {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
  
  /* Mobile nav items spacing */
  .navbar-nav .nav-link {
    padding: 0.75rem 1rem;
    text-align: center;
  }
  
  /* Center mobile navigation items */
  .navbar-nav {
    align-items: center;
  }
  
  /* Mobile dropdown adjustments */
  .dropdown-menu {
    border: none;
    box-shadow: none;
    background-color: transparent;
  }
  
  /* Hero section on mobile */
  .hero-section {
    min-height: 60vh;
    padding-top: 80px;
  }
  
  /* Contact cards on mobile */
  .contact-info-card {
    margin-bottom: 1rem;
  }
  
  /* Service cards on mobile */
  .service-card,
  .service-item {
    margin-bottom: 1.5rem;
  }
  
  /* Agency services use same layout as IT services now */
  
  /* IT services mobile optimization */
  .service-item .feature-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  /* Ensure text doesn't overflow */
  .service-item h3,
  .agency-services h3 {
    font-size: 1.1rem;
    word-break: break-word;
    hyphens: auto;
  }
  
  /* Footer on mobile */
  .footer {
    text-align: center;
  }
  
  .footer .row > div {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  /* Extra small devices */
  .display-4 {
    font-size: 2.5rem;
  }
  
  .display-5 {
    font-size: 2rem;
  }
  
  /* Card padding on mobile */
  .card-body {
    padding: 1.5rem;
  }
  
  /* Reduce icon size further on very small screens */
  .service-item .feature-icon {
    width: 45px;
    height: 45px;
    font-size: 1.1rem;
  }
  
  /* Form adjustments */
  .btn-lg {
    padding: 0.5rem 1.5rem;
    font-size: 1rem;
  }
  
  /* Language switcher and theme switcher on mobile */
  .dropdown-toggle {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
  }
  
  .mode-switch {
    margin-left: 0.5rem !important;
  }
  
  /* Mobile padding adjustments */
  .py-5 {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }
  
  /* Mobile section spacing */
  section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Mobile text alignment */
  .text-md-start {
    text-align: center !important;
  }
  
  /* Mobile grid adjustments */
  .row.g-4 {
    --bs-gutter-y: 1.5rem;
  }
}

/* Navigation Active State */
.navbar-nav .nav-link {
  position: relative;
  transition: color var(--transition-speed) var(--transition-type);
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--brand-primary);
  transition: width 0.3s ease-in-out;
}

.navbar-nav .nav-link:hover::after {
  width: 100%;
}

/* Active page indicator */
.navbar-nav .nav-link.active {
  color: var(--brand-primary) !important;
  font-weight: bolder;
}

/* Additional Mobile Enhancements */
@media (max-width: 991px) {
  /* Navbar mobile menu */
  .navbar-collapse {
    background-color: var(--bs-body-bg);
    margin: 0 -1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-top: 1rem;
  }
  
  /* Mobile menu shadow */
  [data-bs-theme="light"] .navbar-collapse {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
  }
  
  [data-bs-theme="dark"] .navbar-collapse {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3);
  }
  
  /* Mobile navigation underline */
  .navbar-nav .nav-link::after {
    bottom: 0;
  }
}

/* Hero Background Slider */
.hero-slider {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

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

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

.hero-slide::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

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

/* Scroll Down Button */
.scroll-down-btn {
  position: relative;
  display: inline-block;
  text-decoration: none;
  color: white;
  margin-top: 3rem;
  padding: 1rem;
  transition: all 0.3s ease;
}

.scroll-down-btn:hover {
  color: white;
  transform: translateY(5px);
}

.scroll-down-btn .mouse {
  width: 30px;
  height: 50px;
  border: 2px solid white;
  border-radius: 15px;
  margin: 0 auto 10px;
  position: relative;
}

.scroll-down-btn .mouse::before {
  content: '';
  position: absolute;
  top: 8px;
  left: 50%;
  width: 6px;
  height: 6px;
  background-color: white;
  border-radius: 50%;
  transform: translateX(-50%);
  animation: scroll-animation 2s infinite;
}

.scroll-down-btn p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

@keyframes scroll-animation {
  0% {
    opacity: 1;
    top: 8px;
  }
  50% {
    opacity: 0.5;
    top: 20px;
  }
  100% {
    opacity: 0;
    top: 30px;
  }
}

/* Desktop Theme Switcher - Prevent shift on toggle */
.navbar .mode-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px; /* Fixed height to prevent shift */
}

.navbar .mode-switch .form-check-input {
  position: relative;
  margin: 0;
  cursor: pointer;
}

.navbar .mode-switch label {
  position: relative;
  line-height: 1;
  margin: 0;
  display: flex;
  align-items: center;
}

/* Desktop Dropdowns - Prevent shift on toggle */
.navbar .dropdown {
  position: relative;
}

.navbar .dropdown > .dropdown-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  height: 38px; /* Fixed height to prevent shift */
  padding: 0.375rem 0.75rem;
}

/* Login Dropdown Styling */
.navbar .dropdown-toggle {
  border: none;
  background: none;
  color: var(--bs-navbar-color);
  transition: color 0.3s ease;
}

.navbar .dropdown-toggle:hover,
.navbar .dropdown-toggle:focus {
  color: var(--brand-primary);
  background: none;
  border: none;
  box-shadow: none;
}

.navbar .dropdown-toggle::after {
  display: none;
}

.navbar .dropdown-menu {
  position: absolute !important;
  border: none;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
  border-radius: 0.5rem;
  padding: 0.5rem 0;
  min-width: 180px;
  z-index: 1000;
}

.navbar .dropdown-item {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  transition: all 0.3s ease;
}

/* Desktop dropdown hover - text only, no background */
@media (min-width: 992px) {
  .navbar .dropdown-item:hover,
  .navbar .dropdown-item:focus {
    background-color: transparent;
    color: var(--brand-primary);
  }
  
  /* Ensure dropdowns are positioned correctly on desktop */
  .navbar .dropdown {
    position: relative !important;
  }
  
  .navbar .dropdown-menu {
    position: absolute !important;
    top: 100%;
    margin-top: 0.25rem;
  }
}

.navbar .dropdown-item i {
  width: 16px;
  text-align: center;
}

/* Prevent navigation text from wrapping */
.navbar-nav .nav-link {
  white-space: nowrap;
}

/* Responsive Support Ticket Button */
@media (max-width: 1199px) {
  /* Icon-only support button on medium screens */
  .navbar .btn-primary.btn-sm .ai-chat {
    margin-right: 0 !important;
  }
  
  .navbar .btn-primary.btn-sm span {
    display: none;
  }
  
  .navbar .btn-primary.btn-sm {
    padding: 0.375rem 0.75rem;
  }
}

/* Mobile responsive adjustments */
@media (max-width: 991px) {
  /* Container for navbar controls on mobile */
  .navbar .d-flex.align-items-center {
    flex-direction: column;
    align-items: stretch !important;
    width: 100%;
    margin-top: 1rem;
    gap: 0.5rem;
  }
  
  /* Support Ticket Button mobile styling - full width with text */
  .navbar .btn-primary.btn-sm {
    margin-right: 0 !important;
    margin-bottom: 0.5rem;
    width: 100%;
    justify-content: center;
    padding: 0.75rem 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
  
  .navbar .btn-primary.btn-sm span {
    display: inline;
  }
  
  .navbar .btn-primary.btn-sm .ai-chat {
    margin-right: 0.5rem !important;
  }
  
  /* Language dropdown mobile styling */
  .navbar .dropdown {
    margin-left: 0 !important;
    margin-top: 0;
    width: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .navbar .dropdown .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem;
    height: auto; /* Override desktop fixed height */
  }
  
  .navbar .dropdown > .dropdown-toggle {
    height: auto; /* Override desktop fixed height */
  }
  
  .navbar .dropdown-menu {
    position: static !important;
    transform: none !important;
    box-shadow: none;
    background-color: transparent;
    border: none;
    padding: 0;
    width: 100%;
    margin-top: 0.25rem;
  }
  
  .navbar .dropdown-item {
    color: var(--bs-navbar-color);
    padding: 0.5rem 1.5rem;
    border-radius: 0.25rem;
    margin: 0.125rem 0;
    text-align: center;
  }
  
  .navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--bs-navbar-color);
  }
  
  [data-bs-theme="dark"] .navbar .dropdown-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
  }
  
  /* Dark mode dropdown styling */
  [data-bs-theme="dark"] .navbar .dropdown {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.03);
  }
  
  [data-bs-theme="dark"] .navbar .mode-switch {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    background-color: rgba(255, 255, 255, 0.03);
  }
  
  /* Theme switcher mobile styling */
  .navbar .mode-switch {
    margin-left: 0 !important;
    margin-top: 0;
    padding: 0.75rem 1rem;
    justify-content: center;
    width: 100%;
    height: auto; /* Override desktop fixed height */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 0.375rem;
    background-color: rgba(255, 255, 255, 0.05);
  }
  
  .navbar .mode-switch .form-check-input {
    margin-right: 0.75rem;
    margin-top: 0;
    margin-bottom: 0;
  }
  
  .navbar .mode-switch label {
    margin-left: 0.5rem;
  }
  
  /* Login dropdown mobile specific */
  .navbar .dropdown:last-child .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: auto; /* Override desktop fixed height */
  }
  
  .navbar .dropdown:last-child .btn::after {
    margin-left: auto;
  }
  
  .navbar .dropdown:last-child .btn i {
    font-size: 1.125rem;
  }
}

/* Service Cards - Text Overflow Protection */
.service-card,
.service-item {
  height: 100%;
  overflow: hidden;
}

.service-card .card-body,
.service-item .card-body {
  overflow-wrap: break-word;
  word-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
}

.service-card p,
.service-item p {
  overflow-wrap: break-word;
  word-wrap: break-word;
  line-height: 1.6;
}

/* Ensure consistent card heights */
.service-item.h-100 {
  display: flex;
  flex-direction: column;
}

.service-item .card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.service-item .card-body p:last-child {
  margin-bottom: 0;
}

/* Prevent text overflow in service descriptions */
.service-item .card-body p[data-i18n*="services."] {
  max-height: none;
  overflow: visible;
}

/* Services Section Responsive Layout */
@media (max-width: 576px) {
  /* Mobile: Vertical layout (icon on top) */
  .services-section .d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .services-section .d-flex .ms-4 {
    margin-left: 0 !important;
    margin-top: 1rem;
  }
  
  .services-section .feature-icon {
    margin-bottom: 0;
  }
}

/* Mobile Navigation Overlay and Body Lock */
.navbar-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 1040;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  pointer-events: none;
}

.navbar-backdrop.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Body scroll lock when mobile menu is open */
body.navbar-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Ensure navbar is above backdrop */
.navbar {
  z-index: 1050 !important;
}

@media (max-width: 991px) {
  .navbar-collapse {
    position: relative;
    z-index: 1060;
    background-color: var(--bs-body-bg);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  }
  
  .navbar-collapse.show {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
  }
  
  /* Dark mode support for mobile nav */
  [data-bs-theme="dark"] .navbar-collapse {
    background-color: var(--bs-dark);
  }
}

/* Responsive Typography Fixes */
@media (max-width: 576px) {
  /* Fix display-4 on mobile to prevent overflow */
  .display-4 {
    font-size: 2rem !important;
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Fix display-1 on mobile */
  .display-1 {
    font-size: 2.5rem !important;
  }
  
  /* Fix display-5 on mobile */
  .display-5 {
    font-size: 1.75rem !important;
  }
  
  /* Fix display-6 on mobile */
  .display-6 {
    font-size: 1.5rem !important;
  }
  
  /* Force vertical layout for all services on very small screens */
  .service-item .d-flex {
    flex-direction: column !important;
    align-items: flex-start !important;
  }
  
  .service-item .ms-4 {
    margin-left: 0 !important;
    margin-top: 0.75rem;
  }
}

@media (max-width: 768px) {
  /* Tablet sizes */
  .display-4 {
    font-size: 2.5rem;
  }
  
  .display-1 {
    font-size: 3rem;
  }
}