/*
Theme Name: Smiling String Orchestra
Template: twentytwentyfour
Description: Custom child theme for Smiling String Orchestra, based on Twenty Twenty-Four.
Version: 1.0
*/

/* ---- Fonts (matches original Divi site: Poppins for headings/nav, Open Sans for body) ---- */
.site-nav-bar .wp-block-navigation-item__content,
.site-nav-bar .wp-block-navigation-item__label,
h1, h2, h3, h4, h5, h6,
.wp-block-heading {
	font-family: "Poppins", sans-serif;
}
body, p, li, a {
	font-family: "Open Sans", sans-serif;
}

/* ---- Base typography (matches original: 14px body text, grey colour) ---- */
body {
	font-size: 14px;
	line-height: 1.7;
	color: #666666;
}

/* ---- Big centred section headings (Hudba je radost, Aktuality, Podpořili nás) ---- */
.wp-block-heading.has-text-align-center {
	font-size: 37px;
	font-weight: 300;
	letter-spacing: normal;
	line-height: 1.2;
}

/* ---- Navigation bar text colour ---- */
.site-nav-bar .wp-block-navigation-item__content,
.site-nav-bar .wp-block-navigation-item__label,
.site-nav-bar .wp-block-navigation__submenu-icon path {
	color: #ffffff !important;
	fill: #ffffff !important;
	font-size: 17px;
	font-weight: 400;
	text-transform: uppercase;
}
.site-nav-bar .wp-block-navigation-item.current-menu-item > .wp-block-navigation-item__content,
.site-nav-bar .wp-block-navigation-item__content:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
}
.site-nav-bar .wp-block-navigation__responsive-container-open,
.site-nav-bar .wp-block-navigation__responsive-container-close {
	color: #ffffff;
}
.site-nav-bar .wp-block-navigation-submenu .wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--smiling-blue);
}
.site-nav-bar .wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	color: #ffffff !important;
	text-transform: uppercase;
}

/* ---- Header logo (original Logo-krivky.svg has ratio ~257:119 = 2.16:1) ---- */
.site-logo-wrap {
	width: 225px;
	flex-shrink: 0;
}
.site-logo-wrap img {
	display: block;
	width: 100% !important;
	height: auto !important;
}

/* ---- Sticky header: keep nav bar pinned to top, always visible ---- */
.wp-site-blocks > header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 999;
}
.site-nav-bar {
	position: sticky;
	top: 0;
	z-index: 999;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* ---- Separator line between logo and menu ---- */
.site-nav-separator.wp-block-separator {
	width: 100%;
	max-width: none;
	opacity: 0.4;
	margin: 12px 0;
	border: none;
	border-top: 1px solid #ffffff;
}

/* ---- Facebook button in main nav ---- */
.site-nav-bar .nav-facebook-btn > .wp-block-navigation-item__content {
	background-color: #3b3b58;
	border: 2px solid #ffffff;
	border-radius: 4px;
	padding: 10px 32px !important;
	font-weight: 600;
	display: inline-block;
}
.site-nav-bar .nav-facebook-btn > .wp-block-navigation-item__content:hover {
	background-color: #2c2c44;
	text-decoration: none;
}

/* ---- Mobile overlay menu: no focus outline on the opening item ---- */
.wp-block-navigation__responsive-container .wp-block-navigation-item__content:focus {
	outline: none;
	box-shadow: none;
}

/* ---- Mobile header: smaller logo + hamburger menu, less reserved space ---- */
@media (max-width: 781px) {
	.site-nav-bar {
		padding-top: 15px !important;
		padding-bottom: 12px !important;
	}
	.site-logo-wrap {
		width: 140px;
	}
}
.footer-logo-wrap {
	width: 220px;
	margin-bottom: 16px;
}
.footer-logo-wrap img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---- Hero section (gray full-width background) ---- */
.hero-section {
	background-color: #f4f4f4;
}

/* ---- Hero image carousel (slide right to left) ---- */
.hero-carousel {
	position: relative;
	width: 100%;
	height: 420px;
	overflow: hidden;
}
.hero-carousel .wp-block-image,
.hero-carousel figure {
	position: absolute;
	inset: 0;
	margin: 0;
}
.hero-carousel img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: translateX(100%);
	animation: hero-carousel-slide 24s infinite;
}
.hero-carousel .wp-block-image:nth-child(1) img { animation-delay: 0s; }
.hero-carousel .wp-block-image:nth-child(2) img { animation-delay: 6s; }
.hero-carousel .wp-block-image:nth-child(3) img { animation-delay: 12s; }
.hero-carousel .wp-block-image:nth-child(4) img { animation-delay: 18s; }

