/*
Theme Name: IT Foods Profile
Theme URI: https://itfoods.info/
Author: IT Foods
Author URI: https://itfoods.info/
Description: Custom block theme for the IT Foods company profile site. Teal and gold corporate design with serif display type, photo hero, stats band and process strip. Mobile-first, no page-builder dependency. Page content lives in the block templates and is editable in the Site Editor.
Version: 2.0.2
Requires at least: 6.4
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: itfoods-profile
Tags: block-theme, custom-colors, custom-menu, featured-images, translation-ready
*/

/* ============================================================
   IT Foods Profile — base
   ============================================================ */

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

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	-webkit-font-smoothing: antialiased;
}

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

a {
	text-underline-offset: 3px;
}

:focus-visible {
	outline: 3px solid #c0a060;
	outline-offset: 2px;
}

/* Header site logo: linked Media Library image. Explicit widths at
   every level plus flex-shrink:0 — the figure is a flex item and
   must never collapse to zero width. */
.itf-site-logo {
	flex: 0 0 auto;
	margin: 0;
	width: 120px;
}

.itf-site-logo a {
	display: block;
	width: 120px;
}

.itf-site-logo img {
	display: block;
	height: auto;
	width: 120px;
}

/* Screen-reader text + skip link */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal;
}

.skip-link:focus {
	background: #0a2f3a;
	clip: auto;
	clip-path: none;
	color: #fff;
	height: auto;
	left: 1rem;
	padding: 0.6rem 1rem;
	position: fixed;
	top: 1rem;
	width: auto;
	z-index: 200;
}

/* ============================================================
   Header
   ============================================================ */

.itf-header {
	background: #fff;
	border-bottom: 1px solid rgba(10, 47, 58, 0.14);
	position: relative;
	z-index: 100;
}

.itf-header-inner {
	align-items: center;
	gap: 1.5rem;
	padding-bottom: 0.7rem;
	padding-top: 0.7rem;
}

/* Wider header row than the 1140px content column so the logo and
   all 9 menu items fit on one row. */
.itf-header .itf-header-inner {
	max-width: 1280px;
}

/* ============================================================
   Primary menu — desktop row / mobile slide-in panel
   ============================================================ */

.itf-nav-wrap {
	align-items: center;
	display: flex;
}

.itf-menu-toggle {
	align-items: center;
	background: transparent;
	border: 2px solid #0a2f3a;
	border-radius: 3px;
	color: #0a2f3a;
	cursor: pointer;
	display: none;
	font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 0.95rem;
	font-weight: 600;
	gap: 0.5rem;
	line-height: 1;
	padding: 0.55rem 0.8rem;
}

.itf-menu-toggle-icon {
	display: block;
	height: 2px;
	position: relative;
	width: 20px;
}

.itf-menu-toggle-icon,
.itf-menu-toggle-icon::before,
.itf-menu-toggle-icon::after {
	background: currentColor;
}

.itf-menu-toggle-icon::before,
.itf-menu-toggle-icon::after {
	content: "";
	height: 2px;
	left: 0;
	position: absolute;
	width: 20px;
}

.itf-menu-toggle-icon::before {
	top: -6px;
}

.itf-menu-toggle-icon::after {
	top: 6px;
}

.itf-nav-backdrop {
	display: none;
}

