@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Varela&display=swap");
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
:root {
  --default-font-family: "Varela", sans-serif;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

:link,
a:visited {
  color: inherit;
  text-decoration: none;
}

body {
background-color: #e3e7e3;
}
.hero-container {
  max-width: 97%;
  height: 70vh;
  margin: 1% auto;
  border-radius: 20px;
  background: url("./img/alessio-soggetti-GYr9A2CPMhY-unsplash.jpg")
    center/cover no-repeat;
  background-color: rgba(136, 31, 31, 0.1);
  background-blend-mode: darken;
  display: grid;
  grid-template-rows: 8% 1fr 20%;
}
.hero-container > nav {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(20px, 1fr));
  width: 100%;
  justify-items: center;
  align-items: center;
  letter-spacing: 1px;
  font-family: "Varela", sans-serif;
  color: #4a5759;
  margin-top: 10px;
}

nav > div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  flex: 1 1 auto;
}
.hamburger {
  border: none;
  background-color: transparent;
  color: #4a5759;
  cursor: pointer;
  padding: 8px;
  border-radius: 4px;
}

.hamburger:focus,
.hamburger:hover {
  background-color: rgba(74, 87, 89, 0.1);
  outline: 2px solid #4a5759;
  outline-offset: 2px;
}

nav > div:nth-child(1) {
  justify-self: left;
  margin-left: 7%;
}

nav > div:nth-child(3) {
  justify-self: right;
  margin-right: 7%;
  gap: 10px;
}
.profile-picture {
  width: 25px;
  height: 25px;
  border-radius: 50%;
}

.get-started {
  width: 6.5rem;
  height: 30px;
  background-color: rgb(115, 248, 115);
  border-radius: 10px;
  border: none;
  font-size: 12px;
  font-weight: 100;
  cursor: pointer;
  padding: 2px;
}

.get-started:focus,
.get-started:hover {
  background-color: rgb(95, 228, 95);
  outline: 2px solid #2d5a2d;
  outline-offset: 2px;
  transform: translateY(-1px);
}

.header-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #4a5759;
}

.header-h1 {
  max-width: 40%;
  max-height: 60%;
  font-size: 1.5rem;
  font-weight: 100;
  margin-left: 5%;
  margin-bottom: 10%;
  letter-spacing: 1.5px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  font-family: var(--default-font-family);
}


/* Log your trip buttons/graphic */

.trip-logger > h1 {
  font-family: var(--default-font-family);
  color: #4a5759;
  text-align: center;
  margin-top: 2%;
}
.logger-cards {
  max-width: 97%;
  min-height: 30vh;
  max-height: 40vh;
  margin: 0 auto;
  border-radius: 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  justify-items: center;
  align-items: center;
}

.bike {
  background: url("./img/patrick-hendry-1ow9zrlldJU-unsplash.jpg") center/cover
    no-repeat;
}
.run {
  background: url("./img/josh-gordon-fzHmP6z8OQ4-unsplash.jpg") center/cover
    no-repeat;
}
.hike {
  background: url("./img/kalen-emsley-G1qxBDxM8vE-unsplash.jpg") center/cover
    no-repeat;
}
.hike,
.run,
.bike {
  border-radius: 8px;
  width: 90%;
  height: 80%;
  display: flex;
  justify-content: center;
  align-items: start;
  color: #4a5759;
  letter-spacing: 0.5px;
  font-size: 1.2rem;
  font-family: var(--default-font-family);
  text-shadow: -1px 1px 1px white;
  font-weight: 100;
  border: none;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.modal .hike,
.modal .run,
.modal .bike {
  height: 80px;
  min-height: 80px;
  width: 100%;
  color: black;
}
.modal .logger-cards {
  max-width: 100%;
  align-items: center;
  min-height: 45px;
  max-height: 120px;
}

.modal .trip-logger {
  flex-shrink: 0;
}



.bike:focus,
.bike:hover,
.run:focus,
.run:hover,
.hike:focus,
.hike:hover {
  transform: scale(1.05);
  filter: brightness(1.1);
  outline: 3px solid #ffffff;
  outline-offset: 2px;
}

.modal .bike.active,
.modal .run.active,
.modal .hike.active {
  transform: scale(1.05);
  filter: brightness(1.1);
  outline: 3px solid rgb(115, 248, 115);
  outline-offset: 2px;
  box-shadow: 0 0 0 6px rgba(115, 248, 115, 0.2);
}

/* Weather Section */
.weather-section {
  background: url("./img/maddison-mcmurrin-GDumtPpJsT4-unsplash.jpg") top/cover
    no-repeat;
  border-radius: 10px;
  max-width: 97%;
  margin: 5% auto;
  padding: 1%;
}

.weather-titles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  justify-items: center;
}
.weather-titles > div:nth-child(1) {
  justify-self: left;
  margin-left: 6%;
  font-family: var(--default-font-family);
  color: rgb(251, 235, 235);
  letter-spacing: 0.8px;
  font-size: 0.8rem;
  align-self: end;
}
.weather-titles > div:nth-child(2) {
  font-family: var(--default-font-family);
  color: rgb(251, 235, 235);
  letter-spacing: 0.8px;
}
.date {
  font-family: var(--default-font-family);
  color: rgb(251, 235, 235);
  font-size: 0.8rem;
  align-self: end;
  justify-self: right;
  margin-right: 7%;
}

.weather-card-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
  gap: 10px;
  align-items: center;
  justify-items: center;
  max-width: 97%;
  height: fit-content;
  margin: 1% auto;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.8);
  padding: 2%;
}

