/**
 * Custom styles for mobile author avatar
 */

/* Hide the mobile elements by default (for desktop) */
.cs-entry__mobile-author-avatar,
.cs-entry__mobile-title,
.cs-homepage-mobile-title,
.cs-homepage-mobile-author {
    display: none;
}

/* Homepage mobile styles for article listings */
@media (max-width: 767px) {
    /* Hide desktop version of the title and author in listings */
    .cs-entry__content .cs-desktop-title {
        display: none !important;
    }
    
    .cs-entry__content .cs-entry__post-meta {
        display: none !important;
    }
    
    /* Show and style the homepage mobile title at the top */
    .cs-homepage-mobile-title {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 10px 15px;
        z-index: 5;
        background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
    }
    
    .cs-homepage-mobile-title h2 {
        color: #fff;
        font-size: 16px;
        font-weight: 700;
        text-shadow: 0 1px 2px rgba(0,0,0,0.8);
        margin: 0;
        padding: 0;
        line-height: 1.3;
        text-align: left;
    }
    
    /* Remove duplicate titles in hero section */
    .cs-hero-type-1__item .cs-entry__content .cs-entry__title {
        display: none !important;
    }
    
    /* Also hide subtitle and meta in hero content area on mobile */
    .cs-hero-type-1__item .cs-entry__content .cs-entry__subtitle,
    .cs-hero-type-1__item .cs-entry__content .cs-entry__post-meta {
        display: none !important;
    }
    
    /* Show and style the homepage mobile author at the bottom */
    .cs-homepage-mobile-author {
        display: block;
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        padding: 10px;
        z-index: 5;
        text-align: center;
    }
    
    .cs-homepage-avatar-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    .cs-homepage-mobile-author .cs-meta-author-avatar {
        margin-bottom: 3px;
        display: block;
    }
    
    /* Increased size for author avatar and ensured roundness */
    .cs-homepage-mobile-author .cs-meta-author-avatar img {
        width: 55px;
        height: 55px;
        border-radius: 50% !important;
        border: 2px solid #fff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
        object-fit: cover;
    }
    
    .cs-homepage-mobile-author .cs-meta-author-name {
        color: #fff;
        font-size: 12px;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,0.9);
    }
    
    /* Ensure the excerpt still shows */
    .cs-entry__content .cs-entry__excerpt {
        margin-top: 10px;
    }
}

/* Hide regular author details and title in mobile view - ONLY ON SINGLE POSTS */
@media (max-width: 767px) {
    /* For single posts only */
    body.single-post .cs-standard-author-meta .cs-meta-author {
        display: none !important;
    }
    
    /* Additional selector to ensure original author meta is hidden - single posts only */
    body.single-post .cs-entry__content .cs-meta-author {
        display: none !important;
    }
    
    /* Hide the entire standard author meta section if needed - single posts only */
    body.single-post .cs-standard-author-meta {
        visibility: hidden;
        height: 0;
        overflow: hidden;
    }
    
    /* Hide the original title - single posts only */
    body.single-post .cs-standard-title {
        display: none !important;
    }
    
    body.single-post .cs-entry__content .cs-entry__title {
        display: none !important;
    }
}

/* Show and style the mobile title for mobile devices - ONLY ON SINGLE POSTS */
@media (max-width: 767px) {
    /* For single posts only */
    body.single-post .cs-entry__mobile-title {
        display: block;
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        padding: 15px;
        z-index: 10;
        text-align: center;
        background: linear-gradient(to bottom, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.3) 70%, rgba(0,0,0,0) 100%);
    }
    
    body.single-post .cs-entry__mobile-title-text {
        color: #fff;
        font-size: 24px;
        font-weight: 700;
        text-shadow: 0 1px 3px rgba(0,0,0,0.9);
        margin: 0;
        padding: 0;
        line-height: 1.3;
    }
}

/* Show and style the mobile author avatar for mobile devices - ONLY ON SINGLE POSTS */
@media (max-width: 767px) {
    /* For single posts only */
    body.single-post .cs-entry__mobile-author-avatar {
        display: block;
        position: absolute;
        bottom: 10px;
        left: 0;
        right: 0;
        padding: 15px;
        z-index: 10;
        text-align: center;
    }
    
    body.single-post .cs-mobile-avatar-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    
    body.single-post .cs-entry__mobile-author-avatar .cs-meta-author-avatar {
        margin-bottom: 5px;
        display: block;
    }
    
    body.single-post .cs-entry__mobile-author-avatar .cs-meta-author-avatar img {
        width: 100px;
        height: 100px;
        border-radius: 50% !important;
        border: 4px solid #fff;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        object-fit: cover;
    }
    
    body.single-post .cs-entry__mobile-author-avatar .cs-meta-author-name {
        color: #fff;
        font-size: 18px;
        font-weight: 600;
        text-shadow: 0 1px 3px rgba(0,0,0,0.9);
    }
} 