/*
Theme Name: Liron Almog
Theme URI: https://lironalmog.org
Description: Child theme of Kadence for the Liron Almog photography site. Holds site-specific styles and snippets so customizations survive Kadence updates.
Author: Yaniv
Template: kadence
Version: 1.0.0
Text Domain: lironalmog
*/

/* ---- Logo --------------------------------------------------------------
   Reproduce the legacy logo EXACTLY (measured live from lironalmog.org):
   Tahoma, 12px, letter-spacing 2.3px, #000, weight 400.
   Kadence outputs the site title as a plain <p class="site-title">text</p>,
   so the real (bilingual) name is hidden and the legacy text painted via ::before
   (the real name stays in the DOM for SEO / RTL). */
.site-header .site-title {
	font-size: 0 !important;
	letter-spacing: 0 !important;
	line-height: 1;
}
.site-header .site-title::before {
	content: "Liron Almog Photographer";
	font-family: 'Century Gothic', sans-serif; /* exact legacy .finallyH1 */
	font-size: 21px;          /* 1.78em of the legacy 12px container */
	letter-spacing: -0.15px;
	font-weight: 400;
	text-transform: none;
	color: #111111;
	white-space: nowrap;
}

/* ---- Footer social (legacy: Facebook + Instagram) ---------------------- */
.la-footer-social {
	margin-top: 6px;
	font: 400 12px/1.6 Tahoma, Geneva, sans-serif;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}
.la-footer-social a {
	color: inherit;
	text-decoration: none;
	margin: 0 8px;
}
.la-footer-social a:hover { opacity: .65; }

/* ---- Course section headings (legacy gray bar) ------------------------ */
.entry-content h3.has-light-gray-background-color,
.entry-content h3.has-background.has-light-gray-background-color {
	background: #ededed;
	padding: 8px 16px;
	margin-top: 1.6rem;
}
.wp-block-media-text__content { padding: 0 1.4rem; }

/* ---- Per-language direction + modern Hebrew font ---------------------- */
/* direction (not just text-align) is what moves list markers to the correct side. */
.entry-content [dir="rtl"] { direction: rtl; text-align: right; }
.entry-content [dir="ltr"] { direction: ltr; text-align: left; }
.entry-content [dir="rtl"],
.entry-content [dir="rtl"] * {
	font-family: 'Open Sans', 'Arial Hebrew', Arial, sans-serif;
}
/* Global RTL list fix: markers sit on the start side (right in RTL) and stay
   inside the content box instead of overflowing the grid/column. */
.entry-content ul,
.entry-content ol {
	padding-inline-start: 1.6em;
	padding-inline-end: 0;
	list-style-position: outside;
}
.entry-content [dir="rtl"] li { text-align: right; }

/* ---- Galleries: break out to near-full width on desktop (small margins) -
   Applies on the full-width/unboxed gallery pages only. */
@media (min-width: 1025px) {
	.content-style-unboxed .entry-content .modula-gallery {
		width: 94vw;
		max-width: 94vw;
		margin-left: calc(50% - 47vw);
		margin-right: calc(50% - 47vw);
	}
}

/* ---- Readable width for text-heavy content pages (About/Contact/Courses) -
   The wide global container is great for galleries but makes prose lines too
   long; constrain these pages to a comfortable centered column. */
@media (min-width: 1025px) {
	body.page-id-146 .entry-content,
	body.page-id-1467 .entry-content,
	body.page-id-1472 .entry-content {
		max-width: 1080px;
		margin-left: auto;
		margin-right: auto;
	}
}

