/*
Theme Name: Mai táng Đông Hà
Theme URI: http://maitangdongha.com
Author: Antigravity AI
Author URI: https://google.com
Description: Theme WordPress chuẩn giao diện Trại hòm Martino dành riêng cho Dịch vụ Mai táng Đông Hà. Tối ưu hóa chuẩn Taste Skill & SEO.
Version: 2.6.0
License: GNU General Public License v2 or later
Text Domain: maitangdongha
*/

/* Reset & Global Tokens */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #331807;
    --secondary: #ffffff;
    --accent: #c5a85c;        /* Màu vàng đồng cổ kính */
    --accent-dark: #a98d45;
    --price-color: #d93838;   /* Màu đỏ báo giá nổi bật chuẩn Martino */
    --bg-dark: #331807;
    --bg-light: #f6f3ea;      /* Màu kem sáng nhã nhặn */
    --border-color: #e6dcc6;  /* Màu viền kem/vàng gỗ */
    --text-dark: #331807;
    --text-light: #ffffff;
    --text-muted: #666666;
    --font-heading: 'Lora', 'Georgia', serif;
    --font-body: 'Be Vietnam Pro', sans-serif;
    --transition: all 0.3s ease;
    --radius: 4px;
}

body {
    font-family: var(--font-body);
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #ffffff;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent);
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
}

/* Base Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 24px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: var(--radius);
    transition: var(--transition);
    cursor: pointer;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--primary);
    border: 1px solid var(--accent);
}

.btn-primary:hover {
    background-color: var(--accent-dark);
    color: #ffffff;
    border-color: var(--accent-dark);
}

/* Header & Navigation (Martino Style) */
.site-header {
    background-color: var(--primary);
    border-bottom: 0;
    width: 100%;
}

.header-top-bar {
    background-color: #241105;
    border-bottom: 1px solid #452109;
    padding: 8px 0;
    font-size: 12px;
    color: #cbbab0;
}

.header-top-bar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top-bar a {
    color: #cbbab0;
    font-size: 12px;
}

.header-top-bar a:hover {
    color: var(--accent);
}

.header-middle-banner {
    background: #331807 url('images/dongha_img_15.jpg') center/cover no-repeat;
    position: relative;
    padding: 35px 0;
    text-align: center;
    border-bottom: 2px solid var(--accent);
}

.header-middle-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 24, 7, 0.82);
    z-index: 1;
}

.header-middle-banner-inner {
    position: relative;
    z-index: 2;
    color: #ffffff;
}

.header-middle-banner-inner h1 {
    font-size: 38px;
    letter-spacing: 3px;
    color: #ffffff;
    text-transform: uppercase;
    margin-bottom: 5px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.8);
}

.header-middle-sub {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--accent);
    font-style: italic;
    letter-spacing: 2px;
    margin-bottom: 18px;
}

.header-badge-box {
    border: 1px solid var(--accent);
    background-color: rgba(36, 17, 5, 0.75);
    padding: 12px 28px;
    display: inline-block;
    border-radius: var(--radius);
}

.header-badge-title {
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 2px;
}

.header-badge-hotline-label {
    font-size: 10.5px;
    color: var(--accent);
    letter-spacing: 1px;
}

.header-badge-phone {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    color: var(--accent);
    letter-spacing: 2px;
    line-height: 1.1;
    margin: 2px 0;
}

.header-badge-address {
    font-size: 11.5px;
    color: #cccccc;
}

/* Centered Menu Navigation Bar */
.header-menu-bar {
    background-color: #261105;
    border-bottom: 1px solid #452109;
}

.nav-menu-centered {
    display: flex;
    justify-content: center;
    list-style: none;
}

.nav-menu-centered li {
    position: relative;
}

.nav-menu-centered li a {
    display: block;
    padding: 14px 18px;
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.nav-menu-centered li a:hover, 
.nav-menu-centered li.current-menu-item a {
    color: var(--accent);
    background-color: rgba(255, 255, 255, 0.03);
}

/* Homepage Hero Image Slider (Fixed Aspect Ratio & Professional Fade) */
.homepage-slider {
    position: relative;
    width: 100%;
    height: 480px;
    background-color: #331807;
    overflow: hidden;
    margin-bottom: 0;
    border-bottom: 3px solid var(--accent);
}

.homepage-slider .homepage-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    background-size: cover;
    background-position: center center;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.homepage-slider .homepage-slide.active {
    opacity: 1;
    z-index: 2;
}

.homepage-slider .homepage-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(51, 24, 7, 0.68);
}

.homepage-slider .slide-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #ffffff;
    max-width: 850px;
    padding: 20px;
}

.homepage-slider .slide-subtitle {
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--accent);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 600;
}

.homepage-slider .slide-title {
    font-family: var(--font-heading);
    font-size: 40px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.25;
    margin-bottom: 18px;
    text-shadow: 0 4px 12px rgba(0,0,0,0.7);
}