@keyframes hero-carousel-slide {
	0%    { transform: translateX(100%); }
	4%    { transform: translateX(0%); }
	21%   { transform: translateX(0%); }
	25%   { transform: translateX(-100%); }
	100%  { transform: translateX(-100%); }
}

@media (max-width: 781px) {
	.hero-carousel { height: 260px; }
}

/* ---- Recent posts sidebar next to the hero ---- */
.recent-posts-box {
	padding: 24px;
	height: 420px;
	overflow-y: auto;
	box-sizing: border-box;
	border-left: 1px solid #dddddd;
}
.recent-posts-box h3 {
	margin-top: 0;
	font-family: "Poppins", sans-serif;
	font-size: 16px;
	font-weight: 500;
	color: #333333;
	text-transform: none;
	letter-spacing: normal;
}
.recent-posts-box .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
}
.recent-posts-box .wp-block-post-template li {
	margin-bottom: 14px;
}
.recent-posts-box .wp-block-post-title {
	font-size: 14px;
	font-weight: 700;
	font-family: "Poppins", sans-serif;
	margin: 0;
	line-height: 1.4;
}
.recent-posts-box .wp-block-post-title a {
	color: var(--wp--preset--color--smiling-blue);
}

/* ---- "Hudba je radost" intro ---- */
.intro-text p {
	font-style: italic;
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: #000000;
}

/* ---- Aktuality section ---- */
.aktuality-section {
	background-color: var(--wp--preset--color--smiling-blue);
}
.aktuality-section h2 {
	color: #ffffff !important;
}

/* ---- Aktuality list page (post archive used as "Aktuality" page) ---- */
.aktuality-list-section {
	background-color: #f7f7f7;
}

.aktuality-section .wp-block-post-template,
.aktuality-list-section .wp-block-post-template {
	gap: 30px;
}
.aktuality-section .wp-block-post-template > li,
.aktuality-list-section .wp-block-post-template > li {
	position: relative;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	padding: 16px;
	border-radius: 4px;
}

/* Featured image preview (fixed height, cropped) with hover zoom */
.aktuality-section .wp-block-post-template > li .wp-block-post-featured-image,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-featured-image {
	position: relative;
	overflow: hidden;
	border-radius: 4px;
}
.aktuality-section .wp-block-post-template > li .wp-block-post-featured-image img,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	height: 180px;
	object-fit: cover;
	transition: transform 0.3s ease;
}
.aktuality-section .wp-block-post-template > li .wp-block-post-featured-image:hover img,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-featured-image:hover img {
	transform: scale(1.06);
}
.aktuality-section .wp-block-post-template > li .wp-block-post-title,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-title {
	font-family: "Poppins", sans-serif;
	font-size: 20px;
	font-weight: 700;
	line-height: 1.2;
	margin: 0 0 8px;
}
.aktuality-section .wp-block-post-template > li .wp-block-post-title a,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-title a {
	color: var(--wp--preset--color--smiling-blue);
}
.aktuality-section .wp-block-post-template > li .wp-block-post-date,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-date {
	font-style: italic;
	color: #666;
	font-size: 14px;
}
.aktuality-section .wp-block-post-template > li .wp-block-post-excerpt p,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-excerpt p {
	font-size: 14px;
	color: #666666;
}
.aktuality-section .wp-block-post-template > li .wp-block-post-excerpt,
.aktuality-list-section .wp-block-post-template > li .wp-block-post-excerpt {
	flex-grow: 1;
}

