/*
Theme Name: Giya Health
Theme URI: https://www.giyahealth.com
Author: Giya Health
Author URI: https://www.giyahealth.com
Description: Block theme for Giya Health, a women's health expert network. Includes the home, for-clients, for-experts and privacy pages, and the "Find an expert" and "Join as an expert" forms.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.3.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: giya-health
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
:where(a) { text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
:where(a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible) {
	outline: 2px solid var(--wp--preset--color--brand);
	outline-offset: 2px;
}
.has-midnight-background-color :where(a:focus-visible) { outline-color: var(--wp--preset--color--accent); }

/* ---------- Header ---------- */
.giya-header { border-bottom: 1px solid var(--wp--preset--color--line); }
.giya-header .giya-logo img { height: 68px; width: auto; display: block; }
.giya-header .wp-block-navigation a { text-decoration: none; }
.giya-header .wp-block-navigation a:hover { color: var(--wp--preset--color--brand); }
.giya-header .wp-block-navigation-item.current-menu-item > a { color: var(--wp--preset--color--brand); }
@media (max-width: 600px) { .giya-header .giya-logo img { height: 50px; } }

/* ---------- Hero ---------- */
.giya-hero { position: relative; overflow: hidden; }
.giya-hero > * { position: relative; z-index: 1; }

