/**
 * WPM Author Box — Split Panel Design
 * World Pickleball Magazine
 * Version: 1.0.0
 */

/* ========================================
   CSS Custom Properties (overridable)
   ======================================== */
:root {
    --wpm-ab-accent: #ccff00;
    --wpm-ab-navy: #0b0057;
    --wpm-ab-navy-light: #1a0a7a;
    --wpm-ab-white: #ffffff;
    --wpm-ab-grey-light: #f8f9fa;
    --wpm-ab-grey-text: #555555;
    --wpm-ab-grey-dark: #333333;
    --wpm-ab-radius: 12px;
    --wpm-ab-shadow: 0 8px 30px rgba(11, 0, 87, 0.12);
    --wpm-ab-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ========================================
   Main Container
   ======================================== */
.wpm-author-box {
    display: flex;
    border-radius: var(--wpm-ab-radius);
    overflow: hidden;
    box-shadow: var(--wpm-ab-shadow);
    margin: 40px 0 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    line-height: 1.6;
    max-width: 100%;
    border: 1px solid rgba(11, 0, 87, 0.08);
}

/* ========================================
   Left Panel — Identity (Navy)
   ======================================== */
.wpm-ab-identity {
    flex: 0 0 32%;
    max-width: 32%;
    background: var(--wpm-ab-navy);
    background: linear-gradient(160deg, var(--wpm-ab-navy) 0%, var(--wpm-ab-navy-light) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 25px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* Geometric pattern overlay */
.wpm-ab-identity-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.06;
    background-image:
        linear-gradient(30deg, var(--wpm-ab-accent) 12%, transparent 12.5%, transparent 87%, var(--wpm-ab-accent) 87.5%, var(--wpm-ab-accent)),
        linear-gradient(150deg, var(--wpm-ab-accent) 12%, transparent 12.5%, transparent 87%, var(--wpm-ab-accent) 87.5%, var(--wpm-ab-accent)),
        linear-gradient(30deg, var(--wpm-ab-accent) 12%, transparent 12.5%, transparent 87%, var(--wpm-ab-accent) 87.5%, var(--wpm-ab-accent)),
        linear-gradient(150deg, var(--wpm-ab-accent) 12%, transparent 12.5%, transparent 87%, var(--wpm-ab-accent) 87.5%, var(--wpm-ab-accent)),
        linear-gradient(60deg, rgba(204, 255, 0, 0.3) 25%, transparent 25.5%, transparent 75%, rgba(204, 255, 0, 0.3) 75%, rgba(204, 255, 0, 0.3)),
        linear-gradient(60deg, rgba(204, 255, 0, 0.3) 25%, transparent 25.5%, transparent 75%, rgba(204, 255, 0, 0.3) 75%, rgba(204, 255, 0, 0.3));
    background-size: 40px 70px;
    background-position: 0 0, 0 0, 20px 35px, 20px 35px, 0 0, 20px 35px;
    pointer-events: none;
}

/* Accent line at the top of navy panel */
.wpm-ab-identity::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--wpm-ab-accent);
}

/* Avatar */
.wpm-ab-avatar {
    width: 90px !important;
    height: 90px !important;
    min-width: 90px;
    min-height: 90px;
    border-radius: 50% !important;
    -webkit-border-radius: 50% !important;
    clip-path: circle(50% at center);
    -webkit-clip-path: circle(50% at center);
    object-fit: cover !important;
    border: 3px solid rgba(204, 255, 0, 0.5) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
    transition: var(--wpm-ab-transition);
    aspect-ratio: 1 / 1;
}

.wpm-author-box:hover .wpm-ab-avatar {
    border-color: var(--wpm-ab-accent);
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
}

/* Author name */
.wpm-ab-name {
    color: var(--wpm-ab-white);
    font-size: 17px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 18px 0 6px 0;
    position: relative;
    z-index: 1;
    line-height: 1.3;
    padding: 0;
}

/* Role */
.wpm-ab-role {
    color: var(--wpm-ab-accent);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    z-index: 1;
}

/* ========================================
   Right Panel — Bio (White)
   ======================================== */
.wpm-ab-bio-panel {
    flex: 1;
    background: var(--wpm-ab-white);
    padding: 35px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* "ABOUT THE AUTHOR" label */
.wpm-ab-label {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--wpm-ab-accent);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin-bottom: 14px;
    /* Override to use navy-lime combo */
    color: #8a8a00;
}

