/*
Theme Name: Benvindos Barber Theme
Theme URI: https://wpb.local
Author: WebAdvise
Author URI: https://webadvi.se
Description: Custom minimal theme for Benvindos Barber.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: benvindos-barber-theme
*/

/* ==========================================================================
   1. Reset & base
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: 'Bodoni Moda', 'Playfair Display', Georgia, serif;
	color: #1a1a1a;
	line-height: 1.5;
}

a {
	text-decoration: none;
	color: inherit;
}

ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

img {
	max-width: 100%;
	display: block;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

:root {
	--color-primary: #1a1a1a;
	--color-accent: #c9a24b;
	--color-accent-hover: #b3893a;
	--color-light-bg: #f7f6f4;
	--color-border: #e5e2dc;
	--header-height: 76px;
}

/* Smooth-scroll to in-page anchors (menu entries -> section IDs), offset so
   content doesn't land underneath the sticky header. */
html {
	scroll-behavior: smooth;
	scroll-padding-top: var(--header-height);
}

/* ==========================================================================
   2. Site header
   ========================================================================== */

.site-header {
	position: sticky;
	top: 0;
	z-index: 999;
	background: #fff;
	border-bottom: 1px solid var(--color-border);
}

.header-inner {
	position: relative;
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
	height: var(--header-height);
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 16px;
}

/* Left: logo */
.site-branding {
	justify-self: start;
}

.site-logo-link {
	display: inline-block;
}

.site-logo {
	height: 40px;
	width: auto;
}

/* Center: nav + mobile toggle share this column. No position of its own —
   .main-navigation's mobile dropdown (position: absolute) anchors to
   .header-inner instead, so it can span the header's full width. */
.header-menu-area {
	justify-self: center;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Right: language switch */
.lang-switch {
	justify-self: end;
	display: flex;
	gap: 8px;
}

.lang-btn {
	background: none;
	border: 1px solid var(--color-border);
	border-radius: 999px;
	padding: 6px 14px;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	color: var(--color-primary);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.lang-btn:hover:not(.is-active) {
	border-color: var(--color-primary);
}

.lang-btn.is-active {
	background: var(--color-primary);
	border-color: var(--color-primary);
	color: #fff;
}

/* ==========================================================================
   3. Primary navigation (center)
   ========================================================================== */

.primary-menu {
	display: flex;
	align-items: center;
	gap: 32px;
}

.primary-menu li {
	position: relative;
}

.primary-menu > li > a {
	font-weight: 500;
	font-size: 0.95rem;
	padding: 8px 2px;
}

.primary-menu > li > a:hover,
.primary-menu > li > a:focus-visible {
	color: var(--color-accent);
}

/* Dropdowns */
.primary-menu .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 200px;
	background: #fff;
	border: 1px solid var(--color-border);
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
	padding: 8px 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
}

.primary-menu li:hover > .sub-menu,
.primary-menu li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.primary-menu .sub-menu li a {
	display: block;
	padding: 8px 16px;
	font-size: 0.9rem;
	white-space: nowrap;
}

.primary-menu .sub-menu li a:hover {
	background: var(--color-light-bg);
	color: var(--color-accent);
}

/* ==========================================================================
   4. Mobile menu toggle
   ========================================================================== */

.menu-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	background: none;
	border: none;
	cursor: pointer;
	padding: 0;
}

.menu-toggle-bar {
	display: block;
	width: 24px;
	height: 2px;
	background: var(--color-primary);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(2) {
	opacity: 0;
}

.menu-toggle.is-active .menu-toggle-bar:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* ==========================================================================
   5. Responsive header (mobile)
   ========================================================================== */

@media (max-width: 860px) {
	.header-inner {
		grid-template-columns: auto auto 1fr;
	}

	.lang-switch {
		gap: 6px;
	}

	.lang-btn {
		padding: 4px 10px;
		font-size: 0.75rem;
	}

	.menu-toggle {
		display: flex;
	}

	.main-navigation {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: #fff;
		border-bottom: 1px solid var(--color-border);
		display: none;
	}

	.main-navigation.nav-open {
		display: block;
	}

	.primary-menu {
		flex-direction: column;
		align-items: flex-start;
		gap: 0;
		padding: 12px 0 20px;
	}

	.primary-menu > li {
		width: 100%;
	}

	.primary-menu > li > a {
		display: block;
		padding: 12px 4px;
		border-bottom: 1px solid var(--color-border);
	}

	/* On mobile, sub-menus stay open in a static, indented list */
	.primary-menu .sub-menu {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		box-shadow: none;
		border: none;
		padding-left: 16px;
	}
}

/* ==========================================================================
   6. Site footer
   ========================================================================== */

.site-footer {
	background: var(--color-primary);
	color: #f2f2f2;
	padding: 56px 24px 0;
}

.footer-top,
.footer-social,
.footer-bottom {
	max-width: 1200px;
	margin: 0 auto;
}

/* Footer top: brand + tagline */
.footer-top {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding-bottom: 32px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-logo {
	height: 36px;
	width: auto;
	filter: invert(1) brightness(2);
}

.footer-tagline {
	margin: 0;
	color: #b8b8b8;
	font-size: 0.95rem;
}

/* Social icons */
.footer-social {
	display: flex;
	gap: 16px;
	padding: 24px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	color: #f2f2f2;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.social-icon:hover,
.social-icon:focus-visible {
	background: var(--color-accent);
	color: #fff;
}

/* Footer bottom bar */
.footer-bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 20px 0;
	font-size: 0.85rem;
	color: #999;
}

.footer-bottom-links {
	display: flex;
	gap: 20px;
}

.footer-bottom-links a:hover {
	color: #fff;
}

/* ==========================================================================
   7. Responsive footer (mobile)
   ========================================================================== */

@media (max-width: 860px) {
	.footer-bottom {
		flex-direction: column;
		align-items: flex-start;
	}
}
