/* BETAVIET — landing.css (Template A: filter, project grid, reference section) */

.breadcrumb { padding: 16px 40px; color: #c97a2b; font-size: 15px; }
.breadcrumb a { color: #c97a2b; }

.page-h1 {
    text-align: center; color: #333; font-size: 28px;
    margin: 30px 40px; font-weight: 700; line-height: 1.3;
}
@media (max-width: 768px) {
    .page-h1 { font-size: 22px !important; margin: 20px 15px !important; }
    .breadcrumb { padding: 12px 15px; }
}

/* Filter bar */
.filter-bar {
    background: #fff; margin: 0 40px; padding: 16px;
    border-radius: 8px; box-shadow: 0 2px 8px #0001;
    margin-bottom: 24px; display: flex; flex-direction: column; gap: 3px;
}
.filter-row {
    display: flex; align-items: center; gap: 10px;
    flex-wrap: wrap; margin-bottom: 8px;
}
.filter-row:last-child { margin-bottom: 0; }
.filter-row > span { font-weight: bold; min-width: 90px; }
.filter-row button {
    background: #f5f5f5; color: #333; border: 1px solid #eee;
    border-radius: 16px; padding: 6px 16px; cursor: pointer;
    font-size: 14px; transition: all 0.2s;
}
.filter-row button.active, .filter-row button:hover {
    background: #c97a2b; color: #fff; border-color: #c97a2b;
}

@media (max-width: 900px) {
    .filter-bar {
        margin: 0 0 20px 0; border-radius: 0; box-shadow: none;
        padding: 0; overflow-x: auto; flex-direction: row;
        width: 100vw; scrollbar-width: thin;
    }
    .filter-bar-inner { display: flex; flex-direction: column; min-width: 420px; width: max-content; }
    .filter-row {
        flex-wrap: nowrap; gap: 8px; padding: 8px 0 8px 12px;
        margin-bottom: 0; border-bottom: 2px solid #e0e0e0;
    }
    .filter-row:last-child { border-bottom: none; }
    .filter-row > span { min-width: 80px; font-size: 15px; color: #a97a4a; margin-right: 8px; }
    .filter-row button { white-space: nowrap; margin-right: 4px; }
}

/* Project grid */
.project-list {
    display: flex; flex-wrap: wrap; gap: 24px;
    justify-content: center; padding: 0 40px 40px;
}
.project-card {
    background: #fff; border-radius: 8px; box-shadow: 0 2px 8px #0001;
    width: 350px; overflow: hidden; display: flex; flex-direction: column;
    transition: box-shadow 0.2s;
}
.project-card:hover { box-shadow: 0 4px 16px #0002; }
.project-card a { text-decoration: none; color: inherit; display: block; }
.project-thumb { width: 100%; object-fit: cover; aspect-ratio: 4/3; display: block; }
/* legacy alias */
.project-card img { width: 100%; object-fit: cover; aspect-ratio: 4/3; }
.card-info, .project-info { padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.card-title, .project-info .title {
    font-weight: 600; color: #333; font-size: 14px;
    line-height: 1.4; margin: 0;
}
.card-meta, .project-info .meta { font-size: 12px; color: #777; margin: 0; }
.card-style { font-size: 12px; color: #c97a2b; font-weight: 500; margin: 0; }

@media (max-width: 900px) {
    .project-list { padding: 0 0 40px 0; gap: 20px; }
    .project-card { width: calc(100vw - 20px); border-radius: 12px; margin: 0 10px; }
    .project-card img { border-radius: 12px 12px 0 0; }
}

/* Reference section (collapse) */
.reference-section {
    max-width: 1200px; margin: 60px auto; padding: 0 20px;
}
.toggle-container {
    background: #f8f9fa; border: 1px solid #e9ecef;
    border-radius: 8px; overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.toggle-button {
    width: 100%; padding: 20px; background: #fff; border: none;
    cursor: pointer; display: flex; justify-content: space-between;
    align-items: center; font-size: 18px; font-weight: 600; color: #333;
    transition: all 0.3s; border-bottom: 1px solid #e9ecef;
    text-align: left;
}
.toggle-button:hover { background: #f8f9fa; }
.toggle-button .icon { font-size: 20px; transition: transform 0.3s; }
.toggle-button.active .icon { transform: rotate(180deg); }
.content-area { max-height: 0; overflow: hidden; transition: max-height 0.5s; background: #fff; }
.content-area.show { max-height: none; overflow-y: visible; }
.content-inner { padding: 30px; line-height: 1.6; color: #555; }
.content-inner h2, .content-inner h3 { color: #333; margin: 25px 0 15px 0; font-size: 20px; }
.content-inner h4 { color: #444; margin: 20px 0 10px 0; font-size: 16px; }
.content-inner p { margin-bottom: 15px; }
.content-inner ul { margin: 15px 0; padding-left: 20px; }
.content-inner li { margin-bottom: 8px; }
.content-inner img {
    max-width: 100%; height: auto; margin: 20px 0;
    border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    display: block;
    /* CLS prevention: reserve space before image loads */
    aspect-ratio: 3/2;
    object-fit: cover;
}
/* Hero image — reserve 16:9 space */
.article-hero {
    width: 100%; height: auto; display: block;
    aspect-ratio: 16/9; object-fit: cover;
    border-radius: 8px; margin-bottom: 24px;
}
/* WordPress legacy classes */
.alignnone, .aligncenter, .alignleft, .alignright,
img.size-medium, img.size-full {
    height: auto;
    aspect-ratio: 3/2;
}
.highlight-box {
    background: #f0f8ff; border-left: 4px solid #007bff;
    padding: 15px; margin: 20px 0; border-radius: 0 4px 4px 0;
}
.faq-list { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.faq-item {
    background: #fff; border: 1px solid #e9ecef;
    border-radius: 8px; margin-bottom: 12px;
}
.faq-item summary {
    padding: 18px 20px; font-size: 16px; font-weight: 600; color: #c97a2b;
    cursor: pointer; list-style: none; display: flex; justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "▼"; font-size: 12px; transition: transform 0.2s; color: #aaa; }
.faq-item[open] summary::after { transform: rotate(180deg); }
.faq-answer { padding: 0 20px 18px; color: #555; line-height: 1.6; }
.faq-answer p { margin: 0; }
/* legacy */
.faq-item h3 { margin: 0 0 10px; font-size: 17px; color: #c97a2b; }
.faq-item p { margin: 0; color: #555; }

@media (max-width: 768px) {
    .reference-section { margin: 40px auto; padding: 0 15px; }
    .toggle-button { padding: 15px; font-size: 16px; }
    .content-inner { padding: 20px; }
}

/* ═══════════════════════════════════════════════════════════════
   PHASE 2 — Project detail page styles (Template B)
   ═══════════════════════════════════════════════════════════════ */

/* Specs bar */
.project-specs {
    display: flex; flex-wrap: wrap; gap: 10px;
    padding: 12px 40px; margin-bottom: 24px;
}
.spec-chip {
    background: #fdf3e7; color: #7a4a10; border: 1px solid #e8c490;
    border-radius: 20px; padding: 6px 16px; font-size: 14px; font-weight: 500;
    white-space: nowrap;
}

/* Hero image */
.project-hero {
    max-width: 1200px; margin: 0 auto 32px; padding: 0 40px;
}
.project-hero img {
    width: 100%; height: auto; border-radius: 10px;
    display: block; object-fit: cover;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

/* Gallery grid */
.project-gallery {
    max-width: 1200px; margin: 0 auto 40px; padding: 0 40px;
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
}
.project-gallery img {
    width: 100%; aspect-ratio: 4/3; object-fit: cover;
    border-radius: 8px; display: block;
    transition: transform 0.2s, box-shadow 0.2s;
    cursor: pointer;
}
.project-gallery img:hover { transform: scale(1.02); box-shadow: 0 4px 16px rgba(0,0,0,0.18); }

/* Description */
.project-desc {
    max-width: 900px; margin: 0 auto 40px; padding: 0 40px;
    line-height: 1.75; color: #444; font-size: 16px;
}
.project-desc h2 { color: #333; font-size: 22px; margin: 30px 0 14px; }
.project-desc h3 { color: #444; font-size: 18px; margin: 24px 0 10px; }
.project-desc p { margin-bottom: 14px; }
.project-desc ul { margin: 12px 0; padding-left: 22px; }
.project-desc li { margin-bottom: 8px; }

/* CTA bar */
.project-cta-bar {
    display: flex; gap: 16px; flex-wrap: wrap; justify-content: center;
    margin: 0 auto 48px; padding: 0 40px; max-width: 900px;
}
.btn-view-detail {
    display: inline-block; padding: 14px 28px;
    background: transparent; color: #c97a2b;
    border: 2px solid #c97a2b; border-radius: 6px;
    text-decoration: none; font-size: 15px; font-weight: 600;
    transition: all 0.2s;
}
.btn-view-detail:hover { background: #c97a2b; color: #fff; }
.btn-consult {
    display: inline-block; padding: 14px 28px;
    background: #c97a2b; color: #fff;
    border: 2px solid #c97a2b; border-radius: 6px;
    text-decoration: none; font-size: 15px; font-weight: 600;
    transition: all 0.2s;
}
.btn-consult:hover { background: #a8621e; border-color: #a8621e; }

/* Related section heading */
.related-section { max-width: 1200px; margin: 0 auto 20px; padding: 0 40px; }
.related-section h2 {
    text-align: center; font-size: 24px; color: #333;
    margin-bottom: 24px; font-weight: 700;
}

/* Mobile adjustments for project pages */
@media (max-width: 900px) {
    .project-specs { padding: 10px 15px; gap: 8px; }
    .project-hero { padding: 0 10px; margin-bottom: 20px; }
    .project-gallery {
        grid-template-columns: repeat(2, 1fr); gap: 8px; padding: 0 10px;
    }
    .project-desc { padding: 0 15px; font-size: 15px; }
    .project-cta-bar { padding: 0 15px; flex-direction: column; align-items: center; }
    .btn-view-detail, .btn-consult { width: 100%; text-align: center; }
    .related-section { padding: 0 0; }
    .related-section h2 { padding: 0 15px; font-size: 20px; }
}
@media (max-width: 480px) {
    .project-gallery { grid-template-columns: repeat(2, 1fr); }
    .spec-chip { font-size: 13px; padding: 5px 12px; }
}
