/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* General mobile adjustments */
  body {
    font-size: 14px;
    overflow-x: hidden;
    background-color: #f8f9fa;
  }

  /* Header adjustments */
  .page-header {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
    min-height: auto !important;
  }

  /* Breadcrumb navigation */
  .breadcrumb-nav {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    margin-bottom: 1rem;
    font-size: 0.875rem;
  }

  .breadcrumb-nav a {
    color: #fff;
    text-decoration: none;
    opacity: 0.8;
  }

  .breadcrumb-nav .separator {
    color: #fff;
    opacity: 0.5;
    margin: 0 0.5rem;
  }

  .breadcrumb-nav span:last-child {
    color: #fff;
    opacity: 1;
  }

  /* Page title */
  .page-title {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    padding: 0;
  }

  /* Form container adjustments */
  .card {
    margin: 0;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    background: #fff;
  }

  .card-body {
    padding: 1.25rem;
  }

  /* Form field adjustments */
  .cedula-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .input-group {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    margin: 0;
  }

  .form-control {
    font-size: 16px;
    height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    background: #fff;
    margin: 0;
  }

  .input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    flex: 1;
  }

  /* Button adjustments */
  .btn {
    height: 48px;
    font-size: 16px;
    padding: 0 1.5rem;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    margin: 0;
  }

  .input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    min-width: 120px;
  }

  .btn-primary {
    background-color: #5e72e4;
    border-color: #5e72e4;
  }

  .btn-secondary {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
  }

  .btn i {
    font-size: 1rem;
  }

  /* Results area */
  #searchResults {
    margin-top: 1.5rem;
  }

  /* Container adjustments */
  .container-fluid {
    padding: 1rem;
  }

  /* Background color adjustments */
  .bg-primary {
    background-color: #5e72e4 !important;
  }

  /* Small screen adjustments */
  @media (max-width: 375px) {
    .container-fluid {
      padding: 0.75rem;
    }

    .card-body {
      padding: 1rem;
    }

    .form-control,
    .btn {
      height: 44px;
      font-size: 14px;
    }

    .page-title {
      font-size: 1.25rem;
      margin-bottom: 1rem;
    }

    .breadcrumb-nav {
      font-size: 0.75rem;
    }
  }

  /* Form container adjustments */
  .card {
    margin: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  }

  .card-body {
    padding: 1.5rem;
  }

  /* Form field adjustments */
  .form-control {
    font-size: 16px;
    height: 48px;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    margin-bottom: 1rem;
  }

  /* Button adjustments */
  .btn {
    height: 48px;
    font-size: 16px;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0.5rem 0;
  }

  /* Input group adjustments */
  .input-group {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-bottom: 1rem;
  }

  .input-group .form-control {
    margin-bottom: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .input-group .btn {
    margin: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    height: 48px;
  }

  /* Specific styles for the search form */
  .search-form {
    padding: 1rem;
  }

  .search-form .form-group {
    margin-bottom: 1rem;
  }

  /* Navigation header adjustments */
  .navbar-main {
    padding: 0.5rem;
  }

  .breadcrumb {
    margin-bottom: 0.5rem;
  }

  /* Title adjustments */
  h1, .h1 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
  }

  h6, .h6 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
  }

  /* Container spacing */
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* Clean button */
  .btn-secondary {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    color: #6c757d;
    margin-top: 1rem;
    width: auto;
    min-width: 120px;
  }

  /* Specific adjustments for the consultation form */
  .cedula-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
  }

  .cedula-form .input-group {
    width: 100%;
  }

  .cedula-form .input-group .form-control {
    flex: 1;
  }

  .cedula-form .input-group .btn-primary {
    width: auto;
    min-width: 120px;
  }

  /* Sidenav adjustments */
  .sidenav {
    width: 100%;
    max-width: 100%;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
    position: fixed;
    z-index: 1030;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
  }

  .sidenav.show {
    transform: translateX(0);
  }

  /* Main content adjustments */
  .main-content {
    margin-left: 0 !important;
    width: 100% !important;
    padding: 0.5rem !important;
  }

  /* Card adjustments */
  .card {
    margin-bottom: 1rem;
    border-radius: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  /* Form adjustments */
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
    height: auto;
    padding: 0.75rem 1rem;
  }

  .form-control-lg {
    height: auto;
    padding: 1rem 1.25rem;
  }

  .btn-group .btn {
    width: auto;
  }

  /* Table adjustments */
  .table-responsive {
    margin-bottom: 1rem;
    border: 0;
  }

  .table {
    font-size: 0.875rem;
  }

  .table td, .table th {
    padding: 0.5rem;
  }

  /* Navigation adjustments */
  .navbar-nav {
    flex-direction: column;
  }

  .nav-item {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .nav-link {
    padding: 0.75rem 1rem;
  }

  /* Footer adjustments */
  .footer {
    padding: 2rem 0;
  }

  .footer a {
    display: block;
    margin-bottom: 0.5rem;
    padding: 0.5rem 0;
  }

  /* Dashboard specific */
  .dashboard-stats {
    flex-direction: column;
  }

  .stat-card {
    width: 100%;
    margin-bottom: 1rem;
  }

  /* Modal adjustments */
  .modal-dialog {
    margin: 0.5rem;
    max-width: calc(100% - 1rem);
  }

  .modal-content {
    border-radius: 0.5rem;
  }

  /* DataTables adjustments */
  .dataTables_wrapper {
    overflow-x: auto;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }

  .dataTables_length, .dataTables_filter {
    text-align: left;
    margin-bottom: 1rem;
  }

  .dataTables_info, .dataTables_paginate {
    text-align: center;
    margin-top: 1rem;
  }

  /* Quick actions grid */
  .quick-actions {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  /* Breadcrumb adjustments */
  .breadcrumb {
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
  }

  .breadcrumb-item {
    font-size: 0.875rem;
  }

  /* Alert adjustments */
  .alert {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
  }

  /* Badge adjustments */
  .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
  }

  /* Image adjustments */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Row adjustments */
  .row {
    margin-left: -0.5rem;
    margin-right: -0.5rem;
  }

  .col, [class*="col-"] {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Small mobile devices */
@media (max-width: 375px) {
  .card {
    margin: 0.5rem;
  }

  .card-body {
    padding: 1rem;
  }

  .form-control,
  .btn {
    height: 44px;
    font-size: 14px;
  }

  .page-title {
    font-size: 1.25rem;
  }

  body {
    font-size: 13px;
  }

  .btn {
    padding: 0.5rem 0.75rem;
  }

  .nav-link {
    padding: 0.5rem 0.75rem;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidenav {
    width: 250px;
  }

  .main-content {
    margin-left: 250px;
  }

  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .card-deck {
    display: flex;
    flex-flow: row wrap;
    margin-right: -0.5rem;
    margin-left: -0.5rem;
  }

  .card-deck .card {
    flex: 0 0 calc(50% - 1rem);
    margin: 0.5rem;
  }
}

/* Print styles */
@media print {
  .sidenav,
  .navbar,
  .footer {
    display: none !important;
  }

  .main-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  .card {
    border: 1px solid #ddd;
    break-inside: avoid;
  }

  .table {
    width: 100% !important;
  }
} 