/*
Theme Name: Complanet
Description: Complanet child theme for Twenty Twenty-Five.
Author: Complanet
Template: twentytwentyfive
Version: 1.1.0
Text Domain: complanet
License: GPL-2.0-or-later
*/

:root {
	--complanet-gutter: clamp(20px, 4vw, 48px);
}

html { scroll-padding-top: 24px; }
body { margin: 0; }
*, *::before, *::after { box-sizing: border-box; }
.wp-site-blocks { padding-top: 0; padding-bottom: 0; }
.wp-site-blocks > * { margin-block-start: 0; }
header.wp-block-template-part, footer.wp-block-template-part { margin: 0; }
main.complanet-home { margin-block-start: 0; }
a:focus-visible, button:focus-visible {
	outline: 3px solid #336a83;
	outline-offset: 4px;
}

.complanet-header {
	padding: 24px var(--complanet-gutter);
	border-bottom: 1px solid #e2e9ed;
}
.complanet-header-row {
	max-width: 1120px;
	margin-inline: auto;
	gap: 28px;
	padding-right: 204px;
}
.complanet-logo { margin: 0; flex-shrink: 0; }
.complanet-logo img { display: block; width: 240px; height: auto; }
.complanet-menu { margin: 0; }
.complanet-menu .wp-block-navigation__container { gap: 16px; }
.complanet-menu a { display: flex; align-items: center; min-height: 44px; font-size: 1rem; }
.complanet-menu a:hover { color: #336a83; text-decoration: underline; text-underline-offset: 5px; }

/* Keep the plugin's existing floating selector in its own header row. */
body .gtranslate_wrapper .gt_switcher_wrapper {
	position: absolute !important;
	top: 30px !important;
	right: max(var(--complanet-gutter), calc((100% - 1120px) / 2)) !important;
	bottom: auto !important;
	left: auto !important;
	z-index: 100 !important;
}
body.admin-bar .gtranslate_wrapper .gt_switcher_wrapper { top: 62px !important; }

.complanet-hero {
	min-height: 500px;
	padding: 72px var(--complanet-gutter);
	color: #fff;
	background: #336a83;
}
.complanet-hero .wp-block-cover__image-background { width: 62%; left: auto; right: 0; }
.complanet-hero .wp-block-cover__background {
	background: linear-gradient(90deg, #336a83 0%, #336a83 38%, rgb(51 106 131 / 75%) 60%, rgb(51 106 131 / 30%) 100%);
	background-color: transparent !important;
	opacity: 1 !important;
}
.complanet-hero .wp-block-cover__inner-container { max-width: 1120px; width: 100%; margin-inline: auto; }
.complanet-hero h1 {
	max-width: 560px;
	margin: 0;
	color: #fff;
	text-align: left !important;
	font-size: clamp(2.25rem, 4.5vw, 3.5rem);
	font-weight: 650;
	line-height: 1.12;
	letter-spacing: -0.035em;
}
.complanet-hero p { max-width: 510px; margin: 24px 0 32px; text-align: left !important; font-size: 1.25rem; line-height: 1.7; }
.complanet-hero .wp-block-buttons { justify-content: flex-start; }
.complanet-hero .wp-block-button__link { border-radius: 6px; font-weight: 650; }
.complanet-hero .is-style-outline .wp-block-button__link { color: #fff; border: 1px solid rgb(255 255 255 / 70%); background: transparent; }
.complanet-hero .is-style-outline .wp-block-button__link:hover { background: rgb(255 255 255 / 12%); }
.complanet-hero .wp-block-button__link:focus-visible { outline-color: #fff; }

.complanet-about {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
	gap: 64px;
	max-width: 1120px;
	width: calc(100% - 2 * var(--complanet-gutter));
	margin-inline: auto;
	padding: 72px 0 44px;
}
.complanet-about > * { margin: 0; }
.complanet-about h2 { text-align: left !important; font-size: 2.25rem; font-weight: 600; letter-spacing: -0.025em; }
.complanet-about h2::before { content: ""; display: block; width: 40px; height: 4px; margin-bottom: 20px; background: #85a6b5; }
.complanet-about p { font-size: 1.25rem; line-height: 1.75; }

.complanet-cards {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	max-width: 1120px;
	margin: 0 auto 72px !important;
	gap: 24px;
}
.complanet-card {
	min-width: 0;
	padding: 28px;
	border: 1px solid #dce6eb;
	border-radius: 12px;
	background: #f7f9fa;
}
.complanet-card:first-child { background: #336a83; border-color: #336a83; color: #fff; }
.complanet-card:first-child h3 { color: #fff !important; }
.complanet-card:first-child h3 a { color: #fff; }
.complanet-card h3 a { text-decoration: none; }
.complanet-card h3 a:hover { text-decoration: underline; text-underline-offset: 5px; }
.complanet-card h3 { margin: 0 0 18px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.complanet-card p { margin: 0; font-size: 1.1875rem; line-height: 1.75; }
.complanet-card .complanet-card-image { margin: -28px -28px 26px; }
.complanet-card-image img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 11px 11px 0 0; }

.complanet-tomware {
	display: grid;
	grid-template-columns: 210px minmax(0, 810px);
	justify-content: center;
	gap: 16px 64px;
	padding: 56px var(--complanet-gutter);
	background: #85a6b5;
	color: #20343d;
}
.complanet-tomware > * { margin: 0; }
.complanet-tomware .wp-block-image { grid-row: span 2; align-self: center; margin: 0; }
.complanet-tomware .wp-block-image img { width: 190px; height: auto; }
.complanet-tomware h2 { color: #20343d; font-size: clamp(1.5rem, 3vw, 1.875rem); font-weight: 600; text-align: left !important; letter-spacing: -0.025em; }
.complanet-tomware p { text-align: left !important; font-size: 1.125rem; line-height: 1.75; }

.complanet-footer { padding: 24px var(--complanet-gutter); background: #fff; border-top: 1px solid #dce6eb; }
.complanet-footer-row { max-width: 1120px; margin-inline: auto; gap: 16px 32px; }
.complanet-footer p { margin: 0; font-size: 0.95rem; }
.complanet-footer-links { display: flex; flex-wrap: wrap; gap: 24px; }
.complanet-footer-links a { display: inline-block; padding-block: 10px; }

.complanet-page { padding: 56px var(--complanet-gutter) 72px; min-height: 60vh; }
.complanet-page > * { max-width: 820px; margin-inline: auto; }
.complanet-page h1 { color: #336a83; padding-bottom: 24px; border-bottom: 2px solid #85a6b5; margin-top: 0; margin-bottom: 32px; }
.complanet-page .wp-block-post-content { line-height: 1.85; overflow-wrap: anywhere; }
.complanet-page table { width: 100%; border-collapse: collapse; }
.complanet-page td, .complanet-page th { padding: 10px; border: 1px solid #dce5e9; text-align: left; }

.complanet-detail { max-width: 1120px; margin-inline: auto; padding: 56px 0 72px; }
.complanet-detail h1 { color: #336a83; margin: 0 0 36px; font-weight: 600; letter-spacing: -0.03em; }
.complanet-detail-grid { gap: 48px; align-items: flex-start; }
.complanet-detail-grid .wp-block-image { margin: 0; }
.complanet-detail-grid img { display: block; width: 100%; height: auto; border-radius: 12px; }
.complanet-detail-grid p { font-size: 1.25rem; line-height: 1.8; margin: 0; }

.complanet-document { max-width: 1120px; margin-inline: auto; padding: 56px 0 80px; }
.complanet-document-title { margin-bottom: 36px; max-width: 880px; }
.complanet-document h1 { color: #336a83; margin: 0 0 20px; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.15; letter-spacing: -0.035em; }
.complanet-eyebrow { margin: 0 0 16px; color: #336a83; font-size: 1rem; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; }
.complanet-document-lead { margin: 0; color: #526570; font-size: 1.25rem; }
.complanet-privacy-draft { padding: 24px 28px; margin-bottom: 40px; border-left: 4px solid #336a83; border-radius: 0 8px 8px 0; background: #eef4f7; }
.complanet-privacy-draft p { margin: 0; line-height: 1.7; }
.complanet-document-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 64px; align-items: start; }
.complanet-document-index { position: sticky; top: 24px; padding: 24px; background: #f5f8fa; border: 1px solid #dce6eb; border-radius: 12px; }
.complanet-document-index p { margin: 0 0 16px; color: #336a83; font-weight: 650; font-size: 1rem; }
.complanet-document-index ul { padding: 0; margin: 0; list-style: none; }
.complanet-document-index li + li { margin-top: 4px; }
.complanet-document-index a { display: block; padding-block: 10px; font-size: 1rem; line-height: 1.45; text-decoration: none; }
.complanet-document-index a:hover { color: #336a83; text-decoration: underline; }
.complanet-privacy-copy { min-width: 0; overflow-wrap: anywhere; }
.complanet-privacy-section { margin: 0; padding: 0 0 36px; scroll-margin-top: 24px; }
.complanet-privacy-section + .complanet-privacy-section { border-top: 1px solid #dce6eb; padding-top: 36px; }
.complanet-privacy-section h2 { margin: 0 0 20px; color: #336a83; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.complanet-privacy-section p { margin: 0 0 20px; font-size: 1.25rem; line-height: 1.8; }
.complanet-privacy-section p:last-child { margin-bottom: 0; }

.complanet-aid-content > p:first-child { max-width: 820px; margin: 0 0 48px; line-height: 1.8; color: #526570; }
.complanet-aid-content > p:empty { display: none; }
.complanet-aid-year { margin: 48px 0 20px; color: #336a83; font-size: 1.75rem; font-weight: 600; }
.complanet-aid-table { margin: 0; border: 1px solid #dce6eb; border-radius: 12px; overflow: hidden; }
.complanet-aid-table table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.complanet-aid-table td, .complanet-aid-table th { padding: 20px 18px; border: 0; border-bottom: 1px solid #e2e9ed; text-align: left !important; vertical-align: top; font-size: 1.0625rem; line-height: 1.65; overflow-wrap: anywhere; }
.complanet-aid-table td:nth-child(1), .complanet-aid-table th:nth-child(1) { width: 8%; }
.complanet-aid-table td:nth-child(2), .complanet-aid-table th:nth-child(2) { width: 23%; }
.complanet-aid-table td:nth-child(3), .complanet-aid-table th:nth-child(3) { width: 35%; }
.complanet-aid-table td:nth-child(4), .complanet-aid-table th:nth-child(4) { width: 20%; }
.complanet-aid-table td:nth-child(5), .complanet-aid-table th:nth-child(5) { width: 14%; text-align: right !important; font-variant-numeric: tabular-nums; }
.complanet-aid-heading-row { background: #336a83; color: #fff; }
.complanet-aid-heading-row td, .complanet-aid-heading-row th { font-size: 0.9375rem; font-weight: 600; border: 0; }
.complanet-aid-table tbody tr:not(.complanet-aid-heading-row):nth-child(odd) { background: #f5f8fa; }
.complanet-aid-table tr:last-child td { border-bottom: 0; }

@media (max-width: 1216px) {
	.complanet-cards { margin-inline: var(--complanet-gutter) !important; }
	.complanet-detail { margin-inline: var(--complanet-gutter); }
	.complanet-document { margin-inline: var(--complanet-gutter); }
}
@media (max-width: 781px) {
	.complanet-header { padding-top: 18px; padding-bottom: 12px; }
	.complanet-header-row { flex-direction: column; align-items: flex-start; gap: 36px; padding-right: 0; }
	.complanet-logo { min-height: 44px; display: flex; align-items: center; }
	.complanet-logo img { width: 148px; }
	.complanet-menu { width: 100%; margin-right: 0; }
	.complanet-menu .wp-block-navigation__container { gap: 12px 24px; justify-content: flex-start; }
	body .gtranslate_wrapper .gt_switcher_wrapper { top: 22px !important; }
	body.admin-bar .gtranslate_wrapper .gt_switcher_wrapper { top: 68px !important; }
	.complanet-hero { min-height: 440px; padding-block: 56px; }
	.complanet-hero .wp-block-cover__image-background { width: 100%; }
	.complanet-hero .wp-block-cover__background { background-image: linear-gradient(rgb(51 106 131 / 86%), rgb(51 106 131 / 86%)); }
	.complanet-hero h1 { max-width: 510px; }
	.complanet-about { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-top: 44px; padding-bottom: 28px; }
	.complanet-about h2 { font-size: 1.875rem; }
	.complanet-cards { grid-template-columns: minmax(0, 1fr); gap: 20px; margin-bottom: 44px !important; }
	.complanet-card:first-child { grid-row: auto; }
	.complanet-card { padding: 24px; }
	.complanet-card .complanet-card-image { margin: -24px -24px 24px; }
	.complanet-tomware { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 40px; }
	.complanet-tomware .wp-block-image { grid-row: auto; }
	.complanet-tomware .wp-block-image img { width: 150px; }
	.complanet-footer-row { align-items: flex-start; flex-direction: column; gap: 4px; }
	.complanet-page { padding-top: 40px; padding-bottom: 48px; }
	.complanet-detail { padding-top: 40px; padding-bottom: 48px; }
	.complanet-detail-grid { gap: 28px; }
	.complanet-document { padding-top: 40px; padding-bottom: 48px; }
	.complanet-document-title { margin-bottom: 28px; }
	.complanet-privacy-draft { padding: 20px; margin-bottom: 28px; }
	.complanet-document-layout { grid-template-columns: minmax(0, 1fr); gap: 36px; }
	.complanet-document-index { position: static; }
	.complanet-privacy-section h2 { font-size: 1.5rem; }
	.complanet-aid-content > p:first-child { margin-bottom: 32px; }
	.complanet-aid-year { margin-top: 36px; }
	.complanet-aid-table { border: 0; overflow: visible; }
	.complanet-aid-table table, .complanet-aid-table tbody { display: block; }
	.complanet-aid-table tr { display: block; padding: 8px 20px; border: 1px solid #dce6eb; border-radius: 12px; background: #f5f8fa; }
	.complanet-aid-table tr + tr { margin-top: 16px; }
	.complanet-aid-table .complanet-aid-heading-row { display: none; }
	.complanet-aid-table td { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; width: 100% !important; padding: 14px 0; font-size: 1.125rem; text-align: left !important; }
	.complanet-aid-table td::before { content: attr(data-label); color: #336a83; font-weight: 600; font-size: 0.9375rem; }
	.complanet-aid-table td:nth-child(5) { text-align: left !important; }
}
