/*!
Theme Name: Doctor
Theme URI: https://github.com/dimitriosblatsoukas
Author: Krikochoritis Ioannis
Author URI: https://cors.gmbh
Description: One-page WordPress theme for the ophthalmology practice of Dr. Dimitrios Balatsoukas. Built with core Gutenberg blocks.
Version: 1.0.1
Requires at least: 6.5
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: doctor
*/

/* -------------------------------------------------------------------------
   Tokens (theme.json presets are available as --wp--preset--*)
   ------------------------------------------------------------------------- */
:root {
	--c-primary: var(--wp--preset--color--primary);
	--c-secondary: var(--wp--preset--color--secondary);
	--c-accent: var(--wp--preset--color--accent);
	--c-gold: var(--wp--preset--color--gold);
	--c-dark: var(--wp--preset--color--dark);
	--c-gray: var(--wp--preset--color--gray);
	--c-light: var(--wp--preset--color--light);
	--c-white: var(--wp--preset--color--white);
	--f-body: var(--wp--preset--font-family--body);
	--f-heading: var(--wp--preset--font-family--heading);
	--gutter: clamp(1rem, 4vw, 2.5rem);
	--section-y: clamp(3.5rem, 9vw, 7rem);
	--radius: 18px;
	--shadow: 0 20px 50px -20px rgba(12, 55, 87, 0.35);
	--header-h: 76px;
}

/* -------------------------------------------------------------------------
   Base
   ------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f-body); color: var(--c-dark); background: var(--c-white); }
.antialiased { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-secondary); }
h1, h2, h3, h4 { font-family: var(--f-heading); font-weight: 500; line-height: 1.15; color: var(--c-secondary); margin: 0 0 0.6em; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }

.screen-reader-text {
	border: 0; clip-path: inset(50%); height: 1px; margin: -1px; overflow: hidden;
	padding: 0; position: absolute; width: 1px; word-wrap: normal !important;
}
.skip-link:focus {
	clip-path: none; height: auto; width: auto; margin: 0; padding: 0.75rem 1rem;
	position: fixed; top: 0.5rem; left: 0.5rem; z-index: 1000;
	background: var(--c-secondary); color: var(--c-white); border-radius: 8px;
}

/* -------------------------------------------------------------------------
   Header
   ------------------------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
	border-bottom: 1px solid transparent;
	transition: border-color 0.2s, box-shadow 0.2s;
}
.site-header.is-scrolled { border-color: rgba(12, 55, 87, 0.08); box-shadow: 0 6px 24px -12px rgba(12, 55, 87, 0.25); }
.site-header__inner {
	max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter);
	min-height: var(--header-h); display: flex; align-items: center; gap: 2rem;
}
.site-branding { flex: 1; }
.site-title { display: inline-flex; align-items: center; gap: 0.7rem; font-family: var(--f-heading); font-size: 1.25rem; color: var(--c-secondary); }
.site-title__mark {
	width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
	background: radial-gradient(circle at 50% 50%, var(--c-secondary) 0 24%, var(--c-primary) 26% 60%, var(--c-accent) 62% 100%);
	box-shadow: 0 0 0 3px var(--c-white), 0 0 0 4px var(--c-accent);
}
.custom-logo { max-height: 48px; width: auto; }

.site-navigation { display: flex; align-items: center; gap: 1.5rem; }
.site-navigation .menu { list-style: none; margin: 0; padding: 0; display: flex; gap: 1.5rem; }
.site-navigation .menu a { color: var(--c-dark); font-weight: 600; font-size: 0.95rem; position: relative; padding: 0.25rem 0; }
.site-navigation .menu a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px;
	background: var(--c-primary); transform: scaleX(0); transform-origin: left; transition: transform 0.2s;
}
.site-navigation .menu a:hover::after { transform: scaleX(1); }
.header-cta { padding: 0.6rem 1.25rem !important; font-size: 0.9rem !important; }
.header-cta:hover, .header-cta:focus { color: var(--c-white); }

.nav-toggle {
	display: none; position: relative; width: 44px; height: 44px; border: 0; background: none;
	cursor: pointer; margin-left: auto; padding: 0;
}
.nav-toggle__bar, .nav-toggle__bar::before, .nav-toggle__bar::after {
	content: ""; display: block; width: 24px; height: 2px; background: var(--c-secondary);
	position: absolute; left: 10px; transition: transform 0.2s, opacity 0.2s;
}
.nav-toggle__bar { top: 21px; }
.nav-toggle__bar::before { top: -7px; left: 0; }
.nav-toggle__bar::after { top: 7px; left: 0; }
.nav-open .nav-toggle__bar { background: transparent; }
.nav-open .nav-toggle__bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle__bar::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
	.nav-toggle { display: block; }
	.site-navigation {
		display: none; position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 0;
		background: var(--c-white); border-bottom: 1px solid rgba(12, 55, 87, 0.1);
		padding: 0.5rem var(--gutter) 1.25rem; box-shadow: 0 20px 30px -20px rgba(12, 55, 87, 0.3);
	}
	.nav-open .site-navigation { display: flex; }
	.site-navigation .menu { flex-direction: column; gap: 0; }
	.site-navigation .menu a { display: block; padding: 0.85rem 0; border-bottom: 1px solid rgba(12, 55, 87, 0.08); }
	.site-navigation .menu a::after { display: none; }
	.header-cta { margin-top: 1rem; text-align: center; }
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */
.wp-element-button, .wp-block-button__link {
	display: inline-block; cursor: pointer; border: 2px solid var(--c-primary);
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}
.wp-element-button:hover, .wp-block-button__link:hover { border-color: var(--c-secondary); transform: translateY(-1px); }
.is-style-outline .wp-block-button__link { background: transparent; color: var(--c-primary); }
.is-style-outline .wp-block-button__link:hover { background: var(--c-primary); color: var(--c-white); }

