/*
Theme Name: Huong Viet Magazin
Theme URI: https://tapchihuongviet.eu
Author: Tap Chi Huong Viet
Description: Eigenständiges klassisches WordPress-Theme im Magazin-Stil, angelehnt an tapchihuongviet.eu. Card-Grid für Artikel, mehrspaltige Navigation, mehrspaltiger Footer. Baut nur auf stabilen WordPress-Core-APIs auf (Template-Hierarchie, wp_nav_menu, Widgets) und kommt ohne Drittanbieter-Pagebuilder aus.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 6.6
Text Domain: huongviet
*/

/* Farb-/Font-Werte 1:1 aus dem CSS der bisherigen Joomla-Seite
   (tapchihuongviet.eu, T3-Framework-Template) übernommen: Akzentfarbe
   #9f0f2a wird dort für Links, aktive Navigation und Buttons verwendet,
   der Footer ist dunkel (#111111), Schrift ist Roboto/Roboto Condensed. */
:root {
    --hv-bg: #ffffff;
    --hv-bg-alt: #f8f8f8;
    --hv-text: #333333;
    --hv-text-muted: #666666;
    --hv-accent: #9f0f2a;
    --hv-accent-dark: #7a0c20;
    --hv-border: #e5e5e5;
    --hv-footer-bg: #111111;
    --hv-footer-text: #999999;
    --hv-footer-link: #e5e5e5;
    --hv-card-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
    --hv-max-width: 1200px;
    --hv-radius: 6px;
    --hv-font: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    --hv-font-nav: "Roboto Condensed", "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

@import url('https://fonts.googleapis.com/css?family=Roboto:400,700,400italic|Roboto+Slab:400,700|Roboto+Condensed:400,700&subset=latin,latin-ext,vietnamese');

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--hv-font);
    color: var(--hv-text);
    background: var(--hv-bg);
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--hv-accent);
    text-decoration: none;
}

a:hover {
    color: var(--hv-accent-dark);
    text-decoration: underline;
}

h1, h2, h3, h4, h5, h6 {
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 0.5em;
}

.hv-container {
    max-width: var(--hv-max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    border-bottom: 1px solid var(--hv-border);
    background: var(--hv-bg);
}

.site-branding-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    gap: 20px;
}

.site-branding {
    display: flex;
    flex-direction: column;
}

.site-title {
    font-size: 1.8rem;
    margin: 0;
}

.site-title a {
    color: var(--hv-text);
}

.site-title a:hover {
    text-decoration: none;
    color: var(--hv-accent);
}

.site-description {
    color: var(--hv-text-muted);
    font-size: 0.9rem;
    margin-top: 2px;
}

.custom-logo {
    max-height: 70px;
    width: auto;
}

.header-search {
    flex: 0 0 auto;
}

.header-search .search-field {
    padding: 8px 12px;
    border: 1px solid var(--hv-border);
    border-radius: var(--hv-radius);
    min-width: 220px;
}

.header-search .search-submit {
    padding: 8px 14px;
    border: 1px solid var(--hv-accent);
    background: var(--hv-accent);
    color: #fff;
    border-radius: var(--hv-radius);
    cursor: pointer;
}

.main-navigation {
    background: var(--hv-bg-alt);
    border-top: 1px solid var(--hv-border);
    border-bottom: 1px solid var(--hv-border);
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
}

.main-navigation li {
    position: relative;
}

.main-navigation a {
    display: block;
    padding: 12px 16px;
    color: var(--hv-text);
    font-weight: 700;
    font-size: 0.85rem;
    font-family: var(--hv-font-nav);
    text-transform: uppercase;
    letter-spacing: 0.02rem;
}

.main-navigation a:hover {
    color: #ffffff;
    background-color: #111111;
    text-decoration: none;
}

.main-navigation .current-menu-item > a {
    color: #ffffff;
    background-color: var(--hv-accent);
}

.main-navigation ul ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--hv-bg);
    border: 1px solid var(--hv-border);
    box-shadow: var(--hv-card-shadow);
    min-width: 200px;
    z-index: 50;
}

.main-navigation li:hover > ul {
    display: block;
}

