/* app.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', serif;
    background: linear-gradient(135deg, 
        #ffc4d6 0%, 
        #ffebb8 25%, 
        #c4f0d6 50%, 
        #c4d9f0 75%, 
        #f0c4e8 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #4a4a4a;
    overflow-x: hidden;
    min-height: 100vh;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.lantern {
    position: fixed;
    width: 40px;
    height: 55px;
    background: radial-gradient(ellipse at center, #ffe4b5 0%, #ffd700 30%, #ffb347 100%);
    border-radius: 50% 50% 50% 50% / 35% 35% 65% 65%;
    opacity: 0;
    pointer-events: none;
    z-index: 1; /* behind cards but above background */
    filter: blur(0.3px);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.8), 
                0 0 60px rgba(255, 165, 0, 0.6),
                0 0 90px rgba(255, 140, 0, 0.4),
                inset 0 0 20px rgba(255, 240, 180, 0.9);
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.lantern::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 2px;
    height: 8px;
    background: linear-gradient(to bottom, #c0c0c0, #8b7355);
    border-radius: 1px;
    box-shadow: 0 0 5px rgba(192, 192, 192, 0.5);
}

.lantern::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 12px;
    background: radial-gradient(ellipse, #ffd700 0%, #ffb347 50%, #ff8c00 100%);
    border-radius: 50%;
    opacity: 0.8;
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.6);
}

.lantern.glow {
    box-shadow: 0 0 40px rgba(255, 215, 0, 1), 
                0 0 80px rgba(255, 165, 0, 0.9),
                0 0 120px rgba(255, 140, 0, 0.6),
                inset 0 0 25px rgba(255, 250, 200, 1);
    filter: blur(0.2px);
}

/* Disclaimer */
.disclaimer {
    margin-top: 25px;
    padding: 20px;
    background: rgba(107, 159, 184, 0.08);
    border-left: 4px solid #6b9fb8;
    border-radius: 8px;
    font-size: 0.95em;
    color: #5a5a5a;
    line-height: 1.7;
}


/* Family silhouettes - REMOVED */

header {
    text-align: center;
    padding: 60px 20px 20px;
    position: relative;
    z-index: 10; /* Keep header above lanterns */
}

.hero-origin {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column; /* stack line above flower */
    gap: 12px;
    margin-top: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.hero-typed {
    font-size: 1.2em;
    color: #ff7fb3;
    min-height: 1.5em; /* Use min-height instead of fixed height */
    line-height: 1.5em;
    margin-bottom: 15px; /* Add clear spacing below */
}

/* Full-width intro card above columns */
.fullwidth-intro {
    max-width: 1200px;
    margin: 0 auto 40px auto; /* match section gap */
    padding: 0 20px;
}

.intro-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 40px 40px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), 
                0 4px 16px rgba(0,0,0,0.04),
                inset 0 1px 0 rgba(255,255,255,0.6);
    border: 1px solid rgba(255,255,255,0.2);
    position: relative;
    z-index: 10; /* ensure cards are above lanterns */
}

.logo-container {
    margin-bottom: 20px;
}

.logo-container img {
    max-width: 150px;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

h1 {
    font-size: 3.5em;
    color: #ff7fb3;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    animation: fadeInDown 1s ease-out;
}

.tagline {
    font-size: 1.3em;
    color: #6b9fb8;
    font-style: italic;
    margin-bottom: 10px;
    margin-top: 15px; /* Add extra space above on all devices */
}

.quote {
    font-size: 1.1em;
    color: #9b7fb8;
    font-style: italic;
    margin-top: 20px;
}

.quote-attribution {
    margin-top: -30px; /* Move the attribution up */
    font-size: 0.85em; /* Adjust this value - smaller number = smaller text */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 20px 20px; /* tighter bottom padding */
    display: grid;
    grid-template-columns: 1fr 380px;
    align-items: start;
    gap: 30px;
}

/* Trim bottom space after the final left-column section */
.main-column > section:last-child {
    margin-bottom: 20px;
}

/* Ensure the sticky sidebar doesn't add extra space below */
#action {
    grid-column: 2;
    grid-row: 1;
    position: sticky;
    top: 20px;
    height: fit-content;
    align-self: start;
    overflow: visible;
    z-index: 10; /* Make sure this is here */
}

