/* ============================================
   🌸 ENHANCED SECTION: WHERE CREATIVITY MEETS SOUL
   Immersive, Interactive, Soulful Experience
   ============================================ */

/* Section Container with Ken Burns Background Slider */
.whimsy-about {
    position: relative;
    padding: 8rem 2rem;
    overflow: hidden;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

/* Force Sacramento font on title with high specificity */
.whimsy-about .whimsy-about__header .whimsy-about__title,
.whimsy-about__title,
section.whimsy-about h2.whimsy-about__title {
    font-family: 'Sacramento', cursive !important;
    font-size: clamp(1.8rem, 6vw, 3.8rem) !important;
    color: #2D2D2D !important;
    font-weight: 400 !important;
    white-space: normal !important;
    display: block !important;
    text-align: center !important;
    line-height: 1.2 !important;
}

/* Ken Burns Background Slider */
.whimsy-about__bg-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    background: linear-gradient(135deg, #FFF5F5 0%, #F4F9F9 100%);
}

.whimsy-about__bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2s ease-in-out;
    overflow: hidden;
}

.whimsy-about__bg-slide.active {
    opacity: 1;
}

.whimsy-about__bg-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ken Burns Effect - slow zoom and pan */
    animation: kenBurns 20s ease-in-out infinite;
    transform-origin: center center;
    filter: saturate(0.85) brightness(1.05);
}

/* Alternate zoom directions for visual variety */
.whimsy-about__bg-slide:nth-child(1) img { animation-name: kenBurns1; }
.whimsy-about__bg-slide:nth-child(2) img { animation-name: kenBurns2; }
.whimsy-about__bg-slide:nth-child(3) img { animation-name: kenBurns3; }
.whimsy-about__bg-slide:nth-child(4) img { animation-name: kenBurns4; }
.whimsy-about__bg-slide:nth-child(5) img { animation-name: kenBurns5; }

@keyframes kenBurns1 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.15) translate(-2%, -2%); }
    100% { transform: scale(1) translate(0, 0); }
}

@keyframes kenBurns2 {
    0% { transform: scale(1.1) translate(0, 0); }
    50% { transform: scale(1.2) translate(2%, 2%); }
    100% { transform: scale(1.1) translate(0, 0); }
}

@keyframes kenBurns3 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.18) translate(-3%, 2%); }
    100% { transform: scale(1) translate(0, 0); }
}

@keyframes kenBurns4 {
    0% { transform: scale(1.05) translate(0, 0); }
    50% { transform: scale(1.22) translate(2%, -3%); }
    100% { transform: scale(1.05) translate(0, 0); }
}

@keyframes kenBurns5 {
    0% { transform: scale(1) translate(0, 0); }
    50% { transform: scale(1.15) translate(-2%, 3%); }
    100% { transform: scale(1) translate(0, 0); }
}

/* Elegant Overlay for Text Readability - Darker for contrast */
.whimsy-about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        /* Strong center focus for text readability */
        radial-gradient(ellipse at center 40%,
            rgba(255, 250, 248, 0.95) 0%,
            rgba(255, 250, 248, 0.85) 25%,
            rgba(255, 245, 245, 0.6) 50%,
            rgba(255, 245, 245, 0.3) 100%),
        /* Side shadows for depth */
        linear-gradient(to right,
            rgba(139, 90, 90, 0.15) 0%,
            transparent 20%,
            transparent 80%,
            rgba(139, 90, 90, 0.15) 100%),
        /* Bottom fade */
        linear-gradient(to top,
            rgba(255, 245, 245, 0.95) 0%,
            rgba(255, 245, 245, 0.6) 15%,
            transparent 35%),
        /* Top fade */
        linear-gradient(to bottom,
            rgba(255, 245, 245, 0.9) 0%,
            transparent 25%);
    z-index: 1;
}

/* Slider Navigation Dots */
.whimsy-about__slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 3;
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(139, 90, 90, 0.3);
    cursor: pointer;
    transition: all 0.4s ease;
    border: 2px solid transparent;
}

.slider-dot:hover {
    background: rgba(139, 90, 90, 0.5);
    transform: scale(1.2);
}

.slider-dot.active {
    background: #8B5A5A;
    transform: scale(1.3);
    box-shadow: 0 0 10px rgba(139, 90, 90, 0.4);
}

/* Top Wave Transition */
.whimsy-about::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120px;
    background: linear-gradient(to bottom, rgba(255, 245, 245, 1), transparent);
    z-index: 1;
}

