/* ==========================================================================
   Nội thất Tân Nhật Minh
   ========================================================================== */

:root {
	--primary: #5b3a1e;
	--primary-2: #8a5a2b;
	--accent: #b07a35;
	--dark: #2e1d0f;
	--cream: #fbf4e8;
	--cream-2: #f8efe1;
	--gray-bg: #f7f2ea;
	--text: #222;
	--muted: #555;
	--white: #fff;
	--container: 1220px;
	--header-h: 70px;
	--radius: 8px;
	--font: "Open Sans", Arial, sans-serif;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 15px;
	line-height: 1.6;
	color: var(--text);
	background: var(--white);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5 { margin: 0 0 .5em; line-height: 1.3; }
p { margin: 0 0 1em; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; cursor: pointer; }

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

.section { padding: 50px 0; }
.section--gray { background: var(--gray-bg); }
.section--cream { background: var(--cream-2); }

.section-title {
	text-align: center;
	color: var(--primary);
	font-size: 26px;
	font-weight: 700;
	text-transform: uppercase;
	margin-bottom: 28px;
}
.section-title--left { text-align: left; }
.section-title--accent { color: var(--accent); }
.section-title--white { color: var(--white); }

.sub-title { color: var(--accent); font-weight: 700; font-size: 14px; }

.btn {
	display: inline-block;
	padding: 10px 26px;
	border: 0;
	border-radius: 999px;
	background: var(--primary);
	color: var(--white);
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
	transition: background .2s;
}
.btn:hover { background: var(--accent); }
.btn--light { background: var(--white); color: var(--primary); }
.btn--light:hover { background: var(--accent); color: var(--white); }

/* ---------- Header ---------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--cream);
	box-shadow: 0 1px 0 rgba(0,0,0,.05);
	transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 2px 12px rgba(0,0,0,.12); }

.header-inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: var(--header-h);
	gap: 20px;
}
.logo { display: flex; align-items: center; gap: 10px; }
.logo img { height: 52px; width: auto; }
.logo__text {
	display: flex; flex-direction: column;
	font-weight: 700; font-size: 17px; line-height: 1.1;
	color: var(--primary); text-transform: uppercase; letter-spacing: .5px;
}
.logo__text small { font-size: 10px; font-weight: 600; letter-spacing: 3px; color: var(--accent); }

.main-nav { display: flex; align-items: center; gap: 40px; }
.main-nav > a {
	font-size: 14.4px;
	font-weight: 700;
	text-transform: uppercase;
	color: #333;
	padding: 10px 0;
	transition: color .2s;
}
.main-nav > a:hover,
.main-nav > a.is-active { color: var(--accent); }

.header-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
	width: 38px; height: 38px;
	display: grid; place-items: center;
	border: 0; background: none;
	color: #333; font-size: 17px;
	border-radius: 50%;
}
.icon-btn:hover { color: var(--accent); }
.menu-toggle { display: none; }

/* Off-canvas menu (mobile) */
.mobile-nav {
	position: fixed;
	inset: 0;
	z-index: 100;
	visibility: hidden;
}
.mobile-nav.is-open { visibility: visible; }
.mobile-nav__overlay {
	position: absolute; inset: 0;
	background: rgba(0,0,0,.5);
	opacity: 0; transition: opacity .25s;
}
.mobile-nav.is-open .mobile-nav__overlay { opacity: 1; }
.mobile-nav__panel {
	position: absolute; top: 0; left: 0; bottom: 0;
	width: min(290px, 85vw);
	padding: 20px;
	background: var(--white);
	transform: translateX(-100%);
	transition: transform .25s;
	overflow-y: auto;
}
.mobile-nav.is-open .mobile-nav__panel { transform: none; }
.mobile-nav__panel a {
	display: block;
	padding: 12px 0;
	border-bottom: 1px solid #eee;
	font-weight: 700;
	text-transform: uppercase;
	font-size: 14px;
}
.mobile-nav__panel a.is-active { color: var(--accent); }
.mobile-nav__close { margin: -8px -8px 10px auto; }

/* ---------- Hero slider ---------- */
.hero { position: relative; overflow: hidden; background: #ddd; }
.hero__track { display: flex; transition: transform .6s ease; }
.hero__slide { flex: 0 0 100%; }
.hero__slide img {
	width: 100%;
	aspect-ratio: 1942 / 809; /* banner ratio, so the banner always shows in full */
	object-fit: cover;
}
.hero__dots {
	position: absolute;
	left: 0; right: 0; bottom: 14px;
	display: flex; justify-content: center; gap: 8px;
}
.hero__dots button {
	width: 11px; height: 11px;
	padding: 0; border: 0; border-radius: 50%;
	background: rgba(255,255,255,.55);
}
.hero__dots button.is-active { background: var(--white); }

.nav-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 42px; height: 42px;
	border: 0; border-radius: 50%;
	background: rgba(255,255,255,.85);
	color: var(--primary);
	font-size: 16px;
	box-shadow: 0 2px 8px rgba(0,0,0,.15);
	opacity: 0;
	transition: opacity .2s, background .2s;
}
.nav-arrow:hover { background: var(--white); }
.nav-arrow--prev { left: 12px; }
.nav-arrow--next { right: 12px; }
.hero:hover .nav-arrow,
.carousel:hover .nav-arrow { opacity: 1; }
.nav-arrow[hidden] { display: none; }

.page-banner {
	height: clamp(200px, 36vw, 500px);
	background: center / cover no-repeat;
}

/* ---------- About ---------- */
.about { padding: 50px 0; }
.about p { max-width: 900px; margin-left: auto; margin-right: auto; text-align: center; }

/* ---------- Carousel ---------- */
.carousel { position: relative; }
.carousel__viewport { overflow: hidden; }
.carousel__track {
	display: flex;
	gap: var(--gap, 20px);
	transition: transform .5s ease;
}
.carousel__track > * {
	flex: 0 0 calc((100% - (var(--per) - 1) * var(--gap, 20px)) / var(--per));
	min-width: 0;
}
.carousel { --per: 5; }
.carousel[data-per="6"] { --per: 6; }
.carousel[data-per="3"] { --per: 3; }
.carousel .nav-arrow--prev { left: -8px; }
.carousel .nav-arrow--next { right: -8px; }

/* Card: ảnh + thanh xanh */
.card-img { display: block; }
.card-img__media {
	height: 300px;
	border-radius: var(--radius) var(--radius) 0 0;
	overflow: hidden;
}
.card-img__media img {
	width: 100%; height: 100%;
	object-fit: cover;
	transition: transform .4s;
}
.card-img:hover .card-img__media img { transform: scale(1.06); }
.card-img__body {
	min-height: 64px;
	padding: 10px;
	display: flex; flex-direction: column; justify-content: center;
	background: var(--primary);
	color: #f1f1f1;
	text-align: center;
	border-radius: 0 0 var(--radius) var(--radius);
}
.card-img__body h4 {
	margin: 0;
	font-size: 15px;
	color: var(--white);
	text-transform: uppercase;
}
.card-img__body p { margin: 4px 0 0; font-size: 13px; }
.card-img--short .card-img__media { height: 200px; }

/* ---------- Tabs ---------- */
.tabs__nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 14px;
	margin-bottom: 30px;
}
.tab-icon {
	width: 150px;
	padding: 10px 6px 8px;
	border: 2px solid var(--primary-2);
	border-radius: 20px;
	background: var(--cream-2);
	color: rgba(18,18,18,.85);
	font-size: 13px;
	font-weight: 700;
	text-align: center;
	transition: background .2s, color .2s;
}
.tab-icon i { display: block; margin-bottom: 6px; font-size: 26px; color: var(--accent); transition: color .2s; }
.tab-icon:hover,
.tab-icon.is-active { background: var(--primary-2); color: var(--white); }
.tab-icon.is-active i,
.tab-icon:hover i { color: var(--white); }

