/*
Theme Name: Augenarztpraxis Graf
Theme URI: https://graf-augenarzt.ch/
Description: Schlankes Block-Theme für die Augenarztpraxis Graf. Ersetzt Hello Elementor + Elementor, gleiches Erscheinungsbild.
Version: 1.0.1
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: graf-augenarzt
*/

/* ---------------------------------------------------------------------------
 * Base (mirrors the former Hello Elementor reset so all pages look the same)
 * ------------------------------------------------------------------------- */
:root {
	--graf-text: #7a7a7a;
	--graf-title: #7e7e7e;
	--graf-accent: #617dce;
	--graf-danger: #d9534f;
	--graf-link: #cc3366;
	--graf-link-hover: #333366;
	--graf-shadow: rgba(52.73, 79.37, 147, 0.66);
	--graf-roboto: "Roboto", sans-serif;
	--graf-system: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
}

html {
	line-height: 1.15;
	-webkit-text-size-adjust: 100%;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--graf-system);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #333;
	background-color: #fff;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
	margin-top: 0.5rem;
	margin-bottom: 1rem;
	font-family: inherit;
	font-weight: 500;
	line-height: 1.2;
	color: inherit;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.5rem; }
h5 { font-size: 1.25rem; }
h6 { font-size: 1rem; }

p {
	margin-top: 0;
	margin-bottom: 0.9rem;
}

a {
	background-color: transparent;
	text-decoration: none;
	color: var(--graf-link);
}
a:hover,
a:active {
	color: var(--graf-link-hover);
}

b,
strong {
	font-weight: bolder;
}

img {
	border-style: none;
	height: auto;
	max-width: 100%;
}

figure {
	margin: 0;
}

.screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	height: 1px;
	overflow: hidden;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}
.screen-reader-text:focus {
	background-color: #eee;
	clip: auto !important;
	clip-path: none;
	color: #333;
	display: block;
	font-size: 1rem;
	height: auto;
	left: 5px;
	line-height: normal;
	padding: 15px 23px 14px;
	text-decoration: none;
	top: 5px;
	width: auto;
	z-index: 100000;
}

/* ---------------------------------------------------------------------------
 * Header (sticky, logo + site title)
 * ------------------------------------------------------------------------- */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 12001;
}

.graf-header {
	background-color: #fff;
	padding: 10px;
	box-shadow: 0 0 10px 0 var(--graf-shadow);
}

.graf-header__inner {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 0;
	max-width: 1140px;
	margin: 0 auto;
}

/* Logo takes 14.231 % of the left half (old Elementor column), 30 % on mobile. */
.graf-header .wp-block-site-logo {
	flex: 0 0 7.1155%;
	margin: 0;
	line-height: 0;
}
.graf-header .wp-block-site-logo a,
.graf-header .wp-block-site-logo img {
	display: block;
	width: 100% !important;
	height: auto !important;
}

.graf-header .wp-block-site-title {
	flex: 0 0 42.8845%;
	margin: 0;
	font-family: var(--graf-roboto);
	font-size: 19px;
	font-weight: 600;
	line-height: 1;
	color: var(--graf-title);
}
.graf-header .wp-block-site-title a,
.graf-header .wp-block-site-title a:hover {
	color: inherit;
	text-decoration: none;
}

