/*
 Theme Name:   NutritionIQ Child
 Theme URI:     https://brainfleck.com/
 Description:  NutritionIQ child theme for mobile API integration.
 Author:       BrainFleck Solution
 Author URI:   https://brainfleck.com/
 Template:     twentytwentyfive
 Version:      1.0.1
 Requires at least: 6.7
 Requires PHP: 7.2
 License:      GNU General Public License v2 or later
 License URI:  http://www.gnu.org/licenses/gpl-2.0.html
 Text Domain:  nutritioniq-child
*/

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&family=Manrope:wght@400;500;600;700;800&display=swap');

:root {
	--niq-font-manrope: 'Manrope', sans-serif;
	--niq-font-inter: 'Inter', sans-serif;
	--niq-font-mono: 'JetBrains Mono', monospace;

	--niq-primary: #A43621;
	--niq-black: #000000;
	--niq-brown: #58423D;
	--niq-light-pink: #FFF0ED;
	--niq-soft-pink: #FFF8F7;
	--niq-white: #FFFFFF;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html {
  scroll-behavior: smooth;
}

section {
  scroll-margin-top: 80px;
}

body{
	font-family: var(--niq-font-inter);
	font-size: 18px;
	color: var(--niq-brown);
}

h1, h2, h3, h4, h5, h6{
	font-family: var(--niq-font-manrope);
	line-height: 1.3;
	color: var(--niq-black);
}

h2{
	font-size: clamp(24px, 3vw, 56px);
	text-transform: capitalize;
}

/* Sticky Header & Container */
.niq-header {
	width: 100%;
	padding: 16px 0 12px 0;
	box-sizing: border-box;
	display: flex;
	justify-content: center;
	align-items: center;
	position: sticky;
	top: 0;
	z-index: 9999;
	background: transparent;
}

.niq-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: var(--niq-light-pink);
	border: 1.5px solid var(--niq-primary);
	border-radius: 50px;
	padding: 10px 36px;
	box-shadow: 0 4px 20px rgba(164, 54, 33, 0.08);
	box-sizing: border-box;
	transition: all 0.3s ease;
}

/* Brand / Logo */
.niq-brand {
	display: flex;
	align-items: center;
	text-decoration: none;
}

.niq-brand__logo {
	height: 44px;
	width: auto;
	max-width: 210px;
	object-fit: contain;
	display: block;
}

/* Navigation List */
.niq-header__nav {
	display: flex;
	align-items: center;
}

.niq-nav-list {
	display: flex;
	align-items: center;
	gap: 36px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.niq-nav-list li {
	margin: 0;
	padding: 0;
	list-style: none;
	display: inline-block;
}

.niq-nav-list li a {
	color: var(--niq-brown);
	font-weight: 600;
	font-size: 16px;
	text-decoration: none;
	transition: color 0.2s ease, font-weight 0.2s ease;
	font-family: var(--niq-font-inter);
	line-height: 1.4;
	display: inline-block;
}

.niq-nav-list li a:hover {
	color: var(--niq-primary);
}

/* Active Nav Link */
.niq-nav-list li.current-menu-item > a,
.niq-nav-list li.current_page_item > a,
.niq-nav-list li.active > a,
.niq-nav-list li a.active {
	color: var(--niq-primary);
}

/* Mobile Toggle Button */
.niq-nav-toggle {
	display: none;
	background: none;
	border: none;
	cursor: pointer;
	padding: 6px;
}

/* Hide default parent block theme header if present */
header.wp-block-template-part:not(.niq-header) {
	display: none;
}

/* ==========================================================================
   Mobile Navigation (1024px Breakpoint & Below)
   ========================================================================== */
@media (max-width: 1024px) {
	.niq-header__bar {
		position: relative;
		padding: 10px 24px;
		border-radius: 40px;
	}

	.niq-header__nav {
		display: none;
		position: absolute;
		top: calc(100% + 12px);
		left: 0;
		right: 0;
		background: var(--niq-white);
		border: 1.5px solid var(--niq-primary);
		border-radius: 20px;
		padding: 20px 24px;
		box-shadow: 0 10px 30px rgba(164, 54, 33, 0.12);
		z-index: 1000;
	}

	.niq-header__nav.is-open {
		display: block;
		animation: niqSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	}

	.niq-nav-list {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
		width: 100%;
	}

	.niq-nav-list li {
		width: 100%;
		display: block;
	}

	.niq-nav-list li a {
		display: block;
		width: 100%;
		padding: 8px 12px;
		font-size: 16px;
		border-radius: 8px;
	}

	.niq-nav-list li a:hover {
		background: var(--niq-light-pink);
	}

	/* Hamburger Icon */
	.niq-nav-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		width: 40px;
		height: 40px;
		background: var(--niq-light-pink);
		border: 1.5px solid var(--niq-primary);
		border-radius: 50%;
		cursor: pointer;
		transition: all 0.2s ease;
	}

	.niq-nav-toggle span[aria-hidden="true"] {
		display: block;
		width: 20px;
		height: 2px;
		background: var(--niq-primary);
		position: relative;
		transition: background 0.2s ease;
	}

	.niq-nav-toggle span[aria-hidden="true"]::before,
	.niq-nav-toggle span[aria-hidden="true"]::after {
		content: '';
		position: absolute;
		width: 20px;
		height: 2px;
		background: var(--niq-primary);
		left: 0;
		transition: transform 0.2s ease, top 0.2s ease;
	}

	.niq-nav-toggle span[aria-hidden="true"]::before {
		top: -6px;
	}

	.niq-nav-toggle span[aria-hidden="true"]::after {
		top: 6px;
	}

	.niq-nav-toggle[aria-expanded="true"] span[aria-hidden="true"] {
		background: transparent;
	}

	.niq-nav-toggle[aria-expanded="true"] span[aria-hidden="true"]::before {
		top: 0;
		transform: rotate(45deg);
	}

	.niq-nav-toggle[aria-expanded="true"] span[aria-hidden="true"]::after {
		top: 0;
		transform: rotate(-45deg);
	}
}