.tab-pill {
	padding: 8px 22px;
	border: 1px solid #ddd;
	border-radius: 999px;
	background: var(--white);
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	color: #444;
}
.tab-pill:hover { border-color: var(--primary); color: var(--primary); }
.tab-pill.is-active { background: var(--primary); border-color: var(--primary); color: var(--white); }

.tabs__panel { display: none; }
.tabs__panel.is-active { display: block; animation: fade .35s; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Project grid ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.post-overlay {
	position: relative;
	display: block;
	aspect-ratio: 1.4 / 1;
	border-radius: 5%;
	overflow: hidden;
}
.post-overlay img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.post-overlay__text {
	position: absolute; inset: 0;
	display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
	padding: 20px;
	background: linear-gradient(to top, rgba(0,0,0,.65), transparent 60%);
	color: var(--white);
	text-align: center;
	opacity: 0;
	transition: opacity .3s;
}
.post-overlay__text h5 { font-size: 16px; margin: 0 0 8px; }
.post-overlay__text::after { content: ""; width: 30px; height: 2px; background: var(--white); }
.post-overlay:hover .post-overlay__text { opacity: 1; }
.post-overlay:hover img { transform: scale(1.06); }

.post-card { display: block; position: relative; }
.post-card__media {
	aspect-ratio: 1.4 / 1;
	border-radius: var(--radius);
	overflow: hidden;
	background: #eee;
}
.post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__media img { transform: scale(1.06); }
.post-card h5 {
	margin: 12px 0 0;
	font-size: 15px;
	text-align: center;
	transition: color .2s;
}
.post-card:hover h5 { color: var(--accent); }


/* ---------- Process ---------- */
.process {
	display: grid;
	grid-template-columns: repeat(var(--cols, 6), 1fr);
	gap: 24px 16px;
}
.process__item { text-align: center; }
.process__icon {
	position: relative;
	width: 84px; height: 84px;
	margin: 0 auto 14px;
	display: grid; place-items: center;
	border: 2px solid var(--primary-2);
	border-radius: 50%;
	background: var(--white);
	color: var(--primary);
	font-size: 30px;
}
.process__icon span {
	position: absolute; left: -4px; bottom: -2px;
	width: 28px; height: 28px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--accent);
	color: var(--white);
	font-size: 13px; font-weight: 700;
}
.process__item h3,
.process__item h4 {
	font-size: 15px;
	text-transform: uppercase;
	margin-bottom: 8px;
}
.process__item p { font-size: 13px; color: var(--muted); }

