/* Custom Authors Public Styles */

.custom-author-header {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 40px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 24px;
    align-items: center;
}

@media (max-width: 600px) {
    .custom-author-header {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }
}

.custom-author-header .author-avatar img {
    border-radius: 50%;
    border: 4px solid #f1f5f9;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

.custom-author-header .author-avatar img:hover {
    transform: scale(1.05);
}

.custom-author-header .author-meta-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .custom-author-header .author-meta-info {
        align-items: center;
    }
}

.custom-author-header .author-title {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.2;
}

.custom-author-header .author-designation {
    font-size: 14px;
    font-weight: 600;
    color: #2563eb;
    background: #eff6ff;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin: 0;
}

.custom-author-header .author-email {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

.custom-author-header .author-email a {
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s ease;
}

.custom-author-header .author-email a:hover {
    color: #2563eb;
}

.custom-author-header .author-bio {
    font-size: 15px;
    line-height: 1.6;
    color: #334155;
    margin: 12px 0 0 0;
    text-align: left;
}

.custom-author-header .author-bio p {
    margin: 0 0 8px 0;
}

.custom-author-header .author-bio p:last-child {
    margin-bottom: 0;
}

.author-social-links {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 16px;
}

.author-social-links a {
    color: #475569;
    background: #f1f5f9;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.author-social-links a:hover {
    color: #ffffff;
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.4);
}

.author-social-links a .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Post list archive styling */
.author-posts-title {
    font-size: 20px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 24px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 12px;
}

.author-posts-list {
    display: grid;
    gap: 30px;
}

.author-posts-list article {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 24px;
    transition: all 0.2s ease;
}

.author-posts-list article:hover {
    border-color: #cbd5e1;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.author-posts-list .entry-title {
    font-size: 20px;
    margin: 0 0 10px 0;
}

.author-posts-list .entry-title a {
    color: #0f172a;
    text-decoration: none;
    transition: color 0.2s ease;
}

.author-posts-list .entry-title a:hover {
    color: #2563eb;
}

.author-posts-list .entry-meta {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 15px;
}

.author-posts-list .entry-summary {
    color: #475569;
    line-height: 1.5;
    font-size: 14px;
}

/* Pagination */
.pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.pagination .page-numbers {
    padding: 8px 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination .page-numbers.current,
.pagination .page-numbers:hover {
    background: #2563eb;
    border-color: #2563eb;
    color: #ffffff;
}

/* Shortcode: custom_authors_box Styles */

/* Compact layout for banner/meta areas (matches screenshot 2) */
.custom-author-box-compact {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}

.custom-author-box-compact .custom-authors-list {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 14px;
    color: #777777;
}

.custom-author-box-compact .custom-author-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.custom-author-box-compact .custom-author-avatar img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    border: 2px solid #00a9d3;
}

.custom-author-box-compact .custom-author-avatar.fallback-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #0066cc;
}

.custom-author-box-compact .custom-author-avatar.fallback-icon .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-author-box-compact .custom-author-name {
    font-size: 14px;
    font-weight: 500;
}

.custom-author-box-compact .custom-author-name a {
    color: #777777;
    text-decoration: none;
    transition: color 0.2s ease;
}

.custom-author-box-compact .custom-author-name a:hover {
    color: #0066cc;
    text-decoration: none;
}

/* Full layout for bio box at end of posts (matches screenshot 1) */
.custom-author-box-full {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin: 30px 0;
}

.custom-author-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    margin-bottom: 30px;
    overflow: hidden;
}

.custom-author-card-top {
    display: flex;
    position: relative;
    background-color: #ffffff;
}

/* Background blue shape */
.custom-author-card-bg-shape {
    position: absolute;
    top: 0;
    left: 0;
    width: 25%;
    height: 100%;
    background: linear-gradient(135deg, #0239a6 0%, #00A9D3 100%);
    clip-path: polygon(0 0, 100% 0, 85% 100%, 0 100%);
    z-index: 1;
}

/* Left Dots Pattern */
.custom-author-card-dots-left {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 80px;
    height: 60px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.2) 2px, transparent 2px);
    background-size: 16px 16px;
    z-index: 2;
}

