/*
Theme Name:   Divi Child
Theme URI:    http://www.elegantthemes.com/gallery/divi/
Description:  Child theme for Divi (Komlóverzum).
Author:       Milan Bartalovics
Template:     Divi
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  divi-child
*/

/*
 * Divi loads its own stylesheet and this file automatically
 * (see et_divi_enqueue_stylesheet() in Divi/functions.php),
 * so do not @import the parent style.css here.
 *
 * Add custom styles below.
 */

/* ==========================================================================
   Accessibility (WCAG 2.1 AA)
   ========================================================================== */

/* Visible keyboard focus (Divi resets it with :focus { outline: 0 }).
   White outline + dark halo stays visible on both light and dark backgrounds. */
:focus-visible {
	outline: 2px solid #fff !important;
	outline-offset: 0 !important;
	box-shadow: 0 0 0 5px #000 !important;
}

input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline-offset: 0 !important;
}

#page-container .et_pb_slider .et-pb-arrow-prev:focus-visible {
	left: 0 !important;
	opacity: 1 !important;
}

#page-container .et_pb_slider .et-pb-arrow-next:focus-visible {
	right: 0 !important;
	opacity: 1 !important;
}

/* Skip link: first element in the tab order, visible only on focus. */
.divi-child-skip-link {
	position: fixed;
	top: 8px;
	left: 8px;
	z-index: 1000000;
	padding: 12px 20px;
	background: #023726;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.4;
	text-decoration: underline;
	transform: translateY(-200%);
}

.divi-child-skip-link:focus,
.divi-child-skip-link:focus-visible {
	transform: none;
	color: #fff;
}

#main-content:focus {
	outline: 3px solid #023726 !important;
	outline-offset: -3px !important;
	box-shadow: none !important;
}

.et_mobile_nav_menu .mobile_menu_bar:focus-visible {
	outline: 3px solid #fff !important;
	outline-offset: 2px !important;
	box-shadow: 0 0 0 5px #023726 !important;
	border-radius: 3px;
}

/* Menu: keyboard-opened submenus and the toggle button over Divi's arrow. */
.et_pb_menu .et-menu li.divi-child-open > ul.sub-menu,
.et-menu li.divi-child-open > ul.sub-menu {
	opacity: 1 !important;
	visibility: visible !important;
}

.et_pb_menu .et_mobile_menu li.menu-item-has-children > ul.sub-menu {
	display: none !important;
}

.et_pb_menu .et_mobile_menu li.menu-item-has-children.divi-child-open > ul.sub-menu {
	display: block !important;
	opacity: 1 !important;
	visibility: visible !important;
}

.et-menu li.menu-item-has-children,
.et_mobile_menu li.menu-item-has-children {
	position: relative;
}

