/*
 * CroatiaRentalCars premium refinement layer (v1.2).
 *
 * Rewritten after live testing: v1.1 overrode the theme's own colours, tab styles, header and
 * hover effects with !important, which broke hover states (tab hover colours, card lifts, the
 * city-card location list) and the header "24/7 Support" button.
 *
 * Rules for this file:
 *  - never change the header, hero, booking form, footer colours or the floating button;
 *  - never set background/colour on interactive states the theme already styles;
 *  - never use overflow:hidden on cards (it clips the hover lists and tooltips);
 *  - hover: only ADD a shadow where the theme has none; keep the theme's own transforms;
 *  - no !important.
 * Everything is scoped to body.crc-premium (Appearance > Travel Tools & Trust > Premium design layer).
 */

body.crc-premium {
	--crc-navy: #0B1B3F;
	--crc-blue: #1D4ED8;
	--crc-orange: #F97316;
	--crc-line: #E6EAF2;
	--crc-radius: 16px;
	--crc-shadow: 0 1px 2px rgba(11, 27, 63, .04), 0 6px 20px rgba(11, 27, 63, .06);
	--crc-shadow-hover: 0 2px 6px rgba(11, 27, 63, .06), 0 16px 36px rgba(11, 27, 63, .12);
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

/* ---------- Typography polish ---------- */
body.crc-premium h1, body.crc-premium h2, body.crc-premium h3 { text-wrap: balance; }
body.crc-premium .wp-block-post-content h2.wp-block-heading { letter-spacing: -.015em; }
body.crc-premium .wp-block-post-content p { text-wrap: pretty; }
body.crc-premium .wp-block-table table,
body.crc-premium .car-rental-table table { font-variant-numeric: tabular-nums; }

/* ---------- Cards: soft depth + rounded corners (no background or overflow changes) ---------- */
body.crc-premium .success-counters .is-layout-grid > .wp-block-group,
body.crc-premium .one-way-rental .is-layout-grid > .wp-block-group,
body.crc-premium .journey-sec .journey-car-deals .wp-block-column,
body.crc-premium .why-book-grid > .wp-block-group,
body.crc-premium .booking-advice-grid > .wp-block-group,
body.crc-premium .checklist-grid > .wp-block-group,
body.crc-premium .companies-grid > .wp-block-group,
body.crc-premium .route-breakdown .is-layout-grid > .wp-block-group,
body.crc-premium .pre-departure-checklist .is-layout-grid > .wp-block-group,
body.crc-premium .deal-box,
body.crc-premium .key-policy {
	border-radius: var(--crc-radius);
	box-shadow: var(--crc-shadow);
	transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease;
}

/* Hover: the theme already lifts these; we only deepen the shadow so the lift reads clearly. */
body.crc-premium .success-counters .is-layout-grid > .wp-block-group:hover,
body.crc-premium .one-way-rental .is-layout-grid > .wp-block-group:hover,
body.crc-premium .journey-sec .journey-car-deals .wp-block-column:hover { box-shadow: var(--crc-shadow-hover); }

/* Cards with no hover in the theme get a gentle lift. */
body.crc-premium .why-book-grid > .wp-block-group:hover,
body.crc-premium .booking-advice-grid > .wp-block-group:hover,
body.crc-premium .companies-grid > .wp-block-group:hover {
	box-shadow: var(--crc-shadow-hover);
	transform: translateY(-2px);
}

/* City / destination cards: image zooms inside its own frame; card keeps the theme hover. */
body.crc-premium .location-cover-sec.wp-block-cover { border-radius: var(--crc-radius); }
body.crc-premium .location-cover-sec .wp-block-cover__image-background { transition: transform .5s ease; }
body.crc-premium .location-cover-sec:hover .wp-block-cover__image-background { transform: scale(1.05); }

/* Car category cards (Swiper) */
body.crc-premium .swiper-slide .wp-block-group.has-background,
body.crc-premium .car-types .swiper-slide > .wp-block-group { border-radius: var(--crc-radius); }

/* ---------- Buttons: smoother feedback, same colours and sizes ---------- */
body.crc-premium .wp-block-button__link,
body.crc-premium .wp-element-button { transition: box-shadow .15s ease, transform .15s ease, filter .15s ease; }
body.crc-premium .wp-block-post-content .wp-block-button__link:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(11, 27, 63, .16); }
body.crc-premium .wp-block-post-content .wp-block-button__link:active { transform: none; box-shadow: none; }

/* ---------- FAQ: clearer separation between questions ---------- */
body.crc-premium .faq-item {
	background: #fff;
	border: 1px solid var(--crc-line);
	border-radius: 14px;
	margin-bottom: 10px;
	padding-left: 18px;
	padding-right: 18px;
	transition: box-shadow .2s ease, border-color .2s ease;
}
body.crc-premium .faq-item:hover { border-color: #CBD5E6; }
body.crc-premium .faq-item.open,
body.crc-premium .faq-item.active { box-shadow: var(--crc-shadow); border-color: #C7D5FB; }

/* ---------- Tables: rounded frame, calmer header ---------- */
body.crc-premium .wp-block-post-content .wp-block-table {
	border-radius: var(--crc-radius);
	box-shadow: var(--crc-shadow);
	overflow-x: auto;
}
body.crc-premium .wp-block-post-content .wp-block-table thead th {
	font-size: 13px;
	letter-spacing: .03em;
}
body.crc-premium .wp-block-post-content .wp-block-table tbody tr { transition: background-color .15s ease; }
body.crc-premium .wp-block-post-content .wp-block-table tbody tr:hover { background: #F7F9FD; }

/* ---------- Reviews ---------- */
body.crc-premium .home-reviews-sec .reviews-list li.items,
body.crc-premium .suppliers-reviews-sec .reviews-list li.items {
	border-radius: var(--crc-radius);
	box-shadow: var(--crc-shadow);
}

/* ---------- Keyboard focus (visible, on-brand) ---------- */
body.crc-premium a:focus-visible,
body.crc-premium button:focus-visible,
body.crc-premium [role="tab"]:focus-visible,
body.crc-premium .tab-btn:focus-visible {
	outline: 3px solid var(--crc-orange);
	outline-offset: 2px;
	border-radius: 6px;
}

/* ---------- Travel tools placed automatically in pages ---------- */
body.crc-premium .crc-auto-tool,
.crc-auto-tool { padding: 56px 20px; }
.crc-auto-tool > .crc-tool { max-width: 1200px; margin-left: auto; margin-right: auto; }

@media (prefers-reduced-motion: reduce) {
	body.crc-premium * { transition: none; }
	body.crc-premium .location-cover-sec:hover .wp-block-cover__image-background,
	body.crc-premium [class*="grid"] > .wp-block-group:hover { transform: none; }
}
