/* ===== Global Styles ===== */
*, :after, :before {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: sans-serif;
    height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    touch-action: pan-y pinch-zoom;
}



/* ===== Carousel Layout ===== */
.carousel-wrapper {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: auto;
    padding-bottom: env(safe-area-inset-bottom);
    padding-top: env(safe-area-inset-top);
    overflow: hidden;
}

.carousel {
    width: 100%;
    height: auto;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    background: #10112f;
}

.carousel-track {
    display: flex;
    /*justify-content: center;*/
    transition: transform 0.3s ease;
    width: 100%;
    /*gap: 20px;*/
    will-change: transform;
}

/* ===== Card Base Styles ===== */
.card {
    flex: 0 0 100%;
    max-width: 100%;
    height: auto;
    max-height: 100vh;
    background: #10112f;
    /*border-radius: 8px;*/
    color: #fff;
    font-size: 2rem;
    opacity: 0.5;
    transform: scale(0.95);
    transition: opacity 0.3s, transform 0.3s;
    overflow: hidden;
    /*padding-top: 1.5rem;*/
    display: flex;
    flex-direction: column;

    flex-shrink: 0;
}

.card.active {
    opacity: 1;
    transform: scale(1);
}

.card-content {
    padding: 10px 30px;
    text-align: left;
}

.card img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== Individual Card Layouts ===== */
.card-content-1 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.card-2 .card-content-2 {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
}

.card-3 .card-content-3 {
    display: flex;
    flex-direction: row;
}

.card-content-4 {
    padding-bottom: 0;
}

.card-content-12 {
    text-align: center;
}

.card-gif-main {
    width: 17rem;
}

.card-gif-small {
    width: 100px;
}


.card-text-2 {
    font-size: 1.8rem;
    padding: 2rem;
    margin: 2.5rem 0;
}

.card-text-3 {
    font-size: 2.5rem;
    margin-top: 5rem;
}

.card-text-4 {
    font-size: 1.8rem;
    text-align: center;
    margin: 0.5rem 2rem;
    font-weight: 700;
}

.card-text-5, .card-text-11 {
    font-size: 2.7rem;
    line-height: 1.2;
    text-align: center;
}
.card-12 > .card-content {
    padding: 0;
}
.card-text-12 {
    font-size: 1.8rem;
    text-align: center;
    padding: 0.5rem;
}
.card-text-12 p:last-child {
    font-size: 3rem;
    padding-top:2rem;
}
.small {
    font-size: 1.5rem;
}

.card-text-6 {
    /*font-size: 1.5rem;*/
    margin: 0.5rem 2rem;
    font-weight: 500;
}

.card-text-7 {
    font-size: 1.8rem;
}
.card-text-8 {
    /*font-size: 1.8rem;*/
    margin: 0.5rem 2rem;
    font-weight: 300;
}

.card-text-9 {
    font-size: 1.7rem;
    text-align: center;
    margin: 0;
}
.card-text-9 span {
    font-size: 2.5rem;
    line-height: 1rem;
}

.card-text-10 {
    font-size: 1.8rem;
    margin: 1rem;
}

.card-text-11 p,
.card-text-12 p {
    margin: 0;
}

