/* The CSS file remains unchanged as it was already well-structured */
.contact-icons a:hover,
.logo,
.navbar a,
.project-details h2,
.project-details p,
.seemore:hover,
body {
  color: var(--text-color);
}

#thank-you-popup,
.heading,
.review-card h1,
footer {
  text-align: center;
}

.about,
.header,
.home,
.home-content,
.project,
.review {
  display: flex;
}

.header,
footer {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

#mainlogo,
.logo span {
  text-shadow: 0 0 25px var(---main-color);
}

.logo,
.navbar a {
  transition: .3s;
}

#mainlogo,
#menu-icon,
.contact-icons a,
.logo span,
.navbar a.active,
.navbar a:hover,
.seemore,
span {
  color: var(---main-color);
}

.header,
.work {
  padding: 4rem 12%;
}

p {
  font-size: 150%;
  margin-bottom: 15px;
}

#content,
#thank-you-popup {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.btn,
.home-img img,
.logo,
.seemore:hover {
  cursor: pointer;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  text-decoration: none;
  border: none;
  outline: 0;
  scroll-behavior: smooth;
  font-family: Poppins, sans-serif;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

:root {
  --bg-color: #080808;
  --second-color: #131313;
  --text-color: white;
  ---main-color: #e62222;
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-thumb {
  background-color: var(---main-color);
}

::-webkit-scrollbar-track {
  background-color: var(--bg-color);
  width: 50px;
}

html {
  font-size: 60%;
  overflow-x: hidden;
}

body {
  background: var(--bg-color);
}

.cert {
  padding: 20px;
}

.view-cert {
  color: var(---main-color);
  text-decoration: underline;
  cursor: pointer;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: auto;
  display: block;
  max-width: 100vw;
  max-height: 100vh;
}

.close {
  position: absolute;
  top: 20px;
  right: 35px;
  color: var(---main-color);
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 10vh;
  justify-content: space-between;
  align-items: center;
  z-index: 5;
}

footer {
  padding: 10px;
  margin-top: 20px;
}

footer h4 {
  margin: 5px 0;
  font-size: 2rem;
}

footer p {
  margin: 5px 0;
  font-size: .9rem;
}

#thank-you-popup {
  display: none;
  background-color: #000;
  color: red;
  border: 2px solid red;
  border-radius: 10px;
  padding: 20px;
  z-index: 1000;
  font-size: 16px;
}

#mainlogo,
.home-img img,
.text-animation span {
  position: relative;
}

.logo {
  font-size: 3rem;
  font-weight: 800;
}

.logo:hover {
  transform: scale(1.1);
}

#mainlogo {
  font-size: 4.5rem;
  top: .9rem;
}

form[name="contact"] {
  background-color: var(--bg-color);
  border: 2px solid var(---main-color);
  border-radius: 3rem;
  padding: 20px;
  max-width: 80vw;
  margin: 0 auto;
}

::placeholder {
  color: #fff;
}

form[name="contact"] input[type="email"],
form[name="contact"] input[type="text"],
form[name="contact"] textarea {
  display: block;
  width: 100%;
  margin-bottom: 15px;
  padding: 10px;
  background-color: var(--bg-color);
  border: 1px solid var(---main-color);
  border-radius: 5px;
  font-size: 16px;
  color: #fff;
}

form[name="contact"] textarea {
  min-height: 200px;
  color: #fff;
}

form[name="contact"] button[type="submit"] {
  display: block;
  width: 100%;
  padding: 10px;
  background-color: var(--bg-color);
  border: 2px solid var(---main-color);
  color: var(---main-color);
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
}

form[name="contact"] button[type="submit"]:hover {
  background-color: var(---main-color);
  color: #fff;
}

.navbar a {
  font-size: 1.8rem;
  margin-left: 4rem;
  font-weight: 500;
  border-bottom: 3px solid transparent;
}

.navbar a.active,
.navbar a:hover {
  border-bottom: 3px solid var(---main-color);
}

#menu-icon {
  font-size: 3.6rem;
  display: none;
}

section {
  min-height: 100vh;
  padding: 10rem 12%;
}

.heading {
  font-size: 8rem;
  margin: 5rem 0;
}

.certificate {
  align-items: center;
}

.certificate img {
  width: 25%;
  height: auto;
  border-radius: 8px;
  margin-right: 6rem;
}

.cert-details {
  width: 75%;
}

.project,
.review {
  margin-bottom: 3rem;
}

#content,
.review-card {
  background-color: var(--second-color);
  text-align: center;
  padding: 20px;
}

.project {
  align-items: center;
}

.project img {
  width: 30%;
  height: auto;
  border-radius: 8px;
  margin-right: 6rem;
}

.project .cert_logo {
  width: 25%;
  height: auto;
  border-radius: 8px;
  margin-right: 6rem;
}

.project-details {
  width: 70%;
}

.review {
  overflow-x: auto;
  gap: 2rem;
}