.giya-eyebrow { letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; }
.giya-hero .wp-block-button.is-style-outline > .wp-block-button__link { color: #fff; border-color: rgba(255,255,255,.6); }
.giya-hero .wp-block-button.is-style-outline > .wp-block-button__link:hover { background: #fff; color: var(--wp--preset--color--ink); }
.wp-block-details { border-bottom: 1px solid var(--wp--preset--color--line); padding: 18px 0; }
.wp-block-details summary { cursor: pointer; font-weight: 600; font-size: 17px; }
.wp-block-details > p { margin-top: 10px; color: var(--wp--preset--color--ink-muted); }

/* ---------- Cards ---------- */
.giya-card { height: 100%; }
.giya-card h3 { margin-top: 0; }
.giya-step-number {
	display: inline-flex; align-items: center; justify-content: center;
	width: 36px; height: 36px; border-radius: 999px;
	background: var(--wp--preset--color--mist); color: var(--wp--preset--color--ink);
	font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 15px;
}
.giya-tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.giya-tags li {
	background: var(--wp--preset--color--surface-raised); border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px; padding: 8px 14px; font-size: 14px; line-height: 20px;
}
.giya-checklist { list-style: none; padding-left: 0; }
.giya-checklist li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.giya-checklist li::before {
	content: ""; position: absolute; left: 4px; top: 8px; width: 9px; height: 9px; border-radius: 999px;
	background: var(--wp--preset--color--accent);
}
.has-midnight-background-color .giya-checklist li::before { background: var(--wp--preset--color--accent); }

/* ---------- Price table ---------- */
.giya-prices table { border-collapse: collapse; width: 100%; }
.giya-prices th, .giya-prices td { border: 0; border-bottom: 1px solid var(--wp--preset--color--line); padding: 14px 12px 14px 0; text-align: left; vertical-align: top; }
.giya-prices thead th { font-size: 13px; line-height: 16px; font-weight: 600; color: var(--wp--preset--color--ink-muted); border-bottom-width: 1px; }
.giya-prices td:last-child, .giya-prices th:last-child { text-align: right; white-space: nowrap; padding-right: 0; }
.giya-prices.wp-block-table thead { border-bottom: 0; }
.giya-prices figcaption { text-align: left; }

/* ---------- Forms ---------- */
.giya-form { display: grid; gap: 18px; }
.giya-form .giya-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 700px) { .giya-form .giya-row { grid-template-columns: 1fr; } }
.giya-form label, .giya-form legend { display: block; font-size: 13px; line-height: 16px; font-weight: 600; margin-bottom: 6px; color: var(--wp--preset--color--ink); }
.giya-form .giya-optional { font-weight: 400; color: var(--wp--preset--color--ink-muted); }
.giya-form input[type="text"], .giya-form input[type="email"], .giya-form input[type="url"], .giya-form select, .giya-form textarea {
	width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; line-height: 24px;
	color: var(--wp--preset--color--ink); background: var(--wp--preset--color--surface-raised);
	border: 1px solid var(--wp--preset--color--slate); border-radius: 4px; padding: 10px 12px;
}
.giya-form textarea { min-height: 140px; resize: vertical; }
.giya-form input:focus, .giya-form select:focus, .giya-form textarea:focus { border-color: var(--wp--preset--color--brand); outline: 2px solid var(--wp--preset--color--brand); outline-offset: 0; }
.giya-form fieldset { border: 0; padding: 0; margin: 0; }
.giya-form .giya-choices { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.giya-form .giya-choices label, .giya-form .giya-consent label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; font-size: 15px; line-height: 22px; margin: 0; }
.giya-form input[type="checkbox"], .giya-form input[type="radio"] { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--wp--preset--color--brand); flex: none; }
.giya-form .giya-hint { font-size: 13px; line-height: 18px; color: var(--wp--preset--color--ink-muted); margin: 6px 0 0; }
.giya-form button {
	justify-self: start; cursor: pointer; border: 0; border-radius: 8px; padding: 12px 22px;
	background: var(--wp--preset--color--brand); color: var(--wp--preset--color--on-brand);
	font-family: var(--wp--preset--font-family--sans); font-size: 16px; font-weight: 600; line-height: 24px;
}
.giya-form button:hover { background: var(--wp--preset--color--ink); }
.giya-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.giya-notice { border-radius: 8px; padding: 16px 18px; margin-bottom: 20px; font-size: 15px; line-height: 22px; }
.giya-notice--ok { background: var(--wp--preset--color--mist); color: var(--wp--preset--color--ink); }
.giya-notice--error { background: #FBE9E7; color: #7A1E12; border: 1px solid #E9B8AF; }
.giya-notice strong { display: block; margin-bottom: 2px; }

/* ---------- Footer ---------- */
.giya-footer a { color: inherit; text-decoration: none; }
.giya-footer a:hover { text-decoration: underline; }
.giya-footer .giya-logo img { height: 34px; width: auto; display: block; }
.giya-footer ul { list-style: none; padding: 0; margin: 0; }
.giya-footer li { margin-bottom: 8px; }
@media (max-width: 600px) { .giya-header .giya-header-cta { display: none; } }

/* ---------- Blog ---------- */
.giya-eyebrow a { text-decoration: none; }
.wp-block-post-title a { text-decoration: none; color: inherit; }
.wp-block-post-title a:hover { color: var(--wp--preset--color--brand); }
.giya-article h2 { margin-top: 2em; font-size: var(--wp--preset--font-size--heading-2); line-height: 1.33; }
.giya-article > p, .giya-article li { font-size: 17px; line-height: 1.65; }
.giya-article li { margin-bottom: 6px; }
.giya-article .giya-card h3 { margin-top: 0; }
.wp-block-post-navigation-link { font-size: 15px; }

/* ---------- Alignment: cards in a row match, buttons sit on one line ---------- */
.giya-card { display: flex; flex-direction: column; box-sizing: border-box; }
.giya-card > .wp-block-buttons:last-child { margin-top: auto; padding-top: 12px; }
.wp-block-post-template.is-layout-grid > li { display: flex; }
.wp-block-post-template.is-layout-grid > li > .giya-card { width: 100%; }
.wp-block-columns.are-vertically-aligned-bottom > .wp-block-column > :last-child { margin-bottom: 0; }
h2, h3 { text-wrap: balance; }
p, li { text-wrap: pretty; }
/* Blog list: one article per row, title left and summary right, so rows always line up */
.giya-blog-grid .wp-block-post-template { display: grid; gap: 16px; list-style: none; padding: 0; margin: 0; }
@media (min-width: 900px) {
	.giya-blog-grid .giya-card { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); column-gap: var(--wp--preset--spacing--60); align-items: center; }
	.giya-blog-grid .giya-card > * { margin: 0 !important; grid-column: 1; }
	.giya-blog-grid .giya-card > .wp-block-post-terms { align-self: end; }
	.giya-blog-grid .giya-card > .wp-block-post-title { align-self: start; margin-top: 8px !important; }
	.giya-blog-grid .giya-card > .wp-block-post-excerpt { grid-column: 2; grid-row: 1 / span 2; }
}
.giya-blog-grid .wp-block-post-excerpt__excerpt { margin: 0; }


/* =========================================================
   Editorial layouts (v1.2): fewer boxes, more typography
   ========================================================= */

/* Sections on the same background are separated by a hairline, not a colour change */
.giya-section + .giya-section:not(.has-background):not(.giya-hero) { border-top: 1px solid var(--wp--preset--color--line); }
.wp-block-column > h2.wp-block-heading { max-width: 18ch; }
.giya-section h2.wp-block-heading { font-size: clamp(28px, 3.2vw, 38px); line-height: 1.15; }

