/* ===== Overlay Base ===== */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: center;
}

a {
  text-decoration: none;
  color: var(--primary);
}

.overlay.active {
  display: block;
  opacity: 1;
}

.overlay.closing {
  animation: slide-out 1s forwards; 
}

/* ===== Animations ===== */
@keyframes slide-in {
  from { transform: translateX(150vw); }
  to { transform: translateX(0); }
}

@keyframes slide-out {
  from { transform: translateX(0); }
  to { transform: translateX(150vw); }
}

/* ===== Overlay Layout ===== */
.overlay-split {
  display: flex;
  height: 100%;
}

.overlay-left {
  background-color: var(--primary);
  color: var(--secondary);
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 42px;
  position: relative;
}

.overlay-right {
  position: relative;
  background-color: var(--secondary);
  width: 50%;
  height: 100%;
  overflow: hidden;
}

.overlay-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ===== Overlay Content ===== */
.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
}

.logo-desktop {
  height: 5rem;
  justify-content: start;
}

.logo-desktop:active {
  transform: scale(1.05);
}

.overlay-body {
  padding: 1rem 0 1rem 0;
  display: flex;
  flex-direction: column;
  align-content: flex-start;
}

.overlay-body h2 {
  font-size: clamp(5rem, 10vw, 6rem);
  line-height: 0.9;
  margin-bottom: 1.5rem;
}

.overlay-body p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  text-wrap-style: balance;
}

.overlay-body .contact-button {
  padding: 0.5rem 3rem;
  border: none;
  cursor: pointer;
  width: 80%;
  max-width: 300px;
  border-radius: 10px;
  color: var(--secondary);
  border: var(--secondary) 2px solid;
  text-align: center;
  background-color: var(--primary);
  font-family: 'Obviously semibold', sans-serif;
  font-size: 1rem;
  transition: all 0.3s ease;
  display: block;
}

.overlay-body .contact-button:hover,
.overlay-body .contact-button:active {
  background-color: var(--secondary);
  color: var(--primary);
}

body.night-mode .social-nav address a {
  color: var(--secondary);
}

/* ===== Social Navigation ===== */
.social-nav address {
  font-size: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: space-between;
  margin-top: 0.5rem;
  padding-bottom: 30px;
}

/* ===== Responsive Styles ===== */
@media (max-width: 768px) {
  .overlay-split {
    flex-direction: column;
  }
  
  .overlay-body {
    gap: 6px;
  }

  .overlay-body p, .overlay-body h2 {
    margin: 0rem;
  }
  
  .overlay-left {
    width: 100vw;
    height: 100vh;
    justify-content: center;
  }

  .overlay-right {
    display: none;    
  }

  .contact-button {
    align-self: center;
  }

  .overlay-header {
    justify-content: center;
  }
  .social-nav .hidden {
    display: none;
  }
}