/* ========= BASE DESIGN ========= */
:root {
  /* Fallback colors (in case theme fails to load) */
  --primary: #00693e;
  --accent: #004d2b;
  --accent-hover: #00361e;
  --bg: #f7f9fb;
  --text: #222;
  --card: #ffffff;
  --panel: #ffffff;
  --border: #ddd;
  --shadow: rgba(0, 0, 0, 0.06);
}




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


body {
  font-family: 'Poppins', sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}


/* ========= HEADER ========= */
.site-header {
  background: var(--primary);
  color: white;
  padding: 7px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 10px 20px rgba(0,0,0,0.65);
}


.site-header .logo-area {
  display: flex;
  align-items: center;
  gap: 7px;
}


.site-header .logo-area img {
  height: 45px;
  border-radius: 50%;
  background: white;
  padding: 5px;
  cursor: pointer;
}


.site-header h1 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: 0.5px;
}


.site-header nav {
  display: flex;
  align-items: center;
  gap: 16px;
}


.site-header nav button {
  background: white;
  color: var(--primary);
  border: 2px solid white;
  border-radius: 8px;
  padding: 7px 16px;
  font-weight: 600;
  cursor: pointer;
  transition: 0.25s;
}


.site-header nav button:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}


/* ========= CONTAINER ========= */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 50px auto;
}


/* ========= SEARCH BAR ========= */
.search-panel {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 30px;
}


.search-panel input {
  flex: 1 1 400px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  font-size: 15px;
}


.search-panel button {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s;
}


.search-panel button:hover {
  background-color: var(--accent);
}


/* ========= SUBJECT CARDS ========= */
.results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}


.card {
  background: var(--card);
  border-radius: 14px;
  box-shadow: 0 4px 20px var(--shadow);
  padding: 20px;
  transition: 0.3s;
}


.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 25px rgba(0,0,0,0.1);
}


.card h3 {
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 6px;
}


.card p {
  color: #444;
  font-size: 14px;
  margin-bottom: 15px;
}


.card button {
  margin-right: 8px;
  background-color: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 14px;
  font-weight: 500;
  cursor: pointer;
  transition: 0.25s;
}


.card button:hover {
  background-color: var(--accent);
}


/* ========= FOOTER ========= */
.footer {
  text-align: center;
  padding: 25px 0;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid #ddd;
  font-size: 0.9rem;
  color: #555;
}


/* ========= AUTH MODAL ========= */
.modal {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: rgba(0, 0, 0, 0.5);
  z-index: 50;
}
.modal.hidden {
  display: none;
}
.modal-inner {
  width: 380px;
  max-width: 90%;
  background: #fff;
  border-radius: 16px;
  padding: 25px 28px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
  position: relative;
  font-family: "Inter", system-ui, sans-serif;
}
#modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  font-size: 20px;
  color: #555;
  cursor: pointer;
}
.auth-modal h2 {
  color: var(--primary);
  text-align: center;
  font-size: 22px;
  margin-bottom: 4px;
  font-weight: 700;
}
.auth-sub {
  text-align: center;
  color: #555;
  font-size: 14px;
  margin-bottom: 22px;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-form label {
  display: flex;
  flex-direction: column;
  font-size: 14px;
  color: #333;
}
.auth-form input {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  background: #f4f8ff;
  font-size: 15px;
}
.auth-form input:focus {
  outline: 2px solid var(--primary);
  border-color: var(--primary);
}
.check-line {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #555;
}
.auth-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: 0.2s;
}
.auth-btn:hover {
  background: var(--accent);
}
.auth-footer {
  text-align: center;
  font-size: 14px;
  color: #555;
  margin-top: 12px;
}
.auth-footer a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}


/* ========= ANIMATION ========= */
.fade-in {
  opacity: 0;
  animation: fadeIn 0.6s forwards;
}
@keyframes fadeIn {
  to {
    opacity: 1;
  }
}


