
/*
Theme Name: New HD Video
Theme URI: https://newhdvideo.world
Author: New HD Video
Description: Custom Video Magazine Theme
Version: 1.0
*/

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: #f1f1f1;
    color: #171717;
    font-family: Arial, Helvetica, sans-serif;
    transition: background .3s, color .3s;
}

a {
    color: inherit;
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* HEADER */

.site-header {
    width: 100%;
    background: #fff;
    border-bottom: 1px solid #eee;
    position: relative;
    z-index: 10;
}

.header-inner {
    min-height: 108px;
    padding: 15px 2.5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.site-branding {
    flex: 1;
}

.site-title {
    font-size: 36px;
    font-weight: 800;
    white-space: nowrap;
}

.custom-logo {
    max-height: 70px;
    width: auto;
}

.main-navigation ul {
    display: flex;
    list-style: none;
    gap: 20px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-size: 14px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-tag {
    color: #55b978;
    font-size: 20px;
    font-weight: 700;
    white-space: nowrap;
}

.dark-toggle,
.search-toggle {
    background: transparent;
    border: 0;
    font-size: 25px;
    cursor: pointer;
}

.header-search {
    display: none;
    padding: 15px 3%;
    background: #fafafa;
}

.header-search.active {
    display: block;
}

/* HOMEPAGE */

.homepage {
    width: 95%;
    max-width: 1600px;
    margin: 35px auto;
}

/* FEATURED SECTION */

.featured-layout {
    display: grid;
    grid-template-columns: 2fr 1.03fr;
    gap: 7px;
    height: 580px;
}

.featured-main,
.featured-side {
    min-width: 0;
    min-height: 0;
}

.featured-side {
    display: grid;
    grid-template-rows: 1fr 1fr;
    gap: 7px;
}

.featured-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 9px;
    background: #ddd;
}

.main-card {
    width: 100%;
    height: 100%;
}

.side-card {
    width: 100%;
    height: 100%;
}

.featured-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .4s;
}

.featured-card:hover .featured-image {
    transform: scale(1.04);
}

.featured-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 60px 25px 20px;
    color: #fff;
    background: linear-gradient(
        transparent,
        rgba(0,0,0,.85)
    );
}

.featured-overlay h2 {
    margin: 0;
    font-size: 30px;
    font-weight: 800;
    line-height: 1.4;
}

.side-card .featured-overlay h2 {
    font-size: 23px;
}

/* LATEST POSTS */

.latest-section {
    margin-top: 45px;
}

.section-heading {
    margin-bottom: 22px;
    border-bottom: 2px solid #ddd;
}

.section-heading h2 {
    display: inline-block;
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 3px solid #55b978;
    font-size: 25px;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.post-card {
    overflow: hidden;
    background: #fff;
    border-radius: 9px;
    box-shadow: 0 2px 12px rgba(0,0,0,.05);
}

.post-thumbnail {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #ddd;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.post-card:hover img {
    transform: scale(1.05);
}

.post-content {
    padding: 15px;
}

.post-content h3 {
    margin: 0 0 12px;
    font-size: 18px;
    line-height: 1.5;
}

.post-date {
    font-size: 13px;
    color: #888;
}

.no-thumbnail {
    display: flex;
    height: 100%;
    align-items: center;
    justify-content: center;
    color: #777;
}

/* FOOTER */

.site-footer {
    margin-top: 60px;
    padding: 40px 20px;
    background: #171717;
    color: #fff;
    text-align: center;
}

.footer-inner {
    max-width: 1200px;
    margin: auto;
}

.copyright {
    color: #aaa;
    font-size: 14px;
}

/* DARK MODE */

body.dark-mode {
    background: #121212;
    color: #eee;
}

.dark-mode .site-header,
.dark-mode .post-card {
    background: #202020;
    color: #fff;
}

.dark-mode .header-search {
    background: #252525;
}

.dark-mode .section-heading {
    border-color: #444;
}

.dark-mode .post-date {
    color: #aaa;
}

/* TABLET */

@media (max-width: 1000px) {

    .header-inner {
        flex-wrap: wrap;
    }

    .site-title {
        font-size: 28px;
    }

    .header-tag {
        font-size: 16px;
    }

    .featured-layout {
        height: 450px;
    }

    .post-grid {
        grid-template-columns: repeat(3, 1fr);
    }

}

/* MOBILE */

@media (max-width: 650px) {

    .header-inner {
        padding: 15px;
        min-height: auto;
    }

    .site-title {
        font-size: 25px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
    }

    .header-tag {
        font-size: 15px;
    }

    .main-navigation {
        width: 100%;
        overflow-x: auto;
    }

    .main-navigation ul {
        gap: 15px;
    }

    .homepage {
        width: 94%;
        margin: 20px auto;
    }

    .featured-layout {
        height: auto;
        grid-template-columns: 1fr;
    }

    .main-card {
        height: 330px;
    }

    .featured-side {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 150px;
    }

    .featured-overlay {
        padding: 35px 12px 12px;
    }

    .featured-overlay h2 {
        font-size: 20px;
    }

    .side-card .featured-overlay h2 {
        font-size: 14px;
    }

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .post-content {
        padding: 10px;
    }

    .post-content h3 {
        font-size: 15px;
    }

}

/* SINGLE POST PAGE */

.single-page {
    width: 92%;
    max-width: 1000px;
    margin: 40px auto;
}

.single-post {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
}

.single-title {
    font-size: 34px;
    line-height: 1.5;
    margin-bottom: 15px;
}

.single-meta {
    color: #888;
    margin-bottom: 25px;
}

.single-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.single-content {
    font-size: 18px;
    line-height: 1.9;
    margin-top: 25px;
}

.dark-mode .single-post {
    background: #202020;
    color: #fff;
}

@media(max-width:650px) {
    .single-post {
        padding: 15px;
    }

    .single-title {
        font-size: 25px;
    }
}


/* Recommended Posts */

.nhv-recommended-section {
    width: 100%;
    margin: 35px 0;
}

.nhv-recommended-heading {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 25px;
    color: #222;
}

.nhv-recommended-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.nhv-recommended-card {
    display: block;
    text-decoration: none !important;
    color: #fff !important;
    min-width: 0;
}

.nhv-recommended-image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 16px;
    background: #222;
    box-shadow: 0 5px 15px rgba(0,0,0,0.16);
}

.nhv-recommended-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.nhv-recommended-card:hover img {
    transform: scale(1.05);
}

.nhv-recommended-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 35px 10px 12px;
    box-sizing: border-box;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.95));
}

.nhv-recommended-overlay h3 {
    color: #fff !important;
    font-size: 19px;
    line-height: 1.3;
    font-weight: 600;
    text-align: center;
    margin: 0;
}

.nhv-no-thumbnail {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background: #444;
}

@media (max-width: 900px) {
    .nhv-recommended-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .nhv-recommended-heading {
        font-size: 24px;
    }

    .nhv-recommended-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .nhv-recommended-overlay h3 {
        font-size: 15px;
    }
}
