/* Default: All panels visible */
.panel {
    width: 100vw;
    height: 100vh;
    position: relative;
}

.hz-container {
    width: 1000vw; /* Total width for all panels */
    height: 100vh;
    background-color: rgba(0, 14, 84, 1);
    background-size: contain;
    background-repeat: repeat-x;
    will-change: transform;
    display: flex;
    flex-wrap: nowrap;
}

/* Hide all panels except .final-panel on small screens */
@media (max-width: 850px) {
    .hz-container {
        width: 100vw; /* Single panel width */
        height: auto; /* Allow natural height for vertical scrolling */
        flex-direction: column; /* Stack panels vertically */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    .panel {
        display: none; /* Hide all panels by default */
        width: 100vw;
        height: auto; /* Allow content to dictate height */
    }

    .final.panel {
        display: block; /* Show only the final panel */
        position: static; /* Remove relative positioning */
        width: 100vw;
        height: auto; /* Allow natural height */
        min-height: 100vh; /* Ensure at least viewport height */
    }

    /* Adjust final panel content for vertical scrolling */
    .grid-container {
        height: auto; /* Allow natural height */
        min-height: 100vh; /* Ensure at least viewport height */
    }

    .final-content-container {
        flex-direction: column; /* Stack left and right vertically */
        align-items: center; /* Center content */
        height: auto; /* Allow natural height */
    }

    .final-content-left,
    .final-content-right {
        width: 100%; /* Full width on mobile */
        align-self: center; /* Center within container */
    }

    .final-content-right {
        display: inline-flex; /* Switch to flex for better mobile layout */
        flex-direction: column; /* Stack boxes vertically */
        gap: 10px;
    }

    .final-content-box {
        width: 100%; /* Full width for boxes */
        height: auto; /* Adjust height dynamically */
        min-height: 150px; /* Ensure visibility */
    }

    .grateful {
        opacity: 1;
        font-size: 30vw;
        line-height: .8;
    }

    .flip-card-back p {
        font-size: 1.2rem;
    }
    .site-footer {
        background-color: #fff;
    }
    .footer-container {
        display: flex;
        flex-direction: column;
    }
    .footer-container div {
        margin: .5rem;
    }
    .footer-container img {
        max-width: 300px;
        height: auto;
        margin: auto;
    }
}

@media (max-width: 1250px) {
    .hz-container {
        width: 100vw; /* Single panel width */
        height: auto; /* Allow natural height for vertical scrolling */
        flex-direction: column; /* Stack panels vertically */
        overflow-x: hidden; /* Prevent horizontal scrolling */
    }

    .panel {
        display: none; /* Hide all panels by default */
        width: 100vw;
        height: auto; /* Allow content to dictate height */
    }

    .final.panel {
        display: block; /* Show only the final panel */
        position: static; /* Remove relative positioning */
        width: 100vw;
        height: auto; /* Allow natural height */
        min-height: 100vh; /* Ensure at least viewport height */
    }

    /* Adjust final panel content for vertical scrolling */
    .grid-container {
        height: auto; /* Allow natural height */
        min-height: 100vh; /* Ensure at least viewport height */
    }

    .final-content-container {
        /*flex-direction: row; !* Stack left and right vertically *!*/
        /*align-items: center; !* Center content *!*/
        /*height: auto; !* Allow natural height *!*/
    }

    .final-content-left,
    .final-content-right {
        /*width: 100%; !* Full width on mobile *!*/
        /*align-self: center; !* Center within container *!*/
    }

    .final-content-right {
        /*display: flex; !* Switch to flex for better mobile layout *!*/
        /*flex-direction: column; !* Stack boxes vertically *!*/
        /*gap: 10px;*/
    }

    .final-content-box {
        /*width: 100%; !* Full width for boxes *!*/
        /*height: auto; !* Adjust height dynamically *!*/
        min-height: 150px; /* Ensure visibility */
    }

    .grateful {
        opacity: 1;
    }

    .sticky-nav {
        display: none;
    }

    .final-content-box img {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
        z-index: 6;
        opacity: 0.25;
        object-position: center;
    }
    .chevron-icon {
        top: 0;
    }

    .flip-card {
        background-color: #FFFFFF;
        /*perspective: 1000px;*/
    }

    .flip-card-inner {
        position: relative;
        width: 100%;
        height: 100%;
        /*transition: transform 0.6s;*/
        /*transform-style: preserve-3d;*/
        box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    }

    .flip-card:hover .flip-card-inner {
        transform: none;
        /*transition: all 1s ease;*/
    }

    .flip-card-front,
    .flip-card-back {
        /*position: absolute;*/
        -webkit-backface-visibility: unset;
        backface-visibility: unset;
    }

    .flip-card-back {
        width: 100%;
        height: 100%;
        padding: 5px;
        background-color: #FFFFFF;
        /*font-size: 16px; !important;*/
        transform: none;
        align-items: flex-start;
    }

    .flip-card-back p {
        font-size: .95rem;
        display: flex;
        align-items: baseline;
        /*gap: 5px;*/
    }

    .flip-card-back > p > .right-chevrons {
        visibility: hidden;
        height: 30px;
    }

    .letter-button {
        width: 99%;
    }
    .final-content-box-title {
        display: block;
        height: 24%;
        z-index: 6;
    }

    .final-content-box-title h2 {
        line-height: 2rem;
        font-size: clamp(1.5rem, 3vw, 2rem);
        position: absolute;
        z-index: 7;
    }
}