/* "Aktuality" badge overlaid on the featured image */
.aktuality-section .wp-block-post-template > li .post-category-badge,
.aktuality-list-section .wp-block-post-template > li .post-category-badge {
	position: absolute;
	top: 12px;
	left: 12px;
	margin: 0;
	background-color: var(--wp--preset--color--smiling-blue);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 3px;
	z-index: 2;
}
.aktuality-section .wp-block-post-template > li .post-category-badge a,
.aktuality-list-section .wp-block-post-template > li .post-category-badge a {
	color: #ffffff !important;
	text-decoration: none;
}
.aktuality-section .wp-block-read-more,
.aktuality-list-section .wp-block-read-more {
	display: inline-block;
	align-self: flex-start;
	margin-top: auto;
	background-color: var(--wp--preset--color--smiling-blue);
	color: #ffffff !important;
	padding: 6px 18px;
	border-radius: 3px;
	text-decoration: none !important;
	font-size: 0.9rem;
}

/* Pagination links */
.aktuality-list-section .wp-block-query-pagination {
	margin-top: 30px;
	font-family: "Poppins", sans-serif;
}
.aktuality-list-section .wp-block-query-pagination a {
	color: var(--wp--preset--color--smiling-blue);
	text-decoration: none;
}

/* ---- Partner logos row ---- */
.partner-logos {
	width: 100%;
	justify-content: space-between;
	flex-wrap: nowrap;
}
.partner-logos figure {
	display: flex;
	align-items: center;
}
.partner-logos img {
	height: 80px;
	width: auto;
}

/* ---- "O orchestru" section pages: widen content to 1080px and center it ---- */
:is(.page-id-126, .page-id-127, .page-id-128, .page-id-129, .page-id-130, .page-id-131) .entry-content {
	max-width: 1080px;
	margin-left: auto;
	margin-right: auto;
}
:is(.page-id-126, .page-id-127, .page-id-128, .page-id-129, .page-id-130, .page-id-131) .entry-content > * {
	max-width: 1080px;
}

/* ---- Imported content pages (O orchestru, Členové, Historie, ...) ---- */
.entry-content .et_pb_with_background {
	background-color: #f7f7f7;
	box-sizing: border-box;
	padding: 54px 30px;
	margin: 0;
}
.entry-content .et_pb_with_background > h2:first-of-type {
	text-align: center;
	text-transform: uppercase;
	font-size: 37px;
	font-weight: 300;
	color: var(--wp--preset--color--smiling-blue);
	margin: 0 0 30px;
}
.entry-content .et_pb_with_background > h2:first-of-type p {
	font: inherit;
	color: inherit;
	margin: 0;
}
.entry-content .et_pb_with_background p {
	font-family: "Poppins", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: #000000;
}
.entry-content .et_pb_with_background > img,
.entry-content .et_pb_with_background > p > img:not(.alignleft):not(.alignright) {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 30px;
}
/* ---- Year headings + lists (Historie, Repertoár, ...) ---- */
.entry-content .et_pb_with_background p a {
	color: #2ea3f2;
	text-decoration: none;
}
.entry-content .et_pb_with_background p strong {
	font-size: 15px;
	font-weight: 700;
	color: #000000;
	display: block;
	margin-bottom: 5px;
}
.entry-content .et_pb_with_background ul {
	list-style: disc;
	padding-left: 20px;
	margin: 0 0 20px;
}
/* ---- Inline floated images (Dirigent) ---- */
.entry-content .et_pb_with_background img.alignleft {
	float: left;
	margin: 0 15px 15px 0;
	width: auto;
	height: auto;
}
.entry-content .et_pb_with_background img.alignright {
	float: right;
	margin: 0 0 15px 15px;
	width: auto;
	height: auto;
}
.entry-content .et_pb_with_background ul li {
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	line-height: 1.6;
	color: #666666;
	margin-bottom: 6px;
}