/* ========= SUBJECT PAGE ========= */
.subject-page {
  display: flex;
  flex-direction: column;
  gap: 30px;
  margin-top: 40px;
}


.subject-card {
  text-align: center;
  padding: 25px;
}


.subject-card h2 {
  color: var(--primary);
  font-size: 1.8rem;
  margin-bottom: 8px;
}


.subject-card p {
  font-size: 1rem;
  color: #444;
}


/* Layout for upload + notes */
.subject-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 25px;
}


.upload-panel, .notes-panel {
  padding: 20px;
}


.upload-panel h2, .notes-panel h2 {
  font-size: 1.4rem;
  color: var(--primary);
  margin-bottom: 15px;
}


.upload-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}


.upload-form input[type="file"] {
  flex: 1;
}


.upload-form input[type="text"] {
  flex: 2;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
}


.upload-form button {
  background-color: var(--primary);
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}


.upload-form button:hover {
  background-color: var(--accent);
}


/* Notes list styling */
.notes-list .note-item {
  background: #fff;
  padding: 14px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 12px;
}


.notes-list .note-item a {
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
}


.notes-list .note-item small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  color: #777;
}


/* Back home button */
.back-home-btn {
  background: white;
  color: var(--primary);
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: 0.25s;
}


.back-home-btn:hover {
  background: var(--accent);
  color: #fff;
}


/* ========= SCHOOL SELECTION PAGE ========= */
.school-container {
  background: white;
  padding: 60px 70px;
  border-radius: 25px;
  box-shadow: 0 10px 50px rgba(0,0,0,0.08);
  text-align: center;
  max-width: 600px;
  width: 100%;
  animation: fadeIn 0.6s ease-in-out;
}


.school-container h1 {
  font-size: 26px;
  color: #1f1f1f;
  margin-bottom: 10px;
  font-weight: 500;         /* less bold than before */
  letter-spacing: 0.5px;
}


.school-container p {
  font-size: 17px;
  color: #444;
  margin-bottom: 35px;
  line-height: 1.4;
}


.school-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}


.school-btn {
  border: none;
  border-radius: 12px;
  font-size: 18px;
  color: white;
  cursor: pointer;
  padding: 18px;
  transition: 0.25s ease;
  font-weight: 500;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  background-image: linear-gradient(to bottom, rgba(255,255,255,0.08), rgba(0,0,0,0.08));
  background-blend-mode: overlay;
}


.school-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}


/* Button colors */
.school-btn.dlsu { background: #00703c; }
.school-btn.at


#subjects-list {
  transition: opacity 0.3s ease;
}


#subjects-list.hidden {
  opacity: 0;
}


#prof-list {
  transition: opacity 0.3s ease;
}


#prof-list.fade-out {
  opacity: 0;
}


/* Fix professor photo size inside cards */
.prof-photo {
  width: 80px;         /* 👈 small thumbnail */
  height: 80px;        /* keep it square */
  object-fit: cover;   /* crop perfectly */
  border-radius: 10px; /* rounded corners */
  display: block;
  margin: 0 auto 10px auto; /* center + spacing below */
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}


/* ===== Change School Button (Base Style) ===== */
.change-school-btn {
  background: transparent;
  border: none;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  margin-left: 16px;
  cursor: pointer;
  transition: color 0.3s ease, background 0.2s ease;
}


/* ===== Theme-based Colors ===== */
body.dlsu .change-school-btn {
  color: #00703C; /* DLSU green */
}


body.ateneo .change-school-btn {
  color: #0033A0; /* Ateneo blue */
}


body.benilde .change-school-btn {
  color: #006241; /* Benilde green */
}


body.up .change-school-btn {
  color: #7B1113; /* UP maroon */
}


/* ===== Optional Hover ===== */
.change-school-btn:hover {
  text-decoration: underline;
  opacity: 0.9;
}