.et-menu li.menu-item-has-children > .divi-child-submenu-toggle {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: flex;
	width: 28px;
	height: 100%;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.et_mobile_menu li.menu-item-has-children > .divi-child-submenu-toggle {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 2;
	display: flex;
	width: 36px;
	height: 2.7em;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.et_pb_menu .et_mobile_menu li.menu-item-has-children > a {
	padding-right: 48px;
}

.et_pb_menu .et-menu li.menu-item-has-children > a:first-child::after,
.et_pb_menu .et_mobile_menu li.menu-item-has-children > a:first-child::after {
	display: none;
}

.et-menu li.menu-item-has-children > .divi-child-submenu-toggle::after,
.et_mobile_menu li.menu-item-has-children > .divi-child-submenu-toggle::after {
	width: 7px;
	height: 7px;
	margin-top: -4px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	content: "";
	transform: rotate(45deg);
	transition: transform 150ms ease, margin 150ms ease;
}

.et-menu li.divi-child-open > .divi-child-submenu-toggle::after,
.et_mobile_menu li.divi-child-open > .divi-child-submenu-toggle::after {
	margin-top: 4px;
	transform: rotate(225deg);
}

.et_pb_module.dsm_card_carousel .swiper-pagination-bullets .swiper-pagination-bullet {
	position: relative;
	top: 8px;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	padding: 8px;
	background-clip: content-box !important;
}

.dsm_card_carousel .swiper-pagination-bullets {
	bottom: -30px !important;
}

.dsm_card_carousel .dsm_card_carousel_arrow.swiper-button-lock,
.dsm_card_carousel .dsm_card_carousel_pagination.swiper-pagination-lock {
	display: none !important;
}

.dsm_card_carousel_arrow_outside .swiper-button-prev {
  left: -60px !important;
}

.front-end-slider .et-pb-controllers a {
	position: relative;
	top: -9.25px;
	box-sizing: border-box;
	width: 24px;
	height: 24px;
	margin: 0 !important;
	padding: 8px;
	background-clip: content-box !important;
	vertical-align: middle;
	border-radius: 100%;
}

.et_pb_toggle_title > .divi-child-toggle-button {
	box-sizing: border-box;
	display: block;
	width: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	line-height: inherit;
	text-align: left;
	cursor: pointer;
}

.et_pb_toggle_title > .divi-child-toggle-button:focus-visible {
	outline: 3px solid #023726 !important;
	outline-offset: 2px !important;
}

/* Links inside body text: sufficient contrast on light backgrounds
   (Divi's default #2ea3f2 is only ~2.8:1) and not distinguished by colour alone. */
.et_pb_text.et_pb_bg_layout_light .et_pb_text_inner a:not(.et_pb_button),
.et_pb_blurb.et_pb_bg_layout_light .et_pb_blurb_description a:not(.et_pb_button),
.et_pb_post_content a:not(.et_pb_button) {
	color: #177962 ;
	text-decoration: underline;
}

.et_pb_text.et_pb_bg_layout_light .et_pb_text_inner a:not(.et_pb_button):hover,
.et_pb_blurb.et_pb_bg_layout_light .et_pb_blurb_description a:not(.et_pb_button):hover,
.et_pb_post_content a:not(.et_pb_button):hover {
	color: #023726;
}

.et_pb_gallery .et_pb_gallery_pagination ul li a:not(.active) {
	color: #666 !important;
}

/* The news page's full-width photo gallery needs visible, touch-sized controls. */
body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-arrow-prev,
body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-arrow-next {
	display: flex;
	width: 48px;
	height: 48px;
	box-sizing: border-box;
	align-items: center;
	justify-content: center;
	padding: 8px;
	background: rgba(255, 255, 255, 0.9);
	border-radius: 50%;
	color: #666 !important;
	font-size: 32px;
	line-height: 1;
	opacity: 1 !important;
}

body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-arrow-prev {
	left: 0 !important;
}

body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-arrow-next {
	right: 0 !important;
}

body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-controllers {
	position: relative !important;
	bottom: auto !important;
	left: auto !important;
	display: flex;
	width: 100%;
	height: auto;
	justify-content: center;
	gap: 4px;
	margin: 12px 0 0;
}

body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-controllers a {
	position: relative;
	top: 0;
	display: block;
	width: 24px;
	height: 24px;
	box-sizing: border-box;
	margin: 0 !important;
	padding: 8px;
	border-radius: 50%;
	background: #666 !important;
	background-clip: content-box !important;
	color: #fff !important;
	font-size: 0;
	line-height: 0;
	vertical-align: middle;
}

body.page-id-1981 #main-content .et_pb_gallery.et_pb_slider .et-pb-controllers a.et-pb-active-control {
	background: #177962 !important;
	background-clip: content-box !important;
	color: #fff !important;
}

/* Contact form title was an <h1>, now an <h2>: keep the original look. */
h2.et_pb_contact_main_title {
	font-size: 26px;
}

/* Visually hidden text for screen readers. */
.divi-child-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* Footer is dark green (#023726): headings and links are white (bold headings). */
.et-l--footer h2.et_pb_module_heading,
.et-l--footer h3.et_pb_module_heading {
	color: #fff !important;
	font-weight: 700 !important;
}

.et-l--footer .et_pb_text_inner a:not([style*="color"]) {
	color: #fff !important;
	text-decoration: underline;
}

/* Contact Form 7 (replaces the Divi contact form module). */
.wpcf7 form p {
	margin: 0 0 16px;
	padding-bottom: 0;
}

.wpcf7 label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 textarea {
	box-sizing: border-box;
	-webkit-appearance: none;
	appearance: none;
	width: 100%;
	padding: 12px 16px;
	border: 1px solid #767676;
	border-radius: 0;
	background-color: #eee;
	color: #333;
	font-size: 16px;
}

.wpcf7 input[type="text"]::placeholder,
.wpcf7 input[type="email"]::placeholder,
.wpcf7 textarea::placeholder {
	color: #595959;
	opacity: 1;
}

.wpcf7 input[type="text"]:hover,
.wpcf7 input[type="email"]:hover,
.wpcf7 textarea:hover {
	border-color: #333;
}

.wpcf7 input[type="text"].wpcf7-not-valid,
.wpcf7 input[type="email"].wpcf7-not-valid,
.wpcf7 textarea.wpcf7-not-valid {
	border-color: #b00020;
}

.wpcf7 textarea {
	min-height: 160px;
}

.wpcf7 form p:has(> button.wpcf7-submit) {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.wpcf7 form p:has(> button.wpcf7-submit) > .wpcf7-spinner {
	order: 1;
}

#page-container .wpcf7 form button.wpcf7-submit.et_pb_button {
	order: 2;
	margin: 16px 0 0;
	padding: 0.3em 1.2em;
	border: 0 !important;
	border-radius: 6px !important;
	background-color: #187d65 !important;
	background-image: none !important;
	color: #fff !important;
	font-size: 20px;
	cursor: pointer;
}

#page-container .wpcf7 form button.wpcf7-submit.et_pb_button:focus-visible {
	outline: 3px solid #000 !important;
	outline-offset: 3px !important;
}

#page-container .wpcf7 form button.wpcf7-submit.et_pb_button:hover {
	padding: 0.3em 2em 0.3em 0.7em;
	background-color: #146651 !important;
}


