html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

/* Professional color scheme for legal/financial application */
:root {
  --primary-color: #2c3e50;
  /* Dark blue-gray */
  --secondary-color: #34495e;
  /* Slightly lighter blue-gray */
  --accent-color: #3498db;
  /* Professional blue */
  --success-color: #27ae60;
  /* Muted green */
  --warning-color: #f39c12;
  /* Professional orange */
  --danger-color: #e74c3c;
  /* Muted red */
  --light-gray: #ecf0f1;
  /* Very light gray */
  --medium-gray: #95a5a6;
  /* Medium gray */
  --dark-gray: #7f8c8d;
  /* Dark gray */

/* Custom viewport heights for better responsive design */
.min-vh-75 {
  min-height: 75vh !important;
}
  --text-color: #2c3e50;
  /* Dark text */
  --border-color: #bdc3c7;
  /* Light border */
}

body {
  margin-bottom: 60px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: #f8f9fa;
}

/* FAQ Page Specific Styles */
.bg-gradient-primary {
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color)) !important;
}

.accordion-button:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.accordion-button:not(.collapsed) {
  background-color: rgba(52, 152, 219, 0.1);
  border-color: var(--accent-color);
}

.timeline {
  position: relative;
  margin: 20px 0;
}

.timeline .row > div:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -15px;
  width: 30px;
  height: 2px;
  background-color: var(--accent-color);
  z-index: 1;
}

@media (max-width: 768px) {
  .timeline .row > div:not(:last-child)::after {
    display: none;
  }
}

/* Enhanced table styling for FAQ */
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(52, 152, 219, 0.05);
}

/* Card hover effects for better UX */
.card:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

/* Icon spacing improvements */
.accordion-button i {
  margin-right: 8px;
  width: 16px;
  text-align: center;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem var(--accent-color);
}

html {
  position: relative;
  min-height: 100%;
}

/* Professional button styling */
.btn-professional-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-professional-primary:hover {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-professional-secondary {
  background-color: var(--medium-gray);
  border-color: var(--medium-gray);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-professional-secondary:hover {
  background-color: var(--dark-gray);
  border-color: var(--dark-gray);
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-professional-success {
  background-color: var(--success-color);
  border-color: var(--success-color);
  color: white;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease-in-out;
}

.btn-professional-success:hover {
  background-color: #229954;
  border-color: #229954;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Professional card styling */
.card-professional {
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.15s ease-in-out;
}

.card-professional:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-header-professional {
  background-color: var(--primary-color);
  color: white;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.card-header-secondary {
  background-color: var(--secondary-color);
  color: white;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

.card-header-success {
  background-color: var(--success-color);
  color: white;
  border-bottom: 1px solid var(--border-color);
  font-weight: 600;
  padding: 1rem 1.25rem;
}

/* Professional table styling */
.table-professional {
  border: 1px solid var(--border-color);
}

.table-professional thead th {
  background-color: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
  font-weight: 600;
  padding: 0.75rem;
}

.table-professional tbody tr:nth-child(even) {
  background-color: #f8f9fa;
}

.table-professional tbody tr:hover {
  background-color: var(--light-gray);
}

/* Professional alert styling */
.alert-professional {
  border: 1px solid var(--border-color);
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.alert-professional-primary {
  background-color: #e8f4f8;
  border-color: var(--accent-color);
  color: var(--primary-color);
}

.alert-professional-success {
  background-color: #e8f5e8;
  border-color: var(--success-color);
  color: #1e7e34;
}

.alert-professional-warning {
  background-color: #fef9e7;
  border-color: var(--warning-color);
  color: #856404;
}

.alert-professional-danger {
  background-color: #f8e8e8;
  border-color: var(--danger-color);
  color: #721c24;
}

/* Form styling */
.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.5rem;
}

/* Typography */
.display-4 {
  font-weight: 300;
  color: var(--primary-color);
}

.lead {
  color: var(--dark-gray);
}

/* List group professional styling */
.list-group-professional .list-group-item {
  border-color: var(--border-color);
  padding: 0.75rem 1rem;
}

.list-group-professional .list-group-item.highlight {
  background-color: var(--light-gray);
  font-weight: 600;
}

/* Navigation styling override */
.navbar-light .navbar-brand {
  color: var(--primary-color);
  font-weight: 600;
  font-size: 1.5rem;
}

.navbar-light .navbar-nav .nav-link {
  color: var(--text-color);
  font-weight: 500;
}

.navbar-light .navbar-nav .nav-link:hover {
  color: var(--accent-color);
}

/* Remove emoji dependency - use subtle icons instead */
.icon-couple::before {
  content: "👥 ";
}

.icon-money::before {
  content: "€ ";
}

.icon-calculator::before {
  content: "📊 ";
}

.icon-document::before {
  content: "📋 ";
}

.icon-save::before {
  content: "💾 ";
}

.icon-add::before {
  content: "+ ";
}

/* Professional spacing */
.section-spacing {
  margin-top: 2rem;
  margin-bottom: 2rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .card-professional {
    margin-bottom: 1rem;
  }

  .btn-professional-primary,
  .btn-professional-secondary,
  .btn-professional-success {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}

/* Responsive container improvements */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-header {
        padding: 0.75rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.875rem;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
    
    .alert {
        font-size: 0.9rem;
    }
    
    /* Fix mobile alignment issues - ensure all content aligns properly */
    .alert.alert-light {
        text-align: left;
        margin-left: 0;
        margin-right: 0;
    }
    
    .alert .d-flex {
        align-items: center;
        justify-content: flex-start;
    }
    
    /* Ensure buttons in cards maintain proper alignment on mobile */
    .card-body .text-center {
        text-align: center !important;
    }
}

/* Improved card spacing */
.g-4 > * {
    margin-bottom: 1.5rem;
}

/* Better button spacing */
.d-grid .btn {
    padding: 0.75rem 1rem;
}

/* Icon spacing */
.fas {
    margin-right: 0.5rem;
}

/* Card header consistency */
.card-header {
    font-weight: 600;
}

/* Table improvements */
.table th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* Alert improvements */
.alert h4, .alert h5 {
    margin-bottom: 0.75rem;
}

/* Custom utilities */
.text-truncate-mobile {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 576px) {
    .text-truncate-mobile {
        max-width: 150px;
    }
    
    /* Specific mobile alignment fix for homepage cards */
    .col-12 .card .card-body .mt-3 {
        text-align: center;
    }
    
    .alert.alert-light .d-flex {
        flex-direction: column;
        align-items: flex-start !important;
        text-align: left;
    }
    
    .alert.alert-light .text-end {
        text-align: center !important;
        width: 100%;
        margin-top: 10px;
    }
}
/* Accordion improvements - proper spacing */
.accordion-item {
  margin-bottom: 0.5rem !important;
}

.accordion-item:last-child {
  margin-bottom: 0 !important;
}

/* Ensure accordion buttons have proper spacing */
.accordion-button {
  padding: 1rem 1.25rem !important;
}

/* Table spacing improvements */
.table-sm th,
.table-sm td {
  padding: 0.5rem 0.75rem !important;
}

/* Specific spacing for accordion tables to prevent text being too close to edges */
.accordion-body .table th,
.accordion-body .table td {
  padding: 0.75rem 1rem !important;
}

/* Ensure proper spacing for table content */
.accordion-body .table-sm th,
.accordion-body .table-sm td {
  padding: 0.6rem 0.9rem !important;
}

/* Additional spacing for button groups in tables */
.table .btn-group-sm .btn {
  padding: 0.25rem 0.5rem;
  margin: 0 1px;
}