/*
Theme Name: Jin-Ocean MIC
Description: Child theme of Twenty Twenty-Five for Jin-Ocean Mortgage Investment Corporation. Separate English and Chinese headers, footers and page templates; brand colours and fonts; ready-made sections for editors.
Template: twentytwentyfive
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 7.4
Text Domain: jin-ocean
License: GNU General Public License v2 or later
*/

/*
 * Most styling lives in theme.json (colours, fonts, spacing) so editors can
 * change it from Appearance → Editor → Styles. This file only holds what
 * theme.json can't express: the block styles editors pick from the sidebar.
 */

/* ---------- Header ---------- */
.jin-topbar { font-size: 0.8125rem; }
.jin-topbar a { color: inherit; text-decoration: none; }
.jin-topbar a:hover { color: #fff; text-decoration: underline; }
.jin-lang-switch a[aria-current="true"] { font-weight: 700; color: #fff; }
.jin-header .wp-block-navigation a { text-transform: uppercase; letter-spacing: 0.06em; }
.jin-header .wp-block-navigation .current-menu-item > a,
.jin-header .wp-block-navigation a:hover { color: var(--wp--preset--color--accent-1); }

/* ---------- Page title banner ---------- */
.jin-page-banner h1 { letter-spacing: 0.01em; }
.jin-page-banner .jin-banner-rule {
	width: 60px; height: 2px; margin-inline: auto;
	background: var(--wp--preset--color--accent-1); border: 0;
}

/* ---------- Block styles (editors pick these under Block → Styles) ---------- */

/* Heading: "Eyebrow" — small italic blue line above a section title */
.wp-block-heading.is-style-eyebrow {
	font-style: italic;
	color: var(--wp--preset--color--accent-1);
	font-size: var(--wp--preset--font-size--medium);
	font-weight: 400;
	margin-bottom: 0.25rem;
}

/* Heading: "Underlined" — section title with a short blue rule */
.wp-block-heading.is-style-underlined::after {
	content: ""; display: block; width: 50px; height: 2px; margin-top: 0.75rem;
	background: var(--wp--preset--color--accent-1);
}
.wp-block-heading.is-style-underlined.has-text-align-center::after { margin-inline: auto; }

/* Group: "Card" — white box with a thin border */
.wp-block-group.is-style-card {
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-6);
	padding: var(--wp--preset--spacing--40);
	height: 100%;
	transition: box-shadow .2s ease, border-color .2s ease;
}
.wp-block-group.is-style-card:hover {
	border-color: var(--wp--preset--color--accent-1);
	box-shadow: 0 8px 24px rgba(0,0,0,.06);
}

/* Group: "Numbered card" — card with a big faded number in the corner.
   Put the number in the first paragraph of the card. */
.wp-block-group.is-style-numbered-card {
	position: relative; overflow: hidden;
	background: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--accent-6);
	padding: var(--wp--preset--spacing--40);
	min-height: 110px;
	display: flex; align-items: center;
}
.wp-block-group.is-style-numbered-card > p:first-child {
	position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%);
	margin: 0; font-family: var(--wp--preset--font-family--heading);
	font-size: 5rem; line-height: 1; color: var(--wp--preset--color--accent-6);
	pointer-events: none;
}
.wp-block-group.is-style-numbered-card > :not(:first-child) { position: relative; margin: 0; }

/* List: "Checklist" — blue ticks instead of bullets */
.wp-block-list.is-style-checklist { list-style: none; padding-left: 0; }
.wp-block-list.is-style-checklist li { position: relative; padding-left: 1.75em; margin-bottom: 0.5em; }
.wp-block-list.is-style-checklist li::before {
	content: "✓"; position: absolute; left: 0; top: 0;
	color: var(--wp--preset--color--accent-1); font-weight: 700;
}

/* Details (used for the Services tabs) */
.wp-block-details {
	border: 1px solid var(--wp--preset--color--accent-6);
	padding: 0;
	margin-block-start: 0 !important;
}
.wp-block-details + .wp-block-details { border-top: 0; }
.wp-block-details > summary {
	cursor: pointer; padding: 1rem 1.25rem;
	font-family: var(--wp--preset--font-family--heading);
	font-size: var(--wp--preset--font-size--large);
	color: var(--wp--preset--color--contrast);
	list-style: none; position: relative;
}
.wp-block-details > summary::-webkit-details-marker { display: none; }
.wp-block-details > summary::after {
	content: "+"; position: absolute; right: 1.25rem; top: 50%; transform: translateY(-50%);
	color: var(--wp--preset--color--accent-1); font-size: 1.5rem; font-family: var(--wp--preset--font-family--body);
}
.wp-block-details[open] > summary { color: var(--wp--preset--color--accent-1); }
.wp-block-details[open] > summary::after { content: "−"; }
.wp-block-details > :not(summary) { padding: 0 1.25rem 1.25rem; }

/* News cards */
.jin-news-card { height: 100%; }
.jin-news-card .wp-block-post-featured-image img { aspect-ratio: 3/2; object-fit: cover; }
.jin-news-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--contrast); }
.jin-news-card .wp-block-post-title a:hover { color: var(--wp--preset--color--accent-1); }

/* Footer */
.jin-footer a { color: inherit; }
.jin-footer a:hover { color: #fff; }
.jin-footer .wp-block-navigation a { text-decoration: none; }

/* Contact Form 7 — match the theme without editors touching CSS */
.wpcf7-form p { margin: 0 0 1rem; }
.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form textarea {
	width: 100%; box-sizing: border-box; padding: 0.75rem 1rem;
	border: 1px solid #d8d8d8; border-radius: 4px; font: inherit; background: #fff;
}
.wpcf7-form input:focus, .wpcf7-form textarea:focus { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 0; border-color: transparent; }
.wpcf7-form textarea { min-height: 160px; }
.wpcf7-form .wpcf7-submit {
	background: var(--wp--preset--color--accent-1); color: #fff; border: 0; border-radius: 4px;
	padding: 0.85rem 2rem; font: inherit; font-size: 0.875rem; text-transform: uppercase; letter-spacing: .08em; cursor: pointer;
}
.wpcf7-form .wpcf7-submit:hover { background: var(--wp--preset--color--accent-2); }

/* Map embed */
.jin-map iframe { width: 100%; height: 360px; border: 0; display: block; }

@media (max-width: 781px) {
	.jin-topbar .jin-topbar-contact { display: none !important; }
	.wp-block-group.is-style-numbered-card > p:first-child { font-size: 4rem; }
}

/* ---------- Layout glue ---------- */
/* Header, main and footer sit flush against each other. */
.wp-site-blocks > * { margin-block-start: 0; }
/* Full-width sections inside page content stack without white gaps. */
.wp-block-post-content > .alignfull { margin-block-start: 0; margin-block-end: 0; }
.jin-topbar p { margin: 0; }
.jin-sep { opacity: .5; margin: 0 .5em; }
.jin-logo-box { width: fit-content; }
.jin-header .wp-block-image, .jin-header .wp-block-image img { margin: 0; display: block; }
.wp-block-table th { text-align: left; }
