/* Home Page Styles */
#home-page {
    /* Reset container constraints for full screen scroll */
    max-width: none;
    margin: 0;
    padding: 0;
    height: calc(100vh - 64px); /* Subtract topnav height approx */
    overflow-y: auto;
    scroll-snap-type: y mandatory;
    scroll-behavior: smooth;
}

.home-section {
    height: 100%;
    width: 100%;
    scroll-snap-align: start;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.home-section-text {
    background: transparent;
    z-index: 10;
}

.home-section-visual {
    background: transparent;
    overflow: hidden;
}

.home-hero {
    text-align: center;
    padding: 2rem;
    max-width: 800px;
}

.home-title {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.home-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* Animation Container */
.home-animation-container {
    position: relative; /* Changed from absolute to relative to parent section */
    width: 100%;
    height: 100%;
    opacity: 0.6;
}

.floating-photo {
    position: absolute;
    width: 120px;
    height: 160px;
    pointer-events: none;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border: 6px solid white;
    border-bottom: 20px solid white;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    opacity: 0;
    transition: all 1.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Initial positions (same as final, but rotated and scaled) */
.floating-photo.p1 {
    top: 50%; left: 50%;
    margin-top: -170px; margin-left: -142px;
    transform: rotate(-45deg) scale(0.8);
}
.floating-photo.p2 {
    top: 50%; left: 50%;
    margin-top: -170px; margin-left: 10px;
    transform: rotate(45deg) scale(0.8);
}
.floating-photo.p3 {
    top: 50%; left: 50%;
    margin-top: 10px; margin-left: -142px;
    transform: rotate(30deg) scale(0.8);
}
.floating-photo.p4 {
    top: 50%; left: 50%;
    margin-top: 10px; margin-left: 10px;
    transform: rotate(-30deg) scale(0.8);
}

/* Merged state (Neat 2x2 Grid) */
.home-animation-container.animate .floating-photo {
    opacity: 1;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
}

/* Top Left */
.home-animation-container.animate .floating-photo.p1 {
    top: 50%; left: 50%;
    margin-top: -170px; margin-left: -142px;
    transform: rotate(0deg) scale(1);
}
/* Top Right */
.home-animation-container.animate .floating-photo.p2 {
    top: 50%; left: 50%;
    margin-top: -170px; margin-left: 10px;
    transform: rotate(0deg) scale(1);
}
/* Bottom Left */
.home-animation-container.animate .floating-photo.p3 {
    top: 50%; left: 50%;
    margin-top: 10px; margin-left: -142px;
    transform: rotate(0deg) scale(1);
}
/* Bottom Right */
.home-animation-container.animate .floating-photo.p4 {
    top: 50%; left: 50%;
    margin-top: 10px; margin-left: 10px;
    transform: rotate(0deg) scale(1);
}

/* Action Button Container */
.home-action-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    opacity: 0;
    pointer-events: none; /* Initially disabled */
    transition: opacity 0.5s ease 1.2s; /* Delay appearance until photos arrive */
}

.home-animation-container.animate .home-action-container {
    opacity: 1;
    pointer-events: auto;
}

.home-start-btn {
    display: flex;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--primary);
    color: white;
    font-size: 1.25rem;
    font-weight: 600;
    border-radius: 9999px;
    box-shadow: 0 10px 25px rgba(93, 92, 222, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    border: 2px solid white;
}

.home-start-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 15px 35px rgba(93, 92, 222, 0.5);
}

/* Template Grid */
.template-grid {
    display: grid;
    grid-template-columns: repeat(1, 1fr);
    gap: 2rem;
    padding: 2rem 0;
    position: relative;
    z-index: 10;
}

@media (min-width: 640px) {
    .template-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .template-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Template Card */
.template-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
}

.template-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-color: var(--primary);
}

.template-preview {
    aspect-ratio: 3/2;
    background-color: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-color);
}

.template-info {
    padding: 1.5rem;
}

.template-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.template-desc {
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.template-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--primary);
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-top: 1rem;
}
