/*
Theme Name: Delicate Lines
Theme URI: https://delicatelines.hu
Author: Delicate Lines
Description: Egyedi blokk-téma a delicatelines.hu számára (a korábbi Squarespace oldal megjelenése alapján).
Version: 1.0.6
Requires at least: 6.6
Requires PHP: 8.1
License: GPLv2 or later
Text Domain: delicatelines
*/

/* ---------- Layout basics ---------- */
html { scroll-behavior: smooth; }
body { -webkit-font-smoothing: antialiased; }
.dl-main .wp-block-post-content > .alignfull,
.dl-main .wp-block-post-content > .alignfull + * { margin-block-start: 0; }
.dl-main .wp-block-post-content > :first-child { margin-block-start: 0; }
.dl-section { padding-block: var(--wp--preset--spacing--60); }
.dl-section--tight { padding-block: var(--wp--preset--spacing--50); }
.has-sage-background-color { --dl-rule: rgba(237, 235, 233, 0.2); }
strong, b { font-weight: 700; }
img { height: auto; }

/* ---------- Header ---------- */
.dl-header {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	grid-template-areas: "social logo ." ". nav .";
	align-items: center;
	row-gap: 14px;
	padding: 26px 4vw 12px;
	position: relative;
	z-index: 20;
}
.dl-header > * { margin: 0 !important; }
.dl-header .dl-header__social { grid-area: social; justify-self: start; gap: 12px; }
.dl-header .wp-block-site-logo { grid-area: logo; justify-self: center; }
.dl-header .wp-block-site-logo img { width: 263px; max-width: 100%; height: auto; }
.dl-header .wp-block-navigation { grid-area: nav; justify-self: center; }
.dl-header .wp-block-navigation .wp-block-navigation__container { gap: 0.45em; }
.dl-header .wp-block-navigation-item__content { padding-bottom: 1px; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size .2s; }
.dl-header .wp-block-navigation-item__content:hover,
.dl-header .current-menu-item > .wp-block-navigation-item__content { background-size: 100% 1px; }
.dl-header .wp-block-navigation a { text-decoration: none; }
.dl-header .dl-header__social { font-size: 21px !important; }
.dl-header .dl-header__social .wp-social-link svg { width: 1em !important; height: 1em !important; }

/* Front page: header sits on top of the hero image. */
.home .dl-header { position: absolute; top: 0; left: 0; right: 0; }
/* ...so the hero must start at the very top: drop the block gap WordPress puts above <main>. */
.home .wp-site-blocks > .dl-main { margin-block-start: 0; }

@media (max-width: 767px) {
	.dl-header { grid-template-columns: 1fr auto; grid-template-areas: "logo nav"; padding: 20px 6vw 12px; }
	.dl-header .dl-header__social { display: none; }
	.dl-header .wp-block-site-logo { justify-self: start; }
	.dl-header .wp-block-site-logo img { width: 205px; }
	.dl-header .wp-block-navigation { justify-self: end; }
}
/* Mobile menu overlay */
.wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--base) !important; color: var(--wp--preset--color--contrast) !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content { align-items: center !important; padding-top: 18vh; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container { align-items: center !important; gap: 1.1em !important; }
.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-family: var(--wp--preset--font-family--heading); font-size: 30px; }
.wp-block-navigation__responsive-container-open svg,
.wp-block-navigation__responsive-container-close svg { width: 34px; height: 34px; }