@keyframes niqSlideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   Footer Styles (Crimson Red Theme)
   ========================================================================== */
.niq-footer {
	background-color: var(--niq-primary);
	color: var(--niq-white);
	padding: 50px 0 24px 0;
	box-sizing: border-box;
	font-family: inherit;
}

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

.niq-footer__top {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	padding-bottom: 30px;
	gap: 30px;
}

.niq-footer__col {
	flex: 1;
}

.niq-footer__col--contact {
	text-align: left;
}

.niq-footer__col--logo {
	text-align: center;
}

.niq-footer__col--download {
	text-align: right;
}

.niq-footer__title {
	color: var(--niq-white);
	font-size: 20px;
	font-weight: 600;
	margin: 0 0 16px 0;
}

.niq-footer__contact-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.niq-footer__contact-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
	color: var(--niq-white);
	font-size: 15px;
}

.niq-footer__contact-list a {
	color: var(--niq-white);
	text-decoration: none;
	transition: opacity 0.2s;
}

.niq-footer__contact-list a:hover {
	opacity: 0.85;
	text-decoration: underline;
}

.niq-footer__icon {
	flex-shrink: 0;
	fill: var(--niq-white);
}

/* Center Logo */
.niq-footer__brand {
	display: inline-block;
	text-decoration: none;
}

.niq-footer__logo-img {
	height: 270px;
	width: 100%;
	object-fit: cover;
	display: block;
}

/* App Store Badges */
.niq-footer__app-badges {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.niq-footer__app-badges img {
	height: 42px;
	width: auto;
	border-radius: 6px;
	transition: transform 0.2s ease;
}

.niq-footer__app-badges img:hover {
	transform: translateY(-2px);
}

/* Bottom Bar */
.niq-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.25);
	padding-top: 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	font-size: 14px;
	color: var(--niq-white);
	list-style: none;
}

.niq-footer__legal {
	display: flex;
	gap: 20px;
}

.niq-footer__legal a {
	color: var(--niq-white);
	text-decoration: underline;
	font-size: 14px;
	transition: opacity 0.2s;
}

.niq-footer__legal a:hover {
	opacity: 0.85;
}

.niq-footer__copyright p {
	margin: 0;
	color: var(--niq-white);
	font-size: 14px;
}

.niq-footer__social-list {
	display: flex;
	align-items: center;
	gap: 16px;
	list-style: none;
	padding: 0;
	margin: 0;
}

.niq-footer__social-list a {
	color: var(--niq-white);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.2s;
}

.niq-footer__social-list a:hover {
	opacity: 0.8;
}

@media (max-width: 900px) {
	.niq-footer__top {
		flex-direction: column;
		align-items: center;
		text-align: center;
		gap: 30px;
	}

	.niq-footer__col--contact,
	.niq-footer__col--download {
		text-align: center;
	}

	.niq-footer__contact-list li {
		justify-content: center;
	}

	.niq-footer__app-badges {
		justify-content: center;
	}

	.niq-footer__bottom {
		flex-direction: column;
		text-align: center;
		gap: 15px;
	}

	.niq-footer__legal {
		justify-content: center;
	}
}

/* ==========================================================================
   Privacy Policy & Delete Account Page Styling
   ========================================================================== */
.niq-page-policy {
	padding: 60px 0 100px 0;
}

.niq-page__inner {
	max-width: 960px;
	margin: 0 auto;
	padding: 0 20px;
}