/* ========= MOBILE HEADER ========= */
@media (max-width: 768px) {
  /* Keep everything inside the header tight and centered */
  .site-header {
    flex-direction: column; /* stack logo/title and nav vertically */
    align-items: center;
    justify-content: center;
    padding: 6px 15px; /* smaller padding for compact height */
    gap: 4px; /* minimal spacing between rows */
  }


  /* Tighten logo + text area */
  .site-header .logo-area {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px; /* reduce space between logo and text */
  }


  .site-header .logo-area img {
    height: 38px; /* smaller logo */
    padding: 3px;
  }


  .site-header h1 {
    font-size: 1rem; /* smaller font for mobile */
  }


  /* Make nav buttons smaller to save space */
  .site-header nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
  }


  .site-header nav button {
    padding: 5px 10px;
    font-size: 0.9rem;
  }


  /* Adjust header search bar on mobile */
  .site-header .header-search {
    width: 100%;
    margin: 5px 0 0 0;
  }


  .site-header .header-search input {
    width: 100%;
    font-size: 13px;
    padding: 6px 10px;
    height: 34px; /* smaller height */
    line-height: 34px;
  }
}




/* ========= MOBILE SEARCH PANEL ========= */
@media (max-width: 600px) {
  .search-panel {
    flex-direction: column; /* stack vertically */
    gap: 8px;
    margin-bottom: 25px;
  }


  .search-panel input {
    flex: 1;
    padding: 6px 10px; /* reduce height */
    font-size: 0.85rem;
    height: 36px;
    line-height: 36px;
    border-radius: 8px;
  }


  .search-panel button {
    padding: 6px 10px;
    font-size: 0.85rem;
  }
}




/* ========= OTHER MOBILE RESPONSIVE SECTIONS ========= */
@media (max-width: 600px) {
  .card {
    padding: 15px;
    font-size: 0.95rem;
  }


  .card button {
    width: 100%;
    margin-top: 5px;
  }
}


@media (max-width: 768px) {
  .subject-content {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 600px) {
  .star-rating {
    font-size: 22px;
    justify-content: center;
  }


  #prof-details .prof-photo {
    width: 100px;
    margin: 0 auto;
  }


  #comment {
    width: 100%;
    font-size: 0.9rem;
  }
}


@media (max-width: 600px) {
  .footer {
    font-size: 0.8rem;
    padding: 15px 5px;
  }
}




/* ========= HEADER SEARCH BAR (ISOLATED STYLING) ========= */
.site-header .header-search {
  display: flex;
  align-items: center;
  flex: 1;
  justify-content: flex-start;
  margin: 0 15px;
  width: 100%;
  max-width: 600px;
}


.site-header .header-search input {
  flex: 1;
  width: 100%;
  padding: 10px 16px;
  border-radius: 25px;
  border: 1px solid var(--border);
  background: #fff;
  font-size: 15px;
  color: #222;
  transition: border-color 0.25s, box-shadow 0.25s;
}


.site-header .header-search input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 6px rgba(0, 105, 62, 0.3);
  outline: none;
}


/* Optional: make it full width next to logo */
@media (min-width: 900px) {
  .site-header .header-search {
    margin-left: 20px;
    margin-right: 40px;
  }
  .site-header .header-search input {
    max-width: none;
  }
}


.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #fff; /* clean white background */
  color: #000; /* ensure readable text */
  border: 1px solid #ccc;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  display: none;
  z-index: 9999;
  max-height: 250px;
  overflow-y: auto;
  font-family: inherit;
}




.suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: #ffffff; /* white background */
  color: #000000; /* black text */
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: none;
  z-index: 9999;
  max-height: 250px;
  overflow-y: auto;
  font-family: inherit;
}


.suggestion-item {
  padding: 10px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #000000; /* ensure visible black text */
  transition: background 0.2s ease;
}


.suggestion-item:hover {
  background: #f5f5f5; /* light gray on hover */
}

.school-logo {
  background: transparent;
  transition: opacity 0.2s ease-in;
  opacity: 0;
}
.school-logo[src] {
  opacity: 1;
}