/* ---------- Footer ---------- */
.dl-footer { font-family: var(--wp--preset--font-family--heading); font-size: 16.5px; padding-block: 36px 34px; }
.dl-footer p { margin-block: 0 22px; }
.dl-footer a { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.dl-footer .wp-block-social-links { margin-top: 44px !important; gap: 8px; }
.dl-footer .wp-block-social-links .wp-social-link { padding: 0; }
.dl-footer .wp-block-social-links .wp-social-link a { padding: 7px !important; }
.dl-footer .wp-block-social-links .wp-social-link svg { width: 14px !important; height: 14px !important; }

/* ---------- Typography helpers ---------- */
.dl-italic-link a { font-style: italic; }
.dl-lead { font-size: var(--wp--preset--font-size--x-large); font-family: var(--wp--preset--font-family--heading); line-height: 1.37; }
.has-x-small-font-size { line-height: 1.6; }
.wp-block-heading em, .dl-hero h1 em { font-style: italic; }

/* ---------- Buttons ---------- */
.wp-block-button__link { transition: background-color .2s, color .2s; }
.has-sage-background-color .wp-block-button__link { color: var(--wp--preset--color--base); }
.has-sage-background-color .wp-block-button__link:hover { background: var(--wp--preset--color--base); color: var(--wp--preset--color--contrast); }

/* ---------- Hero (front page) ---------- */
.dl-hero.wp-block-cover { min-height: 780px; padding-bottom: clamp(60px, 13vw, 190px); }
.dl-hero h1 { text-align: center; max-width: 470px; margin-inline: auto !important; }
.dl-testimonials { padding-block: clamp(70px, 10vw, 150px) !important; }
.dl-narrow { max-width: 400px; margin-inline: auto !important; }
.dl-about-intro .wp-block-image { max-width: 435px; margin-inline: auto; }
@media (max-width: 767px) { .dl-hero.wp-block-cover { min-height: 490px !important; padding-bottom: 80px; } }

/* ---------- Image styles ---------- */
.wp-block-image.is-style-dl-arch img { border-radius: 999px 999px 0 0; aspect-ratio: 2 / 3; object-fit: cover; width: 100%; }
.wp-block-image.is-style-dl-circle img { border-radius: 50%; aspect-ratio: 1; object-fit: cover; width: 100%; }
.wp-block-image.is-style-dl-square img { aspect-ratio: 1; object-fit: cover; width: 100%; }
.wp-block-image.is-style-dl-portrait img { aspect-ratio: 3 / 4; object-fit: cover; width: 100%; }

/* ---------- Galleries ---------- */
/* Square grid (Referenciák, Instagram, home inspiration) */
.wp-block-gallery.is-style-dl-grid.has-nested-images figure.wp-block-image img { aspect-ratio: 1; object-fit: cover; height: 100%; }

/* Slideshow with thumbnails (home intro) */
.wp-block-gallery.is-style-dl-slideshow { display: block !important; position: relative; }
.wp-block-gallery.is-style-dl-slideshow > figure.wp-block-image { display: none !important; width: 100% !important; margin: 0 !important; }
.wp-block-gallery.is-style-dl-slideshow > figure.wp-block-image.is-active,
.wp-block-gallery.is-style-dl-slideshow:not(.dl-js) > figure.wp-block-image:first-child { display: block !important; }
.wp-block-gallery.is-style-dl-slideshow > figure.wp-block-image img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; height: auto !important; }
.dl-thumbs { display: flex; justify-content: center; gap: 4px; margin-top: 14px; }
.dl-thumbs button { border: 0; padding: 0; width: 54px; height: 54px; cursor: pointer; opacity: .55; background: none; }
.dl-thumbs button.is-active, .dl-thumbs button:hover { opacity: 1; }
.dl-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Horizontal carousel (Rólam) */
.wp-block-gallery.is-style-dl-carousel { display: flex !important; flex-wrap: nowrap !important; overflow-x: auto; scroll-snap-type: x mandatory; gap: 10px !important; scrollbar-width: none; }
.wp-block-gallery.is-style-dl-carousel::-webkit-scrollbar { display: none; }
.wp-block-gallery.is-style-dl-carousel > figure.wp-block-image { flex: 0 0 auto !important; width: auto !important; scroll-snap-align: start; margin: 0 !important; }
.wp-block-gallery.is-style-dl-carousel > figure.wp-block-image img { height: clamp(260px, 25vw, 360px) !important; width: auto !important; max-width: none; object-fit: cover; }
.dl-arrows { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.dl-arrows button { width: 34px; height: 34px; border: 0; background: var(--wp--preset--color--white); color: var(--wp--preset--color--contrast); cursor: pointer; font-size: 18px; line-height: 1; }
.dl-arrows--round button { width: 42px; height: 42px; border-radius: 50%; background: var(--wp--preset--color--base); }

/* ---------- Testimonial slider (home) ---------- */
.dl-slider { position: relative; }
.dl-slider.dl-js > .dl-slide { display: none; }
.dl-slider.dl-js > .dl-slide.is-active { display: block; animation: dl-fade .5s; }
.dl-slide { max-width: 480px; margin-inline: auto !important; text-align: center; }
.dl-slide p:first-child { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--x-large); line-height: 1.37; }
.dl-slider .dl-arrows { position: absolute; inset: 50% 0 auto; transform: translateY(-50%); justify-content: space-between; margin: 0; pointer-events: none; }
.dl-slider .dl-arrows button { pointer-events: auto; }
@media (max-width: 767px) { .dl-slider .dl-arrows { position: static; transform: none; justify-content: center; margin-top: 40px; } }
@keyframes dl-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Accordion (details blocks) ---------- */
.dl-accordion { border-top: 1px solid var(--dl-rule, rgba(33, 64, 69, .45)); }
.dl-accordion .wp-block-details { border-bottom: 1px solid var(--dl-rule, rgba(33, 64, 69, .45)); margin: 0 !important; padding: 0; }
.dl-accordion .wp-block-details summary { list-style: none; cursor: pointer; position: relative; padding: 22px 48px 22px 0; font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--large); line-height: 1.3; }
.dl-accordion .wp-block-details summary::-webkit-details-marker { display: none; }
.dl-accordion .wp-block-details summary::after { content: ""; position: absolute; right: 4px; top: 50%; width: 12px; height: 12px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: translateY(-75%) rotate(45deg); transition: transform .2s; }
.dl-accordion .wp-block-details[open] summary::after { transform: translateY(-25%) rotate(-135deg); }
.dl-accordion .wp-block-details > :not(summary) { margin: 0 0 22px; }
.has-sage-background-color .dl-accordion .wp-block-details summary { padding-block: 16px; font-size: 16.5px; }
.dl-why > .wp-block-columns { max-width: 1150px !important; }
.has-sage-background-color .dl-accordion { --dl-rule: rgba(237, 235, 233, .25); }

