/* General Styling */
body {
    font-family: 'Quicksand', sans-serif; /* Softer body font */
    background: linear-gradient(135deg, #e0f2f7 0%, #d4eaf7 100%); /* Lighter, more serene background */
    color: #333;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 2rem;
    box-sizing: border-box;
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* The Main Card Container */
.card-container {
    width: 100%;
    max-width: 1200px;
    background: #ffffff;
    border-radius: 20px; /* More rounded corners */
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.15); /* Stronger shadow for depth */
    padding: 0; /* Adjust padding due to hero section */
    box-sizing: border-box;
    overflow: hidden; /* Ensure hero image respects border-radius */
    animation: slideIn 0.8s ease-out forwards; /* Initial card animation */
    transform: translateY(20px);
    opacity: 0;
}

@keyframes slideIn {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Hero Section - The top part with image and main message */
.hero-section {
    position: relative;
    background: linear-gradient(45deg, #a8dadc, #457b9d); /* Gradient background if no image */
    color: #ffffff;
    padding: 3rem; /* Adjusted padding for better visual balance */
    border-bottom: 3px solid rgba(255, 255, 255, 0.2);
    text-align: center;
    margin-bottom: 2.5rem;
    overflow: hidden;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1636193535246-a07cd0aa6fcb?q=80&w=2940&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D'); /* Example Unsplash image */
    /* https://unsplash.com/photos/a-sign-that-says-see-you-later-hanging-from-a-door-v_WLk_vNYRA */
    background-size: cover;
    background-position: center;
    opacity: 0.7; /* Make it subtle */
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.hero-section h1 {
    font-family: 'Playfair Display', serif; /* Elegant heading font */
    font-size: 3.5rem; /* Larger, more impactful */
    margin: 0 0 1rem 0;
    line-height: 1.2;
    letter-spacing: 0.5px;
    animation: fadeInScale 1s ease-out forwards;
}

.hero-section .subtitle {
    font-size: 1.3rem; /* Slightly larger subtitle */
    line-height: 1.7;
    margin-top: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeIn 1.2s ease-out forwards;
    animation-delay: 0.2s;
}

.divider {
    width: 80px;
    height: 3px;
    background: #f1faee;
    margin: 2rem auto 0;
    border-radius: 5px;
    animation: expandWidth 1s ease-out forwards;
    animation-delay: 0.4s;
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes expandWidth {
    from { width: 0; }
    to { width: 80px; }
}

/* Wishes Grid Container */
#wishes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.8rem; /* Slightly larger gap */
    padding: 0 3rem; /* Apply padding here for the grid content */
    margin-bottom: 2.5rem;
}

.loading {
    font-size: 1.2rem;
    color: #777;
    text-align: center;
    grid-column: 1 / -1;
    padding: 2rem;
}

.loading i {
    margin-right: 0.8rem;
    color: #457b9d;
}

/* Individual Wish Cards */
.wish-card {
    background: #fdfdfd;
    border: 1px solid #e0e0e0; /* Softer border */
    border-radius: 12px; /* Slightly more rounded */
    padding: 1.8rem; /* More internal padding */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08); /* More pronounced, soft shadow */
    transition: transform 0.2s ease, box-shadow 0.2s ease; /* Hover effect */
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInCard 0.6s ease forwards; /* Custom animation for cards */
}

.wish-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

@keyframes fadeInCard {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wish-card p {
    font-size: 1.05rem; /* Slightly larger text */
    line-height: 1.7;
    color: #444;
    margin: 0 0 1rem 0;
    font-style: italic;
}

.wish-card span {
    font-weight: 700;
    font-size: 0.9rem;
    color: #2a9d8f; /* A new accent color */
    display: block;
    text-align: right;
    margin-top: 1rem;
    padding-top: 0.8rem;
    border-top: 1px dashed #e0e0e0; /* Subtle separator */
}

/* Footer Section */
footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2.5rem 3rem;
    border-top: 2px solid #e0e0e0;
}

.cta-button {
    display: inline-flex; /* Align icon and text */
    align-items: center;
    gap: 0.8rem; /* Space between icon and text */
    background: linear-gradient(45deg, #2a9d8f, #264653); /* Gradient button */
    color: #ffffff;
    font-family: 'Quicksand', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
    text-decoration: none;
    padding: 1.1rem 3rem;
    border-radius: 50px;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(42, 157, 143, 0.3);
}

.cta-button:hover,
.cta-button:focus {
    background: linear-gradient(45deg, #264653, #2a9d8f); /* Reverse gradient on hover */
    box-shadow: 0 12px 30px rgba(42, 157, 143, 0.4);
    transform: translateY(-3px);
}

.footer-note {
    font-size: 0.9rem;
    color: #777;
    margin-top: 1.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .card-container {
        border-radius: 12px;
    }

    .hero-section {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }

    .hero-section .subtitle {
        font-size: 1rem;
    }
    
    #wishes-grid {
        grid-template-columns: 1fr;
        padding: 0 1.5rem;
    }

    footer {
        padding: 2rem 1.5rem;
    }

    .cta-button {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-section h1 {
        font-size: 2rem;
    }

    .hero-section .subtitle {
        font-size: 0.9rem;
    }

    .cta-button {
        font-size: 0.9rem;
        padding: 0.8rem 1.5rem;
    }
}