.main-navigation ul ul a {
    padding: 10px 16px;
    font-weight: 400;
}

/* Hero / Featured */
.hv-hero {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    padding: 32px 0;
}

.hv-hero-main {
    position: relative;
    border-radius: var(--hv-radius);
    overflow: hidden;
    box-shadow: var(--hv-card-shadow);
}

.hv-hero-main img {
    width: 100%;
    height: 420px;
    object-fit: cover;
}

.hv-hero-main .hv-hero-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 24px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0));
    color: #fff;
}

.hv-hero-main .hv-hero-caption h2 {
    font-size: 1.6rem;
    margin: 0;
}

.hv-hero-main .hv-hero-caption h2 a {
    color: #fff;
}

.hv-hero-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Section headings */
.hv-section-title {
    font-size: 1.3rem;
    border-left: 4px solid var(--hv-accent);
    padding-left: 12px;
    margin: 32px 0 16px;
}

/* Card grid */
.hv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    padding: 0 0 32px;
}

.hv-card {
    background: var(--hv-bg);
    border: 1px solid var(--hv-border);
    border-radius: var(--hv-radius);
    overflow: hidden;
    box-shadow: var(--hv-card-shadow);
    display: flex;
    flex-direction: column;
}

.hv-card-thumb {
    aspect-ratio: 16 / 10;
    overflow: hidden;
}

.hv-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hv-card-body {
    padding: 14px 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.hv-card-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--hv-accent);
    letter-spacing: 0.03em;
}

.hv-card-title {
    font-size: 1.05rem;
    margin: 0;
}

.hv-card-title a {
    color: var(--hv-text);
}

.hv-card-excerpt {
    font-size: 0.9rem;
    color: var(--hv-text-muted);
    margin: 0;
}

.hv-card-meta {
    font-size: 0.8rem;
    color: var(--hv-text-muted);
    margin-top: auto;
}

/* Carousel (Mới Cập Nhật) - CSS-only horizontal scroll, keine JS-Abhängigkeit */
.hv-carousel {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding: 4px 0 20px;
    scroll-snap-type: x mandatory;
}

.hv-carousel .hv-card {
    min-width: 260px;
    scroll-snap-align: start;
}

/* Single article */
.hv-article-header {
    padding: 32px 0 16px;
}

.hv-article-header .hv-card-category {
    display: inline-block;
    margin-bottom: 8px;
}

.hv-article-title {
    font-size: 2rem;
    margin: 0 0 12px;
}

.hv-article-meta {
    color: var(--hv-text-muted);
    font-size: 0.9rem;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.hv-article-featured-image {
    margin: 16px 0;
    border-radius: var(--hv-radius);
    overflow: hidden;
}

.hv-article-content {
    font-size: 1.05rem;
}

.hv-article-content img {
    border-radius: var(--hv-radius);
    margin: 16px 0;
}

.hv-share {
    display: flex;
    gap: 10px;
    margin: 24px 0;
}

.hv-share a {
    padding: 8px 14px;
    border-radius: var(--hv-radius);
    background: var(--hv-bg-alt);
    border: 1px solid var(--hv-border);
    font-size: 0.85rem;
    color: var(--hv-text);
}

.hv-share a:hover {
    background: var(--hv-accent);
    color: #fff;
    text-decoration: none;
}

/* Footer */
.site-footer {
    background: var(--hv-footer-bg);
    color: var(--hv-footer-text);
    margin-top: 40px;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    padding: 40px 0;
}

.footer-widgets .widget-title {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 12px;
    color: #ffffff;
}

.footer-widgets ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-widgets li {
    margin-bottom: 6px;
}

.footer-widgets a {
    color: var(--hv-footer-link);
}

.footer-widgets a:hover {
    color: #ffffff;
}

.site-info {
    border-top: 1px solid #222222;
    padding: 16px 0;
    text-align: center;
    font-size: 0.85rem;
    color: var(--hv-footer-text);
}

/* Responsive */
@media (max-width: 900px) {
    .hv-hero {
        grid-template-columns: 1fr;
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .site-branding-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-widgets {
        grid-template-columns: 1fr;
    }

    .hv-grid {
        grid-template-columns: 1fr 1fr;
    }
}
