/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, html {
    height: 100%;
    font-family: 'Arial', sans-serif;
    overflow-x: hidden; /* Allow vertical scrolling, prevent horizontal */
}

/* Container for the entire page */
.container {
    position: relative;
    width: 100%;
    min-height: 100vh; /* Changed from fixed height to minimum height */
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.5),
        rgba(0, 0, 0, 0.3)
    );
    padding: 20px 0; /* Add padding for better spacing on mobile */
}

/* Background images */
.container::before, .container::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 50%;
    background-size: cover;
    background-position: center;
    z-index: -1;
}

/* First condolence card image (front) */
.container::before {
    top: 0;
    background-image: url('../images/front.jpg');
}

/* Second condolence card image (back) */
.container::after {
    bottom: 0;
    top: auto;
    background-image: url('../images/back.jpg');
}

/* Memorial content in the middle */
.memorial-content {
    background-color: rgba(255, 255, 255, 0.85);
    padding: 2rem;
    border-radius: 10px;
    max-width: 800px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

.memorial-content h1 {
    margin-bottom: 1.5rem;
    color: #333;
    font-size: 2.5rem;
}

.memorial-content p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #555;
    font-size: 1.1rem;
}

/* Disclaimer toast */
.disclaimer-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 10;
    max-width: 400px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    background-color: white;
}

.disclaimer-header {
    display: flex;
    justify-content: flex-end;
    padding: 5px;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.minimize-btn, .close-btn {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 5px;
    border-radius: 4px;
}

.minimize-btn:hover, .close-btn:hover {
    background-color: #e0e0e0;
}

.close-btn {
    font-size: 18px;
    font-weight: bold;
}

.disclaimer-content {
    overflow: hidden;
}

.disclaimer-toast img {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    body, html {
        overflow-y: auto; /* Explicitly enable vertical scrolling on mobile */
    }

    .container {
        min-height: 100vh;
        height: auto; /* Allow container to expand based on content */
        flex-direction: column; /* Stack content vertically on mobile */
        padding: 60px 0; /* Increase padding for better spacing */
    }

    .container::before, .container::after {
        height: 50%;
        opacity: 0.7;
        position: fixed; /* Fix background images to viewport */
    }

    .container::before {
        z-index: -2;
    }

    .memorial-content {
        max-width: 90%;
        padding: 1.5rem;
        z-index: 1;
        margin: 20px 0; /* Add margin for better spacing */
        max-height: none; /* Remove any height restrictions */
        overflow-y: visible; /* Ensure content is not cut off */
    }

    .memorial-content h1 {
        font-size: 2rem;
    }

    .memorial-content p {
        font-size: 1rem;
    }

    .disclaimer-toast {
        width: 100%;
        max-width: 100%;
        bottom: 0;
        right: 0;
        left: 0;
        border-radius: 0;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
    }

    .disclaimer-header {
        padding: 8px;
        justify-content: flex-end;
    }

    .minimize-btn, .close-btn {
        width: 36px;
        height: 36px;
        font-size: 18px;
        margin-left: 10px;
    }

    .close-btn {
        font-size: 22px;
    }
}