/* ---- Členové (member grid) ---- */
.entry-content .members-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 30px 20px;
	margin-top: 20px;
}
.entry-content .member-card {
	width: calc(25% - 15px);
	box-sizing: border-box;
}
.entry-content .member-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 2 / 3;
	object-fit: cover;
}
.entry-content .member-card h4 {
	font-family: "Poppins", sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: #333333;
	margin: 7px 0 0;
}
.entry-content .member-card p {
	font-family: "Poppins", sans-serif;
	font-style: italic;
	font-size: 14px;
	font-weight: 400;
	color: #666666;
	margin: 0;
}
@media (max-width: 781px) {
	.entry-content .member-card {
		width: calc(50% - 10px);
	}
}

/* ---- Classic gallery shortcode (sub-gallery pages) ---- */
.entry-content .gallery {
	display: flex;
	flex-wrap: wrap;
	margin: 0 -5px;
}
.entry-content .gallery-item {
	box-sizing: border-box;
	padding: 5px;
	margin: 0;
	width: 100%;
}
.entry-content .gallery-columns-3 .gallery-item {
	width: 33.333%;
}
.entry-content .gallery-item img {
	display: block;
	width: 100%;
	height: auto;
}
@media (max-width: 781px) {
	.entry-content .gallery-columns-3 .gallery-item {
		width: 50%;
	}
}

/* ---- Fotogalerie grid ---- */
.entry-content .gallery-grid {
	display: flex;
	flex-wrap: wrap;
	gap: 30px 20px;
	margin-top: 20px;
}
.entry-content .gallery-card {
	width: calc(33.333% - 14px);
	box-sizing: border-box;
}
.entry-content .gallery-card img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}
.entry-content .gallery-card h4 {
	font-family: "Poppins", sans-serif;
	font-size: 17px;
	font-weight: 600;
	color: #333333;
	margin: 10px 0 0;
}
.entry-content .gallery-card > a:last-child {
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	color: var(--wp--preset--color--smiling-blue);
}
@media (max-width: 781px) {
	.entry-content .gallery-card {
		width: calc(50% - 10px);
	}
}

/* ---- Plain content pages (Nadcházející akce) ---- */
.entry-content #main-content h1 {
	font-family: "Open Sans", sans-serif;
	font-size: 30px;
	font-weight: 500;
	color: #333333;
	text-align: left;
	margin: 0 0 20px;
}

/* ---- Footer ---- */
.site-footer-columns {
	color: #ffffff;
}
.site-footer-columns a {
	color: #ffffff;
}
.site-footer-columns h3 {
	color: #ffffff !important;
	font-size: 22px;
	font-weight: 500;
	letter-spacing: normal;
}

/* Contact icons */
.footer-contact-row {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.footer-icon {
	width: 14px;
	height: 14px;
	flex-shrink: 0;
	color: var(--wp--preset--color--smiling-blue);
}

/* Contact form */
.footer-contact-form {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}
.footer-contact-form .form-row {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.footer-contact-form label {
	font-family: "Poppins", sans-serif;
	font-size: 13px;
	color: #cccccc;
}
.footer-contact-form input,
.footer-contact-form textarea {
	font-family: "Open Sans", sans-serif;
	font-size: 14px;
	color: #ffffff;
	background-color: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 4px;
	padding: 8px 12px;
	resize: vertical;
}
.footer-contact-form input:focus,
.footer-contact-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--smiling-blue);
}
.footer-contact-form .footer-form-submit {
	align-self: flex-start;
	display: inline-block;
	background-color: var(--wp--preset--color--smiling-blue);
	color: #ffffff;
	border: none;
	padding: 8px 24px;
	border-radius: 3px;
	font-family: "Poppins", sans-serif;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color 0.2s ease;
}
.footer-contact-form .footer-form-submit:hover {
	background-color: var(--wp--preset--color--smiling-blue-dark);
}
.footer-contact-form .footer-form-message {
	margin: 0;
	font-size: 13px;
}
.footer-contact-form .footer-form-message.success {
	color: #7fd87f;
}
.footer-contact-form .footer-form-message.error {
	color: #ff8a8a;
}