.review-card {
  flex: 1 1 calc(33.333% - 2rem);
  max-width: calc(33.333% - 2rem);
  border-radius: 20px;
  border: 3px solid;
  border-color: var(---main-color);
  font-size: 190%;
  margin: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 300px;
}

.seemore,
.seemore:hover {
  background-color: transparent;
}

.review-card h1 {
  font-size: 170%;
  margin-bottom: 5%;
}

.review-card p {
  position: relative;
  font-size: 110%;
  line-height: 1.5;
  margin-bottom: 10px;
  max-height: 8.5em; /* Increased height to fit more text */
  overflow: hidden;
}

/* Style for truncated paragraphs */
.review-card p.truncated {
  position: relative;
  padding-bottom: 35px; /* Increased space for the See More button */
}

.btn:hover,
.contact-icons a:hover {
  background-color: var(---main-color);
}

#content {
  width: 50vw;
  border-radius: 20px;
  border: 3px solid;
  border-color: var(---main-color);
  z-index: 100;
}

#content h1 {
  font-size: 280%;
}

#content p {
  font-size: 250%;
}

.rating-container {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding-top: 15px;
}

.rating-container .ratings {
  margin-top: 5px;
}

#star {
  color: gold;
  font-size: 30px;
}

.project-details h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.project-details p {
  font-size: 1.6rem;
  line-height: 1.8;
}

.home {
  align-items: center;
  justify-content: center;
  gap: 15rem;
}

.home-content {
  flex-direction: column;
  align-items: baseline;
  text-align: left;
  justify-content: center;
  margin-top: 3rem;
}

.about {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.about-content {
  max-width: 100vw;
  margin-top: 2rem;
}

.about-content p {
  font-size: 2rem;
  font-weight: 500;
  line-height: 1.8;
  max-width: 1000px;
  margin-top: 3rem;
}

.about-content h3 {
  font-size: 4rem;
  font-weight: 700;
  margin-top: 3rem;
  line-height: 1;
}

.home-content h3 {
  margin-bottom: 2rem;
  margin-top: 1rem;
  font-size: 3.5rem;
}

.home-content h1 {
  font-size: 7rem;
  font-weight: 700;
  margin-top: 1.5rem;
  line-height: 1;
}

.home-img {
  border-radius: 10%;
}

.home-img img {
  top: 3rem;
  width: 32vw;
  transition: .4s ease-in-out;
}

.btn,
.contact-icons a {
  background: 0 0;
  transition: .3s ease-in-out;
}

.home-content p {
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.8;
  max-width: 1000px;
}

.contact-icons a {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  width: 4.5rem;
  height: 4.5rem;
  border: 2px solid var(---main-color);
  font-size: 2.5rem;
  border-radius: 50%;
  margin: 3rem 1.5rem 3rem 0;
}

.contact-icons a:hover {
  transform: scale(1.3) translate(-5px);
  box-shadow: 0 0 25px var(---main-color);
}

.btn {
  display: inline-block;
  padding: 1rem 2.8rem;
  border: 2px solid var(---main-color);
  border-radius: 4rem;
  font-size: 1.6rem;
  color: var(---main-color);
  letter-spacing: .1rem;
  font-weight: 600;
}

.btn:hover {
  transform: scale(1.05);
  color: #000;
  box-shadow: 0 0 50px var(---main-color);
}

.text-animation {
  font-size: 34px;
  font-weight: 600;
  min-width: 280px;
}

.text-animation span::before {
  content: "Programmer";
  color: var(---main-color);
  animation: 20s infinite words;
}

.text-animation span::after {
  content: "";
  background-color: var(--bg-color);
  position: absolute;
  width: calc(100% + 8px);
  height: 100%;
  border-left: 3px solid var(--bg-color);
  right: -8px;
  animation: .6s infinite cursor, 20s steps(14) infinite typing;
}

@keyframes cursor {
  to {
    border-left: 2px solid var(---main-color);
  }
}

@keyframes words {
  0%,
  20% {
    content: "Programmer";
  }
  21%,
  40% {
    content: "Web Developer";
  }
  41%,
  60% {
    content: "Web Designer";
  }
  61%,
  80% {
    content: "Arduino Developer";
  }
  100%,
  81% {
    content: "Chatbot Developer";
  }
}

@keyframes typing {
  10%,
  15%,
  30%,
  35%,
  50%,
  55%,
  70%,
  75%,
  90%,
  95% {
    width: 0;
  }
  20%,
  25%,
  40%,
  45%,
  5%,
  60%,
  65%,
  80%,
  85% {
    width: calc(100% + 8px);
  }
}

@media (max-width: 1285px) {
  html {
    font-size: 55%;
  }
}

@media (max-width: 991px) {
  header {
    padding: 2rem 3%;
  }
  section {
    padding: 10rem 3% 2rem;
  }
}

@media (max-width: 768px) {
  #mainlogo,
  .logo span {
    text-shadow: 0 0 25px var(---main-color);
  }
  .project {
    flex-direction: column;
  }
  .project img {
    width: 100%;
    margin-right: 0;
    margin-bottom: 1.5rem;
  }

  .project .cert_logo {
    width: 50%;
    margin-right: 0;
    margin-bottom: 1.5rem;
  }

  .project-details {
    width: 100%;
    text-align: justify;
  }
  .project-details h2 {
    width: 100%;
    text-align: center;
  }
  .logo {
    font-size: 2.5rem;
    color: var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: .3s;
  }
  #mainlogo {
    color: var(---main-color);
    font-size: 3.5rem;
    position: relative;
    top: .9rem;
  }
}