/* ---------- Lists with bold leads ---------- */
.dl-list { padding-left: 1.6em; }
.dl-list li { margin-bottom: .4em; }

/* ---------- Blog cards ---------- */
.dl-postcards .wp-block-post-title { font-size: var(--wp--preset--font-size--x-large); text-align: center; margin-top: 28px; }
.dl-postcards .wp-block-post-title a { text-decoration: none; }
.dl-postcards .wp-block-post-featured-image img { aspect-ratio: 3 / 4; object-fit: cover; }
.dl-mini-posts .wp-block-post-title { font-family: var(--wp--preset--font-family--body); font-size: 15.7px; line-height: 1.3; margin-top: 10px; }
.dl-mini-posts .wp-block-post-title a { text-decoration: none; }
.dl-mini-posts .wp-block-post-featured-image img { aspect-ratio: 1; object-fit: cover; }
.dl-blog-card { padding: 24px 22px 40px !important; max-width: 550px; }

/* Blog teaser cover (home): full width minus a 28px frame */
.dl-blog-teaser.wp-block-cover { margin-left: calc(var(--wp--style--root--padding-left) * -1 + 28px) !important; margin-right: calc(var(--wp--style--root--padding-right) * -1 + 28px) !important; width: auto !important; max-width: none !important; padding-inline: 6vw; }
.dl-blog-teaser h2 { font-size: var(--wp--preset--font-size--xx-large); }
@media (max-width: 767px) { .dl-blog-teaser.wp-block-cover { margin-left: calc(var(--wp--style--root--padding-left) * -1) !important; margin-right: calc(var(--wp--style--root--padding-right) * -1) !important; padding-inline: 6vw; } }

/* Framed full-width image (home, sage frame) */
.dl-frame-img { padding-inline: 28px; box-sizing: border-box; }
.dl-frame-img img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
@media (max-width: 767px) { .dl-frame-img { padding-inline: 0; } }

/* ---------- Single post ---------- */
.dl-single .wp-block-post-content .alignleft { margin: 6px 22px 12px 0; }
.dl-postnav { font-family: var(--wp--preset--font-family--heading); font-size: var(--wp--preset--font-size--x-large); padding: 60px 28px 40px; }
.dl-postnav a { text-decoration: none; }
.dl-postnav .wp-block-post-navigation-link__arrow-next,
.dl-postnav .wp-block-post-navigation-link__arrow-previous { display: none; }
.dl-postnav .post-navigation-link-next a::before { content: "‹\00a0\00a0"; }
.dl-postnav .post-navigation-link-previous a::after { content: "\00a0\00a0›"; }
.dl-postnav .post-navigation-link-previous { margin-left: auto; text-align: right; }

/* ---------- Plain table (Impresszum) ---------- */
.wp-block-table.is-style-dl-plain table { border: 0; width: auto; }
.wp-block-table.is-style-dl-plain td { border: 0; padding: 4px 40px 4px 0; vertical-align: top; }
.wp-block-table.is-style-dl-plain td:first-child { font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .wp-block-table.is-style-dl-plain td { display: block; padding: 0; } .wp-block-table.is-style-dl-plain td:last-child { margin-bottom: 10px; } }

/* ---------- Columns: stack text first on mobile ---------- */
@media (max-width: 781px) {
	.wp-block-columns.dl-reverse-mobile { flex-direction: column-reverse; }
}

/* ---------- Pinterest "Save" button on photos (assets/js/site.js) ---------- */
.dl-pin-host { position: relative; }
.dl-pin { position: absolute; top: 10px; left: 10px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; background: #E60023; color: #fff; display: grid; place-items: center; opacity: 0; transition: opacity .2s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); text-decoration: none; }
.dl-pin svg { width: 16px; height: 16px; fill: currentColor; }
.dl-pin-host:hover .dl-pin, .dl-pin:focus-visible { opacity: 1; }
.dl-pin:focus-visible { outline: 2px solid var(--wp--preset--color--contrast); outline-offset: 2px; }
@media (hover: none) { .dl-pin { opacity: .95; } }
/* In the slideshow only the visible slide gets a button (hidden slides are display:none anyway). */
/* Slideshow: soft cross-fade when the next picture comes in. */
.wp-block-gallery.is-style-dl-slideshow.dl-js > figure.wp-block-image.is-active { animation: dl-fade .7s ease; }
@media (prefers-reduced-motion: reduce) { .wp-block-gallery.is-style-dl-slideshow.dl-js > figure.wp-block-image.is-active { animation: none; } }
/* Core gallery CSS stretches every <a> inside a gallery figure to 100% (with an id-level selector), so fix the pin's box. */
.wp-block-gallery figure.wp-block-image > a.dl-pin,
figure.wp-block-image > a.dl-pin { position: absolute !important; top: 10px !important; left: 10px !important; width: 26px !important; height: 26px !important; min-width: 0 !important; max-width: none !important; flex: none !important; margin: 0 !important; padding: 0 !important; display: grid !important; object-fit: initial !important; }
