/*
	Dagh Salón — brand theme (plain CSS, no build step).
	Loaded after paradigm.css / phantom.css / fontawesome-all.min.css on every page.
*/

:root {
	--color-primary:        #D03D78; /* main brand color */
	--color-primary-rgb:    208, 61, 120;
	--color-primary-dark:   #9c2c59; /* solid button/bar fills (white text needs this, not the lighter primary) */
	--color-primary-darker: #7d2347; /* hover/active state for the above — keeps the "gets darker when pressed" feel */
	--color-primary-mid:    #e07aa0; /* secondary hover state */
	--color-primary-light:  #f6d9e6; /* tints: badges, subtle backgrounds */
}

.price-footnote {
	display: block;
	margin-top: 1em;
	font-size: 0.75em;
	color: #585858;
}

/* --- Paradigm (index.html) accent overrides --- */

input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover,
.button:hover {
	box-shadow: inset 0 0 0 2px var(--color-primary-dark);
	color: var(--color-primary-dark) !important;
}

input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active,
.button:active {
	background-color: rgba(var(--color-primary-rgb), 0.18);
	box-shadow: inset 0 0 0 2px var(--color-primary-dark);
	color: var(--color-primary-dark) !important;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="search"]:focus,
input[type="url"]:focus,
select:focus,
textarea:focus {
	border-color: var(--color-primary-dark);
}

input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary,
.button.primary {
	/* --color-primary-dark, not the lighter --color-primary: white button
	   text needs the darker shade to read clearly (~7:1 vs ~4.5:1 contrast). */
	background-color: var(--color-primary-dark);
	color: #ffffff !important;
}

	input[type="submit"].primary:hover,
	input[type="reset"].primary:hover,
	input[type="button"].primary:hover,
	button.primary:hover,
	.button.primary:hover {
		background-color: var(--color-primary-darker);
	}

	input[type="submit"].primary:active,
	input[type="reset"].primary:active,
	input[type="button"].primary:active,
	button.primary:active,
	.button.primary:active {
		background-color: var(--color-primary-darker);
	}

input[type="checkbox"]:checked + label:before,
input[type="radio"]:checked + label:before {
	background-color: var(--color-primary);
	border-color: var(--color-primary);
}

#wrapper > section > header h1:before, #wrapper > section > header h2:before,
#wrapper > section > header h1:after, #wrapper > section > header h2:after {
	/* White, not --color-primary: these decorative marks sit on top of the
	   pink panel added below (#wrapper:before) — pink-on-pink was invisible. */
	background: #ffffff;
}

/* --- Phantom (catalog/service pages) accent overrides --- */

.button:hover,
input[type="submit"]:hover,
input[type="reset"]:hover,
input[type="button"]:hover,
button:hover {
	color: var(--color-primary-dark) !important;
	box-shadow: inset 0 0 0 2px var(--color-primary-dark);
}

.button:active,
input[type="submit"]:active,
input[type="reset"]:active,
input[type="button"]:active,
button:active {
	background-color: rgba(var(--color-primary-rgb), 0.12);
}

.button.primary,
input[type="submit"].primary,
input[type="reset"].primary,
input[type="button"].primary,
button.primary {
	/* --color-primary-dark: this button's text is white, which needs the
	   darker shade for readable contrast (see Paradigm block above). */
	background-color: var(--color-primary-dark);
}

	.button.primary:hover,
	.button.primary:active,
	input[type="submit"].primary:hover,
	input[type="submit"].primary:active {
		background-color: var(--color-primary-darker);
	}

.icon.style2 {
	/* Was a plain vendor gray (#c9c9c9). The lightest tint (--color-primary-light)
	   read as gray rather than pink at this thin 1px weight, so use the
	   more saturated mid shade instead — visibly on-brand, not washed out. */
	border-color: var(--color-primary-mid);
}

.icon.style2:hover {
	color: var(--color-primary-dark);
	border-color: var(--color-primary-dark);
}

