/* ========================================
   WHY PHONICS SECTION - ENHANCED
   Beautiful Hover Effects & Animations
   ======================================== */

.why-phonics {
    padding: var(--space-4xl) var(--container-padding);
    background: #fff;
    position: relative;
    overflow: hidden;
}

/* Decorative Elements with Animation */
.decorations {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 1;
}

.decor-arrow {
    position: absolute;
    top: 10%;
    left: 5%;
    width: 150px;
    height: auto;
    animation: float 3s ease-in-out infinite;
    opacity: 0.8;
    transition: all 0.3s ease;
}

/* FIXED: Planet now rotates on its axis like a real planet */
.decor-planet {
    position: absolute;
    top: 5%;
    right: 6%;
    width: 150px;
    height: auto;
    opacity: 0.8;
    animation: floatPlanet 6s ease-in-out infinite;
}

/* Separate rotation for the planet image itself */
.decor-planet img {
    animation: rotatePlanet 20s linear infinite;
    display: block;
    width: 100%;
    height: auto;
}

/* Float animation - gentle up and down movement */
@keyframes floatPlanet {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

/* Planet rotation - spins on its axis */
@keyframes rotatePlanet {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.why-phonics .container {
    max-width: var(--max-width);
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Section Header */
.why-phonics .section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    color: var(--primary-dark);
    text-align: center;
    margin-bottom: var(--space-md);
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

.why-phonics .section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--success) 100%);
    border-radius: var(--radius-full);
    animation: expandWidth 2s ease-in-out infinite;
}

@keyframes expandWidth {

    0%,
    100% {
        width: 80px;
    }

    50% {
        width: 120px;
    }
}

.why-phonics .section-sub {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--text-muted);
    max-width: 900px;
    margin: 0 auto var(--space-3xl);
    line-height: 1.7;
}

/* Main Layout */
.why-inner {
    display: grid;
    grid-template-columns: 600px 1fr;
    gap: var(--space-3xl);
    align-items: flex-start;
    max-width: var(--max-width);
    margin: 0 auto;
    align-items: center;
}

/* Left Side - Image Grid */
.why-media {
    position: relative;
}

.circle-wrapper {
    width: 580px;
    height: 580px;
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 20px;
}

/* Quadrant Styles with Enhanced Hover */
.quad {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    box-shadow: var(--shadow-md);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quad::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(244, 124, 42, 0.2) 0%,
            rgba(36, 167, 55, 0.2) 100%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.quad::after {
    content: '✨';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    font-size: 3rem;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 2;
}

.quad:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.quad:hover::before {
    opacity: 1;
}

.quad:hover::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.8;
}

.quad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.quad:hover img {
    transform: scale(1.15) rotate(2deg);
}

/* Individual Quadrant Shapes */
.quad-1 {
    border-radius: 260px 26px 26px 26px;
    grid-row: 1;
    grid-column: 1;
}

.quad-2 {
    border-radius: 26px 200px 26px 26px;
    grid-row: 1;
    grid-column: 2;
    max-width: 280px;
    max-height: 280px;
    justify-self: end;
}

.quad-3 {
    border-radius: 26px 26px 26px 260px;
    grid-row: 2;
    grid-column: 1;
    max-width: 280px;
    max-height: 280px;
}

.quad-4 {
    border-radius: 26px 26px 260px 26px;
    grid-row: 2;
    grid-column: 2;
    max-width: 280px;
    max-height: 280px;
    justify-self: end;
    align-self: end;
}

/* Center Icon with Pulse Animation */
.center-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120px;
    height: 120px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 20;
    animation: pulse 3s ease-in-out infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: none;
}

.center-icon:hover {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 32px rgba(244, 124, 42, 0.3);
    animation: none;
}

.center-icon img {
    width: 60px;
    height: 60px;
    object-fit: contain;
    transition: transform 0.3s ease;
}

.center-icon:hover img {
    transform: rotate(360deg) scale(1.1);
}

/* Right Side - Content */
.why-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.why-heading {
    font-weight: 700;
    color: var(--primary-dark);
}

.method-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.method-list li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--bg-gray-50);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.method-list li::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg,
            rgba(244, 124, 42, 0.05) 0%,
            transparent 100%);
    transition: width 0.4s ease;
}

.method-list li:hover::before {
    width: 100%;
}

.method-list li:hover {
    background: white;
    box-shadow: var(--shadow-md);
    border-left-color: var(--accent);
    transform: translateX(8px);
}