/* ---- Header social icons: single colour matching the text/logo (no fill) - */
.site-header .header-social-wrap .social-button,
.site-header .header-social-inner-wrap .social-button {
	background: transparent !important;
	border: none !important;
	box-shadow: none !important;
	color: #111 !important;
	padding: 4px 6px !important;
}
.site-header .header-social-wrap .social-button svg,
.site-header .header-social-wrap .social-button .kadence-svg-iconset {
	fill: currentColor !important;
	color: #111 !important;
}
.site-header .header-social-wrap .social-button:hover { color: #777 !important; }

/* ---- Contact form (Contact Form 7) ------------------------------------ */
.wpcf7-form { max-width: 560px; }
.wpcf7-form p { margin: 0; }
.wpcf7-form .la-field { display: block; margin: 0 0 1.1rem; }
.wpcf7-form .la-label { display: block; margin-bottom: .4rem; font-weight: 600; font-size: .95rem; }
.wpcf7-form .la-label .la-en { font-weight: 400; color: #999; font-size: .85em; }
.wpcf7-form input.wpcf7-form-control,
.wpcf7-form textarea.wpcf7-form-control {
	width: 100%;
	box-sizing: border-box;
	padding: .7rem .9rem;
	border: 1px solid #d7d7d7;
	border-radius: 6px;
	background: #fff;
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color .15s ease;
}
.wpcf7-form input.wpcf7-form-control:focus,
.wpcf7-form textarea.wpcf7-form-control:focus { border-color: #111; outline: none; }
.wpcf7-form textarea.wpcf7-form-control { min-height: 150px; resize: vertical; }
.wpcf7-form .la-submit { text-align: center; margin-top: .4rem; }
.wpcf7-form .submitCenter,
.wpcf7-form input.wpcf7-submit {
	background: #111;
	color: #fff;
	border: 0;
	border-radius: 6px;
	padding: .75rem 2.4rem;
	font-size: 1rem;
	letter-spacing: .5px;
	cursor: pointer;
	transition: background .15s ease;
}
.wpcf7-form .submitCenter:hover,
.wpcf7-form input.wpcf7-submit:hover { background: #444; }
.wpcf7-form .wpcf7-not-valid-tip { color: #c0392b; font-size: .85rem; }
.wpcf7-form .wpcf7-response-output { border-radius: 6px; margin: .8rem 0 0; padding: .6rem .9rem; }

/* ---- reCAPTCHA badge: hide globally ----------------------------------- */
.grecaptcha-badge { visibility: collapse !important; }

/* ---- Mobile menu: social icons at the bottom (light on the dark drawer) - */
.popup-drawer-layout-fullwidth .mobile-social-inner-wrap,
.popup-drawer-layout-fullwidth .header-mobile-social-wrap { margin-top: 1.6rem; }
/* plain white glyphs (no filled square) on the dark drawer — high specificity to win */
body .popup-drawer-layout-fullwidth .social-button.social-button {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
	color: #fff !important;
}
body .popup-drawer-layout-fullwidth .social-button.social-button svg {
	fill: #fff !important;
	color: #fff !important;
}
body .popup-drawer-layout-fullwidth .social-button.social-button:hover svg { fill: #bbb !important; }

/* ---- Footer: Contact me + social; line break after copyright on mobile - */
.la-footer-links a { color: inherit; text-decoration: none; margin: 0 .5em; }
.la-footer-links a:hover { opacity: .65; }
.la-copyright + .la-footer-links::before { content: " · "; opacity: .45; }
@media (max-width: 768px) {
	.la-copyright, .la-footer-links { display: block; }
	.la-copyright + .la-footer-links::before { content: none; }
	.la-footer-links { margin-top: .45rem; }
}

/* ---- Gallery loading spinner (until Modula finishes its layout) -------- */
.entry-content .modula-gallery { position: relative; min-height: 140px; }
.entry-content .modula-gallery:not(.tg-loaded):not(:has(.tg-loaded))::after {
	content: ""; position: absolute; top: 50px; left: 50%; width: 42px; height: 42px;
	margin-left: -21px; border: 3px solid rgba(0,0,0,.15); border-top-color: #111;
	border-radius: 50%; animation: la-spin .8s linear infinite; z-index: 3;
}
@keyframes la-spin { to { transform: rotate(360deg); } }

/* ---- Mobile header: logo left, hamburger right (override RTL mirroring) - */
@media (max-width: 1024px) {
	.site-main-header-inner-wrap,
	.site-header-row.site-header-row-has-sides { direction: ltr; }
}

/* ---- Mobile menu drawer: open from the left, text left-aligned --------- */
.popup-drawer-layout-fullwidth .drawer-inner,
.popup-drawer-layout-fullwidth .menu-container,
.mobile-navigation,
.mobile-navigation .menu-item { direction: ltr; text-align: left; }
.mobile-navigation .menu-item a { justify-content: flex-start; text-align: left; }
/* align the whole drawer content to the left edge */
.popup-drawer-layout-fullwidth .drawer-content { margin-right: auto; margin-left: 0; max-width: 80vw; }

/* ---- Mobile: unfloat content images so they don't crowd text ---------- */
@media (max-width: 600px) {
	.entry-content .wp-block-image.alignright,
	.entry-content .wp-block-image.alignleft {
		float: none !important;
		width: 100% !important;
		margin: 0 0 1rem !important;
	}
	.entry-content .wp-block-image.alignright img,
	.entry-content .wp-block-image.alignleft img {
		width: 100% !important;
		max-width: 100% !important;
		height: auto;
	}
	/* Slightly smaller logo so the full name always fits very narrow phones. */
	.site-header .site-title::before { font-size: 18px; letter-spacing: -0.2px; }
}
