/* ========================================
   RESPONSIVE STYLES - Sistema Certificados
   Mobile-first responsive improvements
   ======================================== */

/* ---- LOGIN PAGE ---- */
#back {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f4f6f9;
  z-index: -1;
}

.login-box {
  width: 90%;
  max-width: 400px;
  margin: 5vh auto;
  padding: 0;
}

.login-box .login-logo {
  padding: 20px 0 10px;
  text-align: center;
}

.login-box .login-logo img {
  max-width: 120px;
  height: auto;
  cursor: pointer;
}

.login-box-body,
.login-box .card {
  border-radius: 12px;
  padding: 30px 25px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.login-box-body .form-control {
  height: 48px;
  font-size: 16px; /* prevents zoom on iOS */
  border-radius: 8px;
}

.login-box-body .btn {
  height: 48px;
  font-size: 16px;
  border-radius: 8px;
  font-weight: 600;
}

.login-box-msg {
  font-size: 18px;
  font-weight: 600;
  color: #333;
  margin-bottom: 20px;
}

/* ---- PARTICIPANT EVENT CARDS (mobile) ---- */
.event-cards {
  display: none;
}

.event-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 20px;
  margin-bottom: 16px;
  transition: box-shadow 0.2s ease;
}

.event-card:active {
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.event-card .event-card-title {
  font-size: 17px;
  font-weight: 700;
  color: #333;
  margin-bottom: 10px;
  line-height: 1.3;
}

.event-card .event-card-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.event-card .event-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f0f0f0;
  color: #555;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 13px;
}

.event-card .event-card-badge i {
  font-size: 12px;
  color: #03aba5;
}

.event-card .btn-certificate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #03aba5;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.2s;
}

.event-card .btn-certificate:hover,
.event-card .btn-certificate:focus {
  background: #028a85;
  color: #fff;
  text-decoration: none;
}

/* ---- CONTENT AREA IMPROVEMENTS ---- */
.content-header h1 {
  font-size: 22px;
}

/* ---- NAVBAR MOBILE ---- */
@media (max-width: 576px) {
  .main-header .navbar-nav .nav-link {
    font-size: 14px;
  }

  .main-header .navbar-nav.ml-auto {
    font-size: 12px;
  }
}

/* ---- MOBILE BREAKPOINT ---- */
@media (max-width: 768px) {
  /* Show cards, hide table on mobile */
  .event-cards {
    display: block;
  }

  .table-desktop {
    display: none !important;
  }

  /* Login adjustments */
  .login-box {
    margin: 3vh auto;
  }

  .login-box-body,
  .login-box .card {
    padding: 25px 20px;
  }

  /* Content padding */
  .content-wrapper {
    padding-bottom: 20px;
  }

  .content-header {
    padding: 10px 15px;
  }

  .content-header h1 {
    font-size: 20px;
  }

  .content-header .breadcrumb {
    display: none;
  }

  /* Card improvements */
  .card {
    border-radius: 10px;
    margin: 0 5px;
  }

  .card-header {
    padding: 12px 15px;
  }

  .card-header h3 {
    font-size: 16px;
  }

  .card-body {
    padding: 15px;
  }

  /* Footer */
  .main-footer {
    padding: 10px 15px;
    font-size: 13px;
    text-align: center;
  }

  .main-footer .float-right {
    float: none !important;
    display: block;
    margin-bottom: 4px;
  }

  /* Admin inicio logo */
  .content .container img {
    max-width: 80%;
    height: auto;
  }
}

/* ---- SMALL MOBILE ---- */
@media (max-width: 400px) {
  .login-box {
    width: 95%;
    margin: 2vh auto;
  }

  .login-box-body,
  .login-box .card {
    padding: 20px 15px;
  }

  .event-card {
    padding: 16px;
  }

  .event-card .event-card-title {
    font-size: 15px;
  }
}

/* ---- MODAL RESPONSIVE ---- */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 10px;
  }

  .modal-body .form-control {
    height: 44px;
    font-size: 16px;
  }

  .modal-footer .btn {
    min-height: 44px;
    font-size: 15px;
  }
}

/* ---- TOUCH TARGET SIZES ---- */
@media (pointer: coarse) {
  .btn,
  .nav-link,
  .form-control {
    min-height: 44px;
  }

  .table .btn {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}