.wpcf7-not-valid-tip {
	margin-top: 4px;
	color: #b00020;
	font-weight: 600;
}

.wpcf7 form .wpcf7-response-output {
	margin: 16px 0 0;
	padding: 12px 16px;
	border-width: 2px;
}

/* Logo link: Divi clips the logo box (.et_pb_menu__logo { overflow: hidden }), so
   the default focus ring would be cut off and a white ring is invisible on the
   white header. Draw a dark ring inside the link box instead. */
.et_pb_menu__logo a {
	display: block;
}

.et_pb_menu__logo a:focus-visible {
	outline: 3px solid #023726 !important;
	outline-offset: -3px !important;
	box-shadow: inset 0 0 0 6px #fff !important;
}

.home .et_pb_heading_2_tb_body .et_pb_heading_container h2 {
	color: #fff !important;
}

#menu-navigation>li:last-child .sub-menu {
  left: calc(-100% + 3px);
}

/* Wide tables (fixed pixel width set inline in the editor) must scroll sideways on
   small screens: Divi bordered text modules are overflow: hidden, which clips them. */
.et_pb_text_inner:has(> table) {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* Keyboard focus on a scrollable table (tabindex is set by accessibility.js). The default
   halo would be clipped by the overflow: hidden text module, so draw the ring inside. */
.et_pb_text_inner[data-divi-child-scrollable]:focus-visible {
	outline: 3px solid #023726 !important;
	outline-offset: -3px !important;
	box-shadow: none !important;
}
/* Post archives (archive.php): a card grid under an <h1>. */

/* Room for the fixed Theme Builder header; accessibility.js sets the measured height. */
.divi-child-plain-layout #main-content {
	padding-top: var(--divi-child-header-height, 130px);
}

.archive-header {
	margin-bottom: 40px;
}

.archive-header .archive-title {
	position: relative;
	padding-bottom: 20px;
	color: #023726;
	font-weight: 700;
}

.archive-header .archive-title::after {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 64px;
	height: 4px;
	background: #c9a043;
	content: "";
}

.archive-description {
	max-width: 46em;
	margin-top: 16px;
	color: #444;
	font-size: 18px;
}

#left-area .archive-post-list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
	gap: 32px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.archive-post-list > li {
	display: flex;
	margin: 0;
	padding: 0;
}