.homepage-slider .slide-desc {
    font-size: 15px;
    line-height: 1.7;
    color: #e2e2e2;
    margin-bottom: 25px;
    font-weight: 300;
}

.homepage-slider .slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(51, 24, 7, 0.65);
    border: 1px solid var(--accent);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 20;
    border-radius: 50%;
    transition: var(--transition);
}

.homepage-slider .slider-arrow:hover {
    background: var(--accent);
    color: #331807;
}

.homepage-slider .slider-arrow-left { left: 25px; }
.homepage-slider .slider-arrow-right { right: 25px; }

.homepage-slider .slider-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 20;
}

.homepage-slider .slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    transition: var(--transition);
}

.homepage-slider .slider-dot.active {
    background: var(--accent);
    transform: scale(1.2);
}

/* Martino Black Section Title Boxes (Screenshot 2 Match) */
.section-title-wrapper {
    text-align: center;
    margin-bottom: 35px;
    position: relative;
}

.section-title-wrapper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: var(--primary);
    z-index: 1;
}

.section-title-black {
    position: relative;
    z-index: 2;
    display: inline-block;
    background-color: var(--primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 10px 35px;
    border-left: 3px solid var(--accent);
    border-right: 3px solid var(--accent);
}

.section-subtitle-sub {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 600;
}

/* 4 Black Value Badges Bar (Screenshot 2 Match) */
.value-badges-section {
    background-color: #331807;
    padding: 25px 0;
    border-top: 1px solid #4d260c;
    border-bottom: 1px solid #4d260c;
}

.value-badges-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.value-badge-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    background-color: #261105;
    border: 1px solid #4a240b;
    padding: 15px 20px;
    border-radius: 8px;
    transition: var(--transition);
}

.value-badge-item:hover {
    border-color: var(--accent);
    background-color: #42200a;
}

