/* Mobile CSS for Blog Pages */

@media (max-width: 767.98px) {
    /* Blog Article Page */
    
    /* Breadcrumb - make it wrap properly */
    .breadcrumb {
        font-size: 0.75rem;
        padding: 0.5rem 0;
        margin-bottom: 0.75rem;
        flex-wrap: wrap;
    }

    .breadcrumb-item {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .breadcrumb-item.active {
        white-space: normal;
        word-break: break-word;
    }

    /* Article Header - prevent title from being cut off */
    .card-header .card-title {
        font-size: 1.3rem !important;
        line-height: 1.3;
        margin-bottom: 1rem !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    .card-header .d-flex.flex-wrap {
        font-size: 0.75rem;
        gap: 0.5rem !important;
    }

    .card-header .d-flex.align-items-center {
        font-size: 0.75rem;
    }

    .card-header .d-flex.align-items-center i {
        font-size: 0.7rem;
    }

    /* Article Content */
    .card-body {
        padding: 1rem;
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .card-body h1 {
        font-size: 1.5rem;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
    }

    .card-body h2 {
        font-size: 1.3rem;
        margin-top: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .card-body h3 {
        font-size: 1.1rem;
        margin-top: 1rem;
        margin-bottom: 0.5rem;
    }

    .card-body p {
        margin-bottom: 0.75rem;
        font-size: 0.9rem;
    }

    .card-body ul,
    .card-body ol {
        padding-left: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .card-body li {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

    /* Share Buttons */
    .card-body .d-flex.flex-wrap.gap-2 {
        gap: 0.5rem !important;
    }

    .card-body .btn-sm {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Related Articles - make them stack vertically */
    .card-body .row > .col-md-6 {
        margin-bottom: 0.75rem;
    }

    .card-body .border.rounded {
        padding: 0.75rem !important;
    }

    .card-body .border.rounded h4 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }

    .card-body .border.rounded p {
        font-size: 0.75rem;
        margin-bottom: 0.5rem;
    }

    .card-body .border.rounded a {
        font-size: 0.8rem;
    }

    /* Call to Action section */
    .card.bg-light .card-body {
        padding: 1rem;
    }

    .card.bg-light h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .card.bg-light p {
        font-size: 0.85rem;
        margin-bottom: 1rem;
    }

    .card.bg-light .btn {
        font-size: 0.85rem;
        padding: 0.5rem 1rem;
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .card.bg-light .d-flex.flex-column.flex-sm-row {
        flex-direction: column !important;
    }

    /* Navigation buttons */
    .d-flex.justify-content-between .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Disclaimer */
    .alert-warning {
        font-size: 0.8rem;
        padding: 0.75rem;
    }

    .alert-warning strong {
        font-size: 0.85rem;
    }

    /* Blog Index Page */
    .blog-index .card {
        margin-bottom: 1rem;
    }

    .blog-index .card-title {
        font-size: 1rem;
        line-height: 1.3;
    }

    .blog-index .card-text {
        font-size: 0.85rem;
    }

    .blog-index .btn {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    /* Fix for long titles in page title */
    h1.card-title.h2 {
        font-size: 1.3rem !important;
        word-break: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }

    /* Share this article section */
    .card-header h3.card-title.h5 {
        font-size: 1rem;
    }

    /* Related Articles section header */
    .card .card-header .card-title.h5 {
        font-size: 1rem;
    }
}

/* Extra small devices (phones in portrait, less than 576px) */
@media (max-width: 575.98px) {
    .card-header .card-title {
        font-size: 1.2rem !important;
    }

    .card-body {
        padding: 0.75rem;
        font-size: 0.85rem;
    }

    .card-body h1 {
        font-size: 1.3rem;
    }

    .card-body h2 {
        font-size: 1.15rem;
    }

    .card-body h3 {
        font-size: 1rem;
    }

    .card-body p,
    .card-body li {
        font-size: 0.85rem;
    }
}

/* Landscape orientation */
@media (max-width: 767.98px) and (orientation: landscape) {
    .card-header .card-title {
        font-size: 1.4rem !important;
    }

    .card-body {
        font-size: 0.95rem;
    }
}

