/* description.css */
@import url('/fonts.css');
@import url('/tailwind.css');
@import url('/app/global.css');

html, body {
  font-family: var(--font-inter) !important;
  margin: 0;
  padding: 0;
}

.description-preview-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100vw;
    height: 52.5vh;
    position: relative;
    padding: 2rem;
    overflow: hidden; /* This prevents the moved image from affecting layout */
}

/* Background image with darkening effect */
.bg-description {
    position: absolute;
    top: -14rem; /* Adjust this value to move image up/down */
    left: 0;
    width: 100%;
    height: calc(100% + 20rem); /* Make image much taller to compensate for movement */
    object-fit: cover;
    object-position: center;
    filter: brightness(0.7);
    z-index: 0;
}

/* Top ripped paper SVG */
.description-preview-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100vw;
    height: 5rem;
    background-image: url('/assets/img/ripped-paper-description-top.svg');
    background-size: 100     auto;
    background-position: top left;
    background-repeat: no-repeat;
    z-index: 1;
}

/* Bottom ripped paper SVG */
.description-preview-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: 5rem;
    background-image: url('/assets/img/ripped-paper-description-bottom.svg');
    background-size: 100vw auto;
    background-position: bottom left;
    background-repeat: no-repeat;
    z-index: 1;
}

.content-wrapper {
    text-align: center;
    max-width: 600px;
    z-index: 2;
    position: relative;
    margin: 0 auto;
}

.description-title {
    text-transform: uppercase;
    font-family: var(--font-inter);
    font-weight: 900;
    font-size: 2rem;
    color: white;    
    text-align: center;
    margin: 0 0 1rem 0;
    text-rendering: optimizeLegibility;

    /* text-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.5); */
    text-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.25);
}

.description-text {
    font-family: var(--font-inter);
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.6;
    margin-bottom: 2rem;
    font-weight: 500;

    /* text-shadow: 0 0.75rem 2.5rem rgba(0, 0, 0, 0.5); */
    text-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.25);
}

.read-more-btn {
    font-family: var(--font-inter);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50px;
    padding: 15px 35px;
    font-size: 0.9rem;
    font-weight: 600;

    color: black;
    background-color: white;

    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.read-more-btn:hover {
    /* opacity: 0.8; */
    /* transition: opacity 0.6s ease; */

    /* background-color: rgb(240, 240, 240); */
    box-shadow: 0 0 5px 2px rgba(255, 255, 255, 0.5);
    /* transition: background-color 0.6s ease; */

    /* color: black;
    transition: color 0.6s ease; */
}







/* Making description.php responsive on all devices */

/* Desktop | 1281px - 1440px  */
@media (max-width: 1280px) {
  /* None, coded on macbook m1 pro */
}

/* Medium Laptop/Desktop | 1515px - 1920px */
@media (max-width: 1515px) {
 /* None, coded on macbook m1 pro */
}

/* Small Laptop/Desktop | 1024px - 1280px */
@media (max-width: 1024px) {
  /* None, coded on macbook m1 pro */
}

/* Mobile Small Portrait (Normal) () | up to 480px */
/* S20+, iPhone 12, iPhone 13 */
@media (max-width: 480px) and (orientation: portrait) {
  .description-preview-container {
    height: 50vh;
    padding: 1.5rem 1rem;
  }

  .bg-description {
    filter: brightness(0.6);
    object-position: 70% center;
  }

  .content-wrapper {
    max-width: 90%;
  }

  .description-title {
    font-size: 1.1rem;
    margin: 0 0 .75rem 0;
  }

  .description-text {
    font-size: 0.85rem;
    line-height: 1.5;
    margin-bottom: 1.25rem;
  }

  .read-more-btn {
    padding: 12px 25px;
    font-size: 0.8rem;
    letter-spacing: 1px;
  }

  .description-preview-container::before,
  .description-preview-container::after {
    height: 3rem;
    background-size: 100vw auto;
  }
}

/* Mobile Small Landscape (Seitlich gehlaten) | up to 950px */
/* S20+, iPhone 14, iPhone 15 Pro in Landscape (Seitlich gehlaten) */
@media (max-width: 950px) and (orientation: landscape) {
  .description-preview-container {
    height: 90vh;
    padding: 1rem 2rem;
  }

  .bg-description {
    /* top: -10rem; */
    /* height: calc(100% + 15rem); */
    filter: brightness(0.6);
    transform: scale(1) translateX(0rem) translateY(0.25rem);
    object-position: center center;
  }

  .content-wrapper {
    max-width: 70%;
  }

  .description-title {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
  }

  .description-text {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 1rem;
  }

  .read-more-btn {
    padding: 10px 20px;
    font-size: 0.75rem;
    letter-spacing: 1px;
  }

  .description-preview-container::before {
    height: 4rem;
    background-size: 101vw auto;
  }

  .description-preview-container::after {
    height: 4rem;
    background-size: 101vw auto;
  }
}

/* Mobile Large Portrait (Normal) | 481px - 600px */
/* iPhone 14 Pro Max, Pixel 7 Pro, larger phones */
@media (min-width: 481px) and (max-width: 600px) and (orientation: portrait) {
  .description-preview-container {
    height: 65vh;
    padding: 2rem 1.5rem;
  }

  .bg-description {
    top: -12rem;
    height: calc(100% + 18rem);
    filter: brightness(0.65);
  }

  .content-wrapper {
    max-width: 85%;
  }

  .description-title {
    font-size: 1.8rem;
    margin: 0 0 1.25rem 0;
  }

  .description-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.75rem;
  }

  .read-more-btn {
    padding: 14px 28px;
    font-size: 0.85rem;
    letter-spacing: 1.2px;
  }

  .description-preview-container::before,
  .description-preview-container::after {
    height: 4rem;
  }
}