@media (max-width: 895px) {
  #menu-icon,
  .navbar a,
  .navbar.active {
    display: block;
  }
  .heading {
    font-size: 6rem;
    text-align: center;
    margin: 5rem 0;
  }
  .navbar {
    position: absolute;
    top: 100%;
    right: 0;
    width: 50%;
    padding: 1rem 3%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(20px);
    border-bottom-left-radius: 1rem;
    border-left: 1px solid var(---main-color);
    border-bottom: 1px solid var(---main-color);
    display: none;
  }
  #content,
  .review-card {
    background-color: var(--second-color);
    text-align: center;
    padding: 20px;
  }
  .navbar a {
    font-size: 2rem;
    margin: 3rem 0;
    color: #fff;
  }
  .about-content p {
    font-size: 1.5rem;
  }
  .about-content h3 {
    font-size: 2.6rem;
  }
  .home {
    flex-direction: column-reverse;
    margin: 5rem 4rem;
  }
  .home-content h3 {
    font-size: 2.3rem;
    margin-top: 3rem;
  }
  .home-content h1 {
    font-size: 4.8rem;
    margin-top: 3rem;
  }
  .home-content p {
    max-width: 600px;
    margin: 0 auto;
  }
  .home-img img {
    width: 56vw;
  }
  .review {
    overflow-x: auto;
    gap: 2rem;
  }
  .review-card {
    width: 500px;
    max-width: 500px;
    border-radius: 20px;
    border: 3px solid;
    border-color: var(---main-color);
    font-size: 150%;
    margin: 20px;
  }
  .review-card h1 {
    text-align: center;
    margin-bottom: 5%;
  }
  #content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80vw;
    border-radius: 20px;
    border: 3px solid;
    border-color: var(---main-color);
    z-index: 100;
  }
  #content h1 {
    font-size: 200%;
  }
  #content p {
    font-size: 180%;
  }
  .rating-container {
    width: 60vw;
    display: flex;
    justify-content: center;
    margin-top: 2rem;
  }
  .rating-container .rating {
    margin-top: 5px;
  }
  #star {
    color: gold;
    font-size: 30px;
  }
}

@media (min-width: 768px) {
  form[name="contact"] {
    width: 60vw;
  }
  .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
  }
  .form-row input[type="email"],
  .form-row input[type="text"] {
    flex: 1;
  }
  button,
  textarea {
    width: 100%;
  }
  button {
    width: 50%;
    margin: 0 auto;
    display: block;
  }
}

/* Add these styles at the end of the CSS file */

.review-modal-content {
  background-color: var(--second-color);
  padding: 30px;
  border-radius: 20px;
  border: 3px solid var(---main-color);
  width: 80%;
  max-width: 800px;
  max-height: 80vh;
  overflow-y: auto;
  position: absolute; /* Change to absolute positioning */
  top: 50%; /* Position from the top */
  left: 50%; /* Position from the left */
  transform: translate(-50%, -50%); /* Center the modal */
  margin: 0; /* Remove margin that was causing off-center positioning */
}

.close-review {
  position: absolute;
  top: 10px;
  right: 20px;
  color: var(---main-color);
  font-size: 30px;
  font-weight: bold;
  cursor: pointer;
}

.close-review:hover {
  color: #fff;
}

#reviewModalTitle {
  font-size: 2.5rem;
  margin-bottom: 20px;
  text-align: center;
}

#reviewModalBody {
  font-size: 1.8rem;
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: left;
}

/* Fixed See More button styling */
.seemore {
  display: inline-block !important; /* Force display */
  color: var(---main-color);
  cursor: pointer;
  font-weight: bold;
  text-decoration: underline;
  padding: 5px;
  margin-top: 5px;
  font-size: 90%;
  background-color: var(--second-color); /* Match card background */
  border: 1px solid var(---main-color); /* Add border for visibility */
  border-radius: 4px; /* Rounded corners */
}

.seemore:hover {
  background-color: var(---main-color);
  color: #fff;
}

/* Fix for the modal positioning */
#reviewModal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.8);
}

/* Ensure the See More button is visible on all screen sizes */
@media (min-width: 896px) {
  .seemore {
    display: inline-block !important;
  }
}
