@font-face {
  font-family: 'Urdu Emad Nastaliq';
  src: url('/static/fonts/Urdu_Emad_Nastaliq/Urdu_Emad_Nastaliq.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}


body {
  font-family: 'Urdu Emad Nastaliq', serif;
  font-size: 12px;
  text-align: center;
  background-color: #7c7e81;
}

h1 {
  color: blue;
  text-decoration: underline;
  cursor: default;
  display: inline-block; /* To make the underline only as wide as the text */
  padding-bottom: 2px; /* Add some space between text and underline */
}

/* Remove any link styling from h1 if it contains an anchor */
h1 a {
  color: blue;
  text-decoration: none;
  pointer-events: none; /* Disable click events on the anchor */
}

h2.author {
  margin: -15px 0 15px 0;
  font-size: 1em;
  font-weight: normal;
}

h2.author a {
  color: blue;
  text-decoration: none;
}

h2.author a:hover {
  text-decoration: underline;
}

table {
  border-collapse: collapse;
  margin: 20px 0;
}

td {
  border: 1px solid #ddd;
  padding: 10px;
  text-align: center;
}

img {
  max-width: 100%;
  height: auto;
}

.gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.gallery img {
  width: calc(25% - 10px);
  box-sizing: border-box;
}

.blog-posts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0;
}

.blog-posts img {
  width: calc(25% - 10px);
  box-sizing: border-box;
}

.buttons {
  margin: 20px 0;
}

.button {
  display: block;
  color: blue;
  text-decoration: none;
  margin: 5px 0;
}

.button:hover {
  text-decoration: underline;
}

/* Style for I Have Answers title */
h2.answers-title {
  color: blue;
  text-decoration: none;
  margin: 15px 0 5px 0;
  font-size: 1.2em;
  cursor: default;
  display: block;
}

/* Input field styles */
#answer-input {
  min-width: 300px;
  width: 80%;
  max-width: 600px;
  padding: 15px;
  margin: 15px 0;
  border: 1px solid #ccc;
  border-radius: 4px;
  transition: all 0.3s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: 'Urdu Emad Nastaliq', serif;
  font-size: 14px;
  line-height: 1.5;
  box-sizing: border-box;
}

#answer-input.expanded {
  white-space: normal;
  min-height: 80px;
  height: auto;
  max-height: 300px;
  overflow-y: auto;
  text-overflow: clip;
  resize: none;
  padding: 20px;
  background-color: white;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}



.image-container {
  display: inline-block;
  margin: 10px;
  text-align: center;
}

.square-image {
  width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
}

.speech-bubble {
  position: relative;
  background: white;
  border: 2px solid black;
  border-radius: 10px;
  padding: 5px;
  margin-bottom: 5px;
  font-size: 12px;
  z-index: 10;
}

.speech-bubble::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid black;
}

body {
    background-image: url('/static/images/carduck.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.7);
    z-index: -1;
}
#content {
    position: relative;
    z-index: 1;
}
/* Inventions Section */
.inventions-container {
  max-width: 800px;
  margin: 20px auto;
  padding: 20px;
}

.invention {
  background: white;
  padding: 15px;
  margin-bottom: 15px;
  border-radius: 5px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.add-invention {
  max-width: 600px;
  margin: 30px auto;
  padding: 20px;
  background: #f9f9f9;
  border-radius: 5px;
}

.add-invention input,
.add-invention textarea {
  width: 100%;
  margin-bottom: 10px;
  padding: 8px;
}

.add-invention textarea {
  height: 100px;
  resize: vertical;
}

.add-invention button {
  background: #4CAF50;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.add-invention button:hover {
  background: #45a049;
}

.invention button {
  background: #f44336;
  color: white;
  border: none;
  padding: 5px 10px;
  border-radius: 3px;
  cursor: pointer;
  float: right;
}

.invention button:hover {
  background: #d32f2f;
}