@font-face {
  font-family: 'dc';
  src: url('../fonts/dc.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'dc2';
  src: url('../fonts/dc2.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'ml';
  src: url('../fonts/ml.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'bbb';
  src: url('../fonts/bbb.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
}

* {
  box-sizing: border-box;
}

body {
  direction: rtl;
  text-align: right;
  font-family: 'dc2', Tahoma, Arial, sans-serif;
  background: #ebebeb url('../images/bg.jpg') repeat fixed;
  color: #333;
  margin: 0;
  padding: 0;
}

/* Container Structure - Fixed 1001px matching res-ye.net */
.container-main {
  width: 1001px;
  min-height: 800px;
  margin: 0 auto;
  background-color: #ffffff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
  padding-bottom: 70px;
}

/* Header & Banner */
.header-banner {
  width: 1001px;
  height: 160px;
  display: block;
}

.title-banner {
  width: 600px;
  height: 80px;
  margin: 15px auto 25px auto;
  display: block;
}

/* Navbar */
.custom-navbar {
  background-color: #0abfae;
  background: linear-gradient(to bottom, #0abfae 0%, #039083 100%);
  border: none;
  border-radius: 0;
  margin-bottom: 20px;
  height: 40px;
  min-height: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 15px;
  color: white;
}

.custom-navbar .brand-title {
  color: white;
  font-family: 'dc', sans-serif;
  font-size: 16px;
  font-weight: bold;
  text-decoration: none;
  padding: 8px 15px;
  border-left: 1px solid rgba(255, 255, 255, 0.3);
}

.custom-navbar .nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.custom-navbar .nav-links li a {
  color: white;
  text-decoration: none;
  padding: 10px 16px;
  display: inline-block;
  font-family: 'dc', sans-serif;
  font-size: 14.5px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
  transition: background-color 0.2s;
}

.custom-navbar .nav-links li a:hover {
  background-color: rgba(0, 0, 0, 0.15);
}

.custom-navbar .social-links {
  display: flex;
  gap: 12px;
  align-items: center;
}

.custom-navbar .social-links a {
  color: white;
  text-decoration: none;
  font-size: 18px;
}

/* Breadcrumb */
.custom-breadcrumb {
  list-style: none;
  display: flex;
  padding: 10px 20px;
  margin: 0 0 15px 0;
  background-color: #f5f5f5;
  border-bottom: 1px solid #e5e5e5;
  font-size: 14px;
}

.custom-breadcrumb li+li:before {
  content: " / ";
  padding: 0 8px;
  color: #888;
}

.custom-breadcrumb a {
  color: #039083;
  text-decoration: none;
}

/* 2x2 Grid of Search Boxes - Stays 2 Columns on All Screens */
.boxes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 25px;
  margin-bottom: 25px;
}

/* Box Styling */
.search-box {
  padding: 20px;
  border: 1px solid #009588;
  border-radius: 15px;
  background: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.04);
  position: relative;
}

.box-title {
  text-align: center;
  color: #515151;
  border-bottom: 1px solid #c4c4c4;
  margin-bottom: 15px;
  font-size: 16.5px;
  font-family: 'dc', sans-serif;
  padding: 4px 12px;
}

/* Form Controls */
.input-addon-group {
  display: flex;
  margin-bottom: 14px;
  direction: ltr;
}

.input-addon-group select,
.input-addon-group input {
  flex: 1;
  height: 38px;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-right: none;
  border-radius: 4px 0 0 4px;
  font-size: 14.5px;
  font-family: 'dc2', sans-serif;
  text-align: right;
  direction: rtl;
  outline: none;
}

.input-addon-group select:focus,
.input-addon-group input:focus {
  border-color: #009588;
}

.input-addon {
  width: 40px;
  height: 38px;
  background-color: #eee;
  border: 1px solid #ccc;
  border-radius: 0 4px 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #555;
  font-size: 15px;
}

/* Captcha */
.captcha-container {
  margin-bottom: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-label {
  font-family: 'dc', sans-serif;
  font-size: 14px;
  color: #333;
  white-space: nowrap;
}

.captcha-box {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  background-color: #f9f9f9;
  border: 1px solid #d3d3d3;
  border-radius: 4px;
  padding: 6px 12px;
  width: 250px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.captcha-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.captcha-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #c1c1c1;
  border-radius: 3px;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.2s;
  box-sizing: border-box;
  position: relative;
}

.captcha-checkbox:hover {
  border-color: #a0a0a0;
}

.captcha-checkbox.loading {
  width: 24px;
  height: 24px;
  border: 3px solid #4a90e2;
  border-top-color: transparent;
  border-radius: 50% !important;
  background-color: transparent;
  animation: captcha-spinner 0.75s linear infinite;
  cursor: wait;
}

@keyframes captcha-spinner {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.captcha-checkbox.checked {
  width: 24px;
  height: 24px;
  border: none !important;
  background-color: transparent;
  cursor: default;
  animation: captcha-pop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.captcha-checkbox.checked:after {
  content: '✔';
  color: #0fb36c;
  font-size: 22px;
  line-height: 1;
  font-weight: bold;
}

@keyframes captcha-pop {
  0% { transform: scale(0.3); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.captcha-text {
  font-size: 13px;
  color: #222;
  font-family: Tahoma, sans-serif;
}

.captcha-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: 8.5px;
  color: #888;
}

.captcha-logo img {
  width: 24px;
  height: 24px;
  opacity: 0.75;
}

/* Submit Button */
.btn-search {
  background-color: #039083;
  border: 1px solid #02675e;
  border-bottom: 3px solid #02675e;
  color: white;
  padding: 6px 24px;
  font-size: 15.5px;
  font-family: 'dc', sans-serif;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}

.btn-search:hover:not(:disabled) {
  background-color: #02786d;
}

.btn-search:disabled {
  background-color: #8dbcb7;
  border-color: #7aa5a0;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Result Certificate View */
.result-wrapper {
  padding: 5px 20px 30px 20px;
}

.section-badge-container {
  width: 820px;
  margin: 0 auto 12px auto;
  border: 2px solid #444;
  border-radius: 6px;
  text-align: center;
  padding: 5px 0;
  background-color: #fff;
}

.section-badge-container h3 {
  margin: 0;
  font-family: 'dc', sans-serif;
  font-size: 24px;
  color: #222;
}

.student-info-grid {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 820px;
  margin: 0 auto 16px auto;
  gap: 12px;
}

.info-card {
  border: 1.5px solid #555;
  border-radius: 6px;
  padding: 6px 14px;
  font-family: 'dc2', sans-serif;
  font-size: 15px;
  text-align: center;
  background-color: #ffffff;
}

.info-card.year-box {
  width: 140px;
}

.info-card.name-box {
  flex: 1;
  font-weight: bold;
  font-size: 17px;
}

.info-card.seat-box {
  width: 140px;
  font-weight: bold;
}

/* Transcript Title Row */
.transcript-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 820px;
  margin: 0 auto 6px auto;
  padding: 0 4px;
}

.transcript-header-row .title-ar {
  font-family: 'dc', sans-serif;
  font-size: 19px;
  color: #333;
}

.transcript-header-row .title-en {
  font-family: 'Georgia', 'Times New Roman', serif;
  font-size: 17px;
  font-weight: bold;
  letter-spacing: 0.5px;
  color: #333;
}

/* Transcript Table */
.transcript-table {
  width: 820px;
  margin: 0 auto 14px auto;
  border-collapse: collapse;
  border: 1.5px solid #039083;
  background-color: #fff;
}

.transcript-table th,
.transcript-table td {
  border: 1.5px solid #039083;
  padding: 6px 8px;
  text-align: center;
  font-size: 14.5px;
}

.transcript-table th {
  font-family: 'dc', sans-serif;
  color: #111;
  background-color: #f7fcfa;
  font-weight: bold;
}

.transcript-table th .sub-text {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 11px;
  color: #555;
  font-weight: normal;
}

.transcript-table td.subject-ar {
  text-align: right;
  font-family: 'dc2', sans-serif;
  font-weight: bold;
}

.transcript-table td.subject-en {
  text-align: left;
  font-family: Arial, sans-serif;
  font-weight: bold;
}

.transcript-table tr.total-row {
  font-weight: bold;
  background-color: #f9f9f9;
}

/* Bottom Certificate Section */
.result-bottom-container {
  width: 820px;
  margin: 0 auto;
}

.summary-box {
  border: 1.5px solid #039083;
  border-radius: 4px;
  padding: 8px 18px;
  background-color: #ffffff;
  display: inline-block;
  min-width: 170px;
  font-family: 'dc', sans-serif;
  line-height: 1.8;
  margin-top: 5px;
  float: right;
}

.summary-box .line {
  font-size: 15.5px;
  color: #222;
}

.red-notice {
  clear: both;
  text-align: right;
  color: #e02e2e;
  font-family: 'dc2', sans-serif;
  font-weight: bold;
  font-size: 13.5px;
  padding-top: 14px;
  margin-bottom: 20px;
}

/* Center Print Button (Orange Pill) */
.print-center-container {
  text-align: center;
  margin: 15px 0 20px 0;
}

.btn-print-orange {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, #f5a623 0%, #e69512 100%);
  color: #ffffff;
  border: none;
  border-radius: 30px;
  padding: 8px 30px 8px 16px;
  font-family: 'dc', sans-serif;
  font-size: 17.5px;
  cursor: pointer;
  box-shadow: 0 3px 8px rgba(230, 149, 18, 0.4);
  transition: transform 0.15s ease, background 0.2s ease;
}

.btn-print-orange:hover {
  background: linear-gradient(180deg, #e69512 0%, #c97f0a 100%);
  transform: translateY(-1px);
}

.btn-print-orange .icon-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.85);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

/* Social Share Bar */
.result-footer-bar {
  clear: both;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 25px;
  padding-top: 15px;
  border-top: 1px dashed #dcdcdc;
}

.social-share-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.social-share-group .share-title {
  font-family: 'dc', sans-serif;
  font-size: 14px;
  color: #444;
  margin-left: 6px;
}

.share-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 3px;
  color: #fff;
  text-decoration: none;
  font-size: 14px;
  transition: opacity 0.2s;
}

.share-icon-btn:hover {
  opacity: 0.85;
  color: #fff;
}

.share-icon-btn.share-link {
  background-color: #0288d1;
}

.share-icon-btn.share-fb {
  background-color: #3b5998;
}

.share-icon-btn.share-tw {
  background-color: #1da1f2;
}

.btn-back-link {
  font-family: 'dc', sans-serif;
  font-size: 14px;
  color: #039083;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-back-link:hover {
  color: #02675e;
  text-decoration: underline;
}

/* Alert Not Found Box */
.alert-not-found {
  width: 700px;
  margin: 40px auto;
  background-color: #fcf8e3;
  border: 1px solid #faebcc;
  border-radius: 8px;
  padding: 30px 20px;
  text-align: center;
  font-family: 'dc', sans-serif;
  font-size: 18px;
  color: #8a6d3b;
  line-height: 1.9;
}

.alert-not-found img {
  vertical-align: middle;
  margin: 0 6px;
  width: 28px;
  height: 28px;
}

/* Footer */
.site-footer {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #2f2f2f;
  color: #e6e6e6;
  padding: 8px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.site-footer a {
  color: #0abfae;
  text-decoration: none;
}

/* Print Only & No Print */
.print-only {
  display: none;
}

@media print {
  body {
    background: #fff !important;
  }
  .no-print {
    display: none !important;
  }
  .print-only {
    display: block !important;
  }
  .container-main {
    box-shadow: none !important;
    width: 100% !important;
    padding: 0 !important;
  }
  .print-header-img {
    width: 820px;
    margin: 0 auto 15px auto;
    display: block;
  }
}