/* Hero */
.giya-hero h1 { letter-spacing: -0.02em; }
.giya-hero .wp-block-buttons { margin-top: 28px; gap: 24px; align-items: center; }

/* Text-link "button" */
.wp-block-button.giya-textlink > .wp-block-button__link {
	background: none !important; padding: 0 !important; color: inherit; border-radius: 0;
	text-decoration: underline; text-underline-offset: 0.25em; text-decoration-thickness: 1px; font-weight: 500;
}
.wp-block-button.giya-textlink > .wp-block-button__link:hover { color: var(--wp--preset--color--brand); background: none; }
.has-midnight-background-color .wp-block-button.giya-textlink > .wp-block-button__link { color: #fff; }
.has-midnight-background-color .wp-block-button.giya-textlink > .wp-block-button__link:hover { color: var(--wp--preset--color--accent); }

/* Example request (home hero) */
.giya-example { border-left: 2px solid var(--wp--preset--color--accent); padding: 4px 0 4px 28px; }
.giya-example > * { margin: 0 !important; }
.giya-example-label { color: var(--wp--preset--color--on-midnight-muted); font-weight: 500; }
.giya-example-quote { font-family: var(--wp--preset--font-family--display); font-size: 22px; line-height: 1.4; color: #fff; margin-top: 14px !important; }
.giya-example-meta { color: var(--wp--preset--color--on-midnight-muted); margin-top: 12px !important; }
.giya-example-match { color: #DDE8EB; margin-top: 22px !important; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.giya-example-match strong { color: #fff; font-weight: 600; }

/* Ruled rows: label left, text right */
.giya-rows { border-top: 1px solid var(--wp--preset--color--ink); }
.giya-rows > .giya-row { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 48px; align-items: baseline;
	padding: 22px 0; border-bottom: 1px solid var(--wp--preset--color--line); margin: 0 !important; }
.giya-rows > .giya-row > * { margin: 0 !important; }
.giya-rows > .giya-row h3 { font-size: 20px; line-height: 1.3; }
.giya-rows > .giya-row p { font-size: 18px; line-height: 1.5; color: var(--wp--preset--color--ink); }
@media (max-width: 700px) { .giya-rows > .giya-row { grid-template-columns: 1fr; row-gap: 6px; } }

/* Plain text columns with a rule on top */
.giya-cols { display: grid; gap: 40px 48px; }
.giya-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.giya-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.giya-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .giya-cols-3, .giya-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .giya-cols-2, .giya-cols-3, .giya-cols-4 { grid-template-columns: 1fr; } }
.giya-col { border-top: 1px solid var(--wp--preset--color--ink); padding-top: 18px; margin: 0 !important; }
.giya-col > * + * { margin-top: 10px !important; }
.giya-col h3 { font-size: 20px; line-height: 1.3; margin-top: 0; }
.giya-col p { font-size: 15px; line-height: 1.6; }

/* Timeline labels */
.giya-when { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 15px;
	color: var(--wp--preset--color--brand); margin: 0 0 6px !important; }
.giya-timeline .giya-col { border-top-color: var(--wp--preset--color--accent); border-top-width: 2px; }

/* Lists */
.giya-plainlist { list-style: none; padding: 0; margin: 0; }
.giya-plainlist li { padding: 7px 0; border-bottom: 1px solid var(--wp--preset--color--line); font-size: 15px; }
.giya-plainlist li:last-child { border-bottom: 0; }
.giya-plainlist-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; border-top: 1px solid var(--wp--preset--color--ink); }
.giya-plainlist-2 li { display: flex; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--wp--preset--color--line); }
.giya-plainlist-2 li:last-child { border-bottom: 1px solid var(--wp--preset--color--line); }
@media (max-width: 600px) { .giya-plainlist-2 { grid-template-columns: 1fr; } }
.giya-numbered { counter-reset: n; list-style: none; padding: 0; }
.giya-numbered li { counter-increment: n; position: relative; padding-left: 32px; margin-bottom: 12px; }
.giya-numbered li::before { content: counter(n); position: absolute; left: 0; top: 0;
	font-family: var(--wp--preset--font-family--display); font-weight: 700; color: var(--wp--preset--color--brand); }

/* Form box: crisp, small radius */
.giya-formbox { background: var(--wp--preset--color--surface-raised); border: 1px solid var(--wp--preset--color--line);
	border-radius: 6px; padding: clamp(20px, 3vw, 36px); }
.has-surface-raised-background-color .giya-formbox { background: var(--wp--preset--color--surface); }

