/**
 * MaxTem TV — mesma paleta do site principal
 * Extensão separada: posts, pesquisas, conteúdo
 */

body.maxtem-tv {
    margin: 0;
    background: #fff;
    color: #222;
    font-family: var(--font, 'Inter', system-ui, sans-serif);
}

/* Esconde chrome do site industrial se vazar */
body.maxtem-tv > .maxtem-topbar:not(.mtv-topbar),
body.maxtem-tv > .maxtem-header:not(.mtv-header),
body.maxtem-tv > .maxtem-nav:not(.mtv-nav) {
    /* template próprio não usa header global */
}

.mtv-site {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.mtv-topbar {
    background: var(--maxtem-black, #050505);
    color: var(--maxtem-metal, #9DA8B3);
    font-size: 12px;
    padding: 8px 0;
}

.mtv-topbar .container {
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.mtv-topbar a {
    color: var(--maxtem-metal, #9DA8B3);
    text-decoration: none;
}
.mtv-topbar a:hover {
    color: #fff;
}

.mtv-header {
    background: var(--maxtem-dark, #061525);
    padding: 14px 0;
}

.mtv-header .container {
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.mtv-logo {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: #fff;
}
.mtv-logo .logo-main {
    font-family: var(--font-display, Montserrat, sans-serif);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 0.5px;
    color: #fff;
}
.mtv-logo .logo-sub {
    font-size: 10px;
    color: var(--maxtem-blue-light, #008CFF);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.mtv-header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mtv-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 6px;
}
.mtv-btn-back:hover {
    border-color: var(--maxtem-blue-light, #008CFF);
    color: var(--maxtem-blue-light, #008CFF);
}

/* mtv-nav uses .maxtem-nav */










/* Hero TV = mesmo tamanho Havan */
.mtv-hero {
    background: var(--maxtem-dark, #061525);
}
.mtv-hero .hero-slide {
    position: relative;
    width: 100%;
    min-height: 270px;
    max-height: 370px;
    aspect-ratio: 1410 / 270;
    display: flex;
    align-items: center;
    overflow: hidden;
}
.mtv-hero .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}
.mtv-hero .hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.mtv-hero .hero-content {
    position: relative;
    z-index: 2;
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}
.mtv-hero .hero-title {
    font-family: var(--font-display, Montserrat, sans-serif);
    font-size: clamp(18px, 2.8vw, 36px);
    font-weight: 800;
    line-height: 1.12;
    color: #fff;
    margin-bottom: 10px;
    text-transform: uppercase;
}
.mtv-hero .title-line { display: block; }
.mtv-hero .title-line.highlight { color: var(--maxtem-blue-light, #008CFF); }
.mtv-hero .hero-desc {
    font-size: clamp(13px, 1.4vw, 16px);
    color: rgba(255,255,255,0.85);
    margin-bottom: 14px;
    max-width: 480px;
}
.mtv-hero .btn-hero {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--maxtem-blue, #0066B3);
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.mtv-hero .btn-hero:hover {
    background: var(--maxtem-blue-light, #008CFF);
}

/* Conteúdo / posts */
.mtv-main {
    flex: 1;
    background: var(--maxtem-gray, #F0F2F5);
    padding: 40px 0 60px;
}

.mtv-main .container {
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding: 0 20px;
}

.mtv-section-title {
    font-family: var(--font-display, Montserrat, sans-serif);
    font-size: 22px;
    font-weight: 800;
    color: var(--maxtem-dark, #061525);
    margin: 0 0 8px;
    text-transform: uppercase;
}
.mtv-section-sub {
    color: #666;
    margin: 0 0 24px;
    font-size: 15px;
}

.mtv-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}
@media (max-width: 900px) {
    .mtv-posts-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
    .mtv-posts-grid { grid-template-columns: 1fr; }
}

.mtv-post-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
}
.mtv-post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 102, 179, 0.18);
}
.mtv-post-card .thumb {
    aspect-ratio: 16/10;
    background: var(--maxtem-dark, #061525);
    overflow: hidden;
}
.mtv-post-card .thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.mtv-post-card .body {
    padding: 16px 18px 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.mtv-post-card .cat {
    font-size: 11px;
    font-weight: 700;
    color: var(--maxtem-blue, #0066B3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}
.mtv-post-card h3 {
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 8px;
    color: var(--maxtem-dark, #061525);
    line-height: 1.3;
}
.mtv-post-card p {
    font-size: 13px;
    color: #666;
    margin: 0;
    line-height: 1.45;
    flex: 1;
}

.mtv-empty {
    background: #fff;
    padding: 40px 24px;
    text-align: center;
    border-radius: 10px;
    color: #666;
}

.mtv-footer {
    background: var(--maxtem-dark, #061525);
    color: var(--maxtem-metal, #9DA8B3);
    padding: 28px 20px;
    text-align: center;
    font-size: 13px;
}
.mtv-footer a {
    color: var(--maxtem-blue-light, #008CFF);
    text-decoration: none;
}
.mtv-footer a:hover { text-decoration: underline; }

@media (max-width: 768px) {
    
    .mtv-hero .hero-slide { min-height: 180px; max-height: 240px; }
}

/* Busca MaxTem TV */
.mtv-search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    overflow: hidden;
    min-width: 200px;
    max-width: 320px;
}
.mtv-search-form:focus-within {
    border-color: var(--maxtem-blue-light, #008CFF);
}
.mtv-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    min-width: 0;
}
.mtv-search-input::placeholder {
    color: rgba(255,255,255,0.45);
}
.mtv-search-btn {
    border: none;
    background: var(--maxtem-blue, #0066B3);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.mtv-search-btn:hover {
    background: var(--maxtem-blue-light, #008CFF);
}
.mtv-search-posts {
    max-width: 480px;
    margin: 0 0 28px;
    background: #fff;
    border: 1px solid #dde1e6;
}
.mtv-search-posts .mtv-search-input {
    color: #222;
}
.mtv-search-posts .mtv-search-input::placeholder {
    color: #999;
}
@media (max-width: 768px) {
    .mtv-header .container { flex-wrap: wrap; }
    .mtv-header-actions { width: 100%; justify-content: stretch; }
    .mtv-search-form { max-width: none; flex: 1; }
    
}


/* ========== Menu TV = mesmo do site principal (centralizado) ========== */
body.maxtem-tv .maxtem-nav {
    background: var(--maxtem-blue, #0066B3);
    position: relative;
    top: auto;
    z-index: 100;
}
body.maxtem-tv .maxtem-nav .nav-inner {
    display: flex;
    justify-content: center;
    max-width: var(--container, 1280px);
    margin: 0 auto;
    padding: 0 12px;
}
body.maxtem-tv .maxtem-nav .nav-menu {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
    gap: 0;
}
body.maxtem-tv .maxtem-nav .nav-item {
    flex: 1 1 auto;
    text-align: center;
    position: relative;
    margin: 0;
}
body.maxtem-tv .maxtem-nav .nav-link,
body.maxtem-tv .maxtem-nav .nav-menu > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
    padding: 14px 10px;
    color: #fff !important;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.25s ease;
}
body.maxtem-tv .maxtem-nav .nav-link:hover,
body.maxtem-tv .maxtem-nav .nav-item:hover > .nav-link,
body.maxtem-tv .maxtem-nav .nav-menu > li > a:hover {
    background: rgba(0, 0, 0, 0.15);
    color: #fff !important;
}

/* Carrossel SEM sombra/overlay */
body.maxtem-tv .hero-overlay,
body.maxtem-tv .mtv-hero .hero-overlay,
.hero-overlay {
    background: none !important;
    opacity: 0 !important;
    display: none !important;
}

/* Busca MaxTem TV */
.mtv-search-form {
    display: flex;
    align-items: center;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    overflow: hidden;
    min-width: 200px;
    max-width: 320px;
}
.mtv-search-form:focus-within {
    border-color: var(--maxtem-blue-light, #008CFF);
}
.mtv-search-input {
    flex: 1;
    border: none;
    background: transparent;
    color: #fff;
    padding: 10px 12px;
    font-size: 13px;
    outline: none;
    min-width: 0;
}
.mtv-search-input::placeholder {
    color: rgba(255,255,255,0.45);
}
.mtv-search-btn {
    border: none;
    background: var(--maxtem-blue, #0066B3);
    color: #fff;
    padding: 10px 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}
.mtv-search-btn:hover {
    background: var(--maxtem-blue-light, #008CFF);
}
.mtv-search-posts {
    max-width: 480px;
    margin: 0 0 28px;
    background: #fff;
    border: 1px solid #dde1e6;
}
.mtv-search-posts .mtv-search-input {
    color: #222;
}
.mtv-search-posts .mtv-search-input::placeholder {
    color: #999;
}
@media (max-width: 768px) {
    body.maxtem-tv .maxtem-nav .nav-item {
        flex: 1 1 45%;
    }
    .mtv-header .container { flex-wrap: wrap; }
    .mtv-header-actions { width: 100%; }
    .mtv-search-form { max-width: none; flex: 1; }
}

/* Menu TV não sticky — rola com a página */
body.maxtem-tv .maxtem-nav,
body.maxtem-tv .mtv-nav {
    position: relative !important;
    top: auto !important;
}

/* MaxTem TV mobile: menu hamburger igual loja */
body.maxtem-tv .mobile-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 6px;
    cursor: pointer;
    padding: 10px;
    flex-shrink: 0;
}
body.maxtem-tv .mobile-toggle span {
    display: block;
    width: 100%;
    height: 2.5px;
    background: #fff;
    border-radius: 2px;
}

@media (max-width: 992px) {
    body.maxtem-tv .mtv-nav-desktop,
    body.maxtem-tv .maxtem-nav.mtv-nav {
        display: none !important;
    }
    body.maxtem-tv .mobile-toggle {
        display: flex !important;
    }
    body.maxtem-tv .mtv-btn-back-desktop {
        display: none;
    }
    body.maxtem-tv .mtv-header-inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        flex-wrap: nowrap;
    }
    body.maxtem-tv .mtv-header-actions {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-shrink: 0;
    }
    body.maxtem-tv .mtv-search-desktop {
        display: none;
    }
}

@media (min-width: 993px) {
    body.maxtem-tv .mobile-toggle {
        display: none !important;
    }
}