@media (max-width: 767px) {
	.graf-header .wp-block-site-logo { flex-basis: 15%; }
	.graf-header .wp-block-site-title { flex-basis: 35%; }
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */
.graf-footer {
	max-width: 1140px;
	margin: 0 auto;
	padding: 10px;
	font-family: var(--graf-roboto);
	color: var(--graf-text);
}
.graf-footer p {
	margin-bottom: 0.9rem;
}

/* ---------------------------------------------------------------------------
 * Default page / post layout (as Hello: centred column, title on top)
 * ------------------------------------------------------------------------- */
.graf-main,
.graf-page .graf-page-header .wp-block-post-title {
	margin-left: auto;
	margin-right: auto;
	width: 100%;
}
.graf-main--full {
	max-width: none;
}
@media (max-width: 575px) {
	.graf-page,
	.graf-page .graf-page-header .wp-block-post-title {
		padding-left: 10px;
		padding-right: 10px;
	}
}
@media (min-width: 576px) {
	.graf-page,
	.graf-page .graf-page-header .wp-block-post-title { max-width: 500px; }
}
@media (min-width: 768px) {
	.graf-page,
	.graf-page .graf-page-header .wp-block-post-title { max-width: 600px; }
}
@media (min-width: 992px) {
	.graf-page,
	.graf-page .graf-page-header .wp-block-post-title { max-width: 800px; }
}
@media (min-width: 1200px) {
	.graf-page,
	.graf-page .graf-page-header .wp-block-post-title { max-width: 1140px; }
}

.graf-page .wp-block-post-title {
	font-size: 2.5rem;
	font-weight: 500;
	line-height: 1.2;
	margin-top: 0.5rem;
	margin-bottom: 1rem;
}

/* Core makes post content a flow-root; Hello let the title margin collapse into it. */
.graf-page .wp-block-post-content {
	display: block;
}
.graf-page .wp-block-post-title {
	word-break: normal;
}

.graf-page .page-content a {
	text-decoration: underline;
}

/* Lists inside regular content: browser defaults, like before. */
.graf-page .page-content ul,
.graf-page .page-content ol {
	margin-top: 0;
	margin-bottom: 0;
	padding-left: 40px;
}

/* ---------------------------------------------------------------------------
 * Single post (was the Elementor "Single Post" template)
 * ------------------------------------------------------------------------- */
.graf-single-hero {
	margin: 0;
}
.graf-single-hero img {
	display: block;
	width: 100%;
	height: 500px;
	object-fit: cover;
}
.graf-single .wp-block-post-title {
	font-family: var(--graf-roboto);
	font-weight: 600;
	line-height: 1;
	color: var(--graf-title);
	text-align: center;
	margin: 0;
	padding: 10px;
}
.graf-single .graf-section {
	color: var(--graf-text);
	font-family: var(--graf-roboto);
}

/* ---------------------------------------------------------------------------
 * Building blocks for full-width pages (start page)
 *
 * .graf-section  = former "boxed" Elementor section: 1140px, 10px padding.
 * Direct children are spaced 20px apart (Elementor widget spacing).
 * ------------------------------------------------------------------------- */
.graf-section {
	display: flex;
	flex-direction: column;
	max-width: 1140px;
	margin-left: auto;
	margin-right: auto;
	padding: 10px;
	font-family: var(--graf-roboto);
	color: var(--graf-text);
}
/* Flex column: margins add up instead of collapsing, exactly like the old widget stack. */
.graf-section > * {
	margin-top: 0;
	margin-bottom: 0;
}
.graf-section > * + * {
	margin-top: 20px;
}
.graf-section > p {
	margin-bottom: 0.9rem;
}

.graf-section h1,
.graf-section h2,
.graf-section h3 {
	font-family: var(--graf-roboto);
	font-weight: 600;
	line-height: 1;
	color: var(--graf-title);
}

.graf-hero {
	margin: 0;
	line-height: 0;
}
/* Full width, but capped on wide/short screens so it doesn't fill the whole viewport.
   Unchanged up to ~1450px wide. Crops mostly from the bottom: heads span 6.5%–58% of the
   photo height; 28vw keeps >= 62.6% of it (window ~3%–66%), so no head is ever cut. */
.graf-hero img {
	display: block;
	width: 100%;
	height: auto;
	max-height: max(min(650px, 75vh), 28vw);
	object-fit: cover;
	object-position: 50% 8%;
}

.graf-intro {
	margin-top: 40px;
	margin-bottom: 80px;
}
.graf-intro .graf-kicker {
	font-size: 19px;
	color: var(--graf-text);
	text-align: center;
}
.graf-intro .graf-title {
	font-size: 64px;
	color: var(--graf-text);
	text-align: center;
}
@media (max-width: 767px) {
	.graf-intro {
		margin-top: 0;
		margin-bottom: 20px;
	}
	.graf-intro .graf-title {
		font-size: 30px;
	}
}

/* Three call-to-action columns (button + number). */
.graf-cta {
	display: flex;
	flex-wrap: nowrap;
	gap: 0 !important;
	max-width: 1140px;
	margin: 0 auto !important;
	font-family: var(--graf-roboto);
	color: var(--graf-text);
}
.graf-cta > .wp-block-column {
	display: flex;
	flex-direction: column;
	flex: 1 1 0;
	padding: 10px;
	min-width: 0;
}
.graf-cta > .wp-block-column > * {
	margin-top: 0;
	margin-bottom: 0;
}
.graf-cta > .wp-block-column > * + * {
	margin-top: 20px;
}
.graf-cta > .wp-block-column > p {
	text-align: center;
	margin-bottom: 0.9rem;
}

@media (max-width: 767px) {
	.graf-cta {
		flex-direction: column;
	}
	.graf-cta > .wp-block-column {
		flex-basis: auto !important;
	}
	/* Elementor kept the 20px gap below the button although the number was hidden. */
	.graf-cta > .wp-block-column > .wp-block-buttons {
		margin-bottom: 20px;
	}
}

@media (max-width: 767px) {
	.graf-hide-mobile {
		display: none !important;
	}
}

/* Buttons */
.wp-block-buttons {
	gap: 10px;
}
.wp-block-buttons.is-content-justification-center {
	justify-content: center;
}
.wp-block-button .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--graf-roboto);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	color: #fff;
	background-color: var(--graf-accent);
	border: 0;
	border-radius: 3px;
	/* 40px high like the old Elementor button (16px content box). */
	padding: 12px 24px 13px;
	text-decoration: none;
	fill: #fff;
	transition: all 0.3s;
}
.wp-block-button .wp-block-button__link:hover,
.wp-block-button .wp-block-button__link:focus,
.wp-block-button .wp-block-button__link:active {
	color: #fff;
}
.wp-block-button.is-style-graf-danger .wp-block-button__link {
	background-color: var(--graf-danger);
}