.media-elements-10 {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.media-elements-10 img {
    width: 10rem;
    height: 5rem;
}

.media-elements-11 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.media-elements-11 img {
    width: 17rem;
}

.card-content-9 {
    margin-top: -2rem;
}

.media-elements-9 {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    width: fit-content; /* Shrinks to content size */
    margin: -2rem auto 0;
    transform: translateY(20px) scale(0.7);
    opacity: 0;
    transition: transform 0.5s ease-out, opacity 0.5s ease-out;
}

.media-elements-9.active {
    transform: translateY(0) scale(1); /* move to position + full size */
    opacity: 1;}

.image-wrapper {
    width: 240px;
    height: 370px;
    overflow: hidden;
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.star-wrapper {
    width: 90px;
    height: 90px;
    position: absolute;
    bottom: 40px;
    left: -40px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 2px 6px;
}

.star-wrapper .yellow-star {
    width: 100%;
    height: auto;
    display: block;
}

.total_read_from_author {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 1.7rem;
    font-weight: bold;
    color: black;
    margin: 0;
}



.share-dwnld-btns {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1rem;
    margin-top: 1rem;
}

.share-container {
    position: relative;
    display: flex;
    color: white;
    width: 6rem;
}

.share-toggle-btn {
    background: #dd6026;
    color: white;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    width: 6rem;
    transition: background 0.3s ease, opacity 0.3s ease;
}

.share-toggle-btn.dimmed {
    background: #b9501e; /* darker/dimmed version */
    opacity: 0.8;
}

.share-icons {
    position: absolute;
    top: 120%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, top 0.3s ease;
    z-index: 1000;
}

.share-icons.active {
    top: 110%;
    opacity: 1;
    visibility: visible;
}

.share-icons ul {
    padding: 0.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    gap: 0.5rem;
    margin: 0;
}

.share-icons li {
    cursor: pointer;
    background-color: #f2f2f2;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.share-icons li:hover {
    background-color: #ddd;
}

.share-icons svg {
    width: 1.5rem;
    height: 1.5rem;
}


.download-btn {
    background: #f00f70;
    color: white;
    padding: 8px 12px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    width: 100%;
    height: 100%;
}

#persona-description {
    font-size: 1rem;
}


.media-elements-13 {
    width: 100%;
    display: flex;
    margin-top: 4rem;
    justify-content: center;
}
.media-elements-13 img {
    width: 14rem;
}
.card-content-13 {
    text-align: center;
    margin-top: -5rem;
    font-size: 2rem;
    line-height: 1;
}


.media-elements-14 {
    display: flex;
    justify-content: center;
    padding: 0 2rem;
    height: 20rem;
}
.media-elements-15, .media-elements-7 {
    display: flex;
    justify-content: center;
}
/*.media-elements-14 img {*/
/*    width: 15rem;*/
/*    transform: rotate(270deg);*/
/*    margin-top: -4rem;*/
/*}*/

.card-content-14 p {
    text-align: center;
    margin: 0;
    padding: 0;
}

.media-elements-7 {
    margin-top: 1rem;
    padding-bottom: env(safe-area-inset-bottom);
}


.card-subtext-5,
.card-subtext-6 {
    font-size: 1rem;
}

.card-7 .card-content-7 {
    display:none;
}

.orange-gif,
.purple-gif {
    width: 40px;
}

.blue-gif {
    width: 30px;
}

.pink-circle {
    width: 100px;
}

.top-gif {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
}

.media-elements-top {
    float: right;
    display: flex;
    align-items: flex-start;
    flex-direction: row;
    justify-content: space-between;
    margin: 1rem 1rem 0 1rem;
}

.media-elements-bottom-2 {
    display: flex;
    flex-direction: column;
    margin-top: 1rem;
    margin-left: 5rem;
}

.media-elements-side-3 {
    margin-right: -15rem;
}

.card-media-element-top {
    margin-top: -4rem;
}
.card-media-element-bottom {
    margin-top: -7rem;
    width: 100%;
    display: flex;
    justify-content: center;
    flex-direction: column;
    align-items: center;
}
.card-media-element-bottom img {
    width: 20rem;
}

.card-logo-pretext {
    font-size: 1rem;
    margin-top: -1rem;
}

#card-logo {
    width: 20rem;
    margin: 0.5rem;
}

.media-elements-4 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.media-elements-8 img {
    margin-top: -7rem;
}

.side-elements-3 {
    width: 240px;
    margin-bottom: 1rem;
}

.side-elements-3 img {
    width: 6rem;
}

.side-elements-4 img {
    height: 7rem;
    opacity: 0;
    transform: translateX(-50px); /* left side slides in from left */
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}
.side-elements-4 img.right {
    transform: translateX(50px);
    opacity: 0;
    transition: transform 0.8s ease-out, opacity 0.8s ease-out;
}

/* When active, slide to original position */
.side-elements-4 img.active {
    opacity: 1;
    transform: translateX(0);
}


.media-elements-5 {
    display: flex;
    align-items: center;
    flex-direction: row;
    justify-content: center;
    margin-top: 3rem;
    margin-right: 7rem;
}

.media-elements-5 .card-gif-2 {
    margin-bottom: -18rem;
}


.first-story {
    height: auto;
    margin: 1rem 0;
    max-width: 220px;
}

.story-tag {
    display: block;
    background-color: #f00f70;
    border-radius: 1px;
    color: #ffffff;
    margin: 0 10px -20px auto;
    padding: 7px 17px;
    position: relative;
    text-align: center;
    width: max-content;
    z-index: 1;
    font-size: 0.8rem;
    text-transform: uppercase;
}

.story-image {
    background-color: #563a9b;
}

.story-image img {
    aspect-ratio: 3 / 2;
    height: auto;
    object-fit: cover;
    width: 100%;
}