/* -------------------------------------------------------------------------
   Sections (core/group alignfull)
   ------------------------------------------------------------------------- */
.site-main { overflow-x: clip; }
.entry-content > * + * { margin-top: 0; }
.section { padding: var(--section-y) var(--gutter); margin: 0 !important; }
.section > * + * { margin-top: 1.25rem; }
.section > .wp-block-columns { margin-top: 2.5rem; }

.eyebrow {
	font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
	color: var(--c-primary); margin-bottom: 0.75rem;
}
.section-intro { color: var(--c-gray); font-size: 1.1rem; max-width: 620px; margin-left: auto; margin-right: auto; }

/* Hero */
.section-hero {
	position: relative; color: var(--c-white);
	background: var(--wp--preset--gradient--hero);
	padding-top: clamp(3rem, 8vw, 6rem); padding-bottom: clamp(3rem, 8vw, 6rem);
}
.section-hero::before, .section-hero::after {
	content: ""; position: absolute; border-radius: 50%; pointer-events: none;
	background: radial-gradient(circle, rgba(140, 201, 234, 0.35) 0%, rgba(140, 201, 234, 0) 70%);
}
.section-hero::before { width: 60vw; height: 60vw; top: -30vw; right: -20vw; }
.section-hero::after { width: 40vw; height: 40vw; bottom: -25vw; left: -15vw; }
.section-hero > * { position: relative; z-index: 1; }
.section-hero .eyebrow { color: #DFF1FA; }
.section-hero h1 { color: var(--c-white); font-size: clamp(2.4rem, 5.5vw, 4rem); margin-bottom: 0.4em; }
.section-hero .lead { font-size: 1.15rem; color: rgba(255, 255, 255, 0.92); max-width: 540px; }
.section-hero .wp-block-buttons { margin-top: 1.75rem; gap: 0.75rem; }
.section-hero .wp-block-button__link { background: var(--c-gold); border-color: var(--c-gold); color: var(--c-secondary); }
.section-hero .wp-block-button__link:hover { background: #e8b756; border-color: #e8b756; }
.section-hero .is-style-outline .wp-block-button__link { background: transparent; border-color: rgba(255, 255, 255, 0.6); color: var(--c-white); }
.section-hero .is-style-outline .wp-block-button__link:hover { background: rgba(255, 255, 255, 0.12); border-color: var(--c-white); }
.hero-facts {
	list-style: none; padding: 0; margin: 2.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.75rem 2rem;
	font-size: 0.9rem; color: rgba(255, 255, 255, 0.75);
}
.hero-facts li { display: flex; flex-direction: column; }
.hero-facts strong { font-family: var(--f-heading); font-size: 1.6rem; font-weight: 500; color: var(--c-white); line-height: 1.1; }
.hero-eye img { width: min(100%, 460px); margin: 0 auto; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, 0.35)); }