/* Floating Decorative Elements */
.whimsy-about__decorations {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floating-element {
    position: absolute;
    opacity: 0.15;
    animation: float 20s infinite ease-in-out;
}

.floating-element--1 {
    top: 10%;
    left: 5%;
    font-size: 4rem;
    animation-delay: 0s;
}

.floating-element--2 {
    top: 20%;
    right: 8%;
    font-size: 3rem;
    animation-delay: -5s;
}

.floating-element--3 {
    bottom: 30%;
    left: 10%;
    font-size: 5rem;
    animation-delay: -10s;
}

.floating-element--4 {
    bottom: 15%;
    right: 5%;
    font-size: 3.5rem;
    animation-delay: -15s;
}

.floating-element--5 {
    top: 50%;
    left: 3%;
    font-size: 2.5rem;
    animation-delay: -7s;
}

.floating-element--6 {
    top: 60%;
    right: 12%;
    font-size: 4.5rem;
    animation-delay: -12s;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(-10px) rotate(-3deg);
    }
    75% {
        transform: translateY(-30px) rotate(8deg);
    }
}

/* Content Container - Always Visible */
.whimsy-about__content {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 5rem;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Header Block with Glassmorphism - Always Visible */
.whimsy-about__header {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    border: 2px solid rgba(139, 90, 90, 0.15);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    position: relative;
    overflow: hidden;
    opacity: 1 !important;
    visibility: visible !important;
}

.whimsy-about__header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(139, 90, 90, 0.05) 0%, transparent 70%);
    animation: shimmer 8s infinite linear;
}

@keyframes shimmer {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.whimsy-about__eyebrow {
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    letter-spacing: 4px;
    text-transform: uppercase;
    color: #8B5A5A;
    margin-bottom: 1.5rem;
    font-weight: 600;
    position: relative;
    display: inline-block;
    opacity: 1 !important;
    visibility: visible !important;
}

.whimsy-about__eyebrow::before,
.whimsy-about__eyebrow::after {
    content: '✦';
    margin: 0 1rem;
    color: #8B5A5A;
    opacity: 0.8;
    animation: sparkle 2s infinite;
}

@keyframes sparkle {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.2); }
}

.whimsy-about__title {
    font-family: 'Sacramento', cursive;
    font-size: clamp(1.8rem, 6vw, 3.8rem);
    color: #2D2D2D;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    text-shadow: 1px 1px 2px rgba(139, 90, 90, 0.1);
    position: relative;
    z-index: 1;
    display: block;
    text-align: center;
    white-space: normal;
    font-weight: 400;
    letter-spacing: 0.02em;
}

/* Natural Handwritten Text - Always Visible */
.whimsy-about__title .hand-letter {
    display: inline;
    font-family: 'Sacramento', cursive !important;
    opacity: 1 !important;
    visibility: visible !important;
    transition: color 0.3s ease;
}

/* Handwriting reveal effect */
.whimsy-about__title {
    opacity: 0;
    visibility: visible !important;
}

.whimsy-about__title.handwrite-animate {
    opacity: 1 !important;
}

.whimsy-about__title .hand-word {
    display: inline-block !important;
    opacity: 0;
    clip-path: inset(0 100% 0 0);
    transition: none;
}

.whimsy-about__title.handwrite-animate .hand-word {
    animation: handwriteReveal 0.8s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

.whimsy-about__title.handwrite-animate .hand-word:nth-child(1) { animation-delay: 0.1s; }
.whimsy-about__title.handwrite-animate .hand-word:nth-child(3) { animation-delay: 0.6s; }
.whimsy-about__title.handwrite-animate .hand-word:nth-child(5) { animation-delay: 1.1s; }
.whimsy-about__title.handwrite-animate .hand-word:nth-child(7) { animation-delay: 1.6s; }

.whimsy-about__title .hand-space {
    display: inline-block !important;
    width: 0.15em;
    opacity: 0;
}

.whimsy-about__title.handwrite-animate .hand-space {
    animation: spaceReveal 0.15s ease forwards;
}

.whimsy-about__title.handwrite-animate .hand-space:nth-child(2) { animation-delay: 0.5s; }
.whimsy-about__title.handwrite-animate .hand-space:nth-child(4) { animation-delay: 1.0s; }
.whimsy-about__title.handwrite-animate .hand-space:nth-child(6) { animation-delay: 1.5s; }

@keyframes handwriteReveal {
    0% {
        opacity: 0;
        clip-path: inset(0 100% 0 0);
    }
    30% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        clip-path: inset(0 0% 0 0);
    }
}

