html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin-bottom: 60px;
}

.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;
}

/* Layout Components */
.navbar-brand-custom {
  color: #1976D2;
}

.main-content {
  padding: 0 0 3rem 0;
  min-height: calc(100vh - 300px); /* Ensure minimum height to push footer down */
}

.site-footer {
  background: #f5f5f5;
  padding: 30px 15px;
  margin-top: 3rem;
  min-height: 80px; /* Ensure footer has minimum height */
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-align: center;
}

.footer-item {
  display: inline-block;
}

.footer-separator {
  display: none; /* Hidden on mobile */
}

/* Increase footer spacing on larger screens */
@media (min-width: 768px) {
  .main-content {
    padding: 0 0 4rem 0;
    min-height: calc(100vh - 200px); /* Adjusted for better spacing */
  }

  .site-footer {
    margin-top: 4rem;
    padding: 35px 15px;
    min-height: 90px;
  }

  .footer-content {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.75rem;
  }

  .footer-separator {
    display: inline; /* Show separators on tablet+ */
    margin: 0 0.5rem;
  }
}

@media (min-width: 992px) {
  .main-content {
    padding: 0 0 5rem 0;
    min-height: calc(100vh - 180px); /* Adjusted for better spacing */
  }

  .site-footer {
    margin-top: 5rem;
    padding: 40px 15px;
    min-height: 100px;
  }

  .footer-content {
    flex-direction: row;
    flex-wrap: nowrap; /* Single line on desktop */
    gap: 0;
  }

  .footer-separator {
    margin: 0 1rem;
  }
}

.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;
}

/* Shared Component Styles */
/* These components are used across multiple pages */

/* Primary Button */
.btn-primary-custom {
  background: var(--primary-blue);
  border: none;
  padding: 12px 24px;  /* Mobile-first: smaller padding */
  font-size: 1rem;
  border-radius: var(--radius-full);
  color: white;
  transition: all var(--transition-base);
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
}

.btn-primary-custom:hover {
  background: var(--dark-blue);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(74, 144, 226, 0.4);
  color: white;
}

/* Outline Button */
.btn-outline-custom {
  border: 2px solid var(--primary-blue);
  color: var(--primary-blue);
  padding: 12px 24px;  /* Mobile-first: smaller padding */
  font-size: 1rem;
  border-radius: var(--radius-full);
  transition: all var(--transition-base);
  text-decoration: none;
  display: inline-block;
  font-weight: 600;
  background: transparent;
}

.btn-outline-custom:hover {
  background: var(--primary-blue);
  color: white;
  transform: translateY(-2px);
}

/* Section Titles */
.section-title {
  color: var(--dark-blue);
  font-weight: 700;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--primary-blue), var(--accent-blue));
  border-radius: 2px;
}

/* Alert Styles */
.alert-success {
  background: linear-gradient(135deg, #E8F5E9, #C8E6C9);
  border: 2px solid #66BB6A;
  border-radius: 12px;
  color: #2E7D32;
  padding: 1rem 1.5rem;
}

.alert-danger {
  background: linear-gradient(135deg, #FFEBEE, #FFCDD2);
  border: 2px solid #EF5350;
  border-radius: 12px;
  color: #C62828;
  padding: 1rem 1.5rem;
}

/* Form Controls */
.form-label {
  color: var(--dark-blue);
  font-weight: 600;
  margin-bottom: 8px;
}

.form-control {
  border: 2px solid var(--light-blue);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  transition: all var(--transition-base);
}

.form-control:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 0.25rem rgba(74, 144, 226, 0.15);
}

/* Responsive button enhancements (desktop) */
@media (min-width: 992px) {
  .btn-primary-custom {
    padding: 15px 40px;
    font-size: 1.1rem;
  }

  .btn-outline-custom {
    padding: 15px 40px;
    font-size: 1.1rem;
  }
}