/* ---------- Reasons ---------- */
.reasons { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.reasons__text { padding-left: 50px; }
.reasons__text .section-title { margin-bottom: 8px; }
.check-list li {
	position: relative;
	padding-left: 24px;
	margin: 10px 0;
	font-size: 14px;
}
.check-list li::before {
	content: "\f00c";
	font-family: "Font Awesome 6 Free";
	font-weight: 900;
	position: absolute; left: 0; top: 1px;
	font-size: 12px;
}
.reasons__img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; }

/* ---------- Motto band ---------- */
.motto {
	position: relative;
	padding: 70px 0;
	text-align: center;
	color: var(--white);
	background: url("../img/sofa-go-tan-co.webp") center / cover;
}
.motto::before { content: ""; position: absolute; inset: 0; background: rgba(46,29,15,.78); }
.motto > .container { position: relative; }
.motto__label { margin-bottom: 8px; color: #e8c58f; font-size: 13px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.motto h2 { max-width: 820px; margin: 0 auto 14px; font-size: 28px; text-transform: uppercase; }
.motto p { max-width: 640px; margin: 0 auto 22px; color: #f1e6d6; }

/* ---------- Pain / solution (Thiết kế) ---------- */
.pain-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	align-items: center;
}
.pain-row + .pain-row { margin-top: 30px; }
.pain-row .section-title { font-size: 20px; margin-bottom: 12px; }
.pain-row__img img {
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 16px;
	box-shadow: 14px 14px 0 var(--primary-2);
}
.pain-row--reverse .pain-row__img img { box-shadow: -14px 14px 0 var(--primary-2); }

/* ---------- Breadcrumb / page title ---------- */
.page-head { padding: 26px 0; background: var(--gray-bg); }
.page-head h1 { margin: 0; font-size: 24px; color: var(--primary); text-transform: uppercase; }
.breadcrumb { font-size: 13px; color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }
.page-note { margin: 6px 0 0; font-size: 13px; color: var(--muted); font-style: italic; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 12px; }
.form input,
.form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font: inherit;
	font-size: 14px;
	background: var(--white);
}
.form input:focus,
.form textarea:focus { outline: 2px solid rgba(91,58,30,.35); border-color: var(--primary); }
.form textarea { min-height: 110px; resize: vertical; }
.form .is-invalid { border-color: #d33; }
.form__msg { margin: 0; font-size: 14px; }
.form .hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.form button:disabled { opacity: .6; cursor: wait; }
.form__msg.is-ok { color: var(--primary); font-weight: 700; }
.form__msg.is-error { color: #d33; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.contact-info h3 { color: var(--primary); font-size: 20px; text-transform: uppercase; }
.contact-info p i { width: 22px; color: var(--primary); }
.contact-info .btn i { width: auto; margin-right: 6px; color: inherit; }
.map iframe { display: block; width: 100%; height: 380px; border: 0; }

/* ---------- Footer ---------- */
.site-footer {
	color: #eadfce;
	background: var(--dark);
	font-size: 14px;
}
.footer-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 30px;
	padding: 50px 15px 30px;
}
.site-footer h3 { color: var(--white); font-size: 16px; text-transform: uppercase; margin-bottom: 8px; }
.divider { width: 30px; height: 3px; margin: 0 0 16px; background: var(--accent); }
.site-footer p { margin: 0 0 10px; }
.site-footer p i { width: 20px; color: var(--accent); }
.site-footer a:hover { color: #e8c58f; }
.footer-slogan { font-style: italic; color: #e8c58f; }
.footer-links li { margin: 0 0 8px; }
.footer-links li::before { content: "›"; margin-right: 8px; color: var(--accent); }
.site-footer iframe { display: block; width: 100%; height: 210px; border: 0; border-radius: 6px; background: var(--white); }
.site-footer .footer-map-link { margin: 10px 0 0; }
.site-footer .footer-map-link a { color: #e8c58f; font-weight: 600; }
.site-footer .footer-map-link i { width: auto; margin-right: 6px; }
.footer-bottom {
	padding: 16px 15px;
	border-top: 1px solid rgba(255,255,255,.2);
	text-align: center;
	font-size: 13px;
}

/* ---------- Floating contact + back to top ---------- */
.float-contact {
	position: fixed;
	right: 14px; bottom: 90px;
	z-index: 40;
	display: grid; gap: 14px;
}
.float-contact a {
	position: relative;
	width: 54px; height: 54px;
	display: grid; place-items: center;
	border-radius: 50%;
	color: var(--white);
	font-size: 22px;
	box-shadow: 0 3px 10px rgba(0,0,0,.25);
}
.float-contact a::before {
	content: "";
	position: absolute; inset: -6px;
	border-radius: 50%;
	background: inherit;
	opacity: .35;
	z-index: -1;
	animation: pulse 1.6s infinite;
}
.float-contact .zalo { background: #0b8bff; font-size: 13px; font-weight: 700; }
.float-contact .phone { background: #e02a2a; }
.float-contact .phone i { animation: ring 1.2s infinite; }
@keyframes pulse { 0% { transform: scale(.9); opacity: .5; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes ring {
	0%, 100% { transform: rotate(0); }
	10%, 30% { transform: rotate(-18deg); }
	20%, 40% { transform: rotate(18deg); }
	50% { transform: rotate(0); }
}

.back-to-top {
	position: fixed;
	right: 22px; bottom: 22px;
	z-index: 40;
	width: 38px; height: 38px;
	border: 2px solid #555;
	border-radius: 50%;
	background: var(--white);
	color: #555;
	opacity: 0; visibility: hidden;
	transition: opacity .2s, visibility .2s;
}
.back-to-top.is-visible { opacity: 1; visibility: visible; }

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.reveal { opacity: 1; transform: none; transition: none; }
	html { scroll-behavior: auto; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1100px) {
	.main-nav { gap: 24px; }
	.carousel { --per: 4; }
	.carousel[data-per="6"] { --per: 4; }
	.process { --cols: 4 !important; }
}

@media (max-width: 900px) {
	.main-nav { display: none; }
	.menu-toggle { display: grid; }
	.logo { position: absolute; left: 50%; transform: translateX(-50%); }
	.carousel,
	.carousel[data-per="6"] { --per: 3; }
	.carousel[data-per="3"] { --per: 2; }
	.grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
	.logo__text { display: none; }
	.process { --cols: 3 !important; }
	.reasons, .pain-row, .contact-grid { grid-template-columns: 1fr; }
	.reasons__text { padding: 0 15px; }
	.pain-row--reverse .pain-row__img { order: 2; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.nav-arrow { opacity: 1; }
}

@media (max-width: 600px) {
	body { font-size: 14px; }
	.section { padding: 36px 0; }
	.section-title { font-size: 21px; margin-bottom: 20px; }
	.carousel,
	.carousel[data-per="6"] { --per: 2; --gap: 12px; }
	.carousel[data-per="3"] { --per: 1; }
	.carousel .nav-arrow { width: 34px; height: 34px; font-size: 13px; }
	.carousel .nav-arrow--prev { left: -4px; }
	.carousel .nav-arrow--next { right: -4px; }
	.card-img__media { height: 200px; }
	.card-img__body h4 { font-size: 13px; }
	.tab-icon { width: calc(50% - 7px); }
	.grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
	.motto h2 { font-size: 21px; }
	.process { --cols: 2 !important; }
	.footer-grid { grid-template-columns: 1fr; }
	.float-contact { right: 10px; bottom: 76px; gap: 10px; }
	.float-contact a { width: 46px; height: 46px; font-size: 18px; }
}
