/*
Theme Name: Mitt Tema
Author: André
Version: 1.0
*/

body, html {
  margin: 0;
  padding: 0;
  height: 100vh;
  font-family: "Roboto Condensed", sans-serif;
  background: #172938;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero {
  position: relative;
  height: 40vh;
  width: 100%;
  overflow: visible;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.15), 0 10px 30px rgba(0, 0, 0, 0.15);
}

.hero-left {
  max-width: 300px;
  color: white;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
}

.hero-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 85%;
  display: block;
}

.hero-text {
  position: absolute;
  top: 50%;
  left: 15%;
  transform: translate(-50%, -50%); /* 🪄 Centrera exakt */
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  text-align: left;
  z-index: 1;
  padding: 1rem;
}


.hero-text h1 {
  font-size: 3rem;
  font-weight: 500;
  margin: 0;
}

.hero-text p {
  font-weight: 400;
  font-size: 1rem;
  margin-top: 0.3rem;
}

.social-icons {
  display: flex;
  gap: 1.2rem;
  font-size: 1.5rem;
}

.social-icons a {
  color: white;
  font-size: 1.5rem;
  transition: transform 0.2s ease;
}

.social-icons a:hover {
  transform: scale(1.2);
  color: #b0d4e3;
}

.hero-button {
  position: relative;
  overflow: hidden;
  margin-top: 1.5rem;
  display: inline-block;
  padding: 12px 30px;
  border: 2px solid white;
  color: white;
  background: transparent;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 300;
  font-family: "League Spartan", sans-serif;
  text-decoration: none;
  z-index: 1;
  transition: color 0.3s ease;
}

.hero-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: white;
  z-index: -1;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.hero-button:hover::before {
  transform: translateY(0%);
}

.hero-button:hover {
  color: #172938;
}

/* Modal */
.contact-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: flex-end;
  align-items: center;
  padding: 2rem;
  z-index: 9999;
}

.modal-content h2 {
  font-family: 'League Spartan', sans-serif;
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 1px;
}

.contact-modal.active {
  display: flex;
}

.modal-content {
  background: white;
  padding: 2rem;
  width: 350px;
  max-width: 90%;
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(0,0,0,0.4);
  position: relative;
  animation: slideIn 0.3s ease-out;
  transform: translateY(0);
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
  }
  to {
    transform: translateX(0%);
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 1;
  }
}

.contact-modal.closing .modal-content {
  animation: slideOut 0.3s ease-in forwards;
}

.close-modal {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 1.5rem;
  cursor: pointer;
}

/* Form */
#contactForm {
  font-family: "Montserrat", sans-serif;
}

#contactForm input,
#contactForm textarea {
  width: 100%;
  padding: 0.6rem;
  margin-bottom: 1rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1rem;
  box-sizing: border-box;
}

#contactForm button {
  background-color: #172938;
  color: white;
  border: none;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: 'League Spartan', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  text-align: center;
  transition: background-color 0.2s ease;
}

#contactForm button:hover {
  background-color: #0e1b28;
}

.thank-you-message {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.thank-you-message.fade-out {
  opacity: 0;
  transform: translateX(100%);
}

/* Postbox */
.custom-post-box {
  position: absolute;
  top: 50%;
  left: calc(5% + 320px); /* 5% padding + bredden på AEDATA */
  transform: translateY(-50%);
  width: 260px;
  height: 170px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.5rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  color: white;
  font-family: "Roboto Condensed", sans-serif;
  transition: max-height 0.4s ease, width 0.4s ease;
  z-index: 2;
}

.custom-post-box.expanded {
  width: 550px;
  max-height: 1000px;
}


.custom-post-box h2 {
  margin-top: 0;
  font-size: 1.5rem;
  font-weight: 500;
  font-family: "League Spartan", sans-serif;
  color: #ffffff;
  margin-bottom: 0.5rem;
}

.custom-post-box img {
  max-width: 100%;
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.custom-post-box .post-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #e0e0e0;
  margin-bottom: 1rem;
}

.custom-post-box a {
  color: #b0d4e3;
  text-decoration: underline;
  font-size: 0.95rem;
  transition: color 0.2s ease;
}

.custom-post-box a:hover {
  color: white;
}

.post-flex {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.post-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.post-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: white;
}

.post-info h2 {
  font-size: 1.2rem;
  margin: 0 0 0.2rem;
  font-family: "League Spartan", sans-serif;
}

.post-content {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
  color: #e0e0e0;
}

.post-info a {
  font-size: 0.9rem;
  color: #b0d4e3;
  text-decoration: underline;
}

.post-full img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 8px;
}

/* Expansion */
.post-excerpt {
  display: block;
  transition: opacity 0.3s ease;
}
.post-excerpt.hidden {
  display: none;
}

.post-full {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  margin-top: 1rem;
}
.post-full.open {
  display: block;
  opacity: 1;
}

.post-expand-wrapper {
  overflow: hidden;
  transition: transform 0.4s ease, opacity 0.3s ease, max-height 0.4s ease;
  transform: scale(0.95);
  opacity: 0;
  max-height: 0;
}
.post-expand-wrapper.open {
  transform: scale(1);
  opacity: 1;
  max-height: 1500px;
}
.js-post-full {
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease, max-height 0.4s ease;
  overflow: hidden;
  max-height: 0;
}

.js-post-full.open {
  display: block;
  opacity: 1;
  max-height: 300px; /* Justera denna höjd efter smak */
  overflow-y: auto;  /* Scroll om innehållet är längre */
}
.read-more-toggle {
  position: relative;
  overflow: hidden;
  margin-top: 1rem;
  display: inline-block;
  padding: 6px 12px; /* MINDRE padding */
  border: 2px solid white;
  color: white;
  background: transparent;
  border-radius: 40px; /* Lätt rundare men mindre */
  font-size: 0.9rem; /* Mindre text */
  font-weight: 300;
  font-family: "League Spartan", sans-serif;
  text-decoration: none;
  z-index: 1;
  transition: color 0.3s ease;
}

.read-more-toggle::before {
  content: "";
  position: absolute;
  inset: 0;
  background: white;
  z-index: -1;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.read-more-toggle:hover::before {
  transform: translateY(0%);
}

.read-more-toggle:hover {
  color: #172938;
}
/*scrollbar*/
/* Gäller scrollbars i hela dokumentet */
::-webkit-scrollbar {
  width: 8px;
}

/* Själva "spåret" bakom scrollbaren */
::-webkit-scrollbar-track {
  background: transparent;
}

/* Själva scrollhandtaget */
::-webkit-scrollbar-thumb {
  background-color: white;
  border-radius: 4px;
  border: none;
}

.hero-text {
  align-items: flex-start; /* 🔒 Innehåll placeras upptill och påverkas inte vertikalt */
}

.hero-left {
  flex-shrink: 0; /* 🛑 Förhindra att AEDATA trycks ihop av expanderande post */
}

.custom-post-box {
  align-self: flex-start; /* ✅ Gör att bara postboxen växer nedåt */
}
