/*
 * Homepage block styles - ported from the @push("styles") block in
 * truyenfull/resources/views/home.blade.php (Task 3.2). Enqueued only on the
 * front page, matching the Blade original, which pushed these styles from the
 * home view rather than the shared layout.
 *
 * Only change from the source: /img/ -> ../img/ (this file lives in assets/css/,
 * the images in assets/img/).
 */

    /* Title Section Styling */
    .title-section {
        text-align: left;
        height: 40px;
        text-transform: uppercase;
        border-bottom: 1px solid #4e4e4e;
        position: relative;
        margin-bottom: 15px;

    }

    .title-section h2 {
        font-family: 'Roboto Condensed', Tahoma, sans-serif;
        font-size: 20px;
        height: 40px;
        line-height: 40px;
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .title-section h2 a {
        color: #4e4e4e;
        text-decoration: none;
    }

    .title-section h2 a:hover {
        color: #428bca;
    }

    .title-section i {
        font-size: 16px;
        line-height: 42px;
        vertical-align: middle;
        margin-left: 3px;
    }

    /* Hot Stories Grid */
    .hot-stories {
        margin-bottom: 15px;
        min-height: 200px;
        display: grid;
        grid-template-columns: repeat(8, 1fr);
        gap: 12px;
    }

    .hot-stories .item {
        height: auto;
        width: 100%;
        position: relative;
        aspect-ratio: 129/192;
    }

    .hot-stories .item a {
        text-decoration: none;
        color: inherit;
        display: block;
        height: 100%;
    }

    .hot-stories .item .item-img {
        box-shadow: 0 1px 2px #b5b5b5;
        width: 100%;
        height: 100%;
        display: block;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .full-stories-row img {
        transition: transform 0.3s ease;
    }

    .hot-stories .item .item-img:hover,
    .full-stories-row img:hover {
        transform: scale(1.03);
    }



    .hot-stories .item .title {
        position: absolute;
        bottom: 0;
        width: 100%;
        color: #f4f4f4;
        background-color: rgba(0, 0, 0, .6);
        padding: 5px 0;
        text-shadow: 1px 2px 2px #000;
        font-size: 12px;
        display: block;
        margin-top: 2px;
        text-align: center;
        font-family: 'Roboto Condensed', Tahoma, sans-serif;
    }

    .hot-stories .item .title h3 {
        margin: 0;
        padding: 0;
        font-size: 12px;
        display: inline;
        font-weight: normal;
        line-height: 1.2;
    }

    .full-label {
        width: 34px;
        height: 50px;
        position: absolute;
        display: block;
        bottom: 5%;
        left: -7px;
        z-index: 1;
        background: transparent url(../img/full-label.png) no-repeat;
    }

    /* Full Stories Section - Card Style */
    .full-stories-row {
        display: flex;
        flex-wrap: wrap;
    }

    .full-stories-row .full-story-item {
        margin-bottom: 20px;
        display: flex;
    }

    .full-stories-row .full-story-item a {
        text-decoration: none;
        color: inherit;
        display: flex;
        flex-direction: column;
        width: 100%;
        height: 100%;
    }

    .full-stories-row .full-story-item img {
        width: 100%;
        aspect-ratio: 129 / 192;
        height: auto;
        box-shadow: 0 1px 2px #b5b5b5;
        display: block;
        object-fit: cover;
        background-color: #e9e9e9;
        transition: transform 0.3s ease;
    }

    .full-stories-row .caption {
        margin-top: 8px;
        text-align: center;
        display: flex;
        flex-direction: column;
        flex-grow: 1;
        justify-content: space-between;
    }

    .full-stories-row .caption h3 {
        font-family: 'Roboto Condensed', Tahoma, sans-serif;
        font-size: 14px;
        color: #2b2b2b;
        margin: 0 0 6px 0;
        padding: 0;
        line-height: 1.3em;
        height: 2.6em; /* Cố định chiều cao 2 dòng chữ để các box bằng nhau */
        font-weight: 700;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        word-break: break-word;
    }

    .full-stories-row .caption small {
        display: inline-block;
        margin-top: auto;
        padding: 2px 6px;
        font-size: 12px;
        background-color: #428bca;
        color: #fff;
        border-radius: 3px;
        align-self: center;
    }

    .col-truyen-main .title-section {
        margin-bottom: 0;
    }

    .anchor-link {
        font-size: inherit;
        color: inherit;
        text-decoration: none;
    }

    .anchor-link:hover,
    .anchor-link:hover {
        text-decoration: underline;
    }

    /* Story List Styling */
    .story-list row {
        font-family: 'Roboto Condensed', Tahoma, sans-serif;
        font-size: 15px;
        border-bottom: 1px dashed #ccc;
    }

    .story-list .row>div {
        border-left: 1px dashed #CCC;
        border-bottom: 1px dashed #CCC;
    }

    .text-info a {
        color: #31708f;
    }



    /* Column Layout */
    .col-truyen-side {
        padding-left: 7.5px;
    }

    .col-truyen-side .list {
        background-color: #ecf0f1;
        border: 1px solid #D9E1E4;
    }

    .list-cat .row {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    @media (min-width: 992px) {
        .col-truyen-side .list {
            padding-right: 14px;
            padding-left: 14px;
        }
    }

    /* Label Badges */
    .label-badge {
        padding: 1px 3px;
        font-size: 13px;
        vertical-align: bottom;
        margin-left: 5px;
        display: inline-block;
    }

    .label-full {
        border: 1px solid #86ad86;
        color: #86ad86;
    }

    .label-hot {
        border: 1px solid #fd8383;
        color: #fd8383;
    }

    .label-title {
        height: 20px;
        display: inline-flex;
        align-items: center;
        padding: 1px 3px;
        font-size: 13px;
        margin-left: 5px;
    }

    .label-new {
        border: 1px solid #8eb3fd;
        color: #8eb3fd;
    }

    .label-hot:before {
        content: "Hot"
    }

    .label-new:before {
        content: "New"
    }

    .label-full:before {
        content: "Full"
    }

    .col-title,
    .col-cat,
    .col-chap,
    .col-time {
        display: flex;
        align-items: center;
        height: 40px;
        line-height: 40px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .col-title h3 {
        display: inline;
        overflow: inherit;
        text-overflow: inherit;
        font-size: inherit;
        font-weight: 400;
        font-family: inherit;
        color: inherit;
        margin-bottom: 0;
    }

    .title-list h4 {
        font-family: 'Roboto Condensed', Tahoma, sans-serif;
        color: inherit;
        font-size: 20px;
        font-weight: 500;
        height: 40px;
        line-height: 40px;
        max-width: 100%;
        text-transform: uppercase;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border-bottom: 1px solid #4E4E4E;
    }


    @media all and (max-width: 991px) {

        .col-truyen-main,
        .col-truyen-side {
            padding: 0;
        }

        .hot-stories {
            grid-template-columns: repeat(4, 1fr);
            gap: 10px;
        }

        .full-stories {
            grid-template-columns: repeat(3, 1fr);
            gap: 10px;
        }

        .full-label {
            bottom: -5%;
            background-size: 80% 80%;
            left: -5px;
        }
    }

    @media all and (max-width: 480px) {

        .title-section h2,
        .title-section {
            padding: 0 5px;
        }

        .hot-stories {
            gap: 8px;
        }

        .story-list {
            padding-left: 6px;
        }
    }

    /* Dark Theme Styles */
    .dark-theme .text-info,
    .dark-theme .text-info a {
        color: #a9cf54;
    }

    .dark-theme .full-stories-row .caption h3 {
        color: #b1b1b1;
    }

    .dark-theme .full-stories-row .caption small {
        color: #92bb35;
        border-color: #92bb35;
        border: 1px solid #92bb35;
        background-color: transparent;
    }

    .dark-theme .story-list {
        background-color: #1a1a1a;
        border-color: #333;
    }

    .dark-theme .col-truyen-side .list {
        background-color: #1a1a1a;
        border-color: #333;
    }

    .dark-theme .title-list h4 {
        color: #fff;
        border-bottom-color: #fff;
    }

    .dark-theme .list-cat .row {
        color: #b1b1b1;
    }

    .dark-theme .list-cat a {
        color: #b1b1b1;
    }

    .dark-theme .list-cat a:hover {
        color: #a9cf54;
    }

    /* ==========================================================================
       Homepage SEO Content Box Widget (TruyenFull Style)
       ========================================================================== */
    .tfc-home-content-box {
        margin-bottom: 30px;
        font-size: 14px;
        line-height: 1.7;
        color: #333;
    }

    .tfc-home-content-box.tfc-content-box-card {
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 6px;
        padding: 20px 24px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    }

    .tfc-content-box-heading {
        font-size: 16px;
        font-weight: 700;
        color: #1a1a1a;
        margin: 0 0 14px 0;
        padding-bottom: 8px;
        border-bottom: 2px solid transparent;
        line-height: 1.4;
    }

    .tfc-accent-red .tfc-content-box-heading {
        border-bottom-color: #d32f2f;
    }

    .tfc-accent-blue .tfc-content-box-heading {
        border-bottom-color: #428bca;
    }

    .tfc-accent-green .tfc-content-box-heading {
        border-bottom-color: #5cb85c;
    }

    .tfc-content-box-body h3,
    .tfc-content-box-body h4 {
        font-size: 14px;
        font-weight: 700;
        color: #222;
        margin: 14px 0 6px 0;
    }

    .tfc-content-box-body p {
        margin-bottom: 10px;
    }

    .tfc-content-box-body p:last-child {
        margin-bottom: 0;
    }

    .tfc-content-box-body strong {
        color: #111;
    }

    .tfc-content-box-body a {
        color: #d32f2f;
        text-decoration: none;
        font-weight: 600;
    }

    .tfc-content-box-body a:hover {
        text-decoration: underline;
    }

    .tfc-content-box-body ul,
    .tfc-content-box-body ol {
        margin: 8px 0 12px 20px;
        padding: 0;
    }

    .tfc-content-box-body ul li {
        margin-bottom: 4px;
        list-style-type: disc;
    }

    /* Dark Theme Support */
    .dark-theme .tfc-home-content-box.tfc-content-box-card {
        background: #1a1a1a;
        border-color: #333;
        color: #b1b1b1;
    }

    .dark-theme .tfc-content-box-heading {
        color: #fff;
    }

    .dark-theme .tfc-content-box-body h3,
    .dark-theme .tfc-content-box-body h4,
    .dark-theme .tfc-content-box-body strong {
        color: #e5e5e5;
    }

    .dark-theme .tfc-content-box-body a {
        color: #ff6b6b;
    }