/* About */
.section-about { background: var(--c-white); }
.about-portrait img { border-radius: var(--radius); box-shadow: var(--shadow); }
.check-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.check-list li { position: relative; padding-left: 2rem; margin-bottom: 0.6rem; }
.check-list li::before {
	content: ""; position: absolute; left: 0; top: 0.2em; width: 1.25rem; height: 1.25rem; border-radius: 50%;
	background: var(--c-light) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230F6E9C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 10.5l3.5 3.5L15 7'/%3E%3C/svg%3E") center / 70% no-repeat;
}

/* Services */
.section-services { background: var(--c-light); }
.section-services .wp-block-columns + .wp-block-columns { margin-top: 1.5rem; }
.service-grid { gap: 1.5rem !important; }
.service-card {
	background: var(--c-white); border-radius: var(--radius); padding: 2rem 1.75rem;
	box-shadow: 0 1px 2px rgba(12, 55, 87, 0.06); border: 1px solid rgba(12, 55, 87, 0.06);
	transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.service-icon { margin: 0 0 1.25rem; }
.service-icon img {
	width: 64px !important; height: 64px; padding: 14px; border-radius: 16px;
	background: var(--c-light);
}
.service-card h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.service-card p { color: var(--c-gray); margin: 0; font-size: 0.98rem; }

/* Contact */
.section-contact { background: var(--c-white); }
.contact-list { list-style: none; padding: 0; margin-top: 1.5rem; }
.contact-list li { padding: 0.9rem 0; border-top: 1px solid rgba(12, 55, 87, 0.1); line-height: 1.5; }
.contact-list li:last-child { border-bottom: 1px solid rgba(12, 55, 87, 0.1); }
.contact-list strong { display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c-primary); margin-bottom: 0.15rem; }

.contact-form {
	background: var(--c-light); border-radius: var(--radius); padding: clamp(1.5rem, 4vw, 2.5rem);
}
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.form-field { display: flex; flex-direction: column; margin-bottom: 1rem; }
.form-field label { font-size: 0.85rem; font-weight: 600; color: var(--c-secondary); margin-bottom: 0.4rem; }
.form-field label span { color: #8A5C0A; }
.form-field input, .form-field select, .form-field textarea {
	font: inherit; color: var(--c-dark); background: var(--c-white);
	border: 1px solid rgba(12, 55, 87, 0.18); border-radius: 10px; padding: 0.8rem 1rem;
	transition: border-color 0.2s, box-shadow 0.2s; width: 100%;
}
.form-field textarea { resize: vertical; min-height: 130px; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
	outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(15, 110, 156, 0.25);
}
.form-consent { flex-direction: row; align-items: flex-start; gap: 0.6rem; }
.form-consent input { width: auto; margin-top: 0.25rem; accent-color: var(--c-primary); }
.form-consent label { font-weight: 400; font-size: 0.85rem; color: var(--c-gray); margin: 0; }
.form-actions { margin-top: 0.5rem; }
.form-actions .wp-element-button { width: 100%; font: inherit; font-weight: 600; }

/* -------------------------------------------------------------------------
   Inner pages
   ------------------------------------------------------------------------- */
.page-header, .entry-content > :not(.alignfull),
.error-404, .comments-area, .post-navigation, .search-form {
	max-width: 1180px; margin-left: auto; margin-right: auto; padding-left: var(--gutter); padding-right: var(--gutter);
}
.entry-content > ul:not(.alignfull) > li { margin-left: 1.2rem; }
body:not(.home) .site-main { padding: 3rem 0 5rem; }
body:not(.home) article + article { margin-top: 3rem; }
.page-header { margin-bottom: 2rem; }

/* -------------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------------- */
.site-footer { background: var(--c-secondary); color: rgba(255, 255, 255, 0.75); font-size: 0.95rem; }
.site-footer a { color: var(--c-white); }
.site-footer a:hover { color: var(--c-accent); }
.site-footer__inner {
	max-width: 1180px; margin: 0 auto; padding: 4rem var(--gutter) 3rem;
	display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2.5rem;
}
.footer-brand .site-title { color: var(--c-white); margin-bottom: 1rem; }
.footer-brand .site-title__mark { box-shadow: 0 0 0 3px var(--c-secondary), 0 0 0 4px var(--c-accent); }
.footer-heading { font-family: var(--f-body); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--c-accent); margin-bottom: 1rem; }
.menu-footer { list-style: none; padding: 0; margin: 0; }
.menu-footer li { margin-bottom: 0.5rem; }
.site-footer__bottom { border-top: 1px solid rgba(255, 255, 255, 0.1); }
.site-footer__bottom .site-info { max-width: 1180px; margin: 0 auto; padding: 1.25rem var(--gutter); font-size: 0.85rem; }