.archive-post-list .et_pb_post {
	position: relative;
	display: flex;
	width: 100%;
	flex-direction: column;
	margin: 0;
	overflow: hidden;
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 2px 14px rgba(2, 55, 38, 0.14);
	transition: box-shadow 150ms ease, transform 150ms ease;
}

.archive-post-list .et_pb_post:hover {
	box-shadow: 0 8px 24px rgba(2, 55, 38, 0.22);
	transform: translateY(-3px);
}

@media (prefers-reduced-motion: reduce) {
	.archive-post-list .et_pb_post {
		transition: none;
	}

	.archive-post-list .et_pb_post:hover {
		transform: none;
	}
}

.archive-post-image {
	display: block;
	background: #e6efeb;
}

.archive-post-image img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 10;
	object-fit: cover;
}

.archive-post-body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 24px 24px;
}

.archive-post-list .entry-title {
	margin: 0 0 8px;
	padding: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
}

.archive-post-list .entry-title a {
	color: #023726;
	text-decoration: none;
}

/* The title link covers the whole card: one click target and one Tab stop per post. */
.archive-post-list .entry-title a::after {
	position: absolute;
	inset: 0;
	z-index: 1;
	content: "";
}

.archive-post-list .entry-title a:hover {
	color: #187d65;
}

/* The ring goes around the card instead of the title text. */
.archive-post-list .entry-title a:focus-visible {
	outline: none !important;
	box-shadow: none !important;
}

.archive-post-list .et_pb_post:has(.entry-title a:focus-visible) {
	outline: 3px solid #023726;
	outline-offset: 3px;
}

#left-area .archive-post-list .post-meta {
	margin: 0 0 12px;
	padding: 0;
	color: #4b5563;
	font-size: 14px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

#left-area .archive-post-excerpt {
	margin: 0 0 18px;
	padding: 0;
	color: #333;
	font-size: 16px;
	line-height: 1.6;
}

.archive-post-more {
	margin-top: auto;
	color: #187d65;
	font-weight: 700;
}

.archive-empty {
	font-size: 18px;
}

.navigation.pagination {
	margin-top: 48px;
}

.navigation.pagination .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
}

.navigation.pagination .page-numbers {
	display: inline-flex;
	min-width: 44px;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 0 14px;
	border: 1px solid #187d65;
	border-radius: 6px;
	color: #187d65;
	text-decoration: none;
}

.navigation.pagination a.page-numbers:hover,
.navigation.pagination .page-numbers.current {
	background: #187d65;
	color: #fff;
}

/* Single post (single.php): a readable column. */
.content-article {
	max-width: 760px;
	margin: 0 auto;
	padding-bottom: 0;
}

#left-area .entry-categories {
	margin: 0 0 12px;
	padding: 0;
}

.entry-categories a {
	display: inline-block;
	margin: 0 6px 6px 0;
	padding: 2px 12px;
	border: 1px solid #187d65;
	border-radius: 99px;
	color: #187d65;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none;
}

.entry-categories a:hover {
	background: #187d65;
	color: #fff;
}

.content-article .entry-header .entry-title {
	margin: 0 0 8px;
	padding: 0;
	color: #023726;
	font-size: 38px;
	font-weight: 700;
	line-height: 1.2;
}

#left-area .content-article .post-meta {
	margin: 0 0 28px;
	padding: 0;
	color: #4b5563;
	font-size: 15px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.entry-featured-image {
	margin: 0 0 32px;
}

.entry-featured-image img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
}

.content-article .entry-content {
	font-size: 18px;
	line-height: 1.75;
}

.content-article .entry-content img {
	max-width: 100%;
	height: auto;
}

/* Divi's default link blue (#2ea3f2) is far below 4.5:1 on white. */
.content-article .entry-content a:not(.et_pb_button) {
	color: #187d65;
	text-decoration: underline;
}

.content-article .entry-content a:not(.et_pb_button):hover {
	color: #023726;
}

#left-area .entry-tags {
	margin: 32px 0 0;
	padding: 0;
	color: #4b5563;
}

.entry-tags a {
	color: #187d65;
}

.post-navigation {
	max-width: 760px;
	margin: 48px auto 0;
	padding-top: 24px;
	border-top: 1px solid #d8dce0;
}

.post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 16px;
}