.weather-card-container > * {
  display: flex;
  color: #c75248;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 150px;
  gap: 5px;

  border: #4a5759 solid 1px;
  border-radius: 10px;
}
.time {
  color: #4a5759;
  font-size: 1.3rem;
}

.weather-card img {
  filter: brightness(0.4) contrast(1.5);
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  min-height: 40%;
  min-width: 40%;
  max-width: 1000px;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  z-index: 2;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

.close-modal {
  position: absolute;
  top: 3px;
  right: 3px;
  background: none;
  border: none;
  font-size: 2rem;
  color: black;
  cursor: pointer;
  width: 30px;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.close-modal:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

.modal.invisible {
  visibility: hidden;
  transition: none !important;
}

.modal.invisible * {
  transition: none !important;
  animation: none !important;
}

.modal.invisible .form-actions,
.modal.invisible .input-container,
.modal.invisible .btn-primary,
.modal.invisible .btn-secondary {
  display: none !important;
}

.visible {
  visibility: visible;
}

.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1;
  backdrop-filter: blur(2px);
}

.modal-open .hero-container,
.modal-open .trip-logger:not(.modal .trip-logger),
.modal-open .weather-section,
.modal-open footer {
  opacity: 0.3;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

/* Form Styling */
.input-container {
  border-radius: 12px;
  padding: 1.5rem;
  flex: 1;
  overflow-y: auto;
}

.form-title {
  font-family: var(--default-font-family);
  color: #4a5759;
  font-size: 1.25rem;
  font-weight: 400;
  margin-bottom: 1rem;
  text-align: center;
  letter-spacing: 0.5px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  display: block;
  font-family: var(--default-font-family);
  color: #4a5759;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  letter-spacing: 0.3px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e1e5e9;
  border-radius: 6px;
  font-family: var(--default-font-family);
  font-size: 0.875rem;
  color: #4a5759;
  background-color: rgb(243, 248, 252);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-group input[type="date"] {
  color: #4a5759;
  cursor: pointer;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  filter: invert(0.5);
  opacity: 0.7;
}

.form-group input[type="date"]::-webkit-calendar-picker-indicator:hover {
  opacity: 1;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: rgb(115, 248, 115);
  box-shadow: 0 0 0 3px rgba(115, 248, 115, 0.2);
  background-color: white;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #8a9ba8;
  font-style: italic;
}

.help-text {
  display: block;
  font-family: var(--default-font-family);
  color: #8a9ba8;
  font-size: 0.75rem;
  margin-top: 0.125rem;
  font-style: italic;
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
  max-height: 80px;
}

.form-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e1e5e9;
}

.btn-primary,
.btn-secondary {
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-family: var(--default-font-family);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  letter-spacing: 0.3px;
}

.btn-primary {
  background-color: rgb(115, 248, 115);
  color: #2d5a2d;
  min-width: 100px;
}

.btn-primary:hover,
.btn-primary:focus {
  background-color: rgb(95, 228, 95);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(115, 248, 115, 0.4);
  outline: 2px solid #2d5a2d;
  outline-offset: 2px;
}

.btn-secondary {
  background-color: transparent;
  color: #4a5759;
  border: 2px solid #e1e5e9;
  min-width: 80px;
}

.btn-secondary:hover,
.btn-secondary:focus {
  background-color: #f8fafc;
  border-color: #4a5759;
  transform: translateY(-1px);
  outline: 2px solid #4a5759;
  outline-offset: 2px;
}

/* Responsive form adjustments */
@media (max-width: 768px) {
  .input-container {
    padding: 1rem;
  }
    .modal .hike,
    .modal .run,
    .modal .bike {
      height: 40px;
      min-height: 40px;
      width: 100%;
      color: black;
    }
  .modal {
    width: 100%;
    height: 90vh;
    padding: 2rem 0.5rem 0 0.5rem;
  }
  .logger-cards {
    gap: 5px;
    width: 90%;
  }
  .form-title {
    font-size: 1.125rem;
    margin-bottom: 0.75rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .form-actions {
    flex-direction: column;
    gap: 0.5rem;
  }

  .btn-primary,
  .btn-secondary {
    width: 100%;
    min-width: auto;
  }

  .hero-container .nav {
    grid-template-columns: 10% 1fr 1fr;
  }
  .header-h1 {
    margin-bottom: 20%;
    max-width: 65%;
  }
  .all-activities {
    display: none;
  }
  .hamburger {
    margin-left: 1rem;
  }
  .logo {
    justify-self: right;
  }
  .weather-card-container {
    grid-template-columns: repeat(4, 1fr);
  }

  nav > div:nth-child(1) > div:nth-child(2),
  nav > div:nth-child(1) > div:nth-child(3) {
    display: none;
  }
}

.success-confirmation {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border-left: 4px solid #27ae60;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-radius: 8px;
  padding: 1rem;
  max-width: 350px;
  z-index: 1000;
  animation: slideInRight 0.3s ease-out;
  font-family: var(--default-font-family);
}

.confirmation-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.confirmation-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.confirmation-text {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.confirmation-text strong {
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 2px;
}

.confirmation-text span {
  color: #7f8c8d;
  font-size: 0.9rem;
}

.confirmation-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  color: #bdc3c7;
  cursor: pointer;
  padding: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.confirmation-close:hover {
  background: #ecf0f1;
  color: #7f8c8d;
}

.confirmation-fade-out {
  animation: slideOutRight 0.3s ease-in;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutRight {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Mobile responsive */
@media (max-width: 480px) {
  .success-confirmation {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }

  .confirmation-text span {
    font-size: 0.85rem;
  }
}