@media (max-width: 860px) {
	.site-footer__inner { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
	.site-footer__inner { grid-template-columns: 1fr; gap: 2rem; }
	.hero-columns { flex-direction: column-reverse; }
	.hero-eye img { width: min(80%, 320px); }
}

/* EU / ESPA funding banner in the hero */
.hero-funding { margin-top: 2rem; }
.hero-funding img { width: min(100%, 520px); background: var(--c-white); padding: 0.75rem 1rem; border-radius: 12px; }

/* Contact form: validation and status */
.form-hp { display: none; }
.form-error { margin: 0.4rem 0 0; font-size: 0.85rem; color: #A8321E; }
.form-error[hidden] { display: none; }
.form-field.is-invalid input, .form-field.is-invalid select, .form-field.is-invalid textarea { border-color: #A8321E; }
.form-field.is-invalid input:focus, .form-field.is-invalid select:focus, .form-field.is-invalid textarea:focus { box-shadow: 0 0 0 3px rgba(168, 50, 30, 0.2); }
.form-consent.is-invalid label { color: #A8321E; }
.form-status { margin: 0 0 1rem; padding: 0.9rem 1rem; border-radius: 10px; font-size: 0.95rem; line-height: 1.5; outline: none; }
.form-status.is-success { background: #DDF3EC; color: #0B4F3E; border: 1px solid #9FDCC8; }
.form-status.is-error { background: #FBE7E3; color: #7A2314; border: 1px solid #F1B9AF; }
.form-actions .wp-element-button:disabled { opacity: 0.7; cursor: progress; transform: none; }
.form-consent { flex-wrap: wrap; }
.form-consent .form-error { flex-basis: 100%; }

/* About: credentials grid */
.credential-list { list-style: none; padding: 0; margin: 1.75rem 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
.credential-list li { position: relative; padding: 0.9rem 1rem 0.9rem 3.5rem; background: var(--c-light); border-radius: 12px; font-size: 0.95rem; line-height: 1.4; color: var(--c-dark); }
.credential-list li::before { content: ""; position: absolute; left: 1rem; top: 1rem; width: 1.6rem; height: 1.6rem; background: no-repeat center / contain; }
.credential-list strong { display: block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--c-primary); margin-bottom: 0.2rem; }
.credential-list li:nth-child(1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E9C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 9l10-4 10 4-10 4z'/%3E%3Cpath d='M6 11v4c0 1.5 3 3 6 3s6-1.5 6-3v-4'/%3E%3Cpath d='M22 9v5'/%3E%3C/svg%3E"); }
.credential-list li:nth-child(2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E9C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='9' r='5'/%3E%3Cpath d='M8.5 13.5L7 21l5-2.5 5 2.5-1.5-7.5'/%3E%3C/svg%3E"); }
.credential-list li:nth-child(3)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E9C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E"); }
.credential-list li:nth-child(4)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230F6E9C' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='3' width='16' height='18' rx='1.5'/%3E%3Cpath d='M12 7v6M9 10h6M9 21v-4h6v4'/%3E%3C/svg%3E"); }
@media (max-width: 560px) { .credential-list { grid-template-columns: 1fr; } }
