/*
Theme Name: Archysport Theme
Theme URI: https://www.archysport.com
Description: GeneratePress child theme for Archysport — sports news with E-E-A-T optimized author pages, schema markup, and SEO enhancements.
Author: Archysport Editorial Team
Author URI: https://www.archysport.com/about
Template: generatepress
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: archysport
*/

/* ==========================================================================
   Author Box (appears on single posts and author archive pages)
   ========================================================================== */

.archysport-author-box {
    display: flex;
    gap: 20px;
    padding: 24px;
    margin: 30px 0;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    align-items: flex-start;
}

.archysport-author-box .author-avatar img {
    border-radius: 50%;
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.archysport-author-box .author-info {
    flex: 1;
}

.archysport-author-box .author-name {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 2px;
}

.archysport-author-box .author-name a {
    color: inherit;
    text-decoration: none;
}

.archysport-author-box .author-name a:hover {
    color: #0056b3;
}

.archysport-author-box .author-title {
    font-size: 0.85em;
    color: #6c757d;
    margin: 0 0 8px;
    font-style: italic;
}

.archysport-author-box .author-bio {
    font-size: 0.9em;
    line-height: 1.6;
    color: #495057;
    margin: 0 0 10px;
}

.archysport-author-box .author-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.archysport-author-box .author-social a {
    font-size: 0.8em;
    color: #6c757d;
    text-decoration: none;
    transition: color 0.2s;
}

.archysport-author-box .author-social a:hover {
    color: #0056b3;
}

/* Author specialties badges */
.archysport-author-box .author-specialties {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.archysport-author-box .author-specialties .badge {
    display: inline-block;
    padding: 2px 10px;
    background: #e7f1ff;
    color: #0056b3;
    border-radius: 12px;
    font-size: 0.75em;
    font-weight: 600;
}

/* ==========================================================================
   Author Archive Page
   ========================================================================== */

.archysport-author-header {
    padding: 40px 0 30px;
    margin-bottom: 30px;
    border-bottom: 2px solid #e9ecef;
}

.archysport-author-header .author-profile {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.archysport-author-header .author-avatar img {
    border-radius: 50%;
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 3px solid #e9ecef;
}

.archysport-author-header .author-details {
    flex: 1;
}

.archysport-author-header h1 {
    font-size: 1.8em;
    margin: 0 0 4px;
}

.archysport-author-header .author-role {
    color: #6c757d;
    font-size: 1em;
    margin: 0 0 12px;
    font-style: italic;
}

.archysport-author-header .author-bio {
    font-size: 0.95em;
    line-height: 1.7;
    color: #495057;
    margin: 0 0 16px;
}

.archysport-author-header .author-stats {
    display: flex;
    gap: 24px;
    margin-top: 16px;
}

.archysport-author-header .stat {
    text-align: center;
}

.archysport-author-header .stat-number {
    display: block;
    font-size: 1.4em;
    font-weight: 700;
    color: #212529;
}

.archysport-author-header .stat-label {
    font-size: 0.75em;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Collapse empty / unfilled AdSense containers only.
   Loaded ads (data-ad-status="filled") are NOT affected.
   ========================================================================== */

.entry-content ins.adsbygoogle[data-ad-status="unfilled"] {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.entry-content ins.adsbygoogle:not([data-ad-status="filled"]):empty {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Hide wrapper divs when their ad child is unfilled or empty */
.entry-content div:has(> ins.adsbygoogle[data-ad-status="unfilled"]),
.entry-content div:has(> ins.adsbygoogle:not([data-ad-status="filled"]):empty) {
    display: none !important;
    height: 0 !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* ==========================================================================
   Related Articles
   ========================================================================== */

.archysport-related-articles {
    margin: 40px 0 30px;
    padding: 30px 0 0;
    border-top: 2px solid #e9ecef;
}

.archysport-related-articles .related-heading {
    font-size: 1.3em;
    font-weight: 700;
    margin: 0 0 20px;
    color: #212529;
}

.archysport-related-articles .related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.archysport-related-articles .related-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: box-shadow 0.2s, transform 0.2s;
}

.archysport-related-articles .related-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.archysport-related-articles .related-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.archysport-related-articles .related-thumb {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9ecef;
}

.archysport-related-articles .related-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.archysport-related-articles .related-card:hover .related-thumb img {
    transform: scale(1.05);
}

.archysport-related-articles .related-thumb-placeholder {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
}

.archysport-related-articles .related-content {
    padding: 14px 16px 16px;
}

.archysport-related-articles .related-category {
    display: inline-block;
    font-size: 0.7em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #0056b3;
    background: #e7f1ff;
    padding: 2px 8px;
    border-radius: 3px;
    margin-bottom: 8px;
}

.archysport-related-articles .related-title {
    font-size: 0.95em;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px;
    color: #212529;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archysport-related-articles .related-card-link:hover .related-title {
    color: #0056b3;
}

.archysport-related-articles .related-meta {
    display: flex;
    gap: 12px;
    font-size: 0.75em;
    color: #6c757d;
}

/* ==========================================================================
   Post Navigation (Previous / Next)
   ========================================================================== */

.archysport-post-nav {
    margin: 30px 0 10px;
    padding: 24px 0 0;
    border-top: 2px solid #e9ecef;
}

.archysport-post-nav .post-nav-inner {
    display: flex;
    gap: 20px;
}

.archysport-post-nav .post-nav-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.archysport-post-nav .post-nav-link:hover {
    background: #fff;
    border-color: #0056b3;
    box-shadow: 0 2px 8px rgba(0, 86, 179, 0.1);
}

.archysport-post-nav .post-nav-empty {
    background: transparent;
    border-color: transparent;
}

.archysport-post-nav .post-nav-next {
    text-align: right;
    justify-content: flex-end;
}

.archysport-post-nav .post-nav-arrow {
    font-size: 1.4em;
    color: #0056b3;
    flex-shrink: 0;
    line-height: 1;
}

.archysport-post-nav .post-nav-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.archysport-post-nav .post-nav-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #6c757d;
    font-weight: 600;
}

.archysport-post-nav .post-nav-title {
    font-size: 0.9em;
    font-weight: 600;
    color: #212529;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.archysport-post-nav .post-nav-link:hover .post-nav-title {
    color: #0056b3;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .archysport-author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .archysport-author-box .author-social,
    .archysport-author-box .author-specialties {
        justify-content: center;
    }

    .archysport-author-header .author-profile {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .archysport-author-header .author-stats {
        justify-content: center;
    }

    /* Related Articles responsive */
    .archysport-related-articles .related-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .archysport-related-articles .related-card {
        display: flex;
        flex-direction: row;
    }

    .archysport-related-articles .related-card .related-thumb {
        width: 120px;
        min-width: 120px;
        aspect-ratio: 1 / 1;
    }

    .archysport-related-articles .related-card .related-content {
        padding: 10px 14px;
    }

    .archysport-related-articles .related-title {
        -webkit-line-clamp: 2;
    }

    /* Post Navigation responsive */
    .archysport-post-nav .post-nav-inner {
        flex-direction: column;
        gap: 12px;
    }

    .archysport-post-nav .post-nav-next {
        text-align: left;
        justify-content: flex-start;
        flex-direction: row-reverse;
    }
}
