@import url("satoshi.css");

.row-with-span-effect {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem; /* matches Bootstrap g-3 */
  /* set a base row height — adjust to taste */
  grid-auto-rows: 180px;
  align-items: start;
}

/* make the column element span 2 rows (use span 3 for three rows) */
.row-span-2 {
  grid-row: span 2;
}

/* map Bootstrap column widths to the 12-column grid at large screens */
@media (min-width: 992px) {
  .row-with-span-effect > .col-lg-8 {
    grid-column: span 8;
  }
  .row-with-span-effect > .col-lg-4 {
    grid-column: span 4;
  }
  .row-with-span-effect > .col-md-5 {
    grid-column: span 5;
  }
  .row-with-span-effect > .col-md-7 {
    grid-column: span 7;
  }
  .row-with-span-effect > .col-md-3 {
    grid-column: span 3;
  }
  .row-with-span-effect > .col-6 {
    grid-column: span 6;
  }
  .row-with-span-effect > .col-12 {
    grid-column: span 12;
  }
}

/* Keep padding inside column content */
.col-with-grid {
  padding: 0;
}

* {
  font-family: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  font-weight: 500;
  cursor: default;
}

.titulo {
  font-family: "Satoshi", sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.minor-text {
  font-family: "Satoshi", sans-serif;
  font-weight: 500;
  font-style: italic;
  font-size: 1.1rem;
  color: gray;
  margin-bottom: 1%;
}

.text-content {
  font-family: "Satoshi", sans-serif;
  font-weight: 400;
  font-style: italic;
  font-size: 1rem;
  margin: 0;
}

.hora-atual {
  font-family: "Satoshi", sans-serif;
  font-weight: 700;
  font-size: 3rem;
  margin: 0;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  font-variant-numeric: tabular-nums; /* Makes digits monospaced */
  letter-spacing: 0.05em; /* Adds slight spacing for better optical balance */
}

img {
  border-radius: 16px;

  transition: transform 0.3s ease-in-out;
}

img:hover {
  transform: scale(1.03);
  transition: transform 0.3s ease-in-out;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
  grid-auto-rows: minmax(150px, auto);
}

.welcome-box {
  grid-column: span 8;
  grid-row: span 1;
}

.ai-box {
  grid-column: span 4;
  grid-row: span 3;
}

#chat-messages {
  max-height: 700px;
  overflow-y: auto;
  padding: 0.5rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(128, 128, 128, 0.3) transparent;
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

#chat-messages::-webkit-scrollbar-thumb {
  background: rgba(128, 128, 128, 0.3);
  border-radius: 3px;
}

.message {
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-message {
  background-color: rgba(80, 204, 138, 0.2);
  margin-left: 2rem;
  border: 1px solid rgba(80, 204, 138, 0.3);
}

.ai-message {
  background-color: rgba(128, 128, 128, 0.1);
  margin-right: 2rem;
  border: 1px solid rgba(128, 128, 128, 0.2);
}

#chat-input {
  border-radius: 12px 0 0 12px;
  border: 1px solid rgba(128, 128, 128, 0.3);
  background-color: rgba(128, 128, 128, 0.1);
  color: inherit;
}

#chat-input:focus {
  background-color: rgba(128, 128, 128, 0.15);
  border-color: #50cc8a;
  box-shadow: none;
}

#send-btn {
  border-radius: 0 12px 12px 0;
  background-color: #50cc8a;
  border: 1px solid #50cc8a;
  min-width: 80px;
}

#send-btn:hover {
  background-color: #45b579;
  border-color: #45b579;
}

#send-btn:disabled {
  background-color: rgba(80, 204, 138, 0.5);
  border-color: rgba(80, 204, 138, 0.5);
}

.graduation-bar {
  position: relative;
  grid-column: span 2;
  grid-row: span 2;
  /* Move overflow: hidden to the main container */
  overflow: hidden;
}

.bar {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 0%;
  border-radius: 0 0 16px 16px;
  background-color: #50cc8a;
  transition: height 2s ease-out;
  /* Remove overflow: hidden from here */
}

.wave-svg {
  position: absolute;
  /* Position relative to the top of the bar */
  top: 0;
  left: 0;
  opacity: 1;
  width: 100%;
  pointer-events: none;
  /* Use transform to move it up, which is more reliable */
  transform: translateY(-90%);
}

.graduation-bar:hover {
  transform: translateY(50%);
}

.about-box {
  grid-column: span 6;
  grid-row: span 1;
}

.contacts-box,
.map-box,
.theme-box,
.time-box,
.lang-box {
  grid-column: span 3;
  grid-row: span 1;
}

.welcome-grid {
  display: grid;
  grid-template-columns: 12fr 5fr;
  gap: 1rem;
  align-items: center;
}

.memoji-pic {
  justify-self: center;
  align-self: center;
}

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

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  align-items: center;
}

.profile-pic {
  justify-self: center;
  align-self: center;
}

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

.grid-item:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: 0.2s ease-in-out;
  background-color: rgba(128, 128, 128, 0.219);
  border-radius: 16px;
  transform: scale(1.02);
}

.grid-item-border-bottom:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: 0.2s ease-in-out;
  background-color: rgba(128, 128, 128, 0.219);
  border-radius: 16px 16px 0 0;
  transform: scale(1.02);
}

/* Responsive adjustments */
@media (max-width: 991px) {
  .welcome-box {
    grid-column: span 12;
  }

  .ai-box {
    grid-column: span 12;
    grid-row: span 2;
  }

  .graduation-bar {
    grid-column: span 12;
    grid-row: span 1;
  }

  .about-box {
    grid-column: span 12;
  }

  .contacts-box {
    grid-column: span 12;
  }
  .map-box,
  .theme-box,
  .time-box,
  .lang-box {
    grid-column: span 6;
  }
}

@media (max-width: 767px) {
  .portfolio-grid {
    grid-auto-rows: minmax(120px, auto);
  }

  .welcome-grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    gap: 1rem;
  }

  .memoji-pic img {
    max-width: 150px;
  }

  /* On mobile, make graduation bar horizontal */
  .graduation-bar {
    grid-column: span 12;
    grid-row: span 1;
    overflow: hidden;
  }

  .bar {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0%;
    height: 100%;
    transition: width 2s ease-out;
    border-radius: 16px;
    /* Remove overflow: hidden from here too */
  }

  .wave-svg {
    position: absolute;
    /* Position relative to the right edge of the bar */
    right: 0;
    top: 0;
    width: 60px; /* Set a fixed width for the wave effect */
    height: 100%;
    /* Use transform to rotate and position */
    transform: translateX(80%) rotate(90deg);
    transform-origin: top left;
  }
}
