body {
  padding-top: 60px;
  background-color: #ececec;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.clear {
  clear: both;
}

button:hover {
  cursor: pointer;
}

.hidden {
  display: none;
}

/*----------------------MAIN--------------------*/

main {
  width: 100%;
  height: fit-content;
  padding: 30px 0 20px 0;
  flex: 1;
}

.main-sub-section {
  width: calc(100% - 50px);
  height: fit-content;
  margin-bottom: 30px;
  margin-left: 25px;
}

.section-title {
  width: 100%;
}

.section-title-text {
  color: #563ab1;
  margin-left: 30px;
  margin-bottom: 3px;
}

.section-title-text span {
  font-weight: bold;
  font-size: 25px;
}

.section-title-line {
  width: 100%;
  height: 0.4px;
  background-color: #4b3c7c;
  border-radius: 100%;
  margin-bottom: 5px;
}

.carousel {
  display: flex;
  align-items: center;
  overflow: hidden;
  width: 100%;
}

.scroll-button {
  width: 50px;
  height: 200px;
  border-radius: 20px;
  z-index: 997;
  color: #000;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  background: #d6d6d6;
  flex-shrink: 0;
  transition: none;
}

.scroll-button span {
  z-index: 998;
  margin-top: 1px;
}

.scroll-button:hover {
  background-color: #b4b4b4;
}

.section-blocks-container {
  display: flex;
  gap: 20px;
  flex-direction: row;
  width: fit-content;
  height: fit-content;
  padding: 10px;
  overflow-x: auto;
}

.section-blocks-container::-webkit-scrollbar {
  display: none;
}

.carousel a {
  text-decoration: none;
  color: #fff;
}

/*-------------------------BLOCOS DE PROJETO---------------------------*/
.project-block {
  width: 300px;
  height: 220px;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  flex-shrink: 0;
}

.project-block:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(113, 39, 216, 0.12);
}

.project-img {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: linear-gradient(135deg, #f1f3f6 0%, #e8e8f0 100%);
  flex-shrink: 0;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.project-block:hover .project-img img {
  transform: scale(1.08);
}

.project-footer {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 12px;
  box-sizing: border-box;
  font-weight: 600;
  font-size: 18px;
  background-color: #fff;
  text-align: left;
  border-top: 1px solid #f0f0f0;
}

.project-block:hover .project-footer {
  background-color: #f8f5ff;
}

.project-footer .project-name {
  color: #000000;
  font-weight: bold;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-footer .project-views {
  color: #000000;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-right: 10px;
  white-space: nowrap;
}

.project-footer .project-views i {
  font-size: 13px;
}

.project-footer button {
  width: 20px;
  height: 20px;
  background: none;
  display: flex;
  justify-content: center;
  align-items: center;
  border: none;
  flex-shrink: 0;
}

.project-footer button span {
  color: #000000;
}

/* ------- DARK MODE: PÁGINA PRINCIPAL ------- */
body.dark-mode {
  background-color: #1e1e1e;
  color: #f0f0f0;
}

body.dark-mode .section-title-text {
  color: #c3b1f3;
}

body.dark-mode .section-title-line {
  background-color: #715ebc;
}

body.dark-mode .scroll-button {
  background: #2e2e2e;
  color: #f0f0f0;
}

body.dark-mode .project-block {
  background-color: #2c2c2c;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4);
}

body.dark-mode .project-block:hover .project-footer {
  background-color: #3a3a3a;
}

body.dark-mode .project-footer {
  background-color: #2c2c2c;
}

body.dark-mode .project-footer .project-name {
  color: #f0f0f0;
}

body.dark-mode .project-footer .project-views {
  color: #b0b0b0;
}

body.dark-mode .project-footer button span {
  color: #f0f0f0;
}

/* Garantindo contraste em elementos clicáveis */
body.dark-mode a {
  color: #d0bfff;
}

.see-all-projects-container {
  width: 100%;
  display: flex;
  justify-content: center;
  margin: 40px 0;
}

.see-all-projects-button {
  background-color: #563ab1;
  color: #fff;
  font-weight: 600;
  font-size: 18px;
  padding: 12px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.see-all-projects-button:hover {
  background-color: #6d4ee0;
}

/* Dark mode */
body.dark-mode .see-all-projects-button {
  background-color: #715ebc;
  color: #f0f0f0;
}

body.dark-mode .see-all-projects-button:hover {
  background-color: #8b73e8;
}

/*--------------RESPONSIVIDADE MOBILE--------------*/

/* Tablets */
@media screen and (max-width: 768px) {
  main {
    padding: 20px 0 15px 0;
  }

  .main-sub-section {
    width: calc(100% - 30px);
    margin-left: 15px;
    margin-bottom: 25px;
  }

  .section-title-text {
    margin-left: 15px;
  }

  .section-title-text span {
    font-size: 22px;
  }

  .scroll-button {
    width: 40px;
    height: 180px;
  }

  .project-block {
    width: 260px;
    height: 200px;
  }

  .project-img {
    height: 160px;
  }

  .see-all-projects-button {
    font-size: 16px;
    padding: 10px 24px;
  }
}

/* Celulares */
@media screen and (max-width: 480px) {
  body {
    padding-top: 60px;
  }

  main {
    padding: 15px 0 10px 0;
  }

  .main-sub-section {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-bottom: 20px;
  }

  .section-title-text {
    margin-left: 10px;
    margin-bottom: 5px;
  }

  .section-title-text span {
    font-size: 20px;
  }

  /* Ocultar botões de scroll no mobile - usar scroll touch */
  .scroll-button {
    display: none;
  }

  .carousel {
    width: 100%;
  }

  .section-blocks-container {
    gap: 15px;
    padding: 8px 5px;
    overflow-x: scroll;
    -webkit-overflow-scrolling: touch;
  }

  /* Mostrar scrollbar no mobile para indicar que é scrollável */
  .section-blocks-container::-webkit-scrollbar {
    display: block;
    height: 4px;
  }

  .section-blocks-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
  }

  .section-blocks-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
  }

  body.dark-mode .section-blocks-container::-webkit-scrollbar-track {
    background: #2e2e2e;
  }

  body.dark-mode .section-blocks-container::-webkit-scrollbar-thumb {
    background: #555;
  }

  .project-block {
    width: 220px;
    height: 180px;
  }

  .project-img {
    height: 140px;
  }

  .project-footer {
    padding: 12px 10px;
    height: 40px;
    font-size: 16px;
  }

  .project-footer .project-views {
    font-size: 12px;
    gap: 4px;
    margin-right: 8px;
  }

  .project-footer .project-views i {
    font-size: 11px;
  }

  .project-footer button {
    width: 18px;
    height: 18px;
  }

  .see-all-projects-container {
    margin: 30px 0;
  }

  .see-all-projects-button {
    font-size: 15px;
    padding: 10px 20px;
  }
}

/* Celulares muito pequenos */
@media screen and (max-width: 360px) {
  .section-title-text span {
    font-size: 18px;
  }

  .project-block {
    width: 200px;
    height: 170px;
  }

  .project-img {
    height: 130px;
  }

  .project-footer {
    padding: 10px 8px;
    font-size: 15px;
  }

  .section-blocks-container {
    gap: 12px;
  }

  .see-all-projects-button {
    font-size: 14px;
    padding: 9px 18px;
  }
}