@keyframes spaceReveal {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

/* Word grouping for natural flow */
.whimsy-about__title .hand-word {
    font-family: 'Sacramento', cursive !important;
    white-space: normal;
    margin: 0;
}

/* Ink/Pen underline animation */
.whimsy-about__title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 4px;
    background: linear-gradient(90deg, transparent, #8B5A5A, #C8A9D8, #8B5A5A, transparent);
    border-radius: 3px;
    opacity: 0.7;
}

/* Animate underline after handwriting completes */
.whimsy-about__title.handwrite-animate::after {
    animation: inkUnderlineDraw 0.8s ease 2.2s backwards;
}

@keyframes inkUnderlineDraw {
    0% {
        width: 0;
        opacity: 0;
    }
    100% {
        width: 70%;
        opacity: 0.7;
    }
}

/* Gentle hover effect - color change only, no transform issues */
.whimsy-about__title:hover {
    color: #6B4A4A;
}

.whimsy-about__title:hover .hand-letter {
    color: #6B4A4A;
}

.whimsy-about__text {
    font-family: 'Schoolbell', cursive !important; /* Whimsical Schoolbell handwriting font */
    font-size: 1.5rem !important; /* Made slightly larger for Schoolbell handwriting legibility */
    color: #5A4A4A !important;
    line-height: 2 !important;
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

/* The 3 Pillars Cards - Enhanced */
.whimsy-pillars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    margin-top: 2rem;
    perspective: 1000px;
}

/* Individual Card Styling - Always Visible */
.whimsy-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    cursor: pointer;
    border: none;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Card Gradient Borders */
.whimsy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px;
    padding: 3px;
    background: linear-gradient(135deg, #7BCCC4, #F4A992, #F9D56E, #C8A9D8);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.whimsy-card:hover::before {
    opacity: 1;
}

/* Animated Background Glow */
.whimsy-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--glow-color, rgba(123, 204, 196, 0.15)) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.whimsy-card:hover::after {
    opacity: 1;
}

/* Card Specific Glow Colors */
.whimsy-card:nth-child(1) { --glow-color: rgba(123, 204, 196, 0.2); }
.whimsy-card:nth-child(2) { --glow-color: rgba(249, 213, 110, 0.2); }
.whimsy-card:nth-child(3) { --glow-color: rgba(200, 169, 216, 0.2); }

/* Card Hover Effects */
.whimsy-card:hover {
    transform: translateY(-15px) rotateX(5deg) scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.15), 0 0 40px var(--glow-color);
}

/* Card Icon Container */
.whimsy-card__icon-wrapper {
    width: 100px;
    height: 100px;
    margin: 0 auto 2rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 50%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.5s ease;
}

.whimsy-card:hover .whimsy-card__icon-wrapper {
    transform: scale(1.15) rotate(10deg);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

/* Floating Particles Around Icon */
.whimsy-card__icon-wrapper::before,
.whimsy-card__icon-wrapper::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.5s ease;
}

