/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
}

/* Parallax Sections */
.parallax {
    /* use min-height + padding instead of a fixed height so the section can be tighter
       and sit closer to the next content while still looking good on tall screens */
    min-height: 35vh;
    height: auto;
    padding: 2rem 0; /* reduce vertical footprint */
    background-image: url('images/christmas-bg.jpg'); /* Put your own background image */
    background-size: cover;
    background-position: center;
    /* Disable parallax: use normal scrolling background so sections behave like regular blocks */
    background-attachment: scroll;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.parallax-2 {
    background-image: url('images/snow-bg.jpg'); /* Second background */
}

/* Overlay for readability */
.overlay {
    background: rgba(0, 0, 0, 0.5);
    padding: 1rem; /* slightly less padding so the overlay is more compact */
    border-radius: 6px;
    color: #fff;
}

/* Content Section */
.content {
    background: #fafafa;
    padding: 3rem 1rem;
    text-align: center;
}

/* Desktop / default */
.gift {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    width: 90%;
    max-width: 600px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(3px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.gift:hover {
    transform: translateY(-15px);
}

body {
    background-color: #fff;
    background-image: radial-gradient(#656464 1px, transparent 1px);
    background-size: 3px 3px; /* spacing of dots */
    background-attachment: fixed;
}

.content {
    background: transparent; /* remove #fafafa */
}

.gift {
    background: rgba(255, 255, 255, 0.85); /* slightly see-through white */
    backdrop-filter: blur(3px); /* nice frosted effect */
}

/* Make gift images a reasonable, responsive size on desktop */
.gift img {
    max-width: 100%; /* keep images from being huge on large screens */
    width: auto;      /* allow natural width up to max-width */
    height: auto;     /* preserve aspect ratio */
    display: block;   /* avoid inline spacing issues */
    border-radius: 8px;
}

/* Center images only for tiles that explicitly use the center-img helper class */
.gift.center-img {
    justify-content: center; /* center the flex children horizontally */
    text-align: center;
}
.gift.center-img img {
    margin: 0 auto; /* ensure the image itself is centered inside the tile */
}

/* Secret wish: hidden by default, reveal with .show */
.secret-wish {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 400ms ease, opacity 300ms ease, padding 300ms ease;
    padding-top: 0;
    padding-bottom: 0;
}
.secret-wish.show {
    max-height: 600px; /* large enough to show typical gift card */
    opacity: 1;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
}

/* Make the secret-wish stack vertically and ensure the image and paragraphs are visible */
.gift.secret-wish {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.gift.secret-wish img {
    max-width: 260px;
    width: 60%;
    height: auto;
    display: block;
    margin: 0.5rem auto;
}
.gift.secret-wish p {
    width: 90%;
    text-align: center;
    margin: 0.2rem auto;
}

/* Carousel styles for the secret wish */
.carousel {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 8px;
}
.carousel .slides {
    display: flex;
    transition: transform 400ms ease;
    will-change: transform;
}
.carousel .slide {
    min-width: 100%;
    flex-shrink: 0;
    display: block;
}
.carousel .slide img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}
.carousel-prev, .carousel-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    cursor: pointer;
}
.carousel-prev { left: 8px; }
.carousel-next { right: 8px; }
.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 0.6rem;
}
.carousel-dots button {
    width: 10px; height: 10px; border-radius: 50%; border: none; background: #ccc; cursor: pointer;
}
.carousel-dots button.active { background: #1e88e5; }

@media (max-width: 600px) {
    .carousel { max-width: 280px; }
}

/* Simple button style */
.btn {
    background: #1e88e5;
    color: #fff;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
}
.btn:focus {
    outline: 3px solid rgba(30,136,229,0.3);
}

/* Mobile fallback */
@media (max-width: 768px) {
    body {
        background: none; /* remove desktop background to avoid double-layer */
    }

    body::before {
        content: "";
        position: fixed;
        inset: 0;
        background-color: #fff;
        background-image: radial-gradient(#ccc 1px, transparent 1px);
        background-size: 20px 20px;
        z-index: -1; /* keep it behind everything */
    }
}

.parallax {
    /* Make these sections normal flow elements so they sit between .gift blocks
       and don't create layered parallax backgrounds. */
    position: static;
    overflow: visible;
}

.parallax::before,
.parallax::after {
    /* Hide decorative pseudo-layers used for the parallax effect so backgrounds
       render as a single static layer (or none, depending on the main rule). */
    display: none;
}

@keyframes snow {
    0% { transform: translateY(-10vh) translateX(0); opacity: 1; }
    100% { transform: translateY(100vh) translateX(20px); opacity: 0; }
}

.snowflake {
    position: absolute;
    top: -10px;
    font-size: 3.2rem;
    color: blue;
    opacity: 0;
    animation: snow linear infinite;
}

.snowflake:nth-child(1) { left: 10%; animation-duration: 20s; }
.snowflake:nth-child(2) { left: 30%; animation-duration: 22s; }
.snowflake:nth-child(3) { left: 50%; animation-duration: 24s; }
.snowflake:nth-child(4) { left: 70%; animation-duration: 21s; }
.snowflake:nth-child(5) { left: 90%; animation-duration: 23s; }

.gift {
    transform: translateY(0);
    transition: transform 0.2s ease-out;
    will-change: transform;
}

.overlay h1, .overlay h2 {
    text-shadow: 0 0 10px #fff, 0 0 20px #f54927, 0 0 40px #f54927;
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    from { text-shadow: 0 0 5px #fff, 0 0 10px #f54927; }
    to   { text-shadow: 0 0 20px #fff, 0 0 40px #f54927; }
}

.gift {
    width: 90%;            /* shrinks to fit small screens */
    max-width: 600px;      /* never gets wider than this */
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(3px);
}

.content {
    padding: 3rem 1rem;
}

@media (max-width: 600px) {
    .content {
        padding: 2rem 0.5rem;
    }
    .gift {
        padding: 1rem;
    }
    .gift img {
        max-width: 100%;   /* never overflow its container */
        height: auto;      /* keep the aspect ratio */
        border-radius: 8px; /* optional, matches your card style */
        display: block;    /* removes extra bottom whitespace */
        margin: 0 auto;    /* center the image */
    }
}

h1, h2, p {
    word-wrap: break-word;
}


/* Mobile tweak */
@media (max-width: 600px) {
    .gift {
        width: 80%;          /* make the white box smaller */
        padding: 1rem;       /* reduce padding */
        margin-left: 15%;    /* shift box right so img can "hang out" on left */
        flex-direction: column;
        text-align: center;
    }

    .gift img {
        max-width: 70%;      /* let the image be bigger relative to the box */
        margin-left: -20%;   /* shift the image left so it overhangs */
    }
}