/* Closing line */
.giya-closing h2.wp-block-heading { max-width: 22ch; }
.giya-closing .wp-block-buttons { margin-bottom: 12px; }

/* Crisper corners everywhere */
.wp-element-button, .wp-block-button__link { border-radius: 6px; }
.giya-card { border-radius: 6px !important; }

/* Blog list as ruled rows, not boxes */
.giya-blog-grid .wp-block-post-template { gap: 0 !important; border-top: 1px solid var(--wp--preset--color--ink); }
.giya-blog-grid .giya-card { background: none !important; border: 0 !important; border-bottom: 1px solid var(--wp--preset--color--line) !important;
	border-radius: 0 !important; padding: 26px 0 !important; }
.giya-blog-grid .wp-block-post-title { font-size: 22px !important; line-height: 1.3; }
.giya-blog-grid .wp-block-post-excerpt { font-size: 15px; }

/* Services table: two text columns, left-aligned */
.giya-prices td:last-child, .giya-prices th:last-child { text-align: left; white-space: normal; }
.giya-prices td:first-child, .giya-prices th:first-child { width: 30%; }

/* =========================================================
   Articles (v1.3)
   ========================================================= */
.giya-article { font-size: 17px; }
.giya-article > h2.wp-block-heading { max-width: none; margin-top: 2.2em; }
.giya-article > h3.wp-block-heading { margin-top: 1.6em; }

/* "In short" summary */
.giya-summary { background: var(--wp--preset--color--surface-raised); border-left: 3px solid var(--wp--preset--color--accent);
	padding: 22px 26px; margin: 28px 0 8px !important; border-radius: 0 6px 6px 0; }
.giya-summary > * { margin: 0 !important; }
.giya-summary > * + * { margin-top: 10px !important; }
.giya-summary-label { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 14px; color: var(--wp--preset--color--brand); }
.giya-summary p, .giya-summary li { font-size: 16px; line-height: 1.6; }
.giya-summary ul { padding-left: 20px; }

/* Tables (articles and pages) */
.giya-article .wp-block-table, .giya-datatable { margin: 28px 0; overflow-x: auto; }
.giya-article .wp-block-table table, .giya-datatable table { border-collapse: collapse; width: 100%; font-size: 15px; line-height: 1.5; }
.giya-article .wp-block-table thead, .giya-datatable thead { border-bottom: 0; }
.giya-article .wp-block-table th, .giya-datatable th {
	background: var(--wp--preset--color--midnight); color: #fff; text-align: left; font-weight: 600;
	padding: 12px 14px; border: 0; font-size: 14px; }
.giya-article .wp-block-table td, .giya-datatable td { padding: 12px 14px; border: 0; border-bottom: 1px solid var(--wp--preset--color--line); vertical-align: top; }
.giya-article .wp-block-table tbody tr:nth-child(even) td, .giya-datatable tbody tr:nth-child(even) td { background: rgba(198, 233, 227, 0.28); }
.giya-article .wp-block-table td:first-child, .giya-datatable td:first-child { font-weight: 600; }
.giya-article .wp-block-table figcaption, .giya-datatable figcaption { font-size: 13px; color: var(--wp--preset--color--ink-muted); margin-top: 8px; }

/* FAQ inside articles */
.giya-article .wp-block-details { padding: 16px 0; }

/* Reading time */
.giya-readtime { color: var(--wp--preset--color--ink-muted); }
.giya-datatable td:first-child, .giya-datatable th:first-child, .giya-article .wp-block-table td:first-child { white-space: nowrap; }
.giya-datatable figcaption { text-align: left; }
@media (max-width: 700px) { .giya-datatable td:first-child, .giya-article .wp-block-table td:first-child { white-space: normal; } }

/* One grid: every two-column section splits 50/50, top-aligned */
.giya-section .wp-block-columns, .giya-hero .wp-block-columns { align-items: flex-start !important; }
.wp-block-column > :first-child { margin-top: 0 !important; }
.giya-section .wp-block-column > p:first-child { padding-top: 6px; }
.giya-nw { white-space: nowrap; }

/* Hero facts under the example */
.giya-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 28px !important; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.14); }
.giya-stat > * { margin: 0 !important; }
.giya-stat-num { font-family: var(--wp--preset--font-family--display); font-weight: 700; font-size: 30px; line-height: 1.1; color: #fff; white-space: nowrap; }
.giya-stat-label { font-size: 14px; color: var(--wp--preset--color--on-midnight-muted); margin-top: 6px !important; }
.giya-stats > * { margin: 0 !important; }
