/*
Theme Name: Πέπλο
Theme URI: https://wordpress.org/themes/
Author: Ανθέμιον
Description: Ελληνικό block theme για wedding planner. Όλα τα κείμενα, τα χρώματα και οι γραμματοσειρές αλλάζουν από τον πίνακα διαχείρισης (Εμφάνιση → Διορθωτής).
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 7.4
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: peplo
Tags: block-patterns, full-site-editing, wide-blocks, editor-style
*/

/*
 * Όλα τα χρώματα εδώ διαβάζονται από την παλέτα του theme.json
 * (var(--wp--preset--color--*)), ώστε μια αλλαγή από
 * Εμφάνιση → Διορθωτής → Φύλλα στυλ → Χρώματα να περνάει παντού.
 * Το αρχείο δεν περιέχει κανένα κείμενο που εμφανίζεται στον επισκέπτη.
 */

:root {
	--peplo-arch: 999px 999px 0 0;
	--peplo-hairline: 1px solid color-mix(in srgb, var(--wp--preset--color--sage) 70%, transparent);
	--peplo-olive-sprig: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 40'%3E%3Cpath d='M6 22 C 34 22, 70 21, 114 16' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'/%3E%3Cg%3E%3Cellipse cx='26' cy='15' rx='9' ry='3.2' transform='rotate(-24 26 15)'/%3E%3Cellipse cx='30' cy='29' rx='9' ry='3.2' transform='rotate(22 30 29)'/%3E%3Cellipse cx='50' cy='13' rx='10' ry='3.4' transform='rotate(-26 50 13)'/%3E%3Cellipse cx='55' cy='28' rx='10' ry='3.4' transform='rotate(20 55 28)'/%3E%3Cellipse cx='75' cy='10' rx='10' ry='3.4' transform='rotate(-28 75 10)'/%3E%3Cellipse cx='80' cy='25' rx='10' ry='3.4' transform='rotate(18 80 25)'/%3E%3Cellipse cx='103' cy='10' rx='9' ry='3.2' transform='rotate(-12 103 10)'/%3E%3C/g%3E%3Ccircle cx='64' cy='31' r='3.6'/%3E%3C/svg%3E");
}

html {
	scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}
}

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	font-variant-numeric: oldstyle-nums proportional-nums;
}

/* Ορατή εστίαση πληκτρολογίου σε όλα τα διαδραστικά στοιχεία */
:where(a, button, input, select, textarea, summary, .wp-block-button__link):focus-visible {
	outline: 2px solid var(--wp--preset--color--candle);
	outline-offset: 3px;
	border-radius: 2px;
}

::selection {
	background: var(--wp--preset--color--tulle);
	color: var(--wp--preset--color--ink);
}

/* Κεφαλίδα, περιεχόμενο, ζώνη επικοινωνίας και υποσέλιδο κολλάνε μεταξύ τους:
 * κάθε ενότητα ορίζει μόνη της τα περιθώριά της. */
.wp-site-blocks > * + * {
	margin-block-start: 0;
}

/* ---------------------------------------------------------------
 * Κεφαλίδα
 * ------------------------------------------------------------- */

.peplo-header {
	position: relative;
	z-index: 20;
}

.peplo-header .wp-block-site-title a {
	text-decoration: none;
}

.peplo-header .wp-block-navigation a:where(:not(.wp-element-button)) {
	text-decoration: none;
	background-image: linear-gradient(currentColor, currentColor);
	background-size: 0 1px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	padding-bottom: 2px;
	transition: background-size 0.25s ease;
}

.peplo-header .wp-block-navigation a:where(:not(.wp-element-button)):hover,
.peplo-header .wp-block-navigation .current-menu-item > a {
	background-size: 100% 1px;
}

@media (prefers-reduced-motion: reduce) {
	.peplo-header .wp-block-navigation a {
		transition: none;
	}
}

@media (max-width: 781px) {
	.peplo-header .peplo-header__cta {
		display: none;
	}
}

/* Μενού κινητού: μεγάλα, ευανάγνωστα στοιχεία, στοιχισμένα αριστερά */
.peplo-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: var(--wp--preset--spacing--30);
}

.peplo-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,
.peplo-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container {
	align-items: flex-start;
	gap: var(--wp--preset--spacing--20);
}

.peplo-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.2;
}

/* ---------------------------------------------------------------
 * Αψίδα: η υπογραφή του θέματος.
 * Στυλ μπλοκ «Αψίδα» για Εικόνα (επιλέγεται από τον επεξεργαστή).
 * ------------------------------------------------------------- */

.wp-block-image.is-style-arch {
	position: relative;
	isolation: isolate;
	margin-top: 22px;
	margin-right: 22px;
}

.wp-block-image.is-style-arch img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	border-radius: var(--peplo-arch);
}

.wp-block-image.is-style-arch::before {
	content: "";
	position: absolute;
	z-index: 0;
	inset: -22px -22px 22px 22px;
	border: 1px solid var(--wp--preset--color--candle);
	border-bottom: 0;
	border-radius: var(--peplo-arch);
	pointer-events: none;
}

