/*
Theme Name: Alligator
Theme URI: https://alligatordesign.click/
Author: Alligator Design (Geert Allegaert)
Author URI: https://alligatordesign.click/
Description: The Alligator base theme: calm, fast, versatile and plugin-free websites built to last — no tracking scripts, no third-party bloat. Created and maintained by Alligator Design. This theme never receives updates from wordpress.org.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: alligator
Update URI: https://alligatordesign.click/alligator-theme
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, sticky-post, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}


/* ============================================================
   Alligator Carousel — scroll-snap, no JavaScript, no plugin.
   Usage: add the class "alligator-carousel" to a Group block
   that contains a Gallery block (or insert the ready-made
   pattern: Alligator → Carousel).
   ============================================================ */
.alligator-carousel .wp-block-gallery.has-nested-images {
	display: flex;
	flex-wrap: nowrap !important;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: thin;
	padding-block-end: 0.75rem; /* room for the scrollbar */
}
.alligator-carousel .wp-block-gallery.has-nested-images figure.wp-block-image {
	flex: 0 0 85% !important;
	width: 85% !important;
	scroll-snap-align: center;
	margin: 0;
}
.alligator-carousel .wp-block-gallery.has-nested-images figure.wp-block-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
@media (min-width: 782px) {
	.alligator-carousel .wp-block-gallery.has-nested-images figure.wp-block-image {
		flex-basis: 45% !important;
		width: 45% !important;
	}
}
@media (prefers-reduced-motion: no-preference) {
	.alligator-carousel .wp-block-gallery.has-nested-images {
		scroll-behavior: smooth;
	}
}
/* ============================================================
   Alligator sticky header — position, glass, edge.
   ============================================================ */
header.wp-block-template-part {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}

header.wp-block-template-part::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background-color: rgb(255 255 255 / 0.85);
	backdrop-filter: blur(8px);
	pointer-events: none;
}

/* Header slides away over the first 400px of scrolling.
   Scrolls back into view when returning to the top.
   Browsers without support simply keep the always-sticky header. */
@supports (animation-timeline: scroll()) {
	header.wp-block-template-part {
		animation: alligator-header-hide linear both;
		animation-timeline: scroll(root);
		animation-range: 250px 400px;
	}
	@keyframes alligator-header-hide {
		to { top: calc(var(--wp-admin--admin-bar--height, 0px) - 6rem); }
	}

	/* Neutraliseer de animatie zolang het mobiele menu open is —
	   anders verstoort de actieve animatie de fixed-overlay. */
	header.wp-block-template-part:has(.is-menu-open) {
		animation: none !important;
		top: var(--wp-admin--admin-bar--height, 0px) !important;
	}
}
/* ============================================================
   Alligator edge shadows — header casts down, footer casts up.
   One token, two directions, always in sync.
   ============================================================ */
:root {
	--alligator-edge-shadow: 24px rgb(0 0 0 / 0.08);
}
header.wp-block-template-part {
	box-shadow: 0 8px var(--alligator-edge-shadow);
}
footer.wp-block-template-part {
	box-shadow: 0 -8px var(--alligator-edge-shadow);
}

.alligator-languages { font-size: 0.85em; letter-spacing: 0.05em; }
.alligator-languages strong { opacity: 0.5; }

/* ============================================================
   Alligator mono — systeemstack, geen bestanden, geen download.
   ============================================================ */
code, kbd, pre, samp {
	font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
	font-size: 0.9em;
}

/* ============================================================
   Alligator taalswitch.
   ============================================================ */
.alligator-languages { font-size: 0.85em; letter-spacing: 0.05em; }
.alligator-languages--dropdown { position: relative; }
.alligator-languages--dropdown summary {
	cursor: pointer;
	list-style: none; /* geen driehoekje */
}
.alligator-languages--dropdown summary::after { content: " ▾"; font-size: 0.8em; }
.alligator-languages--dropdown nav {
	position: absolute;
	right: 0;
	background: var(--wp--preset--color--base);
	box-shadow: 0 8px var(--alligator-edge-shadow);
	padding: 0.5rem 0.9rem;
	display: grid;
	gap: 0.4rem;
	z-index: 101; /* boven de sticky header-inhoud */
}

/* ============================================================
   Alligator image protection — opt-in via class, geen echte
   beveiliging, enkel een drempel tegen de occasionele rechtsklik.
   ============================================================ */
.alligator-protect-image,
.alligator-protect-image img {
	-webkit-user-drag: none;
	user-drag: none;
	-webkit-user-select: none;
	user-select: none;
}

