/* Purple Theme & Pedi Detail Redesign */
:root {
    --p-primary: #6f42c1;
    --p-dark: #311b92;
    --p-light: #f3e5f5;
    --p-accent: #ffce45;
}

.text-purple {
    color: var(--p-primary) !important;
}

.bg-purple-light {
    background-color: var(--p-light) !important;
}

/* Enhanced Hero Section */
.pedi-detail-hero {
    background: linear-gradient(135deg, #4527a0 0%, #283593 100%);
    border-radius: 20px;
    padding: 42px 42px 38px;
    color: #fff;
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(49, 27, 146, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('https://www.transparenttextures.com/patterns/cubes.png');
    opacity: 0.05;
    pointer-events: none;
}

.hero-content-inner {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(280px, 360px);
    align-items: stretch;
    gap: 34px;
    position: relative;
    z-index: 5;
}

.hero-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 24px;
}

.hero-text h1 {
    font-size: clamp(2.35rem, 4vw, 3.25rem);
    font-weight: 800;
    margin-bottom: 0;
    letter-spacing: -0.04em;
    line-height: 1;
    white-space: normal;
    overflow-wrap: anywhere;
    text-wrap: balance;
    max-width: 100%;
}

.latin-name {
    font-style: italic;
    font-size: 1.08rem;
    opacity: 0.86;
    margin-bottom: 0;
    display: block;
    line-height: 1.5;
    max-width: 58ch;
}

/* Quick Stats Grid */
.hero-stats-new {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    align-items: stretch;
}

.stat-pill {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.11) 0%, rgba(255, 255, 255, 0.07) 100%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    padding: 16px 18px;
    border-radius: 18px;
    backdrop-filter: blur(10px);
    transition: all 0.2s;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.stat-pill:hover {
    transform: translateY(-3px);
    background: rgba(255, 255, 255, 0.12);
}

.stat-pill .s-label {
    display: block;
    font-size: 0.76rem;
    text-transform: uppercase;
    font-weight: 800;
    color: #d7c6ff;
    margin-bottom: 10px;
    letter-spacing: 0.08em;
    line-height: 1.3;
}

.stat-pill .s-value {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.95);
}

/* Hero Image Section */
.hero-image-new {
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-image-mobile {
    display: none;
}

.img-frame {
    width: min(100%, 320px);
    aspect-ratio: 1 / 1;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.img-frame::after {
    content: '';
    position: absolute;
    top: -10px;
    right: -10px;
    bottom: -10px;
    left: -10px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 40px;
    z-index: -1;
}

.img-frame img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.3));
    transition: transform 0.3s ease;
}

.img-frame:hover img {
    transform: scale(1.08) rotate(2deg);
}

/* Premium Meta Bar */
.premium-meta-bar {
    background: #fff;
    border-radius: 20px;
    padding: 20px 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    margin-bottom: 30px;
    border: 1px solid #f0f0f0;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    color: #444;
}

.meta-item i {
    font-size: 1.1rem;
}

.meta-divider {
    width: 1px;
    height: 24px;
    background: #eee;
}

.share-pills {
    display: flex;
    gap: 8px;
}

.share-pill {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: all 0.2s;
}

.share-pill:hover {
    transform: scale(1.1);
    color: #fff;
}

.share-pill.fb {
    background: #1877f2;
}

.share-pill.x {
    background: #000;
}

.share-pill.wa {
    background: #25d366;
}

.font-controls {
    display: flex;
    align-items: center;
    gap: 5px;
    background: #f8f9fa;
    padding: 4px;
    border-radius: 50px;
}

.font-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: transparent;
    font-weight: 700;
    color: #666;
    transition: all 0.2s;
}

.font-btn:hover {
    background: #fff;
    color: var(--p-primary);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 991px) {
    .pedi-detail-hero {
        padding: 22px 14px 18px;
    }

    .hero-content-inner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-stats-new {
        grid-template-columns: 1fr;
    }

    .hero-image-new {
        display: none;
    }

    .hero-image-mobile {
        display: flex;
        width: 100%;
        justify-content: center;
    }

    .img-frame {
        width: min(100%, 520px);
        margin: 0 auto;
    }

    .hero-text {
        align-items: center;
    }

    .latin-name {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
    .premium-meta-bar {
        padding: 20px;
    }

    .meta-row {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .meta-divider {
        display: none;
    }
}
