/* Premium Styles for Examination Management System - Student Portal */

.exam-banner-section {
  position: relative;
  background-image: url("../img/breadcrumb.png") !important;
  background-size: cover;
  background-position: center;
  min-height: 220px;
  display: flex;
  align-items: center;
  padding: 2.5rem 0;
}

.exam-banner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* background-image: url("../img/breadcrumb.png"); */
  /* background: linear-gradient(
    135deg,
    rgba(15, 59, 141, 0.9) 0%,
    rgba(22, 44, 89, 0.95) 100%
  ); */
  z-index: 1;
}

.exam-banner-content {
  position: relative;
  z-index: 2;
  color: #ffffff;
}

.exam-banner-content h1 {
  font-family: "Cormorant Garamond", serif !important;
  font-weight: 700;
  color: #ffffff;
  font-size: 30px;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.25);
}

.exam-banner-content p {
  font-size: 14px;
  color: #e0e0e0;
  margin-bottom: 0.75rem;
  max-width: 400px;
}

.exam-breadcrumb {
  font-size: 0.9rem;
  color: #ffd043;
}

.exam-breadcrumb a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.2s;
}

.exam-breadcrumb a:hover {
  color: #ffd043;
}

/* Card layout */
.exam-search-card {
  border-radius: 8px;
  border: 1px solid #e0e0e0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
  background-color: #ffffff;
  /* margin-top: -3.5rem; */
  position: relative;
  z-index: 10;
  padding: 2.5rem;
  margin-bottom: 4rem;
}

.exam-card-title-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 2px solid #0f3b8d;
  padding-bottom: 1.25rem;
  margin-bottom: 2rem;
}

.exam-card-title-info h2 {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.65rem;
  color: #112247;
  margin-bottom: 0.25rem;
}

.exam-card-title-info p {
  font-size: 0.95rem;
  color: #707070;
  margin: 0;
}

a.btn-back-portal,
.btn-back-portal {
  border: 1px solid #d97706;
  color: #b45309;
  background-color: transparent;
  padding: 0.5rem 1.25rem;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  display: inline-block;
}

a.btn-back-portal:hover,
a.btn-back-portal:focus,
.btn-back-portal:hover,
.btn-back-portal:focus {
  background: linear-gradient(109deg, #ffd24a 0%, #f0a800 100%) !important;
  color: #1f2937 !important;
  border-color: #f0a800 !important;
  text-decoration: none !important;
  box-shadow: 0 4px 12px rgba(240, 168, 0, 0.25);
}

/* Form Styles */
.exam-form-group {
  margin-bottom: 1.5rem;
}

.exam-form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
  display: block;
}

.exam-form-label span.required {
  color: #d32f2f;
}

.exam-form-control {
  width: 100%;
  height: 45px;
  border: 1px solid #cccccc;
  border-radius: 4px;
  padding: 0.375rem 0.75rem;
  font-size: 0.95rem;
  color: #495057;
  background-color: #ffffff;
  transition:
    border-color 0.15s ease-in-out,
    box-shadow 0.15s ease-in-out;
}

.exam-form-control:focus {
  border-color: #f0a800;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(240, 168, 0, 0.25);
}

/* Captcha wrapper */
.captcha-container-box {
  display: flex;
  align-items: center;
  background-color: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 4px;
  padding: 0.75rem 1rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.captcha-img-wrapper {
  height: 42px;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-refresh-captcha {
  border: 1px solid #ced4da;
  background-color: #ffffff;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-refresh-captcha:hover {
  background-color: #e9ecef;
}

.captcha-input-box {
  flex: 1;
  min-width: 180px;
}

@keyframes btnSearchPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.18);
  }
}

/* Action buttons */
.btn-exam-search {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  color: #ffffff !important;
  border: 1px solid #334155;
  padding: 0.85rem 2.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  box-shadow: 0 4px 14px rgba(51, 65, 85, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* Light shimmer reflection effect on hover */
.btn-exam-search::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
}

.btn-exam-search:hover::before {
  left: 180%;
  transition: left 0.75s ease-in-out;
}

.btn-exam-search i {
  color: #ffffff;
  font-size: 1.05rem;
  transition: transform 0.25s ease;
}

.btn-exam-search:hover,
.btn-exam-search:focus {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  color: #ffffff !important;
  border-color: #94a3b8 !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(148, 163, 184, 0.35);
  text-decoration: none !important;
}

.btn-exam-search:hover i {
  animation: btnSearchPulse 0.8s infinite ease-in-out;
}

.btn-exam-search:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
}