.whimsy-card__icon-wrapper::before {
    width: 120%;
    height: 120%;
    border: 2px dashed var(--accent-color, #7BCCC4);
    animation: rotate 10s linear infinite;
}

.whimsy-card__icon-wrapper::after {
    width: 140%;
    height: 140%;
    border: 1px dotted var(--accent-color, #7BCCC4);
    animation: rotate 15s linear infinite reverse;
}

.whimsy-card:hover .whimsy-card__icon-wrapper::before,
.whimsy-card:hover .whimsy-card__icon-wrapper::after {
    opacity: 0.3;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Card Specific Accent Colors */
.whimsy-card:nth-child(1) .whimsy-card__icon-wrapper { --accent-color: #7BCCC4; }
.whimsy-card:nth-child(2) .whimsy-card__icon-wrapper { --accent-color: #F9D56E; }
.whimsy-card:nth-child(3) .whimsy-card__icon-wrapper { --accent-color: #C8A9D8; }

/* Card Icon SVG */
.whimsy-card__icon {
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.whimsy-card:hover .whimsy-card__icon {
    transform: scale(1.1);
}

/* Card Title */
.whimsy-card__title {
    font-family: 'Sacramento', cursive !important;
    font-size: 3.2rem !important; /* Made larger because Sacramento is a delicate script font */
    color: #2D2D2D !important;
    margin-bottom: 1.25rem !important;
    transition: color 0.3s ease;
    line-height: 1.2 !important;
}

.whimsy-card:hover .whimsy-card__title {
    color: #8B5A5A;
}

.whimsy-card__desc {
    font-family: 'Schoolbell', cursive !important;
    font-size: 1.25rem !important; /* Slightly scaled up for Schoolbell handwriting script legibility */
    color: #666 !important;
    line-height: 1.8 !important;
    margin-bottom: 1.5rem !important;
}

/* Card Action Button */
.whimsy-card__action {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #e0e0e0;
    border-radius: 50px;
    color: #8B5A5A;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(10px);
}

.whimsy-card:hover .whimsy-card__action {
    opacity: 1;
    transform: translateY(0);
    border-color: #8B5A5A;
}

.whimsy-card__action:hover {
    background: #8B5A5A;
    color: white;
}

.whimsy-card__action i {
    transition: transform 0.3s ease;
}

.whimsy-card__action:hover i {
    transform: translateX(5px);
}

/* Particle Animation Container */
.card-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    border-radius: 24px;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    opacity: 0;
}

.whimsy-card:hover .particle {
    animation: particleFloat 2s ease-out forwards;
}

.particle:nth-child(1) { top: 20%; left: 20%; background: #7BCCC4; animation-delay: 0s; }
.particle:nth-child(2) { top: 60%; left: 80%; background: #F4A992; animation-delay: 0.2s; }
.particle:nth-child(3) { top: 40%; left: 10%; background: #F9D56E; animation-delay: 0.4s; }
.particle:nth-child(4) { top: 80%; left: 60%; background: #C8A9D8; animation-delay: 0.6s; }
.particle:nth-child(5) { top: 30%; left: 70%; background: #F5C4C4; animation-delay: 0.8s; }

@keyframes particleFloat {
    0% {
        opacity: 1;
        transform: translate(0, 0) scale(1);
    }
    100% {
        opacity: 0;
        transform: translate(var(--tx, 30px), var(--ty, -30px)) scale(0);
    }
}

/* Bottom CTA Section */
.whimsy-about__cta {
    text-align: center;
    margin-top: 3rem;
}

.whimsy-about__cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.85));
    backdrop-filter: blur(10px);
    border-radius: 50px;
    color: #8B5A5A;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    transition: all 0.4s ease;
    border: 2px solid rgba(139, 90, 90, 0.2);
}

.whimsy-about__cta-btn:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    background: white;
    border-color: #8B5A5A;
}

.whimsy-about__cta-btn i {
    transition: transform 0.3s ease;
}

.whimsy-about__cta-btn:hover i {
    transform: translateX(8px);
}

/* Scroll Reveal Animation Classes - Always Visible by Default */
[data-reveal] {
    opacity: 1 !important;
    transform: translateY(0) !important;
    transition: all 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

[data-reveal="left"] { transform: translateX(0) !important; }
[data-reveal="right"] { transform: translateX(0) !important; }
[data-reveal="scale"] { transform: scale(1) !important; }

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .whimsy-pillars {
        grid-template-columns: repeat(2, 1fr);
    }

}

@media (max-width: 768px) {
    .whimsy-about {
        padding: 6rem 0.75rem;
    }

    .whimsy-about__header {
        padding: 2rem 1rem;
        background: rgba(255, 255, 255, 0.85);
        max-width: 100%;
        border-radius: 24px;
    }

    .whimsy-about__title {
        font-size: clamp(1.5rem, 8vw, 2.2rem);
        line-height: 1.3;
    }

    .whimsy-about__text {
        font-family: 'Schoolbell', cursive !important;
        font-size: 1.25rem !important; /* Adjusted for smaller screens */
        line-height: 1.8 !important;
        color: #4A3A4A !important;
    }

    .whimsy-about__eyebrow {
        color: #6B4A4A;
    }

    .whimsy-pillars {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .whimsy-card {
        padding: 2.5rem 1.5rem;
    }

    .whimsy-card__action {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stronger overlay on mobile for readability */
    .whimsy-about::before {
        background:
            radial-gradient(ellipse at center 40%,
                rgba(255, 250, 248, 0.98) 0%,
                rgba(255, 250, 248, 0.9) 30%,
                rgba(255, 245, 245, 0.7) 60%,
                rgba(255, 245, 245, 0.4) 100%);
    }
}

@media (max-width: 480px) {
    .whimsy-about__header {
        padding: 1.5rem 1rem;
        max-width: 100%;
        border-radius: 20px;
    }

    .whimsy-about__title {
        font-size: 1.6rem;
        line-height: 1.3;
    }

    .whimsy-card__title {
        font-size: 2.2rem !important; /* Adjusted for smaller screens */
    }
}

/* Handwritten title responsive - sizes consolidated above */

/* Reduced Motion Preference */
@media (prefers-reduced-motion: reduce) {
    .floating-element,
    .whimsy-card__icon-wrapper::before,
    .whimsy-card__icon-wrapper::after,
    .particle {
        animation: none !important;
    }

    .whimsy-card:hover {
        transform: translateY(-10px);
    }
}
