/*
 * Najam Stanova Zagreb Companion — front-end styles.
 * Inherits the active theme's preset custom properties where possible,
 * with sensible fallbacks so it looks right under any theme.
 */

/* ---- Grid ---- */
.nszc-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: var(--wp--preset--spacing--40, 1.75rem);
}

.nszc-grid__card {
	background: var(--wp--preset--color--surface, #ffffff);
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 12px;
	padding: var(--wp--preset--spacing--40, 1.75rem);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.02), 0 10px 15px -3px rgba(15, 23, 42, 0.04);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.nszc-grid__card:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 20px -2px rgba(15, 23, 42, 0.08);
}

.nszc-grid__title {
	margin: 0;
	font-size: var(--wp--preset--font-size--large, 1.35rem);
	font-family: var(--nsz--font-family--heading, sans-serif);
	font-weight: 700;
	color: var(--wp--preset--color--secondary, #0f172a);
}

.nszc-grid__title a {
	text-decoration: none;
	color: inherit;
}

.nszc-grid__excerpt {
	margin: 0;
	flex: 1 1 auto;
	color: #64748b;
	font-size: 1rem;
	line-height: 1.6;
}

.nszc-grid__link {
	margin-top: auto;
	font-weight: 600;
	color: var(--wp--preset--color--primary, #2563eb);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	transition: gap 0.2s ease;
}

.nszc-grid__link::after {
	content: "→";
}

.nszc-grid__link:hover {
	color: var(--wp--preset--color--secondary, #0f172a);
	gap: 0.5rem;
}

/* ---- Compact list ---- */
.nszc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.5rem;
}

/* ---- FAQ accordion ---- */
.nszc-faq {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin: 2rem 0;
}

.nszc-faq__item {
	background: var(--wp--preset--color--surface, #ffffff);
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 10px;
	padding: 1.25rem 1.5rem;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.01);
	transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.nszc-faq__item:hover,
.nszc-faq__item[open] {
	border-color: var(--wp--preset--color--primary, #2563eb);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.nszc-faq__q {
	cursor: pointer;
	font-weight: 700;
	font-size: 1.125rem;
	color: var(--wp--preset--color--secondary, #0f172a);
	font-family: var(--nsz--font-family--heading, sans-serif);
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	user-select: none;
	outline: none;
}

.nszc-faq__q::-webkit-details-marker {
	display: none;
}

.nszc-faq__q::after {
	content: "+";
	font-size: 1.5rem;
	font-weight: 400;
	color: var(--wp--preset--color--primary, #2563eb);
	transition: transform 0.25s ease;
}

.nszc-faq__item[open] .nszc-faq__q::after {
	content: "–";
}

.nszc-faq__a {
	padding-top: 0.85rem;
	color: #475569;
	font-size: 1.05rem;
	line-height: 1.6;
	border-top: 1px solid var(--wp--preset--color--border, #e2e8f0);
	margin-top: 0.85rem;
}

/* ---- Hero ---- */
.nszc-hero {
	padding: var(--wp--preset--spacing--70, 6rem) var(--wp--preset--spacing--40, 1.5rem);
	text-align: center;
	background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%);
	color: #ffffff;
	border-radius: 0 0 24px 24px;
	box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.3);
	margin-bottom: var(--wp--preset--spacing--50, 2.5rem);
}

.nszc-hero--image {
	background-size: cover;
	background-position: center;
	position: relative;
	z-index: 0;
}

.nszc-hero--image::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.6) 100%);
	z-index: -1;
	border-radius: 0 0 24px 24px;
}

.nszc-hero__inner {
	max-width: 800px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--40, 1.5rem);
	align-items: center;
}

.nszc-hero__headline {
	margin: 0;
	font-size: var(--wp--preset--font-size--xx-large, 3rem);
	font-family: var(--nsz--font-family--heading, sans-serif);
	font-weight: 800;
	letter-spacing: -0.03em;
	line-height: 1.2;
	color: #ffffff !important;
}

.nszc-hero__sub {
	margin: 0;
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	color: #cbd5e1 !important;
	line-height: 1.6;
	max-width: 680px;
}

.nszc-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.85rem 1.75rem;
	border-radius: 8px;
	background: var(--wp--preset--color--accent, #f59e0b);
	color: #ffffff !important;
	text-decoration: none !important;
	font-weight: 700;
	font-family: var(--nsz--font-family--heading, sans-serif);
	box-shadow: 0 4px 14px 0 rgba(245, 158, 11, 0.3);
	transition: background-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
	min-height: 46px;
}

.nszc-button:hover,
.nszc-button:focus {
	background: #d97706; /* Darker amber */
	transform: translateY(-1px);
	box-shadow: 0 6px 20px 0 rgba(245, 158, 11, 0.4);
}

/* ---- Trust strip ---- */
.nszc-trust {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem 2rem;
	justify-content: center;
	padding: 1.25rem 2rem;
	background: linear-gradient(90deg, rgba(37,99,235,0.03) 0%, rgba(37,99,235,0.06) 100%);
	border: 1px dashed var(--wp--preset--color--border, #e2e8f0);
	border-radius: 12px;
	margin: 2.5rem 0;
}

.nszc-trust__item {
	font-weight: 600;
	font-size: 0.95rem;
	color: var(--wp--preset--color--secondary, #0f172a);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.nszc-trust__item::before {
	content: "✓";
	color: var(--wp--preset--color--primary, #2563eb);
	font-weight: 800;
	font-size: 1.1rem;
}

/* ---- Author E-E-A-T ribbon ---- */
.nszc-author-ribbon {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0.5rem 0.75rem;
	margin: 0 0 1.5rem;
	padding: 0.5rem 1.25rem;
	border-radius: 9999px;
	background: rgba(37, 99, 235, 0.04);
	border: 1px solid rgba(37, 99, 235, 0.08);
	font-size: var(--wp--preset--font-size--small, 0.9rem);
	font-weight: 500;
	color: #475569;
}

.nszc-author-ribbon::before {
	content: "🛡️";
	font-size: 1rem;
}

.nszc-author-ribbon__quals {
	font-weight: 700;
	color: var(--wp--preset--color--primary, #2563eb);
}

.nszc-author-ribbon__by {
	color: var(--wp--preset--color--secondary, #0f172a);
	font-weight: 600;
}

/* ------------------------------------------------------------------ *
 * Premium Scraped Apartments Grid Layout
 * ------------------------------------------------------------------ */
.nszc-apt-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
	gap: 2rem;
	margin: 2.5rem 0;
}

.nszc-apt-card {
	background: var(--wp--preset--color--surface, #ffffff);
	border: 1px solid var(--wp--preset--color--border, #e2e8f0);
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.05), 0 8px 10px -6px rgba(15, 23, 42, 0.03);
	display: flex;
	flex-direction: column;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nszc-apt-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.1), 0 10px 10px -5px rgba(15, 23, 42, 0.04);
}

.nszc-apt-card__image-container {
	position: relative;
	width: 100%;
	padding-top: 66.666%; /* 3:2 Aspect Ratio */
	overflow: hidden;
	background-color: #0b1528;
}

.nszc-apt-card__image {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.5s ease;
}

.nszc-apt-card:hover .nszc-apt-card__image {
	transform: scale(1.05);
}

/* Floating Price Tag (Orange mockup style) */
.nszc-apt-card__price {
	position: absolute;
	top: 1rem;
	left: 1rem;
	background: #d97706; /* Orange/mustard */
	color: #ffffff;
	padding: 0.4rem 0.85rem;
	border-radius: 8px;
	font-weight: 800;
	font-size: 0.9rem;
	box-shadow: 0 4px 10px rgba(217, 119, 6, 0.25);
	z-index: 10;
}

.nszc-apt-card__body {
	padding: 1.5rem;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	gap: 0.85rem;
}

.nszc-apt-card__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--wp--preset--color--secondary, #0f172a);
	font-family: var(--nsz--font-family--heading, sans-serif);
	line-height: 1.35;
	letter-spacing: -0.01em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.nszc-apt-card__specs {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

/* Light Blue spec pills */
.nszc-apt-card__spec {
	font-size: 0.85rem;
	font-weight: 600;
	color: #1e40af; /* Blue text */
	background: #dbeafe; /* Light blue background */
	padding: 0.3rem 0.75rem;
	border-radius: 9999px; /* Rounded pill shape */
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
}

.nszc-apt-card__spec svg {
	width: 14px;
	height: 14px;
	color: #1e40af;
}

/* Meta Row (Location + Source) */
.nszc-apt-card__meta-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
	margin-top: 0.25rem;
}

.nszc-apt-card__location {
	margin: 0;
	font-size: 0.9rem;
	color: #64748b;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 0.25rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.nszc-apt-card__location svg {
	width: 14px;
	height: 14px;
	color: #64748b;
	flex-shrink: 0;
}

/* Source badge (Njuškalo brand colors) */
.nszc-source-badge {
	font-size: 0.75rem;
	font-weight: 700;
	padding: 0.2rem 0.65rem;
	border-radius: 9999px;
	display: inline-flex;
	align-items: center;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.nszc-source-badge.njuškalo,
.nszc-source-badge.njuskalo {
	background: #ff6b00; /* Njuškalo orange */
	color: #ffffff;
}

.nszc-source-badge.index-oglasi {
	background: #3b82f6; /* Index blue */
	color: #ffffff;
}

.nszc-source-badge.facebook {
	background: #1877f2;
	color: #ffffff;
}

/* Full-width dark details button */
.nszc-apt-card__button {
	margin-top: 0.5rem;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.75rem 1.25rem;
	border-radius: 8px;
	background: #0b1528; /* Dark Blue */
	color: #ffffff !important;
	text-decoration: none !important;
	font-weight: 700;
	font-size: 0.95rem;
	font-family: var(--nsz--font-family--heading, sans-serif);
	transition: background-color 0.2s ease, transform 0.2s ease;
	text-align: center;
	min-height: 44px;
	width: 100%;
	border: none;
	box-shadow: 0 2px 4px rgba(11, 21, 40, 0.1);
}

.nszc-apt-card__button:hover {
	background: #1e293b;
	transform: translateY(-1px);
}

.nszc-apt-empty {
	text-align: center;
	color: #64748b;
	font-style: italic;
	padding: 2rem;
	border: 1px dashed var(--wp--preset--color--border, #e2e8f0);
	border-radius: 12px;
}
