/* =====================================================
   Site design — เมนูเด็ด.com (หน้าบ้าน)
   ส่วนประกอบหน้าตาที่ใช้ทั้งเว็บ: header, footer, หัวข้อ section, การ์ด
   โหลดจาก Views/front/header.tpl.php
   ===================================================== */

[x-cloak] { display: none !important; }

/* ---------- Header ---------- */
.md-header {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(14px);
            backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid rgba(17, 24, 39, 0.06);
    transition: box-shadow 0.25s ease, background-color 0.25s ease;
}
.md-header.is-scrolled {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 10px 30px -18px rgba(17, 24, 39, 0.35);
}

/* ช่องค้นหาแบบแคปซูล */
.md-search {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 4px 0 16px;
    border-radius: 9999px;
    background: #f3f5f0;
    border: 1px solid transparent;
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.md-search:hover {
    background: #eef1ea;
}
.md-search:focus-within {
    background: #fff;
    border-color: #80BB01;
    box-shadow: 0 0 0 4px rgba(128, 187, 1, 0.16);
}

/* ปุ่มไอคอนกลม */
.md-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #4b5563;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.md-icon-btn:hover {
    background: #f1f5ea;
    color: #276e00;
}

/* ปุ่มแคปซูลเล็ก (เลือกภาษา) */
.md-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 10px;
    border-radius: 9999px;
    border: 1px solid #e5e7eb;
    background: #fff;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}
.md-pill:hover {
    border-color: #80BB01;
    background: #f7fbef;
}

/* ตัวเลขบนไอคอน */
.md-badge {
    position: absolute;
    top: 2px;
    right: 1px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9999px;
    background: #ef4444;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 0 0 2px #fff;
}
.md-badge-green { background: #276e00; }
.md-badge[hidden] { display: none; }

/* ลิงก์เมนูแถวล่าง */
.md-nav-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    height: 48px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    color: #4b5563;
    white-space: nowrap;
    transition: color 0.2s ease;
}
.md-nav-link::after {
    content: '';
    position: absolute;
    left: 12px;
    right: 12px;
    bottom: 6px;
    height: 3px;
    border-radius: 3px;
    background: linear-gradient(90deg, #80BB01, #276e00);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
}
.md-nav-link:hover {
    color: #276e00;
}
.md-nav-link:hover::after {
    transform: scaleX(0.5);
}
.md-nav-link.is-active {
    color: #276e00;
    font-weight: 600;
}
.md-nav-link.is-active::after {
    transform: scaleX(1);
}
.md-nav-sub {
    font-size: 13px;
    color: #6b7280;
}

/* ---------- Footer ---------- */
.md-footer {
    background:
        radial-gradient(1200px 400px at 85% -10%, rgba(128, 187, 1, 0.12), transparent 60%),
        linear-gradient(180deg, #13220d 0%, #0d1709 100%);
}
.md-footer-cta {
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    padding: 22px 24px;
    border-radius: 20px;
    background: linear-gradient(120deg, rgba(128, 187, 1, 0.22), rgba(39, 110, 0, 0.18));
    border: 1px solid rgba(255, 255, 255, 0.08);
}
@media (min-width: 768px) {
    .md-footer-cta { flex-direction: row; align-items: center; }
}
.md-footer-title {
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}
.md-footer-link {
    color: #9ca3af;
    transition: color 0.2s ease;
}
.md-footer-link:hover {
    color: #c5e36b;
}
.md-footer-contact {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #d1d5db;
    transition: color 0.2s ease;
}
.md-footer-contact:hover {
    color: #fff;
}
.md-footer-ico {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.07);
    color: #a3d33a;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
}
.md-social {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.07);
    color: #e5e7eb;
    transition: background-color 0.2s ease, color 0.2s ease, translate 0.2s ease;
}
.md-social:hover {
    background: #80BB01;
    color: #fff;
    translate: 0 -2px;
}