.value-badge-icon {
    width: 42px;
    height: 42px;
    background-color: #331807;
    color: #ffffff;
    border: 1px solid var(--accent);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.value-badge-text {
    font-family: var(--font-heading);
    font-size: 12px;
    font-weight: 700;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* 4 Religion & Criteria Cards Grid (Screenshot 2 Match) */
.religion-cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.religion-card {
    position: relative;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    aspect-ratio: 4 / 3;
    transition: var(--transition);
}

.religion-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.religion-card:hover img {
    transform: scale(1.06);
}

.religion-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(51, 24, 7, 0.88);
    color: #ffffff;
    text-align: center;
    padding: 10px;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-top: 2px solid var(--accent);
}

/* Hotline Callout Bar (Screenshot 2 Match) */
.hotline-callout-bar {
    background-color: #331807;
    border-top: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    padding: 18px 0;
    color: #ffffff;
}

.hotline-callout-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hotline-callout-title {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.hotline-callout-desc {
    font-size: 12px;
    color: #cccccc;
    margin-top: 2px;
}

.hotline-callout-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.hotline-callout-phone {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 900;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Breadcrumbs Bar */
.breadcrumbs-wrapper {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
    font-size: 12.5px;
    color: var(--text-muted);
}

.breadcrumbs-wrapper a { color: var(--text-dark); }
.breadcrumbs-wrapper a:hover { color: var(--accent-dark); }

/* Tab Panels Display Control */
.tab-panel {
    display: none !important;
}

.tab-panel.active {
    display: grid !important;
}

/* 4-Column Product Grid Layout */
.product-grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.martino-product-card {
    text-align: center;
    transition: var(--transition);
}

.martino-product-card:hover { transform: translateY(-5px); }

.martino-product-frame {
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    padding: 6px;
    margin-bottom: 12px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
}

.martino-product-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.martino-product-card:hover .martino-product-frame img { transform: scale(1.04); }

.martino-product-title {
    font-family: var(--font-heading);
    font-size: 13.5px;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    line-height: 1.4;
    margin-bottom: 6px;
    min-height: 38px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.martino-product-price {
    font-family: var(--font-heading);
    font-size: 15px;
    font-weight: 700;
    color: var(--price-color);
}

/* Single Product Top Overview Layout */
.single-product-top {
    display: flex;
    gap: 30px;
    margin-bottom: 35px;
    align-items: flex-start;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: 6px;
}

.single-product-media {
    width: 45%;
    max-width: 400px;
    flex-shrink: 0;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border: 1px solid var(--border-color);
    background-color: var(--bg-light);
    border-radius: 4px;
}

.single-product-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.single-product-summary {
    flex-grow: 1;
    width: 50%;
}

.single-product-summary h1 {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.3;
    margin-bottom: 12px;
}

.single-product-summary .price {
    font-family: var(--font-heading);
    font-size: 26px;
    font-weight: 800;
    color: var(--price-color);
    margin-bottom: 20px;
}

/* TOC Box */
.toc-box {
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    padding: 16px 20px;
    border-radius: 6px;
    margin-bottom: 30px;
}

.toc-title {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
    margin-bottom: 8px;
}

.toc-list {
    margin: 0;
    padding-left: 20px;
    font-size: 13.5px;
}

.toc-list li {
    margin-bottom: 4px;
}

.toc-list a {
    color: var(--primary);
    text-decoration: underline;
}

/* Single Product & Single Post 2-Column Layout */
.inner-layout-wrapper {
    display: flex;
    gap: 35px;
    padding: 40px 0;
    align-items: flex-start;
}

.inner-main-content {
    width: 73%;
    flex-shrink: 0;
}

.inner-sidebar {
    width: 27%;
    flex-shrink: 0;
    position: sticky;
    top: 30px;
}

/* Sidebar Widgets */
.sidebar-widget {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    margin-bottom: 30px;
}

.sidebar-widget-title {
    background-color: var(--primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 12px 15px;
    letter-spacing: 1px;
}

.sidebar-links-list { list-style: none; padding: 0; margin: 0; }
.sidebar-links-list li { border-bottom: 1px solid #f0f0f0; }
.sidebar-links-list li:last-child { border-bottom: 0; }

.sidebar-links-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    font-size: 13px;
    color: var(--text-dark);
}

.sidebar-links-list li a:hover {
    color: var(--accent-dark);
    background-color: var(--bg-light);
    padding-left: 18px;
}

.sidebar-featured-product-item {
    display: flex;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    align-items: center;
}

.sidebar-featured-product-item:last-child { border-bottom: 0; }

.sidebar-featured-product-img {
    width: 65px;
    height: 65px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-featured-product-info h4 {
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
}

.sidebar-featured-product-info h4 a { color: var(--primary); }
.sidebar-featured-product-info h4 a:hover { color: var(--accent); }

.sidebar-featured-product-price {
    font-size: 13px;
    font-weight: 700;
    color: var(--price-color);
}

/* Detailed Pricing Table (Screenshot 2 Match) */
.pricing-table-container {
    margin: 30px 0;
    overflow-x: auto;
}

.pricing-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px solid var(--border-color);
}

.pricing-table tr {
    transition: background-color 0.2s ease;
}

.pricing-table tbody tr:not(.subheader-row):hover {
    background-color: rgba(197, 168, 92, 0.07);
}

.pricing-table th, .pricing-table td {
    border: 1px solid var(--border-color);
    padding: 12px 16px;
    font-size: 13.5px;
}

.pricing-table th {
    background-color: var(--primary);
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    text-align: left;
}

.pricing-table tr.subheader-row th {
    background-color: var(--bg-light);
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    border-bottom: 2px solid var(--accent);
}

.pricing-table td.package-price {
    color: var(--price-color);
    font-weight: 700;
    font-family: var(--font-heading);
    text-align: right;
}

/* Single Post Entry Header */
.entry-header {
    margin-bottom: 25px;
    border-bottom: 1px solid #eeeeee;
    padding-bottom: 15px;
    background-color: transparent !important;
}

.entry-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary) !important;
    line-height: 1.35;
    margin-bottom: 10px;
}

.entry-meta {
    font-size: 12px;
    color: var(--text-muted);
}

/* Footer Section */
footer {
    background-color: #331807;
    color: #d8c7bc;
    padding: 50px 0 20px 0;
    border-top: 3px solid var(--accent);
    font-size: 13px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 8px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 35px;
    height: 2px;
    background-color: var(--accent);
}

.footer-col p { margin-bottom: 10px; line-height: 1.6; }

.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #d8c7bc; display: inline-block; transition: var(--transition); }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }

.footer-bottom {
    border-top: 1px solid #4d260c;
    padding-top: 20px;
    text-align: center;
    font-size: 12px;
    color: #bfa899;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background-color: var(--primary);
    color: var(--accent);
    border: 1px solid var(--accent);
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    margin: 0 auto;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Responsive Media Queries */
@media (max-width: 991px) {
    .product-grid-4, .religion-cards-grid, .value-badges-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .inner-layout-wrapper { flex-direction: column; }
    .inner-main-content, .inner-sidebar { width: 100%; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .hotline-callout-inner { flex-direction: column; gap: 15px; text-align: center; }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block !important;
    }
    #centered-menu-wrapper {
        display: none;
        width: 100%;
        margin-top: 10px;
    }
    #centered-menu-wrapper.active {
        display: block !important;
    }
    .nav-menu-centered {
        flex-direction: column !important;
        align-items: stretch !important;
        background-color: #331807;
        border: 1px solid var(--accent);
        border-radius: 6px;
        padding: 10px 0;
    }
    .nav-menu-centered li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid #4d260c;
    }
    .nav-menu-centered li:last-child {
        border-bottom: none;
    }
    .nav-menu-centered a {
        padding: 12px 15px !important;
        display: block;
        font-size: 13px !important;
    }
    .maps-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 575px) {
    .product-grid-4, .religion-cards-grid, .value-badges-grid {
        grid-template-columns: 1fr;
    }
    .footer-grid { grid-template-columns: 1fr; }
}