/* =================================
   Global & Typography
==================================== */
body {
    font-family: 'Open Sans', sans-serif;
    background-color: #f4f7f6; /* A slightly softer background color */
    color: #333;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.page-title {
    text-align: center;
    font-size: 2.5rem;
    font-family: 'DM Serif Text', serif;
    margin-bottom: 10px;
}

.page-subtitle {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-top: 0;
    margin-bottom: 40px;
}

/* =================================
   Header & Navigation
==================================== */
header {
    background-color: #fff;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header h1 a {
    text-decoration: none;
    color: #333;
    font-family: 'DM Serif Text', serif;
}

nav ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    gap: 10px;
}

nav a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #555;
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    border-radius: 6px;
    transition: background-color 0.2s, color 0.2s;
}

nav a:hover {
    background-color: #f0f0f0;
    color: #000;
}

nav a.active {
    background-color: #0056b3;
    color: #fff;
}


/* =================================
   Homepage: Department Cards
==================================== */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.06);
    padding: 25px 30px;
}

.card-header {
    font-size: 20px;
    color: #232f34;
    margin-bottom: 25px;
    font-weight: 600;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.departments-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 25px;
}

.dept-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 25px 15px;
    text-decoration: none;
    transition: box-shadow 0.2s, transform 0.2s;
    text-align: center;
}

.dept-box:hover {
    box-shadow: 0 6px 24px rgba(40,80,100,0.1);
    transform: translateY(-4px);
}

.icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #fff;
}

/* Department Icon Colors & Emojis */
.civil { background: #a8ce5a; }
.civil::before { content: "👨‍🚒"; }

.electrical { background: #11bba3; }
.electrical::before { content: "🔌"; }

.mechanical { background: #88d2aa; }
.mechanical::before { content: "🤖"; }

.computer { background: #a6c86c; }
.computer::before { content: "💻"; }

.mme { background: #52175a; }
.mme::before { content: "⛏️"; }

.dept-name {
    color: #393e46;
    font-size: 1.1rem;
    font-weight: 600;
}

/* =================================
   Books Page: Search & Book Cards
==================================== */
.search-container {
    position: relative;
    margin: 0 auto 40px auto;
    max-width: 600px;
}

#searchInput {
    width: 100%;
    padding: 15px 20px 15px 50px;
    font-size: 1rem;
    border: 1px solid #ddd;
    border-radius: 30px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: border-color 0.2s, box-shadow 0.2s;
}

#searchInput:focus {
    outline: none;
    border-color: #0056b3;
    box-shadow: 0 4px 12px rgba(0, 86, 179, 0.15);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #aaa;
}

#booksGrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}

.book-card {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
}

.book-card img {
    width: 100%;
    aspect-ratio: 2 / 3;
    object-fit: cover;
}

.book-info {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.book-title {
    font-family: 'Open Sans', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    margin: 0 0 5px 0;
}

.book-author {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.no-results-message {
    text-align: center;
    font-size: 1.2rem;
    color: #888;
    padding: 40px;
}


/* =================================
   Footer
==================================== */
footer {
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    background-color: #e9ecef;
    color: #6c757d;
    font-size: 0.9rem;
}


/* =================================
   Responsive Styles
==================================== */
@media (max-width: 800px) {
    .departments-grid, #booksGrid {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    }
}

@media (max-width: 500px) {
    .departments-grid, #booksGrid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    .page-title {
        font-size: 2rem;
    }
    .header-container {
        flex-direction: column;
        gap: 10px;
    }
}
/* Floating Feedback Button */
#feedbackBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #007bff, #00c6ff);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px; /* pill shape */
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  animation: floatBtn 2s infinite ease-in-out;
}

/* Hover Effect */
#feedbackBtn:hover {
  background: linear-gradient(135deg, #0056d2, #0096d6);
  transform: scale(1.05);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

/* Floating animation */
@keyframes floatBtn {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}
/* ====== FEEDBACK BUTTON ====== */
/* ====== FEEDBACK BUTTON ====== */
#feedbackBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  border: none;
  padding: 14px 28px;
  border-radius: 50px; /* pill shape */
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 8px 16px rgba(0,0,0,0.25);
  transition: all 0.3s ease;
  animation: floatBtn 2s infinite ease-in-out;
}

#feedbackBtn:hover {
  background: linear-gradient(135deg, #007bff, #00c6ff);
  transform: scale(1.05);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
}

@keyframes floatBtn {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* ====== OVERLAY BACKGROUND ====== */
#overlay {
  display: none; /* hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  z-index: 9998;
  animation: fadeInBg 0.3s ease;
}

/* ====== CENTERED POPUP FORM ====== */
/* ====== CENTERED POPUP FORM (BOX STYLE) ====== */
#feedbackPopup {
  display: none; /* hidden by default */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 380px;          /* fixed width */
  max-width: 90%;        /* prevent overflow on small screens */
  background: #fff;
  border-radius: 18px;   /* smooth rounded corners */
  box-shadow: 0 15px 35px rgba(0,0,0,0.25);
  padding: 25px 30px;
  z-index: 9999;
  animation: fadeInUp 0.35s ease;
  font-family: "Segoe UI", Roboto, sans-serif;
}


#feedbackPopup h3 {
  margin: 0 0 15px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
  text-align: center;
}

#feedbackPopup textarea,
#feedbackPopup input {
  width: 100%;
  padding: 12px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: 0.3s;
}

#feedbackPopup textarea:focus,
#feedbackPopup input:focus {
  border-color: #4facfe;
  box-shadow: 0 0 8px rgba(79,172,254,0.5);
}

#feedbackPopup button {
  width: 100%;
  padding: 12px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  background: linear-gradient(135deg, #4facfe, #00f2fe);
  color: white;
  transition: 0.3s;
}

#feedbackPopup button:hover {
  background: linear-gradient(135deg, #007bff, #00c6ff);
  transform: scale(1.03);
}

#closePopup {
  background: #f44336;
}

#closePopup:hover {
  background: #d32f2f;
}

/* Animations */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes fadeInBg {
  from { opacity: 0; }
  to { opacity: 1; }
}

