/* =========================
   GLOBAL
   ========================= */

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; 
    padding: 0; 
    background-color: #f4f7f6; 
    color: #333; 
}

/* =========================
   NAVIGATION
   ========================= */

nav { 
    background: #0056b3; 
    padding: 15px 0; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}
nav ul { 
    list-style: none; 
    text-align: center; 
    margin: 0; 
    padding: 0; 
}
nav ul li { 
    display: inline; 
    margin: 0 20px; 
    transition: 0.5s;
}
nav ul li:hover{
    color: #989898; 
  
}
nav ul li a { 
    color: white; 
    text-decoration: none; 
    font-weight: bold; 
    font-size: 1.1rem; 
      transition: 0.5s;
}
nav ul li a:hover { 
   color: #989898; 
   
}



/* add file option */


/* Add File Button */
.add-file-btn {
  background-color: #2563eb;
  color: white;
  padding: 10px 18px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  margin-bottom: 15px;
}

.add-file-btn:hover {
  background-color: #1e40af;
}

/* Modal Background */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Box */
.modal-content {
  background-color: white;
  width: 350px;
  margin: 12% auto;
  padding: 20px;
  border-radius: 8px;
  position: relative;
  text-align: center;
}

/* Close Button */
.close-btn {
  position: absolute;
  right: 12px;
  top: 8px;
  font-size: 22px;
  cursor: pointer;
}

/* Submit Button */
.submit-btn {
  background-color: #22c55e;
  color: white;
  padding: 8px 14px;
  border: none;
  border-radius: 5px;
  margin-top: 15px;
  cursor: pointer;
}

.submit-btn:hover {
  background-color: #16a34a;
}


/* add file */


/* =========================
   INDEX PAGE
   ========================= */

.index__container { 
    max-width: 800px; 
    margin: 100px auto; 
    text-align: center; 
    padding: 20px; 
}
h1 { 
    font-size: 3rem; 
    color: #0056b3; 
    margin-bottom: 10px; 
}
.index__tagline { 
    color: #666; 
    font-size: 1.2rem; 
    margin-bottom: 40px; 
}

/* Search Bar */
.index__search-box { 
    position: relative; 
    max-width: 600px; 
    margin: 0 auto; 
}
input[type="text"] { 
    width: 100%; 
    padding: 15px 20px; 
    font-size: 1.1rem; 
    border: 2px solid #ddd; 
    border-radius: 30px; 
    outline: none; 
    transition: 0.3s; 
    box-sizing: border-box; 
}
input[type="text"]:focus { 
    border-color: #0056b3; 
    box-shadow: 0 0 8px rgba(0, 86, 179, 0.2); 
}
button { 
    position: absolute; 
    right: 5px; 
    top: 5px; 
    padding: 10px 25px; 
    background: #0056b3; 
    color: white; 
    border: none; 
    border-radius: 25px; 
    cursor: pointer; 
    font-size: 1rem; 
    margin-top: 3px;
    z-index: 10;
}
button:hover { 
    background: #004494; 
}

/* search similar result  */
#autocomplete-box {
  position: absolute;
  background: white;
  border: 1px solid #ccc;
  max-height: 200px;
  overflow-y: auto;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  z-index: 1000;
  font-family: Arial, sans-serif;
  font-size: 14px;
  border-radius: 10px;
  text-align: start;
}
#autocomplete-box div {
  padding: 8px 12px;
  cursor: pointer;
  transition: 0.5s;
}
#autocomplete-box div:hover {
  background-color: #989898;
}




/* =========================
   QUERY INFO + SORT (FIX)
   ========================= */
.query-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 900px;
  margin: 20px auto;
  padding: 0 10px;
}

.query-card {
  background: #ffffff;
  padding: 12px 18px;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  font-size: 14px;
}

.query-card select {
  margin-left: 8px;
  padding: 6px;
  border-radius: 6px;
}

.hidden {
  display: none !important;
}


/* =========================
   SEARCH RESULTS
   ========================= */

#results {
    margin-top: 40px;
    text-align: left;
}

.result-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 15px;
}

.result-card:hover {
    transform: translateY(-3px);
}

.favicon {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 4px;
    object-fit: contain;
    box-shadow: 0 0 4px rgba(0,0,0,0.1);
}
.favicon[hidden] {
    display: none;
}

.result-content {
    flex-grow: 1;
}

.result-content h3 {
    margin: 0 0 8px 0;
    font-size: 1.2rem;
}

.result-content a {
    text-decoration: none;
    color: #1a0dab;
}

.result-content a:hover {
    text-decoration: underline;
}

.meta {
    color: #555;
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.score {
    font-size: 0.85rem;
    color: #666;
}

/* Buttons inside result card */
.actions {
    margin-top: 10px;
}

.actions a, 
.actions button {
    padding: 6px 14px;
    margin-right: 10px;
    border-radius: 6px;
    background: #0056b3;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-block;
}

.actions a:hover,
.actions button:hover {
    background: #004494;
}


/* =========================
   PROJECT INFO
   ========================= */

.index__info-section { 
    margin-top: 60px; 
    background: white; 
    padding: 30px; 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.05); 
    text-align: left; 
}
.index__info-section h2 { 
    color: #333; 
    border-bottom: 2px solid #0056b3; 
    padding-bottom: 10px; 
    display: inline-block; 
}

/* =========================
   ABOUT PAGE
   ========================= */

.about__container { 
    max-width: 1000px; 
    margin: 40px auto; 
    padding: 20px; 
    text-align: center; 
}

.about__subtitle { 
    color: #666; 
    margin-bottom: 40px; 
    font-size: 1.1rem; 
}

.about__card { 
    background: white; 
    border-radius: 10px; 
    padding: 20px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
    transition: transform 0.3s; 
}
.about__card:hover { 
    transform: translateY(-5px); 
}
.about__card img { 
    width: 100px; 
    height: 100px; 
    border-radius: 50%; 
    background: #ddd; 
    margin-bottom: 15px; 
    object-fit: cover; 
}
.about__role { 
    color: #0056b3; 
    font-weight: bold; 
    font-size: 0.85rem; 
    text-transform: uppercase; 
}

.about__student-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); 
    gap: 30px; 
}

/* =========================
   SAFETY PAGE
   ========================= */

header { 
    background: #2c3e50; 
    color: white; 
    padding: 40px 20px; 
    text-align: center; 
}

.safety__container { 
    max-width: 900px; 
    margin: 40px auto; 
    padding: 20px; 
}

.safety__tips-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
}

.safety__tip-card { 
    background: white; 
    padding: 25px; 
    border-radius: 8px; 
    border-left: 5px solid #0056b3; 
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
}

.safety__warning { 
    border-left-color: #e74c3c; 
}
.safety__success { 
    border-left-color: #27ae60; 
}


.index__container{
    position: relative;
}

/* =========================
   PAGINATION (FINAL FIX)
   ========================= */

#pagination {
  display: flex;
  justify-content: center;
  align-items: center;

  position: absolute;
  bottom: 0%;
  left: 0;
  right: 0;

  gap: 12px;
  flex-wrap: wrap;
}

#pagination button {
  padding: 8px 14px;
  min-width: 40px;

  border-radius: 8px;
  border: none;

  background: #e5e7eb;
  color: #333;
  font-weight: 600;

  cursor: pointer;
  white-space: nowrap;      /* prevents overlap text */
}

#pagination button.active {
  background: #0056b3;
  color: white;
}

#pagination button:hover:not(.active) {
  background: #cbd5e1;
}


#results {
  display: block;
  width: 100%;
  clear: both;
}
