/* Hero Section - PLNTS Style Layout */
.plant-family-hero-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e8f5e8 50%, #f1f3f4 100%);
    padding: 40px 0 60px 0;
    margin: 30px 0 50px 0;
    position: relative;
    overflow: hidden;
}

.plant-family-hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 124, 89, 0.05) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    33% {
        transform: translate(30px, -30px) rotate(120deg);
    }

    66% {
        transform: translate(-20px, 20px) rotate(240deg);
    }
}

.hero-container {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 0 20px;
}

.hero-image-side {
    position: relative;
    transform: translateX(-20px);
}

.main-plant-image {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(74, 124, 89, 0.2);
    transform: rotate(-2deg);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.main-plant-image:hover {
    transform: rotate(0deg) scale(1.05);
    box-shadow: 0 30px 60px rgba(74, 124, 89, 0.3);
}

.hero-plant-img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    transition: transform 0.6s ease;
}

.main-plant-image:hover .hero-plant-img {
    transform: scale(1.1);
}

.hero-content-side {
    padding: 10px 0;
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 2.4rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 20px;
    line-height: 1.1;
    font-family: 'Corben', cursive;
    animation: slideInFromRight 1s ease-out;
    text-align: left;
    transform: translateX(-30px);
}

@keyframes slideInFromRight {
    0% {
        transform: translateX(100px);
        opacity: 0;
    }

    100% {
        transform: translateX(0);
        opacity: 1;
    }
}

.hero-title em {
    font-style: italic;
    color: #4a7c59;
}

.intro-text {
    margin-bottom: 25px;
    transform: translateX(-15px);
    text-align: left;
}

.intro-text p {
    font-size: 1rem;
    line-height: 1.6;
    color: #555;
    margin-bottom: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.fun-facts-section {
    margin-bottom: 30px;
    transform: translateX(15px);
}

.facts-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #4a7c59;
    text-align: right;
    margin-bottom: 24px;
    font-family: 'Corben', cursive;
    transform: translateX(15px);
}

