/*
Theme Name:   Mardani
Theme URI:    https://mardani.ro
Description:  Child theme for mardani.ro and shop.mardani.ro (ADR-0006). Parent theme is a proposal: see wordpress/plugins.md.
Author:       Balan Danut Marcel
Template:     kadence
Version:      0.5.4
Text Domain:  mardani
*/

:root {
	/* Brand (design reference: docs/reference/Template_Design, OD-02) */
	--mardani-navy: #0b1d3a;
	--mardani-navy-2: #16305a;
	--mardani-gold: #f5a623;
	--mardani-gold-hover: #e0961a;
	--mardani-light: #f8fafc;
	--mardani-muted: #64748b;
	--mardani-radius: 1rem;
	--mardani-eu-blue: #003399;
	--mardani-eu-yellow: #ffcc00;
	--mardani-eu-fg: #ffffff;
}

/* EU strip on every page (D-20) */
.mardani-eu-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1rem;
	align-items: center;
	justify-content: center;
	padding: 0.6rem 1rem;
	background: var(--mardani-eu-blue);
	color: var(--mardani-eu-fg);
	font-size: 0.875rem;
	text-align: center;
}

.mardani-eu-strip a {
	color: var(--mardani-eu-yellow);
	font-weight: 600;
	text-decoration: underline;
}

.mardani-eu-strip__flag {
	color: var(--mardani-eu-yellow);
}

/* GDPR links under the EU strip (SEC-010, WEB-012) */
.mardani-legal-links {
	padding: 0.5rem 1rem 1rem;
	text-align: center;
	font-size: 0.8125rem;
}

/* Legal drafts awaiting the adviser's approval (D-21) */
.mardani-draft-note {
	background: #fff4d6;
	border-left: 4px solid #d9a400;
	padding: 0.75rem 1rem;
}

/* Project page: mandatory 4-logo header, visible without scrolling on every device (WEB-014) */
.mardani-eu-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 1rem 2rem;
	padding: 1rem 0 1.5rem;
	margin-bottom: 1.5rem;
	border-bottom: 1px solid rgba(0, 51, 153, 0.15);
}

.mardani-eu-logos__item {
	height: 72px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
}

@media (max-width: 600px) {
	.mardani-eu-logos {
		gap: 0.75rem 1.25rem;
	}

	.mardani-eu-logos__item {
		height: 48px;
	}

	.mardani-eu-logos__item.is-wide {
		flex-basis: 100%;
		height: auto;
		max-height: 52px;
	}
}

/* Project page: programme footer with the blue county band (WEB-021) */
.mardani-eu-footer {
	margin-top: 3rem;
	padding: 1.5rem 1rem;
	border-top: 4px solid var(--mardani-eu-blue);
}

.mardani-eu-counties {
	background: var(--mardani-eu-blue);
	color: var(--mardani-eu-fg);
	letter-spacing: 0.15em;
	padding: 0.5rem;
	font-weight: 600;
}

/* Home page callout to the project page (WEB-013) */
.mardani-eu-callout {
	border-left: 4px solid var(--mardani-eu-blue);
	padding: 1rem 1.5rem;
	margin-top: 2rem;
}

/* ===== Brand design (W-03) ===== */

body {
	background: var(--mardani-light);
}

/* Top notification bar on both sites (from the xyz template) */
.mardani-topbar {
	background: var(--mardani-navy);
	color: #fff;
	font-size: 0.9375rem;
	font-weight: 500;
}

.mardani-topbar__inner {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.5rem;
	align-items: center;
	justify-content: space-between;
	max-width: var(--global-content-width, 1290px);
	margin: 0 auto;
	min-height: 3rem;
	padding: 0.75rem 1rem;
}

.mardani-topbar__msg {
	display: flex;
	gap: 0.5rem;
	align-items: center;
	margin: 0;
}

.mardani-topbar svg {
	width: 1.1em;
	height: 1.1em;
	flex: none;
	fill: var(--mardani-gold);
}

.mardani-topbar__note {
	opacity: 0.85;
}

.mardani-topbar__info {
	display: flex;
	gap: 1.25rem;
	align-items: center;
}

.mardani-topbar__info span {
	display: inline-flex;
	gap: 0.35rem;
	align-items: center;
}

.mardani-topbar a {
	color: #fff;
	text-decoration: none;
}

@media (max-width: 767px) {
	.mardani-topbar__inner {
		justify-content: center;
		text-align: center;
	}

	.mardani-topbar__note,
	.mardani-topbar__info {
		display: none;
	}
}

/* "Acum și online" label with a pulsing dot (xyz template) */
.mardani-live-label {
	display: inline-flex !important;
	gap: 0.6rem;
	align-items: center;
	padding: 0.4rem 0.9rem;
	border-radius: 999px;
	background: rgba(245, 166, 35, 0.15);
	color: var(--mardani-gold) !important;
	font-size: 0.75rem !important;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.mardani-live-label::before {
	content: "";
	width: 0.55rem;
	height: 0.55rem;
	border-radius: 50%;
	background: #22c55e;
	animation: mardani-ping 1.4s ease-out infinite;
}

@keyframes mardani-ping {
	0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7); }
	80%, 100% { box-shadow: 0 0 0 0.6rem rgba(34, 197, 94, 0); }
}

