:root {
  --transparent-yellow: #F5EFC6;
  --sceptre-red: #4D0E12;
  --cerulean-blue: #A5BCD6;
  --potting-soil: #4A2E27;
  --java-brown: #231815;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: #f0f4f8;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--java-brown);
}

/* HEADER */
#mainHeader {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid #e5e5e5;
  transition: box-shadow 0.3s ease;
}

.nav-container {
  max-width: 1200px;
  margin: auto;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between; /* Pushes Logo to left and nav to right */
  gap: 25px;
}

.logo-area {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 55px;
  height: 55px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.logo-text h1 {
  font-size: 20px;
  font-weight: 800;
  color: #231815;
  line-height: 1.2;
}

.logo-text p {
  font-size: 11px;
  color: #666;
  margin-top: 4px;
}

/* NAVIGATION (Pushed to the right) */
nav {
  margin-left: auto; /* Pushes the navigation block to the right */
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  text-decoration: none;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 600;
  color: #231815;
}

.nav-link {
  position: relative;
  padding: 10px 0;
}

.nav-link.active::after,
.nav-link:hover::after {
  content: "";
  position: absolute;
  height: 2px;
  background: #231815;
  left: 0;
  right: 0;
  bottom: 3px;
}

/* SIGN UP AND LOG IN BUTTONS */
.btn-signin,
.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 20px;
  border: 1px solid #777;
  border-radius: 30px;
  background: transparent;
  transition: 0.3s ease;
}

.btn-signin:hover,
.btn-login:hover {
  background: #231815;
  color: #fff;
}

/* GET STARTED BUTTON */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: 30px;
  background: var(--sceptre-red);
  border: 1px solid var(--sceptre-red);
  color: #fff !important;
  transition: 0.3s ease;
  font-family: inherit;
  font-weight: 700;
  cursor: pointer;
}

.btn-primary:hover {
  background: #333;
  border-color: #333;
  transform: translateY(-2px);
}

/* MOBILE MENU */
.menu-toggle {
  display: none;
}

.page {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

#detailsView {
  justify-content: center;
  padding: 40px 20px;
}

.details-container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.category-tag {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--sceptre-red);
}

.page-title {
  font-size: 2rem;
  font-weight: 700;
  margin-top: 6px;
  margin-bottom: 24px;
}

/* Search Input */
.search-wrapper {
  margin-bottom: 20px;
}

.search-wrapper input {
  width: 100%;
  padding: 14px 20px;
  border-radius: 16px;
  border: 1px solid rgba(165, 188, 214, 0.8);
  font-family: inherit;
  font-size: 0.95rem;
  outline: none;
  background: #ffffff;
}

.search-wrapper input:focus {
  border-color: var(--sceptre-red);
}

/* Filter Bar */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.filter-btn {
  background: #ffffff;
  border: 1px solid rgba(165, 188, 214, 0.5);
  padding: 10px 20px;
  border-radius: 20px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--potting-soil);
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  background: rgba(245, 239, 198, 0.5);
}

.filter-btn.active {
  background: var(--sceptre-red);
  color: #ffffff;
  border-color: var(--sceptre-red);
}

/* Resource Grid */
.resources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.item-card {
  background: linear-gradient(135deg, rgba(245, 239, 198, 0.3) 0%, rgba(165, 188, 214, 0.2) 100%), #ffffff;
  border: 1px solid rgba(165, 188, 214, 0.5);
  border-radius: 20px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.item-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(35, 24, 21, 0.06);
}

.item-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--sceptre-red);
  background: var(--transparent-yellow);
  padding: 4px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.item-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--java-brown);
  margin-bottom: 8px;
}

.item-desc {
  font-size: 0.88rem;
  color: var(--potting-soil);
  line-height: 1.5;
  margin-bottom: 20px;
}

.item-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--sceptre-red);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  transition: gap 0.2s ease, color 0.2s ease;
}

.item-btn:hover {
  gap: 10px;
  color: var(--java-brown);
}

.item-btn svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2.5;
  fill: none;
}

/* Modal Workspace */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(35, 24, 21, 0.5);
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 100;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background: #ffffff;
  width: 100%;
  max-width: 800px;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.modal-header h3 {
  font-size: 1.3rem;
  color: var(--java-brown);
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  color: var(--potting-soil);
}

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

.input-side, .output-side {
  display: flex;
  flex-direction: column;
}

label {
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--potting-soil);
}

textarea {
  width: 100%;
  height: 220px;
  border-radius: 12px;
  border: 1px solid rgba(165, 188, 214, 0.8);
  padding: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  resize: vertical;
  background: rgba(245, 239, 198, 0.15);
  outline: none;
}

textarea:focus {
  border-color: var(--sceptre-red);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  justify-content: flex-end;
}

.btn-secondary {
  background: var(--transparent-yellow);
  color: var(--java-brown);
  border: 1px solid rgba(165, 188, 214, 0.6);
  padding: 10px 16px;
  border-radius: 12px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
}

.results-box {
  height: 220px;
  overflow-y: auto;
  border-radius: 12px;
  border: 1px solid rgba(165, 188, 214, 0.6);
  background: linear-gradient(135deg, rgba(245, 239, 198, 0.2) 0%, rgba(165, 188, 214, 0.15) 100%);
  padding: 14px;
}

.empty-msg {
  color: var(--potting-soil);
  opacity: 0.7;
  font-size: 0.85rem;
  text-align: center;
  margin-top: 60px;
}

.summary-block h4 {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--sceptre-red);
  margin-bottom: 6px;
  text-transform: uppercase;
}

.summary-block ul {
  padding-left: 18px;
  font-size: 0.85rem;
  color: var(--potting-soil);
  line-height: 1.5;
  margin-bottom: 12px;
}