.wp-block-button.is-style-graf-danger .wp-block-button__link::before,
.wp-block-button.is-style-graf-phone .wp-block-button__link::before,
.wp-block-button.is-style-graf-mail .wp-block-button__link::before {
	content: "";
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
	margin-right: 5px;
	background-color: currentColor;
	-webkit-mask: var(--graf-icon) no-repeat center / contain;
	mask: var(--graf-icon) no-repeat center / contain;
}
.wp-block-button.is-style-graf-danger .wp-block-button__link::before {
	width: 13.125px;
	--graf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 448 512'%3E%3Cpath d='M224 512c35.32 0 63.97-28.65 63.97-64H160.03c0 35.35 28.65 64 63.97 64zm215.39-149.71c-19.32-20.76-55.47-51.99-55.47-154.29 0-77.7-54.48-139.9-127.94-155.16V32c0-17.67-14.32-32-31.98-32s-31.98 14.33-31.98 32v20.84C118.56 68.1 64.08 130.3 64.08 208c0 102.3-36.15 133.53-55.47 154.29-6 6.45-8.66 14.16-8.61 21.71.11 16.4 12.98 32 32.1 32h383.8c19.12 0 32-15.6 32.1-32 .05-7.55-2.61-15.27-8.61-21.71z'/%3E%3C/svg%3E");
}
.wp-block-button.is-style-graf-phone .wp-block-button__link::before {
	--graf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M497.39 361.8l-112-48a24 24 0 0 0-28 6.9l-49.6 60.6A370.66 370.66 0 0 1 130.6 204.11l60.6-49.6a23.94 23.94 0 0 0 6.9-28l-48-112A24.16 24.16 0 0 0 122.6.61l-104 24A24 24 0 0 0 0 48c0 256.5 207.9 464 464 464a24 24 0 0 0 23.4-18.6l24-104a24.29 24.29 0 0 0-14.01-27.6z'/%3E%3C/svg%3E");
}
.wp-block-button.is-style-graf-mail .wp-block-button__link::before {
	--graf-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath d='M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm0 48v40.805c-22.422 18.259-58.168 46.651-134.587 106.49-16.841 13.247-50.201 45.072-73.413 44.701-23.208.375-56.579-31.459-73.413-44.701C106.18 199.465 70.425 171.067 48 152.805V112h416zM48 400V214.398c22.914 18.251 55.409 43.862 104.938 82.646 21.857 17.205 60.134 55.186 103.062 54.955 42.717.231 80.509-37.199 103.053-54.947 49.528-38.783 82.032-64.401 104.947-82.653V400H48z'/%3E%3C/svg%3E");
}

/* Intro paragraph (16pt bold lead-in + 14pt text, as before). */
.graf-section > .graf-lead {
	margin-top: 0.9rem;
	margin-bottom: calc(0.9rem + 1px); /* old mixed-size line box was 1px taller */
	font-size: 18.6667px;
	line-height: 24px;
}
.graf-lead strong {
	font-size: 21.3333px;
	line-height: 1.07;
}

/* List in three columns (one on mobile). */
ul.is-style-graf-3col {
	columns: 3;
	column-gap: 1em;
	padding-left: 0;
}
ul.is-style-graf-3col li {
	margin-left: 40px;
}
@media (max-width: 767px) {
	ul.is-style-graf-3col {
		columns: 1;
	}
}

.graf-centered {
	text-align: center;
}

/* Google Maps embed */
.graf-map {
	line-height: 0;
	overflow: hidden;
}
.graf-map iframe {
	display: inline;
	width: 100%;
	max-width: 100%;
	height: 300px;
	margin: 0;
	border: none;
}

.graf-address {
	text-align: center;
	margin-bottom: 0 !important;
}