/* "Ofertă specială" badge that bounces (xyz template) */
.mardani-offer-badge {
	position: absolute;
	z-index: 3;
	top: -1rem;
	right: -0.5rem;
	margin: 0 !important;
	animation: mardani-bounce 1.2s ease-in-out infinite;
}

.mardani-offer-badge a {
	display: inline-flex;
	gap: 0.4rem;
	align-items: center;
	padding: 0.6rem 1rem;
	border-radius: 1rem;
	background: #dc2626;
	color: #fff;
	font-size: 0.8125rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-decoration: none;
	box-shadow: 0 10px 20px -6px rgba(220, 38, 38, 0.55);
}

.mardani-offer-badge a::before {
	content: "⚡";
}

@keyframes mardani-bounce {
	0%, 100% { transform: translateY(0); }
	50% { transform: translateY(-0.5rem); }
}

/* No moving parts for visitors who ask the system for reduced motion (accessibility) */
@media (prefers-reduced-motion: reduce) {
	.mardani-live-label::before,
	.mardani-offer-badge {
		animation: none;
	}
}

/* Home hero (mardani template) */
.mardani-hero {
	position: relative;
	overflow: visible;
	background: var(--mardani-navy);
	color: #fff;
	padding: clamp(3rem, 7vw, 6rem) 1rem clamp(4rem, 8vw, 7rem) !important;
	margin-top: 0 !important;
	border-bottom-left-radius: 50% 2.5rem;
	border-bottom-right-radius: 50% 2.5rem;
}

.mardani-hero > .wp-block-columns {
	position: relative;
	z-index: 1;
	align-items: center !important;
	gap: 3rem;
}

.mardani-hero h1 {
	color: #fff;
	font-size: clamp(2rem, 4.5vw, 3.5rem);
	font-weight: 800;
	line-height: 1.15;
	text-wrap: balance;
}

.mardani-hero h1 .mardani-accent {
	color: var(--mardani-gold);
}

.mardani-hero p {
	color: #cbd5e1;
	font-size: 1.125rem;
}

.mardani-hero .wp-block-button__link {
	padding: 0.9rem 2rem;
	border-radius: 999px;
	font-weight: 800;
}

.mardani-hero .wp-block-button:not(.is-style-outline):not(.mardani-btn-store) .wp-block-button__link {
	background: var(--mardani-gold);
	color: var(--mardani-navy);
	box-shadow: 0 10px 25px -8px rgba(245, 166, 35, 0.6);
}

.mardani-hero .wp-block-button:not(.is-style-outline):not(.mardani-btn-store) .wp-block-button__link:hover {
	background: var(--mardani-gold-hover);
}

.mardani-hero .is-style-outline .wp-block-button__link {
	border: 2px solid rgba(255, 255, 255, 0.4) !important;
	background: transparent !important;
	color: #fff !important;
}

.mardani-hero .is-style-outline .wp-block-button__link:hover {
	border-color: #fff !important;
}

/* "Găsește un magazin": white button with a shop icon (xyz template Click & Collect style) */
.mardani-hero .mardani-btn-store .wp-block-button__link {
	display: inline-flex;
	gap: 0.6rem;
	align-items: center;
	border: 1px solid #e2e8f0 !important;
	border-radius: 1rem;
	background: #fff !important;
	color: var(--mardani-navy) !important;
	transition: transform 0.2s, border-color 0.2s;
}

.mardani-hero .mardani-btn-store .wp-block-button__link::before {
	content: "";
	width: 1.25rem;
	height: 1.25rem;
	background: var(--mardani-gold);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4v2h16V4zm1 10v-2l-1-5H4l-1 5v2h1v6h10v-6h4v6h2v-6h1zm-9 4H6v-4h6v4z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.mardani-hero .mardani-btn-store .wp-block-button__link:hover {
	border-color: var(--mardani-gold) !important;
	transform: translateY(-2px);
}

/* Hero visual: white card with the logo and a "safe payment" badge */
.mardani-hero-card {
	position: relative;
	padding: 2.5rem 2rem 2rem !important;
	border-radius: 2rem;
	background: #fff;
	box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
	transform: rotate(2deg);
	transition: transform 0.5s;
}

.mardani-hero-card:hover {
	transform: rotate(0);
}

.mardani-hero-card .wp-block-image img {
	width: min(280px, 80%);
	height: auto;
}

.mardani-hero .mardani-hero-card p {
	color: var(--mardani-navy);
	font-size: 1rem;
}

.mardani-hero .mardani-hero-card .mardani-pay-badge {
	width: fit-content;
	margin: 1rem auto 0;
	padding: 0.5rem 0.9rem;
	border-radius: 0.75rem;
	background: #f0fdf4;
	color: #166534;
	font-size: 0.8125rem;
	font-weight: 700;
}

/* Sections and titles with the gold underline */
.mardani-section {
	padding: clamp(3rem, 6vw, 5rem) 1rem !important;
}

.mardani-section--white {
	background: #fff;
}

.mardani-section h2 {
	color: var(--mardani-navy);
	font-weight: 800;
}

.mardani-section h2.has-text-align-center::after {
	content: "";
	display: block;
	width: 4rem;
	height: 0.35rem;
	margin: 1rem auto 0;
	border-radius: 999px;
	background: var(--mardani-gold);
}

/* "De ce să ne alegi?" cards */
.mardani-cards {
	gap: 2rem !important;
	margin-top: 2.5rem;
}

.mardani-card {
	padding: 2rem !important;
	border: 1px solid #e2e8f0;
	border-radius: var(--mardani-radius);
	background: #fff;
	text-align: center;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
	transition: box-shadow 0.2s;
}

.mardani-card:hover {
	box-shadow: 0 15px 30px -12px rgba(15, 23, 42, 0.2);
}

.mardani-card--featured {
	border: 2px solid var(--mardani-gold);
	box-shadow: 0 20px 40px -15px rgba(11, 29, 58, 0.3);
}

@media (min-width: 782px) {
	.mardani-card--featured {
		transform: translateY(-1rem);
	}
}

.mardani-card h3 {
	color: var(--mardani-navy);
	font-size: 1.25rem;
	font-weight: 700;
}

.mardani-card p {
	color: var(--mardani-muted);
	font-size: 0.9375rem;
}

.mardani-card .mardani-card__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	margin: 0 auto 1.25rem;
	border-radius: 50%;
	background: var(--mardani-light);
	color: inherit;
	font-size: 1.75rem;
	line-height: 1;
}

