/*
Theme Name: DigiAdvies
Theme URI: https://www.digiadvies.com/
Author: DigiAdvies
Description: Block theme replicating the DigiAdvies JouwWeb design: black page, content in a rounded dark box over a full-width hero, turquoise headings, orange buttons, Open Sans. Colours, header, footer and menu are editable in Weergave > Editor.
Requires at least: 6.6
Tested up to: 6.9
Requires PHP: 8.1
Version: 1.0.0
License: GPL-2.0-or-later
Text Domain: digiadvies
*/

/* ---- Page structure ---- */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > * { margin-block-start: 0 !important; }
.wp-site-blocks > main, .wp-site-blocks > .da-has-hero { flex: 1 0 auto; }
.da-main { padding-top: 0; padding-bottom: 0; }
.da-main .wp-block-post-content > * { margin-block-start: 0; }
.da-main .wp-block-post-content > * + * { margin-block-start: 0; }

/* ---- Header ---- */
.da-header { position: relative; z-index: 20; background: var(--wp--preset--color--da-orange); padding-bottom: 34px !important; }
.da-has-hero .da-header { position: absolute; top: 0; left: 0; right: 0; background: transparent; padding-bottom: 18px !important; }
.da-header .wp-block-site-logo img { height: auto; display: block; }
.da-nav { gap: 6px; }
.da-header .wp-block-navigation-item__content { padding: 7px 18px; border-radius: 5px; color: #fff; }
.da-header .wp-block-navigation-item__content:hover { box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.da-header .current-menu-item > .wp-block-navigation-item__content,
.da-header .wp-block-navigation-item__content[aria-current="page"] { box-shadow: inset 0 0 0 2px #fff; }
.da-header .wp-block-search__button { background: transparent; color: #fff; padding: 6px; }
.da-header .wp-block-search__button svg { width: 26px; height: 26px; }
.da-header .wp-block-search:not(.wp-block-search__searchfield-hidden) .wp-block-search__input { width: 200px !important; min-width: 200px !important; flex: 0 0 auto !important; background: #fff; color: #222; border: 1px solid #ccc; padding: 6px 10px; }
.da-header .wp-block-navigation__responsive-container.is-menu-open { background: #000; }

/* ---- Hero (full-width Cover block at the top of Home/Blog) ---- */
.da-hero { padding-top: 110px; padding-bottom: 60px; }
/* Height as on JouwWeb: ratio x viewport height, capped at ratio x ~1155 px (home 0.76, blog 0.4). */
.da-hero[style*="min-height:76vh"] { min-height: min(76vh, 878px) !important; }
.da-hero[style*="min-height:40vh"] { min-height: min(40vh, 462px) !important; }
.da-hero .da-hero-button .wp-block-button__link { border-radius: 8px; }
/* Hero text lines up with the logo and the content box (1030 px column), as on the old site. */
.da-hero .wp-block-cover__inner-container { width: 100% !important; max-width: 1030px; margin-left: auto !important; margin-right: auto !important; }
.da-hero .da-hero-title { font-size: 45px; font-weight: 700; line-height: 1.2; color: #fff; margin: 0 0 24px; }
.da-hero .da-hero-button .wp-block-button__link { font-size: 22.4px; font-weight: 700; padding: 11px 22px; }

/* ---- Content "strips" (boxed 1090 px) ---- */
.da-strip { padding: 25px 30px !important; margin-top: 0 !important; margin-bottom: 0 !important; }
.da-strip > * + * { margin-block-start: 1em; }
.da-strip > :first-child { margin-top: 0; }
/* The box overlaps whatever is above it (hero or orange header) by 30 px, with rounded top corners. */
.wp-block-post-content > .da-strip:first-child,
.wp-block-post-content > .da-hero + .da-strip,
.da-main > .da-strip:first-child { margin-top: -30px !important; position: relative; z-index: 2; border-radius: 5px 5px 0 0; }
.wp-block-post-content > .da-strip:last-child,
.da-main > .da-strip:last-child { border-radius: 0 0 5px 5px; }
.wp-block-post-content > .da-strip:only-child,
.da-main > .da-strip:only-child { border-radius: 5px; }
.da-strip h1, .da-strip h2, .da-strip h3 { margin-top: .4em; }
.da-strip p { margin-top: .9em; }
.da-strip p:first-child { margin-top: 0; }
/* Image + text strip (Openingstijden) */
.da-split { padding: 0 !important; grid-template-columns: 50% 50% !important; }
.da-split .wp-block-media-text__content { padding: 25px 30px; }
.da-split .wp-block-media-text__media { min-height: 260px; }

/* ---- Buttons ---- */
.wp-block-button.is-style-outline > .wp-block-button__link { border: 2px solid currentColor; color: var(--wp--preset--color--da-link); background: transparent; border-radius: 30px; }
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: rgba(238,160,146,.12); color: var(--wp--preset--color--da-link); }
.wp-block-button.da-btn-extra-large .wp-block-button__link { font-size: 24px; padding: 12px 24px; }
.wp-block-button.da-btn-large .wp-block-button__link { font-size: 20px; }
.wp-block-button.da-btn-small .wp-block-button__link { font-size: 14px; padding: 8px 14px; }
.wp-block-button[class*="da-icon-"] .wp-block-button__link { display: inline-flex; align-items: center; justify-content: center; gap: .6em; }
.wp-block-button[class*="da-icon-"] .wp-block-button__link::before,
.da-mobile-bar__icon {
	content: ""; width: 1.1em; height: 1.1em; flex: none; display: inline-block; background: currentColor;
	-webkit-mask: var(--da-icon) center / contain no-repeat; mask: var(--da-icon) center / contain no-repeat;
}
.da-strip .wp-block-buttons { gap: 10px; }
.wp-block-button.wp-block-button__width-100:not(.is-style-outline) .wp-block-button__link { justify-content: flex-start; text-align: left; }
.da-footer .wp-block-button__link { border-radius: 8px; }
.wp-block-separator.wp-block-separator:not(.is-style-dots) { width: 100%; max-width: none; border: 0; border-top: 1px solid currentColor; opacity: 1; }

/* ---- Accordion (Details block) ---- */
.wp-block-details.da-accordion summary { font-size: 17px; font-weight: 700; color: var(--wp--preset--color--da-orange-light); cursor: pointer; list-style: none; position: relative; padding-right: 44px; }
.wp-block-details.da-accordion summary::-webkit-details-marker { display: none; }
.wp-block-details.da-accordion summary::after {
	content: ""; position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border-radius: 50%;
	background: var(--wp--preset--color--da-orange) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") center / 18px no-repeat;
	transition: transform .2s;
}
.wp-block-details.da-accordion[open] summary::after { transform: translateY(-50%) rotate(180deg); }

/* ---- Images, gallery, embeds ---- */
.da-strip .wp-block-image img { border-radius: 4px; }
.wp-block-image.is-style-rounded img { border-radius: 9999px; }
.da-gallery.wp-block-gallery { gap: 6px; }
.da-video { margin: 1em auto; aspect-ratio: 16 / 9; }
.da-video iframe { width: 100%; height: 100%; border: 0; }
.da-icon-image { aspect-ratio: 1; border-radius: 50%; background: var(--wp--preset--color--da-orange); display: grid; place-items: center; margin: 1em auto; }
.da-icon-image > span { width: 55%; height: 55%; background: #fff; -webkit-mask: var(--da-icon) center / contain no-repeat; mask: var(--da-icon) center / contain no-repeat; }

/* ---- Blog overview ---- */
.da-news .wp-block-post-template { margin-top: 1.5em; }
.da-news .wp-block-post-template > li + li { margin-top: 1.5em; }
.da-news .wp-block-post-title { font-size: 18.3px; margin: 0 0 .3em; }
.da-news .wp-block-post-title a { color: var(--wp--preset--color--da-orange-light); text-decoration: none; }
.da-news .wp-block-post-title a:hover { text-decoration: underline; }
.da-news .wp-block-post-excerpt { font-size: 13.5px; }
.da-news .wp-block-post-excerpt__excerpt { margin: 0; }
.da-news .wp-block-post-excerpt__more-link { color: var(--wp--preset--color--da-orange-light); text-decoration: underline; font-size: 13px; }
.da-news-item { gap: 20px; }
.da-news .wp-block-post-featured-image img { border-radius: 0; width: 100%; height: auto; }

/* ---- Single post ---- */
.da-post .wp-block-post-content { padding-left: 0 !important; padding-right: 0 !important; }
.da-post .wp-block-post-title { color: var(--wp--preset--color--da-teal); margin: 0; }
.da-post-meta { gap: .3em; font-size: 13px; margin-top: .2em !important; }
.da-post-meta p, .da-post-meta .wp-block-post-date { margin: 0; font-size: 13px; }
.da-post-nav { font-size: 13px; font-style: italic; }
.da-post-nav a { color: var(--wp--preset--color--da-orange-light); }
.da-comments h2, .da-comments .wp-block-comments-title { font-size: 20px; color: var(--wp--preset--color--da-teal); }
.da-comments input[type=text], .da-comments input[type=email], .da-comments input[type=url], .da-comments textarea { background: #3d4a47; color: #fff; border: 1px solid #4a5754; width: 100%; max-width: 420px; }
.da-comments .comment-form-url, .da-comments .comment-form-cookies-consent { display: none; }
.da-comments .form-submit input[type=submit] { background: var(--wp--preset--color--da-orange); color: #fff; border: 0; border-radius: 8px; padding: 8px 16px; cursor: pointer; }
.da-comment { border: 1px solid #4a5754; border-radius: 3px; padding: 10px 12px; margin-top: 12px; font-size: 14px; }
.da-comment .wp-block-comment-author-name { font-weight: 700; }
.da-comment .wp-block-comment-date { font-size: 12px; color: #c9d1cf; }
.da-comments .children { padding-left: 20px; }

/* ---- Footer ---- */
.da-footer { font-size: 14px; }
.da-footer p { margin: .3em 0; }
.da-footer .wp-block-buttons { margin: 1em 0; }
.da-footer .wp-block-button__link { font-size: 16px; padding: 8px 16px; }
.da-slogan { text-align: left; margin-top: 1.5em !important; }

/* ---- Phone bottom bar (as JouwWeb's "mobiele balk") ---- */
.da-mobile-bar { display: none; }

@media (max-width: 799px) {
	body { --wp--style--root--padding-left: 8px; --wp--style--root--padding-right: 8px; padding-bottom: 64px; }
	.da-header { padding-bottom: 18px !important; }
	.da-header .wp-block-navigation__responsive-container-open:not(.always-shown) { display: flex !important; }
	.da-header .wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) { display: none !important; }
	.da-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close { display: flex !important; }
	.da-header-inner { position: relative; justify-content: center !important; }
	.da-header .wp-block-site-logo img { width: 230px !important; }
	.da-nav { position: absolute; inset: 0; justify-content: space-between !important; flex-direction: row-reverse; pointer-events: none; }
	.da-nav > * { pointer-events: auto; }
	.da-header .wp-block-navigation__responsive-container-open svg { width: 28px; height: 28px; }
	.da-hero { padding-top: 90px; }
	.da-hero .da-hero-title { font-size: 20px; }
	.da-hero .da-hero-button .wp-block-button__link { font-size: 18px; }
	.da-strip { padding: 20px 15px !important; }
	.wp-block-post-content > .da-strip:first-child, .wp-block-post-content > .da-hero + .da-strip, .da-main > .da-strip:first-child { margin-top: -10px !important; }
	.da-split { grid-template-columns: 100% !important; }
	.da-split .wp-block-media-text__media { grid-row: 2; }
	:root :where(h1) { font-size: 22.7px; }
	:root :where(h2) { font-size: 19.7px; }
	:root :where(h3) { font-size: 18.4px; }
	.da-mobile-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid #ddd; }
	.da-mobile-bar__item { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 4px; color: #333; font-size: 12px; text-decoration: none; }
	.da-mobile-bar__icon { width: 18px; height: 18px; color: #333; }
}
.da-img-rounded img, .wp-block-image.da-img-rounded img { border-radius: 8px; }
.da-strip ul, .da-strip ol { margin-top: .6em; }
.da-strip li { margin: 0; }
.da-gallery.wp-block-gallery img { aspect-ratio: 1; object-fit: cover; }
.da-strip { padding-top: 32px !important; padding-bottom: 32px !important; }
