/* Mobile fixes for the branding style guides article */

/* Base styles for PDF download box */
.pdf-download-box {
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-download-box i {
    color: #d32f2f;
    font-size: 24px;
    margin-right: 15px;
}

.pdf-download-box a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.pdf-download-box a:hover {
    color: #004999;
}

/* Improve overall mobile layout */
@media (max-width: 768px) {
    /* Fix article container layout for mobile */
    .article-container {
        grid-template-columns: 1fr;
        padding: 1rem;
    }
    
    /* Ensure images don't overflow their containers */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Better spacing in the article header content */
    .article-header-content {
        padding: 1.5rem;
    }
    
    /* Fix article title size for mobile */
    .article-title {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }
    
    /* Adjust padding for article content */
    .article-content {
        padding: 1.5rem;
    }
    
    /* Fix the PDF download box layout */
    .pdf-download-box {
        flex-direction: column;
        padding: 10px;
        text-align: center;
    }
    
    .pdf-download-box i {
        margin-right: 0;
        margin-bottom: 10px;
    }
    
    /* Adjust the checklist items */
    .checklist-items li {
        padding: 10px 0;
    }
    
    /* Fix table of contents */
    .table-of-contents {
        padding: 1rem;
    }
    
    .toc-list li {
        margin-bottom: 0.75rem;
    }
    
    /* Fix spacing for brand logo containers */
    .brand-logo-container {
        margin: 15px auto;
    }
    
    .brand-logo {
        max-width: 160px;
    }
}

/* Additional fixes for smaller screens */
@media (max-width: 480px) {
    /* Further reduce paddings */
    .article-container {
        padding: 0.75rem;
    }
    
    .article-content {
        padding: 1rem;
    }
    
    /* Make titles even smaller */
    .article-title {
        font-size: 1.6rem;
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    /* Ensure share buttons fit */
    .article-share {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .share-button {
        margin: 5px;
    }
    
    /* Fix back to blog button */
    .back-to-blog {
        padding: 10px 16px;
        font-size: 0.9rem;
        bottom: 20px;
        right: 20px;
    }
    
    /* Fix author section */
    .article-author {
        flex-direction: column;
        text-align: center;
    }
    
    .author-image {
        margin-bottom: 10px;
    }
}

/* Fix for very small screens */
@media (max-width: 320px) {
    .article-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .article-title {
        font-size: 1.4rem;
    }
    
    .article-intro {
        font-size: 1rem;
    }
    
    .article-content p, 
    .article-content li {
        font-size: 0.95rem;
    }
}

/* Style for brand logo containers */
.brand-logo-container {
    text-align: center;
    margin: 20px auto;
}

.brand-logo {
    max-width: 200px;
    height: auto;
}

/* Fix the overflow issues in the article content */
.article-section {
    overflow-wrap: break-word;
    word-break: break-word;
}

/* Ensure images are responsive */
.article-section img,
.brand-logo-container img {
    max-width: 100%;
    height: auto;
}

/* Fix table of contents for mobile */
@media (max-width: 768px) {
    .table-of-contents {
        background-color: #f8f9fa;
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 2rem;
    }
    
    .toc-list {
        padding-left: 1rem;
    }
    
    .toc-list a {
        display: block;
        padding: 5px 0;
        line-height: 1.3;
    }
}

/* Fix sidebar on mobile */
@media (max-width: 768px) {
    .article-sidebar {
        position: static;
        margin-top: 2rem;
    }
}