.mardani-card--featured .mardani-card__icon {
	width: 5rem;
	height: 5rem;
	background: var(--mardani-navy);
}

/* Product groups: icon tiles until real photos arrive */
/* Classic themes wrap group children in an inner container: the grid goes on whichever element holds the tiles. */
.mardani-tiles:not(:has(> .wp-block-group__inner-container)),
.mardani-tiles > .wp-block-group__inner-container {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 1rem;
	margin-top: 2rem;
}

.mardani-tiles .mardani-tile {
	margin: 0 !important;
}

.mardani-tile a {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	justify-content: flex-end;
	height: 10rem;
	padding: 1rem;
	border-radius: var(--mardani-radius);
	background: linear-gradient(to top, var(--mardani-navy) 0%, var(--mardani-navy-2) 100%);
	color: #fff;
	font-weight: 700;
	text-decoration: none;
	transition: transform 0.2s, box-shadow 0.2s;
}

.mardani-tile a:hover,
.mardani-tile a:focus-visible {
	color: var(--mardani-gold);
	transform: translateY(-3px);
	box-shadow: 0 15px 30px -12px rgba(11, 29, 58, 0.5);
}

.mardani-tile__icon {
	font-size: 2.25rem;
	line-height: 1;
}

/* Brand footer on both sites, above the EU strip */
.mardani-footer {
	background: var(--mardani-navy);
	color: #cbd5e1;
	border-top: 4px solid var(--mardani-gold);
	font-size: 0.875rem;
}

.mardani-footer__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 2.5rem;
	max-width: var(--global-content-width, 1290px);
	margin: 0 auto;
	padding: 3.5rem 1rem 2rem;
}

.mardani-footer h2 {
	margin: 0 0 1rem;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.mardani-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mardani-footer li {
	margin-bottom: 0.6rem;
}

.mardani-footer a {
	color: #cbd5e1;
	text-decoration: none;
}

.mardani-footer a:hover,
.mardani-footer a:focus-visible {
	color: var(--mardani-gold);
}

.mardani-footer__brand {
	display: flex;
	gap: 0.6rem;
	align-items: center;
	margin-bottom: 1rem;
	color: #fff;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: 0.02em;
}

.mardani-footer__brand img {
	width: 2.75rem;
	height: 2.75rem;
	padding: 0.2rem;
	border-radius: 50%;
	background: #fff;
}

.mardani-footer__contact li {
	display: flex;
	gap: 0.6rem;
}

.mardani-footer__contact svg {
	width: 1em;
	height: 1em;
	margin-top: 0.2em;
	flex: none;
	fill: var(--mardani-gold);
}

.mardani-footer__todo {
	color: #94a3b8;
	font-style: italic;
}

.mardani-footer__social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 50%;
	background: #1e293b;
	color: var(--mardani-gold);
	font-weight: 800;
}

.mardani-footer__social a:hover {
	background: var(--mardani-gold);
	color: var(--mardani-navy);
}

.mardani-footer__bottom {
	max-width: var(--global-content-width, 1290px);
	margin: 0 auto;
	padding: 1.25rem 1rem;
	border-top: 1px solid #1e293b;
	color: #94a3b8;
	font-size: 0.75rem;
}

/* Header "Cumpără online" button (Kadence header button) */
.site-header .header-button {
	border-radius: 999px !important;
	font-weight: 800 !important;
	letter-spacing: 0.02em;
}

/* Missing company data in legal drafts: [mardani_company] shortcode */
.mardani-todo {
	padding: 0 0.25rem;
	background: #fff4d6;
	color: #7a5200;
}