.wpm-ab-label-line {
    display: inline-block;
    width: 40px;
    height: 2px;
    background: var(--wpm-ab-accent);
    vertical-align: middle;
}

/* Bio text */
.wpm-ab-bio {
    color: var(--wpm-ab-grey-text);
    font-size: 15px;
    line-height: 1.75;
    margin: 0 0 20px 0;
    padding: 0;
}

/* ========================================
   Social Links
   ======================================== */
.wpm-ab-socials {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}

.wpm-ab-social-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 16px;
    border-radius: 50px;
    background: var(--wpm-ab-navy);
    color: var(--wpm-ab-white);
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--wpm-ab-transition);
    border: none;
    cursor: pointer;
}

.wpm-ab-social-link svg {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
}

.wpm-ab-social-link:hover,
.wpm-ab-social-link:focus {
    background: var(--wpm-ab-accent);
    color: var(--wpm-ab-navy);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(11, 0, 87, 0.2);
    text-decoration: none;
}

.wpm-ab-social-link:focus {
    outline: 2px solid var(--wpm-ab-accent);
    outline-offset: 2px;
}

/* ========================================
   View All Articles Link
   ======================================== */
.wpm-ab-view-posts {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wpm-ab-navy);
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.3px;
    transition: var(--wpm-ab-transition);
    border: none;
}

.wpm-ab-view-posts:hover,
.wpm-ab-view-posts:focus {
    color: var(--wpm-ab-navy-light);
    text-decoration: none;
}

.wpm-ab-arrow {
    display: inline-block;
    transition: transform 0.3s ease;
}

.wpm-ab-view-posts:hover .wpm-ab-arrow {
    transform: translateX(4px);
}

/* ========================================
   Scroll Animation
   ======================================== */
.wpm-ab-animate {
    opacity: 0;
    transform: translateY(25px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.wpm-ab-animate.wpm-ab-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Responsive — Tablet
   ======================================== */
@media (max-width: 768px) {
    .wpm-author-box {
        flex-direction: column;
        margin: 30px 0 20px 0;
    }

    .wpm-ab-identity {
        flex: none;
        max-width: 100%;
        padding: 30px 20px 25px;
        flex-direction: row;
        gap: 20px;
        text-align: left;
    }

    .wpm-ab-identity::before {
        height: 3px;
    }

    .wpm-ab-avatar {
        width: 70px;
        height: 70px;
        flex-shrink: 0;
    }

    .wpm-ab-name {
        margin: 0 0 4px 0;
        font-size: 16px;
    }

    .wpm-ab-role {
        font-size: 11px;
    }

    .wpm-ab-bio-panel {
        padding: 25px 20px;
    }

    .wpm-ab-bio {
        font-size: 14px;
    }

    .wpm-ab-social-link {
        padding: 6px 14px;
        font-size: 11px;
    }
}

/* ========================================
   Responsive — Mobile
   ======================================== */
@media (max-width: 480px) {
    .wpm-author-box {
        border-radius: 10px;
        margin: 25px 0 15px 0;
    }

    .wpm-ab-identity {
        flex-direction: column;
        text-align: center;
        padding: 25px 15px 20px;
        gap: 10px;
    }

    .wpm-ab-avatar {
        width: 65px;
        height: 65px;
    }

    .wpm-ab-name {
        font-size: 15px;
    }

    .wpm-ab-bio-panel {
        padding: 20px 15px;
    }

    .wpm-ab-label {
        font-size: 10px;
    }

    .wpm-ab-bio {
        font-size: 13px;
        line-height: 1.65;
    }

    .wpm-ab-socials {
        gap: 8px;
    }

    .wpm-ab-social-link {
        padding: 6px 12px;
        font-size: 11px;
    }

    .wpm-ab-social-link span {
        display: none;
    }

    .wpm-ab-social-link svg {
        width: 16px;
        height: 16px;
    }

    .wpm-ab-view-posts {
        font-size: 13px;
    }
}

/* ========================================
   Print Styles
   ======================================== */
@media print {
    .wpm-author-box {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }

    .wpm-ab-identity {
        background: #f5f5f5 !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    .wpm-ab-name {
        color: #000 !important;
    }

    .wpm-ab-role {
        color: #555 !important;
    }

    .wpm-ab-socials {
        display: none;
    }
}