.icon.style2:active {
	background-color: rgba(var(--color-primary-rgb), 0.15);
}

#menu {
	background: var(--color-primary-dark);
}

/* --- Sticky WhatsApp bar ---
   --sbar-h is the bar's real measured height, set by assets/js/includes.js
   (syncStickyBarHeight) once the bar exists and again on resize/load —
   it's always accurate, no hand-tuning needed. The 8em fallback only
   matters for the brief instant before that JS runs, or if it's disabled. */

body {
	padding-top: var(--sbar-h, 8em);
}

#sticky-cta {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	z-index: 10003;
	/* --color-primary-dark, not the lighter --color-primary: both lines of
	   text in this bar are white, which needs the darker shade to read
	   clearly (~7:1 vs ~4.5:1 contrast — see the Paradigm block above). */
	background-color: var(--color-primary-dark);
	text-align: center;
	padding: 0.5em 1em;
	padding-top: calc(0.5em + env(safe-area-inset-top, 0px));
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.25em;
}

	#sticky-cta a {
		color: #ffffff;
		text-decoration: none;
		font-size: 0.85em;
		font-weight: 600;
		letter-spacing: 0.05em;
		display: inline-flex;
		align-items: center;
		gap: 0.5em;
	}

	#sticky-cta a:hover {
		text-decoration: underline;
	}

/* --- Hero logo (index.html) --- */

/* paradigm.css pins every direct child of the intro header to a fixed
   width via #wrapper > section.intro > header > * (20rem desktop, 21rem
   <=1280px, 100% <=1152px) — sized for the original h1 text measure.
   That rule's #wrapper id outranks a plain .hero-logo class, so it was
   silently capping the wrapper (and therefore the img inside it, via
   its own max-width: 100%) regardless of what width we gave the image.
   Match the same selector path so this wins at every breakpoint, and
   let the image carry the actual responsive size instead. */
#wrapper > section.intro > header > .hero-logo {
	width: 100%;
}

.hero-logo {
	margin: 0 0 1.5em;
}

	.hero-logo img {
		width: 42rem;
		max-width: 100%;
		height: auto;
	}

	@media screen and (max-width: 736px) {

		.hero-logo img {
			width: 28rem;
			margin-left: auto;
			margin-right: auto;
		}

	}

/* --- Hero CTAs (index.html) --- */

.hero-ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
	justify-content: center;
	margin-bottom: 1.5em;
}

	/* paradigm.css hides every ul.actions in the intro header at <=1152px
	   (its own "Next" scroll-arrow button, since scrolling is natural on
	   mobile) — .hero-ctas reuses that same ul.actions class, so it was
	   getting hidden too as collateral damage. Force it back on; the
	   scroll arrow (plain ul.actions, no .hero-ctas) stays hidden as the
	   template intended. */
	@media screen and (max-width: 1152px) {

		#wrapper > section.intro > header ul.actions.hero-ctas {
			display: flex;
		}

	}

/* --- Hero on mobile/tablet (index.html) ---
   At <=1152px paradigm.css stacks the hero: pink header, then the photo.
   Two problems there:
   - paradigm.css gives the photo box (.content) no real height here (its
     100vh only applies to the desktop two-column layout); it's just
     padding around an absolutely-positioned .image.fill, so the photo got
     squashed. Give it a real height.
   - dagh-logo.png is a square with lots of empty space above/below the
     wordmark, which made the pink header ~700px tall. Crop the logo to
     its middle band and trim the header padding.
   Also paradigm.css sets grid-template-rows: 3fr on every section, which
   makes the header row soak up spare height; size rows to content. */