/* Right Dots Pattern */
.custom-author-card-dots-right {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 120px;
    height: 80px;
    background-image: radial-gradient(#cbd5e1 2px, transparent 2px);
    background-size: 16px 16px;
    opacity: 0.5;
    z-index: 1;
}

.custom-author-card-left {
    position: relative;
    width: 25%;
    flex: 0 0 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 0;
    z-index: 3;
}

.custom-author-card-avatar-wrapper {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
    width: 120px;
    height: 120px;
    margin-right: 0;
    transform: none;
}

.custom-author-card-avatar {
    flex-shrink: 0;
    width: 100px;
    height: 100px;
}

.custom-author-card-avatar img {
    width: 100px !important;
    height: 100px !important;
    max-width: 100px !important;
    border-radius: 50% !important;
    object-fit: cover;
    display: block;
    border: 4px solid #ffffff;
    position: relative;
    z-index: 3;
    background: #ffffff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

/* Outer ring */
.avatar-ring {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    z-index: 2;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.avatar-ring .ring-dot {
    position: absolute;
    width: 5px;
    height: 5px;
    background: #ffffff;
    border-radius: 50%;
}

.ring-dot-1 {
    top: 15%;
    right: 5%;
}

.ring-dot-2 {
    bottom: 20%;
    left: 5%;
}

.custom-author-card-right {
    position: relative;
    flex: 1;
    padding: 40px 40px 40px 20px;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.custom-author-card-label {
    font-size: 12px;
    font-weight: 700;
    color: #0056d2;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.custom-author-card-label .dot {
    width: 8px;
    height: 8px;
    background-color: #0056d2;
    border-radius: 50%;
}

.custom-author-card-name {
    font-size: 25px;
    font-weight: 800;
    color: #020b2e;
    margin: 0 0 12px 0;
    line-height: 1.2;
}

.custom-author-card-name a {
    color: #020b2e;
    text-decoration: none;
    transition: color 0.2s ease;
}

.custom-author-card-name a:hover {
    color: #0056d2;
}

.custom-author-card-line {
    width: 40px;
    height: 4px;
    background-color: #0056d2;
    border-radius: 2px;
    margin-bottom: 20px;
}

.custom-author-card-bio {
    font-size: 13px;
    line-height: 1.6;
    color: #475569;
}

.custom-author-card-bio p {
    margin: 0 0 10px 0;
}

.custom-author-card-bio p:last-child {
    margin-bottom: 0;
}

/* Bottom bar */
.custom-author-card-bottom {
    background-color: #f4f8fc;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #eaf0f6;
}

.custom-author-card-connect {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    font-weight: 700;
    color: #020b2e;
}

.custom-author-card-connect .connect-icon {
    width: 36px;
    height: 36px;
    background-color: #0056d2;
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-author-card-socials-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
}

.socials-divider {
    width: 1px;
    height: 28px;
    background-color: #cbd5e1;
}

.custom-author-card-socials {
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-author-card-socials a.social-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.custom-author-card-socials a.linkedin {
    background-color: #0077b5;
    color: #ffffff;
}

.custom-author-card-socials a.twitter {
    background-color: #ffffff;
    color: #0f1419;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.custom-author-card-socials a.website {
    background-color: #ffffff;
    color: #475569;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.custom-author-card-socials a.social-icon:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Responsive */
@media (max-width: 1440px) {
    .custom-author-card-left {
        width: 30%;
        flex: 0 0 30%;
    }

    .custom-author-card-bg-shape {
        width: 30%;
    }
}

@media (max-width: 992px) {
    .custom-author-card-top {
        padding: 0;
    }

    .custom-author-card-left {
        width: 30%;
        flex: 0 0 30%;
        padding: 30px 0;
    }

    .custom-author-card-bg-shape {
        width: 30%;
    }

    .custom-author-card-avatar-wrapper {
        margin-right: 0;
        transform: none;
    }

    .custom-author-card-right {
        padding: 30px 30px 30px 20px;
    }

    .custom-author-card-bio {
        font-size: 11px;
        /* Decreased bio text size */
    }
}

@media (max-width: 768px) {
    .custom-author-card-top {
        flex-direction: column;
        padding: 0;
        align-items: center;
    }

    .custom-author-card-bg-shape {
        width: 100%;
        height: 100px;
        clip-path: none;
    }

    .custom-author-card-dots-left {
        top: 10px;
        left: 10px;
    }

    .custom-author-card-dots-right {
        display: none;
    }

    .custom-author-card-left {
        width: 100%;
        flex: none;
        justify-content: center;
        margin-bottom: 16px;
        padding: 40px 0 0 0;
    }

    .custom-author-card-avatar-wrapper {
        transform: none;
        margin-right: 0;
        width: 120px;
        height: 120px;
    }

    .custom-author-card-avatar {
        width: 100px;
        height: 100px;
    }

    .custom-author-card-avatar img {
        width: 100px !important;
        height: 100px !important;
        max-width: 100px !important;
        border-width: 4px;
    }

    .avatar-ring {
        width: 120px;
        height: 120px;
        border-color: rgba(255, 255, 255, 0.3);
    }

    .custom-author-card-right {
        padding: 0 20px 30px 20px;
        text-align: center;
        align-items: center;
    }

    .custom-author-card-line {
        margin-left: auto;
        margin-right: auto;
    }

    .custom-author-card-label {
        justify-content: center;
    }

    .custom-author-card-bottom {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
        text-align: center;
    }

    .custom-author-card-connect {
        flex-direction: column;
        justify-content: center;
        gap: 8px;
    }

    .custom-author-card-socials-wrapper {
        flex-direction: column;
        gap: 16px;
    }

    .socials-divider {
        display: none;
    }
}

/* Hide Elementor Social Icon items if the link is empty, or Array */
.elementor-widget-social-icons .elementor-social-icon[href=""],
.elementor-widget-social-icons .elementor-social-icon[href*="Array"],
.elementor-widget-social-icons .elementor-social-icon:not([href]),
.elementor-social-icon[href=""],
.elementor-social-icon[href*="Array"],
.elementor-social-icon:not([href]),
.elementor-social-icons-wrapper > *:has(.elementor-social-icon[href=""]),
.elementor-social-icons-wrapper > *:has(.elementor-social-icon[href*="Array"]),
.elementor-social-icons-wrapper > *:has(.elementor-social-icon:not([href])) {
    display: none !important;
}