.niq-page__article {
	background: var(--niq-white, #FFFFFF);
	border: 1px solid #F0D5D0;
	border-radius: 24px;
	padding: 56px 64px;
	box-shadow: 0 12px 40px rgba(164, 54, 33, 0.05);
}

.niq-page__title {
	font-family: var(--niq-font-manrope, sans-serif);
	font-size: clamp(32px, 4.5vw, 48px);
	font-weight: 800;
	color: var(--niq-black, #000000);
	line-height: 1.2;
	letter-spacing: -0.8px;
	margin-bottom: 32px;
	padding-bottom: 24px;
	border-bottom: 2px solid var(--niq-light-pink, #FFF0ED);
	position: relative;
}

.niq-page__title::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 80px;
	height: 3px;
	background: var(--niq-primary, #A43621);
	border-radius: 3px;
}

.niq-page__content {
	font-family: var(--niq-font-inter, sans-serif);
	font-size: 16px;
	line-height: 1.75;
	color: var(--niq-brown, #58423D);
}

.niq-page__content p {
	margin-bottom: 20px;
	font-size: 16px;
	line-height: 1.75;
	color: var(--niq-brown, #58423D);
}

.niq-page__content h2 {
	font-family: var(--niq-font-manrope, sans-serif);
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 800;
	color: var(--niq-black, #000000);
	margin-top: 40px;
	margin-bottom: 18px;
	line-height: 1.3;
	letter-spacing: -0.5px;
}

.niq-page__content h3 {
	font-family: var(--niq-font-manrope, sans-serif);
	font-size: clamp(18px, 2.5vw, 22px);
	font-weight: 700;
	color: var(--niq-primary, #A43621);
	margin-top: 32px;
	margin-bottom: 14px;
	line-height: 1.35;
}

.niq-page__content h4 {
	font-family: var(--niq-font-manrope, sans-serif);
	font-size: 17px;
	font-weight: 700;
	color: var(--niq-black, #000000);
	margin-top: 24px;
	margin-bottom: 12px;
}

.niq-page__content ul,
.niq-page__content ol {
	margin: 16px 0 24px 0;
	padding-left: 24px;
}

.niq-page__content ul li,
.niq-page__content ol li {
	font-size: 16px;
	line-height: 1.7;
	color: var(--niq-brown, #58423D);
	margin-bottom: 10px;
}

.niq-page__content ul li::marker {
	color: var(--niq-primary, #A43621);
	font-size: 1.1em;
}

.niq-page__content ol li::marker {
	color: var(--niq-primary, #A43621);
	font-weight: 700;
}

.niq-page__content a {
	color: var(--niq-primary, #A43621);
	font-weight: 600;
	text-decoration: none;
	border-bottom: 1px dashed var(--niq-primary, #A43621);
	transition: all 0.2s ease;
}

.niq-page__content a:hover {
	color: #8C2C19;
	border-bottom-style: solid;
}

.niq-page__content table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	margin: 28px 0;
	border: 1px solid #F0D5D0;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 4px 16px rgba(164, 54, 33, 0.03);
}

.niq-page__content th {
	background-color: var(--niq-light-pink, #FFF0ED);
	color: var(--niq-primary, #A43621);
	font-family: var(--niq-font-manrope, sans-serif);
	font-size: 15px;
	font-weight: 700;
	padding: 16px 20px;
	text-align: left;
	border-bottom: 2px solid #F0D5D0;
}

.niq-page__content td {
	padding: 16px 20px;
	border-bottom: 1px solid #F0D5D0;
	font-size: 15px;
	color: var(--niq-brown, #58423D);
	line-height: 1.6;
	background: #FFFFFF;
}

.niq-page__content tr:last-child td {
	border-bottom: none;
}

.niq-page__content tr:nth-child(even) td {
	background-color: #FFFDFD;
}

.niq-page__content strong,
.niq-page__content b {
	font-weight: 700;
	color: var(--niq-black, #000000);
}

.niq-page__content blockquote {
	background: var(--niq-light-pink, #FFF0ED);
	border-left: 4px solid var(--niq-primary, #A43621);
	border-radius: 0 14px 14px 0;
	padding: 20px 24px;
	margin: 28px 0;
	font-style: normal;
	color: var(--niq-brown, #58423D);
}

.niq-page__content blockquote p:last-child {
	margin-bottom: 0;
}

@media (max-width: 768px) {
	.niq-page-policy {
		padding: 40px 0 60px 0;
	}

	.niq-page__article {
		padding: 32px 24px;
		border-radius: 16px;
	}

	.niq-page__title {
		margin-bottom: 24px;
		padding-bottom: 16px;
	}

	.niq-page__content table {
		display: block;
		overflow-x: auto;
		white-space: nowrap;
	}
}