.itf-menu {
	display: flex;
	flex-wrap: nowrap;
	gap: 0.25rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.itf-menu a {
	border-bottom: 3px solid transparent;
	color: #0a2f3a;
	display: block;
	font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 0.92rem;
	font-weight: 600;
	padding: 0.55rem 0.55rem;
	text-decoration: none;
	white-space: nowrap;
}

.itf-menu a:hover,
.itf-menu a:focus-visible {
	border-bottom-color: #c0a060;
	color: #0a2f3a;
}

.itf-menu .current-menu-item > a,
.itf-menu .current-menu-ancestor > a,
.itf-menu .current_page_item > a {
	border-bottom-color: #c0a060;
	color: #a68a4e;
}

/* Slightly tighter menu on medium desktops so all 9 items
   stay on one row. */
@media (min-width: 1100px) and (max-width: 1280px) {

	.itf-menu a {
		font-size: 0.88rem;
		padding-left: 0.5rem;
		padding-right: 0.5rem;
	}
}

.itf-header-inner {
	flex-wrap: wrap;
}

@media (min-width: 1100px) {

	.itf-header-inner {
		flex-wrap: nowrap;
	}
}

/* Mobile / tablet: hamburger + slide-in panel.
   The off-canvas behaviour only applies once JS has run
   (.js-ready on the wrapper). Without JS the menu renders as a
   stacked teal block under the header, fully reachable. */
@media (max-width: 1099px) {

	.itf-menu-toggle {
		display: inline-flex;
	}

	.itf-nav-wrap.js-ready .itf-nav {
		background: #0a2f3a;
		bottom: 0;
		box-shadow: -8px 0 24px rgba(0, 0, 0, 0.25);
		max-width: 320px;
		overflow-y: auto;
		padding: 4.5rem 1.5rem 2rem;
		position: fixed;
		right: 0;
		top: 0;
		transform: translateX(105%);
		transition: transform 0.3s ease;
		visibility: hidden;
		width: 85vw;
		z-index: 150;
	}

	.itf-nav-wrap.js-ready.is-open .itf-nav {
		transform: translateX(0);
		visibility: visible;
	}

	.itf-nav-wrap.js-ready.is-open .itf-nav-backdrop {
		background: rgba(10, 47, 58, 0.55);
		border: 0;
		bottom: 0;
		cursor: pointer;
		display: block;
		left: 0;
		padding: 0;
		position: fixed;
		right: 0;
		top: 0;
		z-index: 140;
	}

	.itf-nav-wrap:not(.js-ready) {
		flex-basis: 100%;
	}

	.itf-nav-wrap:not(.js-ready) .itf-menu-toggle {
		display: none;
	}

	.itf-nav-wrap:not(.js-ready) .itf-nav {
		background: #0a2f3a;
		padding: 0.5rem 0 0.25rem;
		width: 100%;
	}

	.itf-menu {
		flex-direction: column;
		gap: 0.15rem;
	}

	.itf-menu a {
		border-bottom: 1px solid rgba(255, 255, 255, 0.14);
		color: #fff;
		font-size: 1.05rem;
		padding: 0.8rem 0.4rem;
		white-space: normal;
	}

	.itf-menu a:hover,
	.itf-menu a:focus-visible {
		border-bottom-color: #c0a060;
		color: #fff;
	}

	.itf-menu .current-menu-item > a,
	.itf-menu .current-menu-ancestor > a,
	.itf-menu .current_page_item > a {
		border-bottom-color: #c0a060;
		color: #c0a060;
	}
}

/* ============================================================
   Hero + sections
   ============================================================ */

.itf-main {
	display: block;
	overflow-wrap: break-word;
}

/* Content links: quiet underline by default, gold on hover. */
.itf-main a {
	text-decoration-color: rgba(10, 47, 58, 0.4);
}

.itf-main a:hover,
.itf-main a:focus-visible {
	text-decoration-color: #c0a060;
}

.itf-hero {
	padding-bottom: 3rem;
	padding-top: 3rem;
}

/* Full-bleed photo hero (home page Cover block). Side padding keeps
   the text off the viewport edges on phones. */
.wp-block-cover.itf-hero {
	padding-bottom: 4.5rem;
	padding-left: 1.25rem;
	padding-right: 1.25rem;
	padding-top: 4.5rem;
}

.itf-hero h1 {
	color: #fff;
	font-size: clamp(2.3rem, 4.5vw, 3.3rem);
	line-height: 1.15;
	margin-bottom: 0;
	margin-top: 0;
}

.wp-block-cover.itf-hero h1 {
	font-size: clamp(2.6rem, 5.5vw, 4.25rem);
	line-height: 1.1;
}

/* Gold rule under the hero heading: drawn as part of the H1 so it
   always sits at the content column's left edge. */
.itf-hero h1::after {
	background: #c0a060;
	content: "";
	display: block;
	height: 3px;
	margin-top: 1.25rem;
	width: 64px;
}

/* Eyebrow label above the hero heading. */
.itf-hero .itf-eyebrow {
	color: #c0a060;
	font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	line-height: 1.4;
	margin: 0 0 0.9rem;
	text-transform: uppercase;
}

/* Hero intro. It must share the H1's box exactly: WordPress
   constrained-layout CSS gives every hero child the content-size
   max-width with auto margins, which puts the H1 at the column
   edge. Do NOT add a max-width here (a narrower block gets centred
   inside the column — the v2.0.0 defect) and do NOT force
   margin-left:0 (that aligns it to the full-width band's edge,
   170–190px left of the H1 — the v1.0.2 and v2.0.1 defect).
   Only the top margin is set; left/right come from the layout. */
.itf-hero-intro {
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.2rem;
	line-height: 1.65;
	margin-top: 1.25rem;
}

.itf-hero .wp-block-buttons {
	margin-top: 1.75rem;
}

/* Outline button on the teal hero: white border, transparent fill. */
.itf-hero .is-style-outline > .wp-block-button__link,
.itf-hero .is-style-outline .wp-block-button__link {
	background: transparent;
	border: 2px solid #fff;
	color: #fff;
}

.itf-hero .is-style-outline > .wp-block-button__link:hover,
.itf-hero .is-style-outline .wp-block-button__link:hover,
.itf-hero .is-style-outline > .wp-block-button__link:focus,
.itf-hero .is-style-outline .wp-block-button__link:focus {
	background: #fff;
	border-color: #fff;
	color: #0a2f3a;
}

.itf-section {
	padding-bottom: 3.25rem;
	padding-top: 3.25rem;
}

/* Gold underline under section headings. */
.itf-main h2::after {
	background: #c0a060;
	content: "";
	display: block;
	height: 3px;
	margin-top: 0.6rem;
	width: 48px;
}

.itf-main h2 {
	margin-top: 0;
}

/* Arrow text links ("Our Story →"). */
.itf-text-link a,
.itf-card-link a {
	font-weight: 600;
	text-decoration: none;
}

.itf-text-link a:hover,
.itf-text-link a:focus-visible,
.itf-card-link a:hover,
.itf-card-link a:focus-visible {
	text-decoration: underline;
	text-decoration-color: #c0a060;
	text-decoration-thickness: 2px;
}

/* ============================================================
   Stats band (home page)
   ============================================================ */

.itf-stats-band {
	padding-bottom: 2.5rem;
	padding-top: 2.5rem;
}

.itf-stats {
	display: grid;
	gap: 1.5rem 2rem;
	grid-template-columns: repeat(5, 1fr);
}

.itf-stats > * {
	margin: 0;
}

.itf-stat {
	text-align: center;
}

.itf-stat-number {
	color: #c0a060;
	font-family: "Fraunces", Georgia, "Times New Roman", serif;
	font-size: 2.5rem;
	font-weight: 600;
	line-height: 1.1;
	margin: 0 0 0.35rem;
}

.itf-stat-label {
	color: rgba(255, 255, 255, 0.92);
	font-size: 0.95rem;
	line-height: 1.45;
	margin: 0;
}

@media (max-width: 900px) {

	.itf-stats {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 560px) {

	.itf-stats {
		grid-template-columns: repeat(2, 1fr);
	}

	.itf-stat-number {
		font-size: 2.1rem;
	}
}

/* ============================================================
   Process strip (home + International Rice Mills)
   ============================================================ */

.itf-process {
	display: grid;
	gap: 2rem 1.5rem;
	grid-template-columns: repeat(6, 1fr);
	position: relative;
}

.itf-process > * {
	margin: 0;
}

.itf-process-step {
	position: relative;
	text-align: center;
	z-index: 1;
}

.itf-process-num {
	align-items: center;
	background: #f7f5f0;
	border: 2px solid #c0a060;
	border-radius: 50%;
	color: #0a2f3a;
	display: flex;
	font-family: "Fraunces", Georgia, "Times New Roman", serif;
	font-size: 1.5rem;
	font-weight: 600;
	height: 3.5rem;
	justify-content: center;
	margin: 0 auto 0.8rem;
	width: 3.5rem;
}

.itf-process-name {
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
}

/* Connecting gold line behind the numbered circles — single row
   only; hidden once the strip wraps. */
@media (min-width: 1024px) {

	.itf-process::before {
		background: rgba(192, 160, 96, 0.5);
		content: "";
		height: 2px;
		left: 8%;
		position: absolute;
		right: 8%;
		top: 1.75rem;
		z-index: 0;
	}
}

@media (max-width: 1023px) {

	.itf-process {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {

	.itf-process {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ============================================================
   Cards + card grids
   ============================================================ */

.itf-card-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(3, 1fr);
}

.itf-card-grid > * {
	margin: 0;
}

.itf-card-grid--2 {
	grid-template-columns: repeat(2, 1fr);
}

@media (max-width: 900px) {

	.itf-card-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {

	.itf-card-grid,
	.itf-card-grid--2 {
		grid-template-columns: 1fr;
	}
}

.itf-card {
	background: #fff;
	border: 1px solid rgba(10, 47, 58, 0.12);
	border-radius: 4px;
	border-top: 3px solid #c0a060;
	padding: 1.5rem;
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}

.itf-card:hover {
	box-shadow: 0 10px 28px rgba(10, 47, 58, 0.12);
	transform: translateY(-4px);
}

.itf-card > * {
	margin-bottom: 0;
	margin-top: 0;
}

.itf-card > * + * {
	margin-top: 0.9rem;
}

.itf-card h3 {
	margin-top: 0;
}

.itf-card .wp-block-image img {
	border-radius: 4px;
	display: block;
}

/* Group logos row. */
.itf-group-logo {
	margin-left: auto;
	margin-right: auto;
	max-width: 190px;
}

.itf-group-logo img {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.itf-group-name {
	font-weight: 600;
	text-align: center;
}

/* Branch photo rows. */
.itf-branch-photo img {
	border-radius: 4px;
	display: block;
}

/* Rice-range dish image. */
.itf-dish-image img {
	border-radius: 4px;
	display: block;
}

/* Tall portrait images in split sections: cropped to a fixed
   height so the section stays balanced. */
.itf-tall-image img {
	border-radius: 4px;
	display: block;
	height: 520px;
	object-fit: cover;
	width: 100%;
}

@media (max-width: 781px) {

	.itf-tall-image img {
		height: 420px;
	}
}

/* Cooking Rice pack shots (Brands page). */
.itf-packshots {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat(2, 1fr);
}

.itf-packshots > * {
	margin: 0;
}

.itf-packshots img {
	border-radius: 4px;
	display: block;
}

@media (max-width: 600px) {

	.itf-packshots {
		grid-template-columns: 1fr;
	}
}

/* ============================================================
   Markets chips (home page)
   ============================================================ */

.itf-chips {
	gap: 0.6rem;
}

.itf-chip {
	background: #fff;
	border: 1px solid rgba(10, 47, 58, 0.3);
	border-radius: 999px;
	color: #0a2f3a;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.4;
	margin: 0;
	padding: 0.45rem 1rem;
}

/* ============================================================
   Mill video
   ============================================================ */

.itf-video {
	margin: 0 auto;
	max-width: 400px;
}

.itf-video video {
	border-radius: 4px;
	display: block;
	height: auto;
	width: 100%;
}

/* ============================================================
   CTA band
   ============================================================ */

.itf-cta {
	padding-bottom: 3.25rem;
	padding-top: 3.25rem;
	text-align: center;
}

.itf-cta h2 {
	color: #fff;
}

.itf-cta h2::after {
	margin-left: auto;
	margin-right: auto;
}

.itf-cta p {
	color: rgba(255, 255, 255, 0.92);
}

.itf-cta a {
	color: #fff;
}

.itf-cta a:hover,
.itf-cta a:focus-visible {
	color: #c0a060;
}

/* Timeline (Our Story). */
.itf-timeline p {
	border-left: 3px solid #c0a060;
	padding-left: 1rem;
}

/* Leadership photo. */
.itf-team-photo img {
	border-radius: 4px;
	box-shadow: 0 12px 32px rgba(10, 47, 58, 0.14);
	display: block;
}

/* ============================================================
   GTranslate floating language switcher (plugin widget, fixed to
   the viewport's top-left, body-level element, present on every
   page). On desktop it sits clear of the header, but at and below
   the hamburger breakpoint it lands directly on the header logo
   and hides the "IT FOODS" text. Move it to the bottom-left on
   small screens.
   The positioned element is the plugin's floating wrapper,
   div#gt_float_wrapper (the selector the plugin author prescribes
   for repositioning it, with !important, in GTranslate support
   answers). v2.0.1 targeted .gtranslate_wrapper / .gt_switcher
   and a :has() fallback instead, and the widget did not move —
   the plugin's own ID rules outrank class selectors. The ID
   selector below matches the plugin's specificity; the extra
   selectors are harmless fallbacks. Offsets only affect
   positioned elements, so static descendants (e.g. the dropdown
   list) are untouched.
   ============================================================ */

@media (max-width: 1100px) {

	div#gt_float_wrapper,
	.gt_float_switcher,
	body > div:has(img[src*="/gtranslate/flags/"]),
	.gtranslate_wrapper {
		bottom: 12px !important;
		left: 12px !important;
		right: auto !important;
		top: auto !important;
	}
}

/* ============================================================
   Footer
   ============================================================ */

.itf-footer {
	border-top: 3px solid #c0a060;
	color: rgba(255, 255, 255, 0.92);
	padding-bottom: 2rem;
	padding-top: 3rem;
}

.itf-footer h2 {
	color: #fff;
	font-size: 1.25rem;
}

.itf-footer h2::after {
	display: none;
}

.itf-footer a {
	color: #fff;
}

.itf-footer a:hover,
.itf-footer a:focus-visible {
	color: #c0a060;
}

.itf-footer .wp-block-social-links {
	gap: 0.6rem;
}

.itf-footer .wp-social-link {
	background: #c0a060 !important;
	color: #0a2f3a !important;
}

.itf-footer .wp-social-link a {
	color: #0a2f3a !important;
}

.itf-footer .wp-social-link a:hover,
.itf-footer .wp-social-link a:focus-visible {
	color: #0a2f3a !important;
}

.itf-copyright {
	border-top: 1px solid rgba(255, 255, 255, 0.18);
	color: rgba(255, 255, 255, 0.75);
	font-size: 0.9rem;
	margin-top: 2rem;
	padding-top: 1.25rem;
	text-align: center;
}

/* ============================================================
   Contact form
   ============================================================ */

.itf-form {
	max-width: 40rem;
}

.itf-form-field {
	margin-bottom: 1.25rem;
}

.itf-form-field label {
	display: block;
	font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	margin-bottom: 0.35rem;
}

.itf-form-field input[type="text"],
.itf-form-field input[type="email"],
.itf-form-field textarea {
	border: 1px solid rgba(10, 47, 58, 0.35);
	border-radius: 3px;
	font: inherit;
	padding: 0.65rem 0.8rem;
	width: 100%;
}

.itf-form-field textarea {
	min-height: 9rem;
	resize: vertical;
}

.itf-form-field input:focus,
.itf-form-field textarea:focus {
	border-color: #0a2f3a;
	outline: 3px solid #c0a060;
	outline-offset: 1px;
}

/* Honeypot: kept off-screen, never shown. */
.itf-hp {
	height: 0;
	left: -9999px;
	margin: 0;
	overflow: hidden;
	position: absolute;
	top: auto;
	width: 0;
}

.itf-form-submit {
	background: #c0a060;
	border: 0;
	border-radius: 3px;
	color: #0a2f3a;
	cursor: pointer;
	font-family: "Source Sans 3", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	padding: 0.8rem 1.6rem;
}

.itf-form-submit:hover,
.itf-form-submit:focus-visible {
	background: #a68a4e;
	color: #0a2f3a;
}

.itf-form-notice {
	border-left: 4px solid #c0a060;
	margin-bottom: 1.25rem;
	padding: 0.8rem 1rem;
}

.itf-form-notice--success {
	background: #f7f5f0;
	border-left-color: #0a2f3a;
}

.itf-form-notice--error {
	background: #fdf3f0;
	border-left-color: #b3261e;
}

/* ============================================================
   Generic templates (index / archive / single / search / 404)
   ============================================================ */

.itf-loop {
	padding-bottom: 3rem;
	padding-top: 3rem;
}

.itf-not-found {
	padding-bottom: 4rem;
	padding-top: 4rem;
	text-align: center;
}

/* ============================================================
   Entrance animation (JS-gated; see assets/js/theme.js)
   ============================================================ */

.itf-anim .itf-fade-up {
	opacity: 0;
	transform: translateY(18px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.itf-anim .itf-fade-up.is-visible {
	opacity: 1;
	transform: none;
}

@media (prefers-reduced-motion: reduce) {

	html {
		scroll-behavior: auto;
	}

	.itf-anim .itf-fade-up,
	.itf-nav {
		opacity: 1 !important;
		transform: none !important;
		transition: none !important;
	}

	.itf-card {
		transition: none;
	}

	.itf-card:hover {
		transform: none;
	}
}