.method-icon {
    min-width: 68px;
    width: 68px;
    height: 68px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transform: rotate(-45deg);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.method-list li:hover .method-icon {
    transform: rotate(0deg) scale(1.1);
    box-shadow: var(--shadow-md);
}

.method-icon img {
    width: 40px;
    height: 40px;
    object-fit: contain;
    transform: rotate(45deg);
    transition: transform 0.3s ease;
}

.method-list li:hover .method-icon img {
    transform: rotate(0deg) scale(1.1);
}

.icon-sound {
    background: linear-gradient(135deg, #6dd3b3, #2ea876);
}

.icon-creative {
    background: linear-gradient(135deg, #5fb5ff, #7e6bff);
}

.icon-reading {
    background: linear-gradient(135deg, #ffb76b, #ff6b8a);
}

.icon-family {
    background: linear-gradient(135deg, #E63A49, #E63A49);
}

.method-text h4 {
    font-size: var(--font-size-base);
    font-weight: 700;
    color: var(--primary-dark);
    margin-bottom: var(--space-xs);
    transition: color 0.3s ease;
}

.method-list li:hover .method-text h4 {
    color: var(--accent);
}

.method-text p {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Why Cards Grid - ENHANCED */
.why-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-xl);
    margin-top: var(--space-2xl);
}

.why-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    text-align: center;
    border: 2px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 6px 20px rgba(14, 30, 37, 0.04);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Animated Background Gradient */
.why-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0) 0%,
            rgba(255, 255, 255, 0.5) 50%,
            rgba(255, 255, 255, 0) 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.why-card:hover::before {
    transform: translateX(100%);
}

/* Shine Effect on Hover */
.why-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

.why-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 40px rgba(14, 30, 37, 0.12);
}

.card-red {
    border: 2px solid #FF6B35;
    background: linear-gradient(135deg, #FFF8F6 0%, #fff 100%);
}

.card-red:hover {
    border-color: #ff4500;
    background: linear-gradient(135deg, #FFF0EB 0%, #FFF8F6 100%);
}

.card-green {
    border: 2px solid #48BB78;
    background: linear-gradient(135deg, #F6FBF8 0%, #fff 100%);
}

.card-green:hover {
    border-color: #38a169;
    background: linear-gradient(135deg, #EDF7F0 0%, #F6FBF8 100%);
}

.card-blue {
    border: 2px solid #4399E1;
    background: linear-gradient(135deg, #F6FAFD 0%, #fff 100%);
}

.card-blue:hover {
    border-color: #3182ce;
    background: linear-gradient(135deg, #EBF5FB 0%, #F6FAFD 100%);
}

.card-violet {
    border: 2px solid #9F7AEA;
    background: linear-gradient(135deg, #FAF8FF 0%, #fff 100%);
}

.card-violet:hover {
    border-color: #805ad5;
    background: linear-gradient(135deg, #F3EFFF 0%, #FAF8FF 100%);
}

.card-icon {
    display: inline-block;
    font-size: 24px;
    margin-bottom: var(--space-md);
    width: 60px;
    height: 60px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.why-card:hover .card-icon {
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

/* Bounce Animation on Hover */
@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.why-card:hover .card-icon {
    animation: bounce 0.6s ease infinite;
}

.why-card h4 {
    margin: 0 0 var(--space-md);
    font-size: var(--font-size-base);
    color: #22343b;
    font-weight: 600;
    transition: all 0.3s ease;
}

.why-card:hover h4 {
    color: var(--accent);
    transform: scale(1.05);
}

.why-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.5;
    transition: color 0.3s ease;
}

.why-card:hover p {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 1200px) {
    .why-inner {
        grid-template-columns: 500px 1fr;
        gap: var(--space-2xl);
    }

    .circle-wrapper {
        width: 480px;
        height: 480px;
    }

    .why-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1024px) {
    .why-inner {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }

    .circle-wrapper {
        width: 100%;
        max-width: 500px;
        height: auto;
        aspect-ratio: 1;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .why-phonics {
        padding: var(--space-3xl) var(--space-md);
    }

    .decor-arrow,
    .decor-planet {
        width: 80px;
    }

    .circle-wrapper {
        max-width: 400px;
        gap: 12px;
    }

    .quad-1,
    .quad-2,
    .quad-3,
    .quad-4 {
        border-radius: var(--radius-lg);
        max-width: none;
        max-height: none;
    }

    .center-icon {
        width: 80px;
        height: 80px;
    }

    .center-icon img {
        width: 50px;
        height: 50px;
    }

    .method-list li {
        flex-direction: column;
        text-align: center;
    }

    .method-icon {
        margin: 0 auto;
    }

    .why-cards {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .circle-wrapper {
        max-width: 320px;
        gap: 8px;
    }

    .why-cards {
        gap: var(--space-lg);
    }
}