.post-navigation .nav-previous,
.post-navigation .nav-next {
	flex: 1 1 280px;
}

.post-navigation .nav-next {
	text-align: right;
}

.post-navigation a {
	display: block;
	box-sizing: border-box;
	min-height: 44px;
	padding: 14px 18px;
	border: 1px solid #187d65;
	border-radius: 8px;
	color: #023726;
	text-decoration: none;
}

.post-navigation a:hover {
	background: #187d65;
	color: #fff;
}

.post-navigation .nav-subtitle {
	display: block;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.post-navigation .nav-title {
	display: block;
	margin-top: 4px;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

#left-area .entry-back {
	max-width: 760px;
	margin: 24px auto 0;
	padding: 0;
}

.entry-back a {
	color: #187d65;
	font-weight: 700;
}

@media (max-width: 767px) {
	.content-article .entry-header .entry-title {
		font-size: 30px;
	}

	.post-navigation .nav-next {
		text-align: left;
	}
}

/* Single post: breathing room under the fixed header, and page-builder content (Divi rows
   are 80% wide with their own padding) lines up with the title instead of being inset. */
.divi-child-plain-layout #main-content .container {
	padding-top: 58px;
}

.content-article .entry-content .et_pb_section {
	padding: 0;
}

.content-article .entry-content .et_pb_row {
	width: 100%;
	max-width: none;
	padding: 0;
}

.content-article .entry-content .et_pb_text {
	color: #333;
}

/* Divi has its own, more specific rules for page-builder single posts
   (.et_pb_pagebuilder_layout.single.et_full_width_page:not(.et-tb-has-body) #main-content ...):
   same selector plus the element, so these win. */
body.et_pb_pagebuilder_layout.single-post.et_full_width_page:not(.et-tb-has-body) #main-content .container {
	padding-top: 58px;
}

body.et_pb_pagebuilder_layout.single-post.et_full_width_page:not(.et-tb-has-body) #main-content .content-article .entry-content .et_pb_row {
	width: 100%;
	max-width: none;
	padding: 0;
}

/* Divi outputs important colours per Heading module; override them centrally.
   The museum education page sets its heading colours individually. */
body:where(:not(.page-id-506)) #main-content .et_pb_heading_container :is(h1, h2, h3, h4, h5, h6),
body:where(:not(.page-id-506)) #main-content .et_pb_module_heading,
body:where(:not(.page-id-506)) #main-content h1.entry-title {
	color: #177962 !important;
}

/* The first parallax section carries each page's white title and subtitle. */
body:where(:not(.page-id-506)) #main-content .et_pb_section_0.et_pb_section_parallax .et_pb_module_heading,
body:where(:not(.page-id-506)) #main-content .et_pb_section_0.et_pb_section_parallax h1.entry-title {
	color: #fff !important;
}

/* Keep headings intentionally white on dark, image-backed, or green sections. */
body:where(:not(.page-id-506)) #main-content .et_pb_bg_layout_dark .et_pb_heading_container :is(h1, h2, h3, h4, h5, h6),
body:where(:not(.page-id-506)) #main-content .et_pb_bg_layout_dark .et_pb_module_heading,
body.home #main-content .et_pb_section_3_tb_body .et_pb_module_heading,
body.home #main-content .et_pb_section_4_tb_body .et_pb_module_heading,
body.home #main-content .et_pb_section_5_tb_body .et_pb_module_heading,
body.home #main-content .et_pb_section_7_tb_body .et_pb_module_heading,
body.home #main-content .et_pb_heading_6_tb_body .et_pb_module_heading,
body.home #main-content .et_pb_heading_9_tb_body .et_pb_module_heading,
body #post-222 .et_pb_heading_2 .et_pb_module_heading,
#post-2364 .et_pb_heading_0 .et_pb_module_heading,
#post-2364 .et_pb_heading_1 .et_pb_module_heading,
body #post-1433 h1.entry-title,
#post-1433 .et_pb_heading_0 .et_pb_module_heading,
body #post-1441 h1.entry-title,
#post-1441 .et_pb_heading_0 .et_pb_module_heading,
body #post-2497 h1.entry-title,
#post-2497 .et_pb_heading_0 .et_pb_module_heading {
	color: #fff !important;
}