.wp-block-image.is-style-arch figcaption {
	position: relative;
	z-index: 1;
}

/* Μία μόνο κίνηση στη σελίδα: η αψίδα της αρχικής «ανεβαίνει» κατά τη φόρτωση. */
@media (prefers-reduced-motion: no-preference) {
	.peplo-hero .wp-block-image.is-style-arch img {
		animation: peplo-arch-rise 1.4s cubic-bezier(0.2, 0.7, 0.15, 1) both;
	}

	.peplo-hero .wp-block-image.is-style-arch::before {
		animation: peplo-fade 1.2s 0.7s ease-out both;
	}
}

@keyframes peplo-arch-rise {
	from {
		clip-path: inset(100% 0 0 0 round 999px 999px 0 0);
	}
	to {
		clip-path: inset(0 0 0 0 round 999px 999px 0 0);
	}
}

@keyframes peplo-fade {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* ---------------------------------------------------------------
 * Διαχωριστικό «Κλαδί ελιάς»: κλαδάκι στο κέντρο και δύο λεπτές
 * γραμμές. Χρωματίζεται με το χρώμα του μπλοκ (currentColor).
 * ------------------------------------------------------------- */

.wp-block-separator.is-style-olive {
	width: 100%;
	max-width: 22rem;
	height: 2.25rem;
	border: 0;
	opacity: 1;
	color: var(--wp--preset--color--sage);
	-webkit-mask:
		var(--peplo-olive-sprig) center / 5.5rem auto no-repeat,
		linear-gradient(#000, #000) left center / calc(50% - 3.5rem) 1px no-repeat,
		linear-gradient(#000, #000) right center / calc(50% - 3.5rem) 1px no-repeat;
	mask:
		var(--peplo-olive-sprig) center / 5.5rem auto no-repeat,
		linear-gradient(#000, #000) left center / calc(50% - 3.5rem) 1px no-repeat,
		linear-gradient(#000, #000) right center / calc(50% - 3.5rem) 1px no-repeat;
}

.wp-block-separator.is-style-olive:not(.has-background) {
	background-color: currentColor;
}

.wp-block-separator.is-style-olive:not(.alignwide):not(.alignfull) {
	margin-left: auto;
	margin-right: auto;
}

/* Στοίχιση αριστερά, κάτω από τίτλους σελίδων */
.wp-block-separator.is-style-olive.peplo-start:not(.alignwide):not(.alignfull) {
	margin-left: 0;
	margin-right: auto;
}

/* ---------------------------------------------------------------
 * Λίστα «Κλαδάκια»
 * ------------------------------------------------------------- */

ul.is-style-sprigs {
	list-style: none;
	padding-left: 0;
}

ul.is-style-sprigs > li {
	position: relative;
	padding-left: 1.9em;
	margin-bottom: 0.55em;
}

ul.is-style-sprigs > li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 0.55em;
	width: 1.15em;
	height: 0.45em;
	background-color: var(--wp--preset--color--sage);
	-webkit-mask: var(--peplo-olive-sprig) left center / contain no-repeat;
	mask: var(--peplo-olive-sprig) left center / contain no-repeat;
}

/* ---------------------------------------------------------------
 * Ομάδα «Κάρτα πακέτου»
 * ------------------------------------------------------------- */

.wp-block-group.is-style-package {
	border: var(--peplo-hairline);
	padding: var(--wp--preset--spacing--40) var(--wp--preset--spacing--30);
	height: 100%;
	display: flex;
	flex-direction: column;
}

.wp-block-group.is-style-package > .wp-block-buttons {
	margin-top: auto;
	padding-top: var(--wp--preset--spacing--30);
}

.wp-block-group.is-style-package.has-background {
	border-color: transparent;
}

.wp-block-group.is-style-package .peplo-price {
	font-variant-numeric: lining-nums;
}

/* ---------------------------------------------------------------
 * Βήματα διαδικασίας (πραγματική σειρά, άρα αρίθμηση)
 * ------------------------------------------------------------- */

.peplo-steps > .wp-block-column {
	border-top: var(--peplo-hairline);
	padding-top: var(--wp--preset--spacing--20);
}

.peplo-step-number {
	font-variant-numeric: oldstyle-nums;
	line-height: 1 !important;
}

/* ---------------------------------------------------------------
 * Μαρτυρίες
 * ------------------------------------------------------------- */

.wp-block-quote.is-style-testimonial {
	border: 0;
	padding: 0;
	margin: 0;
}

.wp-block-quote.is-style-testimonial p {
	font-family: var(--wp--preset--font-family--display);
	font-style: italic;
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.5;
}

.wp-block-quote.is-style-testimonial cite {
	display: block;
	font-family: var(--wp--preset--font-family--body);
	margin-top: var(--wp--preset--spacing--20);
	font-style: normal;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
	line-height: 1.5;
}

.wp-block-quote.is-style-testimonial cite strong {
	display: block;
	color: var(--wp--preset--color--ink);
	font-weight: 600;
}

/* ---------------------------------------------------------------
 * Συχνές ερωτήσεις (μπλοκ Λεπτομέρειες)
 * ------------------------------------------------------------- */

.wp-block-details {
	border-bottom: var(--peplo-hairline);
	padding: var(--wp--preset--spacing--20) 0;
}

.wp-block-details summary {
	list-style: none;
	cursor: pointer;
	position: relative;
	padding-right: 2.5rem;
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.35;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::before,
.wp-block-details summary::after {
	content: "";
	position: absolute;
	right: 0.35rem;
	top: 50%;
	width: 0.9rem;
	height: 1px;
	background: var(--wp--preset--color--olive);
	transition: transform 0.25s ease;
}

.wp-block-details summary::after {
	transform: rotate(90deg);
}

.wp-block-details[open] summary::after {
	transform: rotate(0deg);
}

.wp-block-details > :not(summary) {
	margin-top: var(--wp--preset--spacing--20);
	max-width: 65ch;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-details summary::before,
	.wp-block-details summary::after {
		transition: none;
	}
}

/* ---------------------------------------------------------------
 * Λίστα άρθρων
 * ------------------------------------------------------------- */

.wp-block-post-featured-image img {
	transition: transform 0.6s ease;
}

.wp-block-post-featured-image a:hover img {
	transform: scale(1.03);
}

.wp-block-post-featured-image a {
	display: block;
	overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
	.wp-block-post-featured-image img {
		transition: none;
	}
}

.wp-block-post-title a {
	text-decoration: none;
}

.wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.18em;
}

/* ---------------------------------------------------------------
 * Φόρμα επικοινωνίας (Contact Form 7)
 * ------------------------------------------------------------- */

.wpcf7 form {
	display: grid;
	gap: var(--wp--preset--spacing--20);
}

.wpcf7 .peplo-form-row {
	display: grid;
	gap: var(--wp--preset--spacing--20);
	grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.wpcf7 label {
	display: block;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 500;
	color: var(--wp--preset--color--ink);
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 input[type="date"],
.wpcf7 input[type="number"],
.wpcf7 select,
.wpcf7 textarea {
	display: block;
	width: 100%;
	margin-top: 0.4rem;
	padding: 0.8rem 0.9rem;
	font: inherit;
	font-size: var(--wp--preset--font-size--medium);
	color: var(--wp--preset--color--ink);
	background: var(--wp--preset--color--white);
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 45%, transparent);
	border-radius: 2px;
	box-sizing: border-box;
}

.wpcf7 textarea {
	min-height: 9rem;
	resize: vertical;
}

.wpcf7 input:focus,
.wpcf7 select:focus,
.wpcf7 textarea:focus {
	border-color: var(--wp--preset--color--olive);
	outline: 2px solid color-mix(in srgb, var(--wp--preset--color--olive) 25%, transparent);
	outline-offset: 0;
}

/* Ερώτηση κατά του spam: η απάντηση είναι σύντομη, οπότε στενό πεδίο. */
.wpcf7 input.wpcf7-quiz {
	max-width: 11rem;
}

.wpcf7 .peplo-form-quiz small {
	display: block;
	margin-top: 0.3rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}

.wpcf7 .wpcf7-acceptance label {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-weight: 400;
	line-height: 1.5;
}

.wpcf7 .wpcf7-list-item {
	margin: 0;
}

.wpcf7 input[type="submit"] {
	justify-self: start;
	cursor: pointer;
	border: 0;
	border-radius: 999px;
	padding: 0.95rem 1.9rem;
	font: inherit;
	font-weight: 500;
	letter-spacing: 0.01em;
	background: var(--wp--preset--color--olive);
	color: var(--wp--preset--color--almond);
	transition: background-color 0.2s ease;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--ink);
}

.wpcf7 input[type="submit"]:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.wpcf7 .wpcf7-spinner {
	align-self: center;
}

.wpcf7 .wpcf7-not-valid-tip {
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--rose);
	margin-top: 0.3rem;
}

.wpcf7 form .wpcf7-response-output {
	margin: 0;
	padding: 0.9rem 1rem;
	border-radius: 2px;
	font-size: var(--wp--preset--font-size--small);
}

.wpcf7 form.sent .wpcf7-response-output {
	border-color: var(--wp--preset--color--olive);
	background: color-mix(in srgb, var(--wp--preset--color--sage) 18%, transparent);
}

/* ---------------------------------------------------------------
 * Υποσέλιδο
 * ------------------------------------------------------------- */

.peplo-footer a:where(:not(.wp-element-button)),
.peplo-cta a:where(:not(.wp-element-button)) {
	color: inherit;
	text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
}

.peplo-footer a:hover {
	text-decoration-color: currentColor;
}

.peplo-footer .peplo-footer__links {
	list-style: none;
	padding-left: 0;
}

.peplo-footer .peplo-footer__links li {
	margin-bottom: 0.45em;
}

/* ---------------------------------------------------------------
 * Βοηθητικά
 * ------------------------------------------------------------- */

.peplo-measure {
	max-width: 38rem;
}

.peplo-gallery-tight.wp-block-gallery {
	--wp--style--gallery-gap-default: 0.75rem;
}

.peplo-gallery-tight.wp-block-gallery img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
}