/* Bottom copyright bar */
.site-footer-bottom {
	border-top: 1px solid rgba(255, 255, 255, 0.1);
	padding-top: 16px;
	padding-bottom: 16px;
}
.site-footer-bottom p {
	margin: 0;
}

/* ---- Single post template ---- */
.post-breadcrumb {
	font-family: "Poppins", sans-serif;
	font-size: 13px;
	color: #666666;
	margin: 0 0 20px;
}
.post-breadcrumb a {
	color: var(--wp--preset--color--smiling-blue);
	text-decoration: none;
}

.single-post-columns {
	gap: 40px;
	align-items: flex-start;
}
.single-post-content-col {
	flex-basis: 700px;
	flex-grow: 0;
	max-width: 700px;
}
.single-post-sidebar {
	flex-basis: 300px;
	flex-grow: 0;
	max-width: 300px;
	border-left: 1px solid #dddddd;
	padding-left: 24px;
}

/* Featured image: fixed width regardless of portrait/landscape orientation */
.single-post-featured-image img {
	width: 448px;
	max-width: 100%;
	height: auto;
	display: block;
	margin: 0 0 20px;
}

.single-post-meta {
	align-items: center;
	gap: 12px;
	margin-bottom: 20px;
}
.single-post-meta .post-category-badge {
	display: inline-block;
	background-color: var(--wp--preset--color--smiling-blue);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 12px;
	border-radius: 3px;
}
.single-post-meta .post-category-badge a {
	color: #ffffff !important;
	text-decoration: none;
}
.single-post-meta .wp-block-post-date {
	font-style: italic;
	color: #666666;
	font-size: 14px;
}

/* Sidebar: list of other posts */
.single-post-sidebar h3 {
	margin-top: 0;
	font-family: "Poppins", sans-serif;
	font-size: 16px;
	font-weight: 600;
	color: var(--wp--preset--color--smiling-black);
}
.single-post-sidebar .wp-block-post-template {
	list-style: none;
	margin: 0;
	padding: 0;
}
.single-post-sidebar .wp-block-post-template li {
	margin-bottom: 14px;
}
.single-post-sidebar .wp-block-post-title {
	font-size: 14px;
	font-weight: 700;
	font-family: "Poppins", sans-serif;
	margin: 0;
	line-height: 1.4;
}
.single-post-sidebar .wp-block-post-title a {
	color: var(--wp--preset--color--smiling-blue);
}

/* Gallery below post content */
.entry-content .wp-block-gallery {
	margin-top: 30px;
}

/* ---- Lightbox for classic galleries (Fotogalerie sub-pages) ---- */
.entry-content .gallery-item a {
	cursor: zoom-in;
}
.ssc-lightbox {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	background-color: rgba(0, 0, 0, 0.85);
	z-index: 9999;
}
.ssc-lightbox.is-open {
	display: flex;
}
.ssc-lightbox-img {
	max-width: 90vw;
	max-height: 90vh;
	box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
}
.ssc-lightbox-close,
.ssc-lightbox-prev,
.ssc-lightbox-next {
	position: absolute;
	background: none;
	border: none;
	color: #ffffff;
	font-size: 36px;
	line-height: 1;
	cursor: pointer;
	padding: 10px;
}
.ssc-lightbox-close {
	top: 10px;
	right: 20px;
}
.ssc-lightbox-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}
.ssc-lightbox-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

@media (max-width: 781px) {
	.single-post-content-col,
	.single-post-sidebar {
		flex-basis: 100%;
		max-width: 100%;
		border-left: none;
		padding-left: 0;
	}
}