.btn-exam-search:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

@keyframes btnDownloadBounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(3px);
  }
}

.btn-exam-download {
  background: linear-gradient(180deg, #64748b 0%, #475569 100%);
  color: #ffffff !important;
  border: 1px solid #334155;
  padding: 0.85rem 2.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  box-shadow: 0 4px 14px rgba(51, 65, 85, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.4px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

/* Light shimmer reflection effect on hover */
.btn-exam-download::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 70%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: skewX(-25deg);
  transition: none;
  pointer-events: none;
}

.btn-exam-download:hover::before {
  left: 180%;
  transition: left 0.75s ease-in-out;
}

.btn-exam-download i {
  color: #ffffff;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}

.btn-exam-download:hover,
.btn-exam-download:focus {
  background: linear-gradient(180deg, #334155 0%, #1e293b 100%) !important;
  color: #ffffff !important;
  border-color: #94a3b8 !important;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.35), 0 0 0 2px rgba(148, 163, 184, 0.35);
  text-decoration: none !important;
}

.btn-exam-download:hover i {
  animation: btnDownloadBounce 0.8s infinite ease-in-out;
}

.btn-exam-download:active {
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.25);
}

.btn-exam-download:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Results Display styles */
.results-display-section {
  margin-top: 2rem;
  border-top: 1px dashed #cccccc;
  padding-top: 2rem;
}

.student-meta-table {
  width: 100%;
  margin-bottom: 1.5rem;
}

.student-meta-table td {
  padding: 0.5rem 1rem;
  font-size: 0.95rem;
}

.student-meta-table td.meta-label {
  font-weight: 600;
  color: #112247;
  width: 25%;
}

.subject-grades-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

.subject-grades-table th {
  background-color: #0f3b8d;
  color: #ffffff;
  font-weight: 600;
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid #0f3b8d;
}

.subject-grades-table td {
  padding: 0.75rem 1rem;
  border: 1px solid #dee2e6;
}

.result-summary-row {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 1.25rem;
  border-radius: 4px;
  margin-bottom: 2rem;
}

.result-stat-box {
  text-align: center;
}

.result-stat-box span {
  font-size: 0.85rem;
  text-transform: uppercase;
  color: #707070;
  display: block;
  margin-bottom: 0.25rem;
}

.result-stat-box strong {
  font-size: 1.35rem;
  color: #112247;
}

/* Printing styles */
@media print {
  body * {
    visibility: hidden;
  }
  .print-area,
  .print-area * {
    visibility: visible;
  }
  .print-area {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .no-print {
    display: none !important;
  }
}

/* ===========================
   Responsive Styles
=========================== */

/* Tablet */
@media (max-width: 992px) {
  .exam-card-title-container {
    gap: 1rem;
  }

  .exam-card-title-info h2 {
    font-size: 1.45rem;
  }

  .exam-card-title-info p {
    font-size: 0.9rem;
  }

  .btn-back-portal {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
  }
}

/* Mobile */
@media (max-width: 768px) {
  .exam-card-title-container {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    text-align: left;
  }

  .exam-card-title-info {
    width: 100%;
  }

  .exam-card-title-info h2 {
    font-size: 1.35rem;
  }

  .exam-card-title-info p {
    font-size: 0.9rem;
    line-height: 1.6;
  }

  .btn-back-portal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    padding: 0.65rem 1.2rem;
  }
}

/* Small Mobile */
@media (max-width: 576px) {
  .exam-card-title-container {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
  }

  .exam-card-title-info h2 {
    font-size: 1.2rem;
  }

  .exam-card-title-info p {
    font-size: 0.85rem;
  }

  .btn-back-portal {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 0.9rem;
  }
}