section {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    border-radius: 24px;
    padding: 50px 40px;
    margin-bottom: 40px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.08), 
                0 4px 16px rgba(0,0,0,0.04),
                inset 0 1px 0 rgba(255,255,255,0.6);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.2);
    z-index: 10; /* ensure cards are above lanterns */
}

section:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12), 
                0 8px 24px rgba(0,0,0,0.06),
                inset 0 1px 0 rgba(255,255,255,0.8);
}

h2 {
    font-size: 2.5em;
    color: #ff7fb3;
    margin-bottom: 25px;
    text-align: center;
}

p {
    line-height: 1.8;
    font-size: 1.1em;
    margin-bottom: 20px;
    color: #5a5a5a;
}

/* Flower Animation */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.flower-container {
    position: relative;
    width: 80px;
    height: 100px;
}

.flower {
    position: relative;
    width: 100%;
    height: 100%;
}

.stem {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 0;
    background: linear-gradient(to top, #6b9f6b, #8bc98b);
    border-radius: 2px;
    animation: growStem 1.5s ease-out forwards;
}

.leaf {
    position: absolute;
    width: 20px;
    height: 12px;
    background: #7fb37f;
    border-radius: 50% 0;
    opacity: 0;
}

.leaf-left {
    left: 20%;
    bottom: 30%;
    transform: rotate(-45deg);
    animation: growLeaf 0.5s ease-out 1s forwards;
}

.leaf-right {
    right: 20%;
    bottom: 20%;
    transform: rotate(135deg);
    animation: growLeaf 0.5s ease-out 1.2s forwards;
}

.petals {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
}

.petal {
    position: absolute;
    width: 25px;
    height: 25px;
    background: linear-gradient(135deg, #ffb3d9 0%, #ff8ec4 100%);
    border-radius: 50% 50% 50% 0;
    top: 50%;
    left: 50%;
    transform-origin: 0 0;
    opacity: 0;
    transform: translate(-50%, -50%) rotate(0deg) scale(0);
}

.petal:nth-child(1) {
    animation: bloomPetal 0.6s ease-out 1.5s forwards;
    transform: translate(-50%, -50%) rotate(0deg);
}

.petal:nth-child(2) {
    animation: bloomPetal 0.6s ease-out 1.6s forwards;
    transform: translate(-50%, -50%) rotate(72deg);
}

.petal:nth-child(3) {
    animation: bloomPetal 0.6s ease-out 1.7s forwards;
    transform: translate(-50%, -50%) rotate(144deg);
}

.petal:nth-child(4) {
    animation: bloomPetal 0.6s ease-out 1.8s forwards;
    transform: translate(-50%, -50%) rotate(216deg);
}

.petal:nth-child(5) {
    animation: bloomPetal 0.6s ease-out 1.9s forwards;
    transform: translate(-50%, -50%) rotate(288deg);
}

.center {
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%) scale(0);
    width: 20px;
    height: 20px;
    background: radial-gradient(circle, #ffd966 0%, #ffcc33 100%);
    border-radius: 50%;
    animation: bloomCenter 0.4s ease-out 2.1s forwards;
}

@keyframes growStem {
    to {
        height: 60px;
    }
}

@keyframes growLeaf {
    to {
        opacity: 1;
    }
}

@keyframes bloomPetal {
    to {
        opacity: 1;
        transform: translate(-50%, -50%) rotate(var(--rotation, 0deg)) scale(1);
    }
}

@keyframes bloomCenter {
    to {
        transform: translateX(-50%) scale(1);
    }
}

/* Carousel */
.carousel-container {
    position: relative;
    width: 100%;
    height: 400px;
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #ffd4e5 0%, #d4f0e5 50%, #d4e0f0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2em;
    color: #888;
    text-align: center;
    padding: 20px;
}

/* Action Cards */
.action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin-top: 20px;
    max-width: 100%;
    position: relative;
    z-index: 10; /* Add this line */
}

.action-card {
    background: linear-gradient(135deg, #fff5f8 0%, #f5f8ff 100%);
    border-radius: 15px;
    padding: 24px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    z-index: 10; /* Add this line - keeps cards above lanterns */
}

.action-card:hover {
    transform: scale(1.05);
    border-color: #ff7fb3;
    box-shadow: 0 8px 25px rgba(255, 127, 179, 0.3);
}

.action-card h3 {
    color: #6b9fb8;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    margin-top: 15px;
    background: linear-gradient(135deg, #ff7fb3 0%, #ffb3d9 100%);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 127, 179, 0.4);
    cursor: pointer;
    border: none;
    font-family: 'Georgia', serif;
    font-size: 1em;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 127, 179, 0.6);
    background: linear-gradient(135deg, #ffb3d9 0%, #ff7fb3 100%);
}

.btn-secondary {
    background: linear-gradient(135deg, #6b9fb8 0%, #a3c0d1 100%);
    box-shadow: 0 4px 15px rgba(107, 159, 184, 0.4);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #a3c0d1 0%, #6b9fb8 100%);
    box-shadow: 0 6px 20px rgba(107, 159, 184, 0.6);
}

/* Initiatives */
.initiatives-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin: 30px 0;
}

.initiative-item {
    text-align: center;
    padding: 25px;
    background: linear-gradient(135deg, #fff9fb 0%, #f9fbff 100%);
    border-radius: 15px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid rgba(255, 127, 179, 0.1);
}

.initiative-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 127, 179, 0.2);
    border-color: rgba(255, 127, 179, 0.3);
}

.initiative-item:nth-child(3) {
    grid-column: 1 / -1;
    max-width: 600px;
    margin: 0 auto;
}

.initiative-icon {
    font-size: 3em;
    margin-bottom: 15px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

.initiative-item h3 {
    color: #6b9fb8;
    font-size: 1.4em;
    margin-bottom: 12px;
}

.initiative-item p {
    font-size: 1em;
    line-height: 1.7;
    margin-bottom: 0;
}

@media (max-width: 768px) {
    .initiatives-grid {
        grid-template-columns: 1fr;
    }
    
    .initiative-item:nth-child(3) {
        grid-column: 1;
        max-width: 100%;
    }
}

/* Testimonial Carousel */
.testimonial-carousel-container {
    margin: 40px 0;
}

.testimonial-carousel {
    position: relative;
    background: linear-gradient(135deg, #fff9fb 0%, #f9fbff 100%);
    border-radius: 15px;
    padding: 50px 80px;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

/* Static decorative quotation marks */
.testimonial-carousel::before {
    content: '"';
    font-size: 4em;
    color: #ff7fb3;
    opacity: 0.2;
    position: absolute;
    left: 3%;
    top: 5%;
    line-height: 1;
    pointer-events: none;
    transform: translateY(25%);  /* Fine-tune vertical position */
}

.testimonial-carousel::after {
    content: '"';
    font-size: 4em;
    color: #ff7fb3;
    opacity: 0.2;
    position: absolute;
    right: 3%;
    bottom: 5%;
    line-height: 1;
    pointer-events: none;
    transform: translateY(25%);  /* Fine-tune vertical position */
}

.testimonial-slide {
    position: absolute;
    width: calc(100% - 160px);
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    text-align: center;
}

.testimonial-slide.active {
    opacity: 1;
}

.testimonial-slide blockquote {
    font-size: 1.15em;
    font-style: italic;
    color: #5a5a5a;
    line-height: 1.8;
    margin: 0;
    position: relative;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 127, 179, 0.8);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    font-size: 2em;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.carousel-nav:hover {
    background: rgba(255, 127, 179, 1);
    transform: translateY(-50%) scale(1.1);
}

.carousel-nav.prev {
    left: 15px;
}

.carousel-nav.next {
    right: 15px;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 127, 179, 0.3);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #ff7fb3;
    transform: scale(1.3);
}

/* @media (max-width: 768px) {
    .testimonial-carousel {
        padding: 40px 60px;
    }
    
    .testimonial-carousel::before {
        font-size: 3em;
        left: 10px;
        top: 5px;
    }
    
    .testimonial-carousel::after {
        font-size: 3em;
        right: 10px;
        bottom: 5px;
    }
    
    .testimonial-slide {
        width: calc(100% - 120px);
    }
    
    .testimonial-slide blockquote {
        font-size: 1em;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }
} */

/* Footer */
footer {
    text-align: center;
    padding: 30px 20px;
    color: #7b7b7b;
    position: relative;
    z-index: 10; /* Keep footer above lanterns */
}

footer p {
    margin: 10px 0;
}

.memorial {
    font-style: italic;
    color: #9b7fb8;
    font-size: 1.1em;
}

/* Lantern animation */
@keyframes floatUp {
    0% {
        transform: translateY(0) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    100% {
        transform: translateY(-100vh) translateX(var(--drift, 0px)) scale(1.1);
        opacity: 1;
    }
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    h1 {
        font-size: 2.5em;
    }

    h2 {
        font-size: 2em;
    }

    section {
        padding: 30px 25px;
    }

    .carousel-container {
        height: 300px;
    }

    .section-header {
        flex-direction: column;
        gap: 15px;
    }

    .flower-container {
        width: 60px;
        height: 80px;
    }
    
    /* Mobile testimonial carousel adjustments */
    .testimonial-carousel {
        padding: 45px 55px; /* Slightly more vertical padding */
        min-height: 275px; /* A bit taller */
    }
    
    .testimonial-carousel::before {
        font-size: 2.5em;
        left: 2%;
        top: 3%;
        transform: translateY(0);
    }
    
    .testimonial-carousel::after {
        font-size: 2.5em;
        right: 2%;
        bottom: 3%;
        transform: translateY(50%);
    }
    
    .testimonial-slide {
        width: calc(100% - 110px);
        padding: 0 5px;
    }
    
    .testimonial-slide blockquote {
        font-size: 0.95em;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
        line-height: 1.7;
    }
    
    .carousel-nav {
        width: 35px;
        height: 35px;
        font-size: 1.5em;
    }
    
    .carousel-nav.prev {
        left: 5px;
    }
    
    .carousel-nav.next {
        right: 5px;
    }
}

/* Extra small phones */
@media (max-width: 480px) {
    .testimonial-carousel {
        padding: 40px 50px;
        min-height: 290px;
    }

    .testimonial-carousel::before {
        font-size: 0.95em;
        left: 2%;
        top: 3%;
        transform: translateY(0);
    }
    
    .testimonial-carousel::after {
        font-size: 0.95em;
        right: 2%;
        bottom: 3%;
        transform: translateY(50%);
    }
    
    .testimonial-slide {
        width: calc(100% - 100px);
    }
    
    .testimonial-slide blockquote {
        font-size: 0.92em;
    }
    
    .carousel-nav {
        width: 32px;
        height: 32px;
        font-size: 1.4em;
    }
}

/* Responsive: stack into single column */
@media (max-width: 1024px) {
    .container {
        display: block;
        max-width: 900px;
    }
    #action {
        position: relative !important;
        margin-top: 30px;
        z-index: 10 !important; /* Ensure it stays above lanterns */
    }
    section {
        padding: 40px 30px;
        z-index: 10; /* Ensure sections stay above lanterns */
    }
}

/* Desktop: independent scroll for left column */
@media (min-width: 1025px) {
    .main-column {
        max-height: none;
        overflow: visible;
        padding-right: 0;
        -webkit-overflow-scrolling: auto;
    }
}

#action .sidebar-tail {
    margin-top: 24px;
    height: 8vh; /* extend subtly to help bottom alignment */
    min-height: 40px;
    max-height: 100px;
    border-radius: 16px;
    background: linear-gradient(135deg, #fffafb 0%, #f7fbff 100%);
    opacity: 0.7;
}

@media (max-width: 1024px) {
    #action .sidebar-tail {
        display: none; /* no need on stacked layout */
    }
}