*, html {
    scroll-behavior: smooth!important;
}
* {
    box-sizing: border-box;
    overflow: hidden;
}
html, body {
    height: 100%;
    margin: 0;
}
body {
    background-image: none!important;
    background-color: #FFFEFA!important;
    height: 100vh!important;
    overflow: hidden;
}
body, #after-title {
    font-family: "Catamaran", Helvetica, sans-serif;
    font-weight: 100;
}
nav {
    width: 100%;
}
h2 {
    margin: 0;
}
/* Center the entire after-main container */
#after-main {
    height: 100vh; /* Full viewport height */
    width: 100vw; /* Full viewport width */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers vertically */
    align-items: center;    /* Centers horizontally */
    position: absolute;
    top: 0;
    left: 0;
    z-index: 999;
    background: transparent; /* Optional, for better contrast debugging */
}

/* Style for individual elements */
#after-title,
#date,
#counter-title,
#counter,
#counter2 {
    color: #CC958F;
    font-family: "Cormorant Garamond", serif;
    font-weight: 500;
    text-align: center;
    letter-spacing: -0.015em;
}

/* Specific font sizes for elements */
#after-title {
    font-size: 4em;
}
#date {
    font-size: 3.75em;
}
#counter-title {
    font-size: 2em;
    text-transform: initial;
}
#counter,
#counter2 {
    font-size: 1.5em;
}

#header-after {
    background: none;
    display: flex;
    justify-content: center;
    align-items: stretch;
    right: 0;
    height: 8em;
    padding: 0;
    pointer-events: none;
    width: 100%!important;
    max-width: 100%!important;
    z-index: 999;
    position: absolute;
    top: 0;
    left: 0;
}
#logo-nav,
#logo-nav-alt {
    height: 100%;
    width: auto;
    text-align: center;
    padding: 0 1.35em;
    transition: opacity 0.8s ease-in-out;
    -webkit-transition: opacity 0.8s ease-in-out;
    -ms-transition: opacity 0.8s ease-in-out;
    -moz-transition: opacity 0.8s ease-in-out;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    margin-left: auto;
    margin-right: auto;
}
#logo-nav {
    opacity: 1;
}
#logo-nav-alt {
    opacity: 0;
}
#image-library {
    height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Ensure it's positioned relative for child positioning */
}

.image-library-link {
    position: absolute; /* Position absolutely for stacking */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 1s ease-in-out; /* Only transition opacity */
    pointer-events: none; /* Disable interaction when hidden */
}
.image-from-library {
    width: auto;
    height: 100%;
    object-fit: contain;
    z-index: 1;
}
.carousel-active {
    opacity: 1;
    pointer-events: all; /* Enable interaction when active */
}
.carousel-hidden {
    opacity: 0;
    pointer-events: none;
}

@media 
(max-width: 1495px),
(max-width: 1280px),
(max-width: 980px),
(max-width: 736px),
(max-width: 480px)
{   
    #logo-nav {
        opacity: 0;
    }
    #logo-nav-alt {
        opacity: 1;
    }
}