@media screen and (max-width: 1152px) {

	#wrapper > section.intro {
		grid-template-rows: auto auto auto;
	}

	#wrapper > section.intro > header {
		padding-top: 5rem;
		padding-bottom: 2.5rem;
	}

	.hero-logo img {
		height: auto;
		aspect-ratio: 2 / 1;
		object-fit: cover;
	}

	/* The photo is a portrait, so never crop it: take it out of the
	   template's absolute "fill" mode and let it keep its own proportions
	   as a normal in-flow image. When the screen is wider than the photo
	   (tablet, landscape phone) the box is brand pink, so the leftover
	   space reads as pink columns on either side. */
	#wrapper > section.intro > .content {
		background-color: var(--color-primary);
		height: auto;
		min-height: 0;
		padding: 0;
		text-align: center;
	}

	#wrapper > section.intro > .content > .image.fill {
		display: inline-block;
		height: auto;
		max-width: 100%;
		position: relative;
		width: auto;
	}

	#wrapper > section.intro > .content > .image.fill img {
		display: block;
		height: auto;
		max-height: 85vh;
		max-width: 100%;
		object-fit: contain;
		position: static;
		width: auto;
	}

}

/* --- Service price teasers --- */

ul.service-teasers {
	list-style: none;
	margin: 0 0 1.5em 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
}

	ul.service-teasers li a {
		display: inline-flex;
		align-items: center;
		gap: 0.5em;
		padding: 0.6em 1em;
		border: solid 1px var(--color-primary-light);
		border-radius: 2em;
		color: inherit;
		text-decoration: none;
		transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
	}

	ul.service-teasers li a:hover {
		background-color: var(--color-primary-light);
		border-color: var(--color-primary-dark);
	}

	ul.service-teasers li a .icon:before {
		color: var(--color-primary-dark);
	}

.price-teaser {
	font-size: 0.8em;
	font-weight: 600;
	color: var(--color-primary-dark);
	background-color: var(--color-primary-light);
	border-radius: 1em;
	padding: 0.15em 0.75em;
}

p.price-teaser {
	display: inline-block;
	margin: 0.5em 0 0 0;
}

/* --- Contact section emphasis --- */

#wrapper > section > footer,
footer#footer section {
	border-top: 2px solid var(--color-primary-light);
	padding-top: 1.5em;
}

/* --- Typography polish --- */

h1, h2, h3 {
	font-weight: 700;
}

.desc,
#main .inner > p {
	max-width: 42em;
}

/* --- Accessibility: visible focus states --- */

a:focus-visible,
button:focus-visible,
.button:focus-visible,
input:focus-visible {
	outline: 2px solid #ffffff;
	outline-offset: 2px;
	box-shadow: 0 0 0 4px var(--color-primary-dark);
}

/* --- Fix: offset Phantom's fixed nav below the sticky CTA bar ---
   Same --sbar-h custom property as body's padding-top above — see that
   comment. Always in sync automatically, nothing to hand-tune here. */

#header nav {
	top: calc(2em + var(--sbar-h, 8em));
}

@media screen and (max-width: 736px) {

	#header nav {
		top: calc(0.5em + var(--sbar-h, 8em));
	}

	#menu > .close {
		top: calc(0.5em + var(--sbar-h, 8em));
	}

}

/* --- Fix: #D03D78 must be the dominant brand color on index.html too --- */

#wrapper:before {
	background-color: var(--color-primary);
	/* The vendor pattern baked into this background-image is a decorative
	   squiggle texture tinted teal (rgba(67,217,184,.25)) — not a DOM
	   element, so it can't be recolored via a simple selector override.
	   Drop it rather than leave the old brand color showing through. */
	background-image: none;
}

/* --- Fix: white text/lines on the pink panel, not vendor black/gray ---
   <header> gets a pink background at every width — the panel on desktop
   (#wrapper:before below), and an explicit mobile background further
   down (paradigm.css hides the panel entirely at <=1152px, so header
   re-paints its own background there) — so white text is always correct
   on it. */

#wrapper > section > header h1,
#wrapper > section > header h2,
#wrapper > section > header p {
	color: #ffffff;
}

/* <footer> (phone/address/social — grid-area: footer, same column as
   header per paradigm.css) never gets that mobile background re-paint,
   only the real panel — so it's pink-backed on desktop but plain on
   mobile. White text there was invisible on mobile; scope it to desktop
   only and let mobile fall back to the default dark text. */
