/* =========================================
   JOURNALS PAGE - GLOBAL LAYOUT
========================================= */
main {
  background: #f7faff;
  padding: 40px 0;
}

.container {
  display: flex;
  gap: 25px;
  align-items: flex-start;
  width: 95%;
  max-width: 1200px;
  margin: 0 auto;
}

/* =========================================
   SIDEBAR
========================================= */
.sidebar {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  width: 250px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.sidebar h3 {
  color: #013c74;
  margin-bottom: 15px;
  text-align: center;
  font-weight: 600;
  border-bottom: 2px solid #e6f0ff;
  padding-bottom: 8px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
}

.sidebar li {
  background: #f3f8fc;
  color: #013c74;
  padding: 10px;
  margin-bottom: 8px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
  border: 1px solid transparent;
}

.sidebar li:hover {
  background: #013c74;
  color: #ffd700;
}

.sidebar li.active {
  background: #0254a2;
  color: #fff;
  font-weight: 600;
  border: 1px solid #013c74;
  box-shadow: 0 2px 6px rgba(1, 60, 116, 0.3);
}

/* =========================================
   MAIN CONTENT
========================================= */
.main {
  flex: 1;
  background: #fff;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.main h2 {
  color: #013c74;
  margin-bottom: 25px;
  font-weight: 600;
  border-bottom: 2px solid #e6f0ff;
  padding-bottom: 10px;
}

/* =========================================
   JOURNAL CARDS
========================================= */
.journal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
}

.journal-card {
  background: #f8fbff;
  border: 1px solid #dbe6f3;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: 0 3px 8px rgba(1, 60, 116, 0.05);
}

.journal-card:hover {
  transform: translateY(-4px);
  background: #ffffff;
  box-shadow: 0 5px 14px rgba(1, 60, 116, 0.1);
}

.journal-card h4 {
  color: #013c74;
  margin-bottom: 10px;
  font-size: 1.1em;
  font-weight: 600;
}

.journal-card p {
  font-size: 0.9em;
  color: #444;
  margin: 4px 0;
}

.journal-card button {
  margin-top: 12px;
  padding: 8px 16px;
  border: none;
  background: #ffd700;
  color: #013c74;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.journal-card button:hover {
  background: #013c74;
  color: #fff;
}

/* Hide empty sections */
.journal-list.hidden {
  display: none;
}

.journal-list:empty::before {
  content: "No journals available in this category.";
  display: block;
  text-align: center;
  color: #999;
  font-style: italic;
  grid-column: 1 / -1;
}

/* =========================================
   MODAL (SUBMIT PAPER FORM)
========================================= */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(3px);
  z-index: 5000;
  justify-content: center;
  align-items: center;
  padding: 30px 15px;
}

.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 35px 40px;
  max-width: 600px;
  width: 100%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  position: relative;
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Close button */
.close-btn {
  position: absolute;
  right: 20px;
  top: 15px;
  font-size: 26px;
  font-weight: bold;
  color: #333;
  cursor: pointer;
  transition: 0.2s ease;
}

.close-btn:hover {
  color: #013c74;
}

/* =========================================
   FORM STYLING
========================================= */
#paperForm {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

#paperForm label {
  font-weight: 600;
  color: #013c74;
  font-size: 0.95em;
  margin-bottom: 4px;
}

#paperForm input,
#paperForm textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccd8e6;
  border-radius: 6px;
  font-size: 0.95em;
  outline: none;
  background: #f8fbff;
  transition: all 0.3s ease;
}

#paperForm input:focus,
#paperForm textarea:focus {
  border-color: #013c74;
  box-shadow: 0 0 4px rgba(1, 60, 116, 0.25);
  background: #fff;
}

/* Two-column layout */
#paperForm .form-row {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

#paperForm .form-row > div {
  flex: 1;
  min-width: 240px;
}

/* File input */
#paperForm input[type="file"] {
  padding: 8px;
  border: 1px dashed #cfd8e6;
  background: #f9fcff;
  border-radius: 6px;
}

/* Submit button */
#paperForm button {
  align-self: center;
  width: 50%;
  background: #ffd700;
  color: #013c74;
  border: none;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
}

#paperForm button:hover {
  background: #013c74;
  color: #fff;
}

/* =========================================
   RESPONSIVE DESIGN
========================================= */
@media (max-width: 992px) {
  .container {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
  }

  .journal-list {
    grid-template-columns: 1fr 1fr;
  }

  #paperForm .form-row {
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .journal-list {
    grid-template-columns: 1fr;
  }

  .modal-content {
    padding: 25px;
  }

  #paperForm button {
    width: 100%;
  }

  #paperForm input,
  #paperForm textarea {
    font-size: 0.9em;
  }
}
