html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.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 #258cfb;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Ensure container grows to push footer down */
.container {
  flex: 1 0 auto;
}

/* Main content area - add generous padding to prevent footer overlap */
main {
  padding-bottom: 4rem !important;
  margin-bottom: 4rem !important;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

/* Custom styles for AI Solutions website */

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    margin-bottom: 2rem;
}

/* Card Enhancements */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Footer Improvements - Compact and clearly separated from main content */
.footer {
    padding: 1.5rem 0;
    background-color: #343a40;
    color: #adb5bd;
    margin-top: 4rem;
    flex-shrink: 0;
    width: 100%;
    clear: both;
    border-top: 3px solid #0d6efd;
    font-size: 0.875rem;
}

.footer h5,
.footer h6 {
    color: #f8f9fa;
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.footer p {
    color: #adb5bd;
    margin-bottom: 0.5rem;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #ffffff;
}

.footer ul li {
    margin-bottom: 0.25rem;
}

.footer hr {
    border-color: #495057;
    opacity: 1;
}

.footer .btn-primary {
    font-size: 0.875rem;
    padding: 0.375rem 0.75rem;
}

/* Button Enhancements */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(13, 110, 253, 0.3);
}

.btn-lg {
    font-weight: 500;
}

/* Form Enhancements */
.form-control:focus,
.form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

/* Alert Enhancements */
.alert {
    border-left: 4px solid;
    border-radius: 8px;
}

.alert-success {
    border-left-color: #198754;
}

.alert-info {
    border-left-color: #0dcaf0;
}

.alert-danger {
    border-left-color: #dc3545;
}

/* Navigation Enhancements */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 600;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
    margin-bottom: 2rem;
}

/* Analysis Content Styling */
.analysis-content {
    line-height: 1.8;
}

.analysis-content h2 {
    color: #0d6efd;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
}

.analysis-content h3 {
    color: #495057;
}

.analysis-content ul {
    padding-left: 1.5rem;
}

.analysis-content ul li {
    margin-bottom: 0.75rem;
}

.analysis-content strong {
    color: #212529;
    font-weight: 600;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Icon Styling */
svg {
    vertical-align: middle;
}

/* Loading State */
.btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

/* Print Styles */
@media print {
    .no-print,
    .btn,
    .alert,
    nav,
    footer {
        display: none !important;
    }
    
    body {
        margin: 0;
        padding: 20px;
    }
    
    .card {
        border: 1px solid #dee2e6;
        box-shadow: none;
    }
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Visible for Better Keyboard Navigation */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Color Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
    --light-color: #f8f9fa;
    --dark-color: #212529;
}