/* Tablet Portrait (Normal) | 601px - 1024px */
@media (min-width: 601px) and (max-width: 1024px) and (orientation: portrait) {
  .description-preview-container {
    height: 40vh;
    padding: 2.5rem 2rem;
  }

  .bg-description {
    /* top: -12rem;
    height: calc(100% + 18rem); */
    filter: brightness(0.6);
    transform: scale(1) translateX(0rem) translateY(3.5rem);
  }

  .content-wrapper {
    max-width: 75%;
    margin-top: -1rem;
  }

  .description-title {
    font-size: 2rem;
    margin: 0 0 .5rem 0;
  }

  .description-text {
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
  }

  .read-more-btn {
    padding: 18px 36px;
    font-size: 1rem;
    letter-spacing: 1.5px;
  }

  .description-preview-container::before {
    height: 5rem;
    background-size: 101vw auto;
  }

  .description-preview-container::after {
    height: 5rem;
    background-size: 102vw auto;
    bottom: -1px;
  }
}

/* Tablet Landscape (Seitlich gehlaten) | 951px - 1366px */
@media (min-width: 951px) and (max-width: 1366px) and (orientation: landscape) {
  .description-preview-container {
    height: 60vh;
    padding: 2rem;
  }

  .bg-description {
    /* top: -10rem;
    height: calc(100% + 15rem); */
    filter: brightness(0.6);
    transform: scale(1) translateX(0rem) translateY(0.25rem);
  }

  .content-wrapper {
    max-width: 65%;
    margin-top: 1rem;
  }

  .description-title {
    font-size: 2rem;
    margin: 0 0 .5rem 0;
  }

  .description-text {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
  }

  .read-more-btn {
    padding: 16px 32px;
    font-size: 0.9rem;
    letter-spacing: 1.3px;
  }

  .description-preview-container::after {
    height: 5rem;
    background-position: center;
    background-size: 100% auto;
  }

  .description-preview-container::after {
    height: 5rem;
    bottom: -1rem;
    background-position: center;
    background-size: 100% auto;
  }
}