* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Montserrat", sans-serif;
  line-height: 1.6;
  color: #333;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header Styles */
.header {
  background-color: #272424;
  padding: 10px 0;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header .container {
  max-width: 1200px;
  margin: -20px auto;
  padding: 0 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
}

.logo-image {
  height: 120px;
  margin-top: -5px;
  width: auto;
  object-fit: contain;
}

.navigation {
  display: flex;
  gap: 30px;
  align-items: center;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  padding: 5px 10px;
  position: relative;
  display: inline-block;
}

.nav-link.active {
  color: #cebb9a;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 2px;
  height: 2px;
  background-color: white;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

.donate-btn {
  background-color: #b63621;
  padding: 8px 16px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
}

.donate-btn:hover {
  background-color: white;
  color: #537930;
}

/* Main Content */
.main-content {
  margin-top: 20px;
  background-color: #edeff1;
}

.hero-section {
  background: #537930;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 90px 10px 70px;
  border-radius: 0 0 50% 50% / 0 0 100px 100px;
}

.hero-content {
  text-align: center;
  color: white;
  z-index: 2;
  position: relative;
  max-width: 1000px;
  padding: 80px 10px;
}

.hero-title {
  font-family: "Bebas Neue", sans-serif;
  font-size: 67px;
  font-weight: bold;
  letter-spacing: 8px;
  margin-bottom: 20px;
  line-height: 1.3;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-description {
  font-family: "Montserrat", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.95;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* Services Section */
.services-section {
  padding: 7% 0 80px;
}

.service-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  max-width: 800px;
  margin: 0 auto;
}

.service-card {
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.card-image {
  overflow: hidden;
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.service-card:hover .card-image img {
  transform: scale(1.05);
}

.card-content {
  background-color: #b73621;
  padding: 20px;
  text-align: center;
}

.card-content h3 {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 4px;
  color: white;
  font-size: 20px;
  margin: 0;
}

/* Footer */
.footer {
  font-family: "Bebas Neue", sans-serif;
  letter-spacing: 2px;
  background-color: #272424;
  color: #cebb9a;
  padding: 10px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 80px;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-text {
  text-align: justify;
  flex: 1;
}

.footer-text p {
  margin-bottom: 5px;
  font-size: 14px;
  opacity: 0.8;
}

.social-icons {
  display: flex;
  gap: 15px;
}

.social-icon {
  display: inline-block;
  width: 45px;
  height: 45px;
  color: #cebb9a;
  text-align: center;
  line-height: 35px;
  text-decoration: none;
  font-size: 20px;
  transition: background-color 0.3s ease;
}

.social-icon:hover {
  background-color: #b73621;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header .container {
    flex-direction: column;
    gap: 20px;
  }

  .navigation {
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
  }

  .hero-title {
    font-size: 36px;
  }

  .hero-description {
    font-size: 16px;
  }

  .service-cards {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 28px;
  }

  .nav-link {
    font-size: 12px;
  }

  .navigation {
    gap: 15px;
  }
}

/* ===== HOUSE OF BOOKS ASSISTANT CHATBOT STYLES ===== */

/* Chat Icon */
.chat-icon {
  position: fixed;
  bottom: 24px;
  right: 24px; /* Changed from left: 24px */
  width: 50px;
  height: 50px;
  background: #b73621;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(183, 54, 33, 0.3);
  transition: all 0.3s ease;
  z-index: 1100;
  border: none;
}

.chat-icon:hover {
  transform: scale(1.1);
  box-shadow: 0 12px 30px rgba(183, 54, 33, 0.4);
}

.chat-icon i {
  font-size: 20px;
  color: white;
}

/* Chat Box */
.chat-box {
  position: fixed;
  bottom: 85px;
  right: 24px; /* Changed from left: 24px */
  width: 340px;
  max-width: calc(100vw - 48px);
  background: white;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
  z-index: 1050;
  transform: translateY(20px) scale(0.95);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.chat-box.active {
  transform: translateY(0) scale(1);
  opacity: 1;
  visibility: visible;
}

/* Chat Header */
.chat-header {
  background: linear-gradient(135deg, #b73621, #8f2a1a);
  color: white;
  padding: 12px 14px;
  border-radius: 10px 10px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 2px;
  font-family: "Montserrat", sans-serif;
}

.chat-header p {
  font-size: 12px;
  opacity: 0.9;
  font-family: "Montserrat", sans-serif;
}

.close-btn {
  background: none;
  border: none;
  color: white;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.close-btn:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.close-btn i {
  font-size: 14px;
}

/* Chat Content */
.chat-content {
  height: 200px;
  overflow-y: auto;
  background: #f9fafb;
  padding: 14px;
}

.welcome-message {
  background: white;
  padding: 12px;
  border-radius: 8px;
  margin-bottom: 16px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.welcome-message p {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
  font-family: "Montserrat", sans-serif;
}

.questions-label {
  font-size: 11px;
  color: #6b7280;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
  padding-left: 4px;
  font-family: "Montserrat", sans-serif;
}

.question-btn {
  width: 100%;
  text-align: left;
  padding: 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 13px;
  color: #374151;
  font-family: "Montserrat", sans-serif;
}

.question-btn:hover {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b73621;
}

/* Chat Messages */
.chat-messages {
  height: 200px;
  overflow-y: auto;
  background: #f9fafb;
  padding: 14px;
}

.back-btn {
  background: none;
  border: none;
  color: #b73621;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 12px;
  padding: 4px 0;
  font-family: "Montserrat", sans-serif;
}

.back-btn:hover {
  color: #8f2a1a;
}

#messagesContainer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.message {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
  font-family: "Montserrat", sans-serif;
}

.message.user {
  background: #b73621;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.message.bot {
  background: white;
  color: #374151;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.typing-indicator {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 10px 14px;
  background: white;
  border-radius: 12px;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.typing-dot {
  width: 6px;
  height: 6px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.typing-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%,
  60%,
  100% {
    transform: translateY(0);
  }
  30% {
    transform: translateY(-10px);
  }
}

/* Chat Input */
.chat-input {
  padding: 10px 14px;
  background: white;
  border-top: 1px solid #e5e7eb;
  display: flex;
  gap: 8px;
  align-items: center;
}

#messageInput {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid #d1d5db;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: "Montserrat", sans-serif;
}

#messageInput:focus {
  border-color: #b73621;
}

.send-btn {
  width: 36px;
  height: 36px;
  background: #b73621;
  border: none;
  border-radius: 50%;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.send-btn:hover {
  background: #8f2a1a;
}

.send-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.send-btn i {
  font-size: 14px;
}

/* Chat Footer */
.chat-footer {
  padding: 8px 14px;
  background: white;
  border-top: 1px solid #e5e7eb;
  border-radius: 0 0 10px 10px;
}

.footer-info {
  background: #f3f4f6;
  padding: 8px 12px;
  border-radius: 15px;
  font-size: 11px;
  color: #6b7280;
  text-align: center;
  font-family: "Montserrat", sans-serif;
}

/* Responsive adjustments for chatbot */
@media (max-width: 480px) {
  .chat-box {
    width: calc(100vw - 32px);
    right: 16px; /* Changed from left: 16px */
    bottom: 75px;
  }

  .chat-icon {
    right: 16px; /* Changed from left: 16px */
    bottom: 16px;
    width: 45px;
    height: 45px;
  }

  .chat-icon i {
    font-size: 18px;
  }
}

@media (max-width: 480px) {
  .header .container {
    padding: 10px;
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-image {
    height: 80px;
    margin-top: 0;
  }

  .navigation {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
  }

  .nav-link {
    padding: 8px 0;
    display: block;
    width: 100%;
    font-size: 14px;
  }

  .donate-btn {
    width: 100%;
    text-align: center;
  }

  .hero-content {
    padding: 50px 10px;
  }

  .hero-description {
    font-size: 14px;
  }

  .service-cards {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 0 10px;
  }

  .footer-content {
    padding: 10px;
    gap: 30px;
  }

  .footer-text p {
    font-size: 12px;
  }

  .social-icon {
    width: 36px;
    height: 36px;
    font-size: 16px;
    line-height: 28px;
  }
}

@media (max-width: 768px) {
.burger {
  display: block;
  background: none;
  border: none;
  font-size: 24px;
  color: white;
  cursor: pointer;
  z-index: 1001;
  margin-left: auto;         /* push to the right */
  margin-right: 10px;
  position: relative;
  top: 10px;                 /* slight vertical spacing */
}

  .navigation {
    display: none;
    flex-direction: column;
    background-color: #222;
    position: absolute;
    top: 70px; /* Adjust based on header height */
    right: 0;
    width: 100%;
    padding: 10px 20px;
    z-index: 1000;
    padding-top: 60px; /* shift menu down so it doesn't start right under the icon */
  }

  .navigation.show {
    display: flex;
  }

  .nav-link,
  .dropbtn {
    padding: 10px 0;
    font-size: 14px;
    color: #fff;
    text-align: left;
  }

  .dropdown-content {
    position: static;
    background: #333;
  }

  .dropdown-content a {
    font-size: 13px;
    padding: 5px 10px;
  }
}