@media screen and (min-width: 1153px) {

	#wrapper > section > footer h3,
	#wrapper > section > footer a,
	#wrapper > section > footer span,
	#wrapper > section > footer li {
		color: #ffffff;
	}

	#wrapper > section > footer {
		border-top-color: #ffffff;
	}

}

	/* The one plain (non-primary) button that lives in this panel — "Ver
	   servicios" — defaults to black text on a translucent gray outline
	   (rgba(144,144,144,.25)) in paradigm.css. Both read poorly against
	   the pink panel, so give it a white outline instead. Scoped to the
	   header context (not .button generally) so it doesn't affect
	   anything outside the panel. */
	#wrapper > section > header .button:not(.primary) {
		box-shadow: inset 0 0 0 2px #ffffff;
		color: #ffffff !important;
	}

	#wrapper > section > header .button:not(.primary):hover {
		background-color: rgba(255, 255, 255, 0.15);
		box-shadow: inset 0 0 0 2px #ffffff;
		color: #ffffff !important;
	}

#wrapper > section > header:before,
#wrapper > section:last-of-type > header:after {
	/* White, not --color-primary: same pink-on-pink collision as the h1/h2
	   dot+line above — this 2px rule sits on the #wrapper:before panel. */
	background: #ffffff;
}

@media screen and (max-width: 1152px) {

	#wrapper > section > header {
		background-color: var(--color-primary);
		/* paradigm.css's own mobile header rule sets background-color AND a
		   separate background-image (the same decorative crystalline pattern
		   as the desktop panel, teal-tinted) — overriding color alone left
		   the old teal pattern showing on top of the new pink. Drop it,
		   same fix as #wrapper:before above. */
		background-image: none;
	}

}

/* --- Fix: recolor baked-in SVG icons (vendor gray/black -> brand) ---
   These are CSS background-image data-URIs, not real DOM elements, so a
   plain color: override can't touch them — the fix is a full property
   override with the same SVG, just the embedded fill/stroke hex swapped. */

#header nav ul li a[href="#menu"]:after {
	/* Resting (closed) hamburger icon — was vendor gray #585858. Phantom's
	   #header has a plain/white background at every width, so one fixed
	   color works everywhere, no breakpoint needed. */
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' viewBox='0 0 100 100' preserveAspectRatio='none'%3E%3Cstyle%3Eline %7B stroke-width: 8px%3B stroke: %239c2c59%3B %7D%3C/style%3E%3Cline x1='0' y1='25' x2='100' y2='25' /%3E%3Cline x1='0' y1='50' x2='100' y2='50' /%3E%3Cline x1='0' y1='75' x2='100' y2='75' /%3E%3C/svg%3E");
}

a.arrow:before {
	/* "Next" scroll-down arrow on the homepage hero — was vendor black.
	   Its <header> always has a pink background (the panel on desktop,
	   an explicit repaint on mobile — see below), so white reads clearly
	   at every width, same as the surrounding heading text. */
	background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' x='0px' y='0px' viewBox='0 0 512 512'%3E%3Cpath d='M442.53,346.28L293.65,495.16c-0.33,0.33-0.7,0.62-1.05,0.94c-9.16,9.77-22.15,15.9-36.6,15.9 c-14.44,0-27.43-6.13-36.59-15.88c-0.35-0.33-0.72-0.62-1.06-0.96L69.47,346.28c-19.62-19.62-19.62-51.44,0-71.05 c19.62-19.62,51.43-19.62,71.06,0l65.23,65.23V50.24C205.76,22.5,228.25,0,256,0s50.24,22.5,50.24,50.24v290.21l65.23-65.23 c19.62-19.62,51.43-19.62,71.05,0C462.15,294.84,462.15,326.66,442.53,346.28z' fill='%23ffffff' /%3E%3C/svg%3E");
}