.story-text {
    background-color: #563a9b;
    padding: 0.5rem 1rem;
}

.story-text h3 {
    margin: 0;
    font-size: 1rem;
    color: #ffffff;
    line-height: 1.5;
}

.story-text p {
    margin: 10px 0 0 0;
    font-size: 0.7rem;
}

.time-of-day {
    text-transform: lowercase;
}

.card-text-15 {
    font-size: 1.8rem;
}

.media-elements-15 {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    justify-content: space-evenly;
    align-items: center;
    gap: 1rem;
    flex: 1;
    overflow-y: auto;
    padding-bottom: 6rem;
}

.nl-card {
    width: 12rem;
    height: 15rem;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    padding: 0 1rem;

        opacity: 0;
        transform: translateY(20px) scale(0.95);
        transition: transform 0.5s ease-out, opacity 0.5s ease-out;

}

.nl-card.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.nl-text {
    padding: 1rem 0;
    height: 4.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nl-title {
    font-size: 1.5rem;
    margin: 0;
    line-height: 1.2;
    overflow: hidden;
}

.nl-tag {
    font-size: 0.8rem;
    text-transform: uppercase;
}

.nl-btn {
    border: none;
    padding: 0.5rem 1rem;
}

/*.nl-btn:hover {*/
/*    font-weight: bold;*/
/*    cursor: pointer;*/
/*    transition: font-weight 0.2s ease;*/
/*}*/

.newsletter-thumbnail {
    width: 100%;
    max-height: 100px;
    object-fit: contain;
}

.message-box {
    color: white;
    display:none;
    margin: -4rem auto 4rem;
}

.subscribed {
    opacity: 0.6;
    cursor: default;
    pointer-events: none;
}


/* ===== Navigation Buttons ===== */
.nav-btn {
    background: transparent;
    /*background: rgba(0, 0, 0, 0.5);*/
    border-radius: 5px;
    color: #fff;
    border: none;
    padding: 5px 10px;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s;
}

.left-btn-wrapper {
    position: absolute;
    /*top: 90%;*/
    left: 1rem;
    transform: translateY(-50%);
    z-index: 20;
    bottom:12%; /*env(safe-area-inset-bottom);*/
}

.right-btn-wrapper {
    position: absolute;
    /*top: 90%;*/
    right: 1rem;
    transform: translateY(-50%);
    z-index: 20;
    overflow: visible;
    bottom: 12%; /*env(safe-area-inset-bottom);*/
}

.left-btn {
    left: 0;
    padding: 10px 15px;
    font-size: 1rem;
}

.right-btn {
    white-space: nowrap;
    display: flex;
    flex-flow: column nowrap;
    align-items: center;
    cursor: pointer;
    will-change: transform;
    transform-origin: center;

    animation-name: zoom-only;
    animation-duration: 5s;
    animation-timing-function: ease-in-out;
    animation-iteration-count: infinite;
    /* animation-delay: 10s; */
    /* animation-fill-mode: forwards; */
}

.right-btn-text {
    text-transform: uppercase;
    font-size: 1rem;
    font-weight: bold;
    text-shadow:
            0 0 4px #b00050,
            0 0 8px #b00050,
            0 0 12px #b00050;
}

.right-btn-arrow {
    font-size: 18px;
    margin-left: 10px;
}

@keyframes zoom-only {
    0%, 100% {
        transform: scale(1);
        transform-origin: 50% 50%;
    }
    10%, 20%, 30%, 50%, 70%, 80%, 90% {
        transform: scale(1.05);
        transform-origin: 50% 50%;
    }
    40%, 60% {
        transform: scale(1.1);
        transform-origin: 50% 50%;
    }
}


/* ===== Helper classes and more ===== */
.font-anton {
    font-family: 'Anton', sans-serif;
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

.bold {
    font-weight: bold;
}

.italic {
    font-style: italic;
}

.pink {
    color: #f00f70;
}

.yellow {
    color: #f5b716;
}

.orange {
    color: #dd6026;
}

.blue {
    color: #11a7ce;
}

.bg-pink {
    background-color: #f00f70;
}

.bg-yellow {
    background-color: #f5b716;
}

.bg-orange {
    background-color: #dd6026;
}

.bg-blue {
    background-color: #11a7ce;
}

.bg-purple {
    background-color: #563a9b;
}

a {
    /* text-decoration: none; */
    color: unset;
    cursor: pointer;
}

.hidden {
    display: none;
}



/* ===== Mobile styles ===== */
@media (max-width: 600px) {

    .share-icons.active {
        top: -2em;
    }

    .media-elements-4 {
        gap: 10px;
    }

    /*.right-btn-wrapper, .left-btn-wrapper {*/
    /*    top: 83%;*/
    /*}*/

    html, body {
        height: 100%;
        margin: 0;
        padding: 0;
        overflow: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .carousel-wrapper {
        height: 100dvh;
        height: 100svh; /* small viewport height - new iOS keyword */
        height: 100lvh; /* large viewport height fallback */
        width: 100%;
        position: relative;
        overflow: hidden;
        background: #fff;
        padding-bottom: env(safe-area-inset-bottom);
        padding-top: env(safe-area-inset-top);
        box-sizing: border-box;
    }

}

/* ===== Larger screens ===== */
@media (min-width: 601px) {

    .card-media-element-top {
        margin-top: -12rem;
    }

    .card-media-element-bottom {
        margin-top: -23rem;
    }

    .card-media-element-bottom img {
        width: 22rem;
    }

    .card-gif-small {
    width: 120px;
  }

  .card-text-2 {
    font-size: 2.5rem;
    padding: 2rem;
    margin: 3rem 0;
  }

  .card-text-3 {
    font-size: 3.5rem;
      margin-left: 2rem;
      margin-top: 5rem;
  }


    .media-elements-side-3 {
        margin-right: -13rem;
    }

  .card-text-4,
  .card-text-7, .card-text-8 {
    font-size: 2.5rem;
    margin: 0.5rem 2rem;
  }

  .card-text-6 {
    font-size: 3.2rem;
  }

    .card-text-5 {
        padding: 2rem 4rem;
    }

  .card-subtext-5 {
    font-size: 1.5rem;
  }

    .card-text-10 {
        font-size: 2.5rem;
        padding: 0 4rem;
    }

    .story-text h3 {
        font-size: 1.2rem;
    }

    .story-text p {
        font-size: 0.8rem;
    }

    /*.story-tag {*/
    /*    font-size: 1rem;*/
    /*    margin: 0 5px -20px auto;*/
    /*}*/

    .first-story {
        max-width: 300px;
    }

  .orange-gif,
  .purple-gif {
    width: 40px;
  }

  .blue-gif {
    width: 30px;
  }

  .pink-circle {
    width: 170px;
  }

  .right-btn-arrow {
    font-size: 30px;
  }

    .right-btn-wrapper {
        bottom: 8%; /*env(safe-area-inset-bottom);*/
    }

  .right-btn-text {
    font-size: 1.2rem;
      line-height: 0.5;
  }

  .card {
    height: auto;
    max-height: 700px;
    width: 100%;
    padding-bottom: 0;
    position: static;
    overflow: visible;
  }

  .card-content {
    position: relative; /* remove absolute overlay if applied */
    top: auto;
    left: auto;
    right: auto;
    bottom: auto;
    display: block;
    justify-content: initial;
  }
    .side-elements-4 img {
        height: auto;
    }

    .media-elements-5 {
        display: flex;
        align-items: center;
        flex-direction: row;
        justify-content: center;
        margin-top: 3rem;
    }

    .media-elements-8 img {
        margin-top: -20rem;
    }

    .media-elements-10 img {
        width:9rem;
    }

    .media-elements-12 {
        display: flex;
        justify-content: flex-end;
        margin-top: -10rem;
    }
    .media-elements-12 img {
        width: 30rem;
    }

    .small {
        font-size: 1.8rem;
    }

    .card-text-9 {
        font-size: 2rem;
    }

    .card-text-15 {
        font-size: 1.5rem;
    }

    .media-elements-14 {
        height: 23rem;
        padding: 0 4rem;
    }

    .media-elements-15{
        flex-direction: row;
        gap: 0;
    }
    .card-7 .card-content-7 {
        display: flex;
    }
    .card-content-7 p {
        margin: 0 auto;
        font-size: 1.2rem;
        text-align: center;
    }

    .card-text-12 {
        font-size: 2.2rem;
        padding: 0 1rem;
    }

    #total_timeframe_read {
        font-size: 7rem;
        padding: 0;
        margin-top: 4rem;
        margin-left: 10rem;
        text-align: left;
    }

    #persona-description {
        /*font-size: 1.2rem;*/
        margin: 0 1rem;
    }

    .card-content-11 {
        margin-top: 0;
        padding-top: 0;
    }

}