.facts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.fact-bubble {
    background: linear-gradient(135deg, #ffffff 0%, #f0fff0 100%);
    border: 2px solid #e8f5e8;
    border-radius: 25px;
    padding: 24px 20px;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    animation: popIn 0.6s ease-out;
    animation-fill-mode: both;
    overflow: hidden;
}

.fact-bubble:nth-child(1) {
    animation-delay: 0.1s;
}

.fact-bubble:nth-child(2) {
    animation-delay: 0.2s;
}

.fact-bubble:nth-child(3) {
    animation-delay: 0.3s;
}

.fact-bubble::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(74, 124, 89, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.fact-bubble:hover {
    transform: translateY(-8px) rotate(1deg);
    box-shadow: 0 15px 30px rgba(74, 124, 89, 0.15);
    border-color: #4a7c59;
}

.fact-bubble:hover::before {
    opacity: 1;
}

@keyframes popIn {
    0% {
        transform: scale(0.8) rotate(-5deg);
        opacity: 0;
    }

    50% {
        transform: scale(1.05) rotate(2deg);
    }

    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.fact-bubble p {
    font-size: 1rem;
    line-height: 1.5;
    color: #555;
    margin: 0;
    position: relative;
    z-index: 2;
    padding: 8px 0;
}

.fact-bubble strong {
    color: #4a7c59;
    font-weight: 600;
}

.expert-section {
    margin-top: 25px;
}

.expert-card {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 255, 248, 0.9) 100%);
    padding: 24px;
    border-radius: 25px;
    border: 2px solid rgba(74, 124, 89, 0.1);
    backdrop-filter: blur(15px);
    box-shadow: 0 10px 30px rgba(74, 124, 89, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.expert-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 90%;
    height: 90%;
    background: linear-gradient(90deg, transparent, rgba(74, 124, 89, 0.1), transparent);
    transition: left 0.6s ease;
}

.expert-card:hover::before {
    left: 100%;
}

.expert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(74, 124, 89, 0.2);
    border-color: rgba(74, 124, 89, 0.3);
}

.expert-avatar {
    flex-shrink: 0;
}

.expert-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: linear-gradient(135deg, #4a7c59 0%, #6ba06f 100%);
    color: white;
    border: 3px solid #4a7c59;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.expert-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #4a7c59;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.expert-card:hover .expert-icon,
.expert-card:hover .expert-photo {
    transform: scale(1.1);
    box-shadow: 0 8px 20px rgba(74, 124, 89, 0.3);
}

.expert-title {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    color: #666;
}

.expert-title em {
    color: #4a7c59;
    font-weight: 500;
}

.expert-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.expert-link:hover {
    color: #4a7c59;
    transform: translateX(4px);
}

.expert-link-disabled {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #999;
    font-weight: 500;
    font-size: 1rem;
    cursor: default;
}

/* Auto-displayed hero sections on product pages */
.single-product .plant-family-hero-section.phs-auto {
    margin: 20px 0 30px 0;
    padding: 30px 0 40px 0;
    width: 100%;
    box-sizing: border-box;
}

/* Hero sections displayed after description (full width area) */
.single-product .plant-family-hero-section.phs-auto {
    margin: 40px 0 !important;
    padding: 50px 0 !important;
    width: 100% !important;
    max-width: none !important;
}

/* Fix container for product pages */
.single-product .plant-family-hero-section.phs-auto .hero-container {
    max-width: 1200px !important;
    margin: 0 auto !important;
    padding: 0 20px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: center !important;
}

/* Ensure proper image sizing on product pages */
.single-product .plant-family-hero-section.phs-auto .hero-plant-img {
    height: 300px !important;
    width: 100% !important;
    object-fit: cover !important;
}

.single-product .plant-family-hero-section.phs-auto .hero-title {
    font-size: 2rem;
}

.single-product .plant-family-hero-section.phs-auto .hero-plant-img {
    height: 300px;
}

/* Compact version for product pages */
.phs-auto .fun-facts-section {
    margin-bottom: 20px;
}

.phs-auto .fact-bubble {
    padding: 16px 12px;
}

.phs-auto .expert-card {
    padding: 16px;
}

/* Theme compatibility fixes */
.plant-family-hero-section * {
    box-sizing: border-box;
}

.plant-family-hero-section .hero-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 40px !important;
    align-items: center !important;
}

.plant-family-hero-section .hero-image-side,
.plant-family-hero-section .hero-content-side {
    width: 100% !important;
    max-width: none !important;
}

.plant-family-hero-section .main-plant-image {
    width: 100% !important;
    max-width: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        padding: 0 25px !important;
    }

    .hero-title {
        font-size: 2rem;
        text-align: center;
        transform: translateX(0);
    }

    .facts-title {
        text-align: center;
        transform: translateX(0);
    }

    .intro-text {
        transform: translateX(0);
        text-align: left;
    }

    .fun-facts-section {
        transform: translateX(0);
    }

    .hero-image-side {
        transform: translateX(0);
    }

    .hero-plant-img {
        height: 250px;
    }

    .plant-family-hero-section {
        padding: 30px 0;
        margin: 20px 0;
    }

    /* Force mobile layout for all hero sections */
    .plant-family-hero-section .hero-container {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 0 25px !important;
        max-width: 100% !important;
    }

    /* Mobile fixes for product pages */
    .single-product .plant-family-hero-section.phs-auto .hero-container {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
        padding: 0 25px !important;
    }
    
    /* Better spacing for mobile content */
    .plant-family-hero-section .hero-content-side {
        padding: 0 !important;
    }
    
    .plant-family-hero-section .main-plant-image {
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Mobile fact bubbles - more rounded and compact */
    .facts-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 15px !important;
    }
    
    .fact-bubble {
        border-radius: 30px !important;
        padding: 25px 18px !important;
        min-height: 100px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .fact-bubble p {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        text-align: center !important;
        margin: 0 !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .intro-text p {
        font-size: 1rem;
    }
    
    /* Stack bubbles for very small screens */
    .facts-grid {
        grid-template-columns: 1fr !important;
        gap: 15px !important;
    }
    
    .fact-bubble {
        border-radius: 25px !important;
        padding: 22px 16px !important;
        min-height: 90px !important;
        max-width: 320px !important;
        margin: 0 auto !important;
    }
    
    .fact-bubble p {
        font-size: 1rem !important;
    }
}