/*
Theme Name:   Elegance Child
Theme URI:    https://lateritetiles.in
Description:  Design for Elegance Laterite Tiles & Stones, built as a child theme of Twenty Twenty-Five. Keep all customisations here so the parent theme can be updated safely.
Author:       Elegance Laterite Tiles & Stones
Template:     twentytwentyfive
Version:      1.0.0
Requires at least: 6.7
Requires PHP: 7.4
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  elegance-child
*/

/* ------------------------------------------------------------------
   Icons (CSS masks, so they inherit the text colour via currentColor)
------------------------------------------------------------------- */
:root {
	--elg-icon-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2a1 1 0 0 1 1-.25c1.1.37 2.3.57 3.6.57a1 1 0 0 1 1 1V20a1 1 0 0 1-1 1A17 17 0 0 1 3 4a1 1 0 0 1 1-1h3.5a1 1 0 0 1 1 1c0 1.25.2 2.45.57 3.57a1 1 0 0 1-.25 1z'/%3E%3C/svg%3E");
	--elg-icon-mobile: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8 1h8a2 2 0 0 1 2 2v18a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2zm0 3v14h8V4zm4 15.2a1.1 1.1 0 1 0 0 2.2 1.1 1.1 0 0 0 0-2.2z'/%3E%3C/svg%3E");
	--elg-icon-quote: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 19h7v-8H6c0-2.2 1.8-4 4-4V4c-3.9 0-7 3.1-7 7zm11 0h7v-8h-4c0-2.2 1.8-4 4-4V4c-3.9 0-7 3.1-7 7z'/%3E%3C/svg%3E");
	--elg-icon-eraser: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M15.1 3.4a1.5 1.5 0 0 1 2.1 0l4.4 4.4a1.5 1.5 0 0 1 0 2.1L12.5 19H20v2H8.6l-5.2-5.2a1.5 1.5 0 0 1 0-2.1zM8.4 10.1l-3.6 3.6 4.6 4.6h1.5l2.6-2.6z'/%3E%3C/svg%3E");
	--elg-icon-justify: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v2.6H3zm0 5.1h18v2.6H3zm0 5.2h18v2.6H3zm0 5.1h18V21H3z'/%3E%3C/svg%3E");
	--elg-icon-left: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v2.6H3zm0 5.1h12v2.6H3zm0 5.2h18v2.6H3zm0 5.1h12V21H3z'/%3E%3C/svg%3E");
	--elg-icon-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 3h18v2.6H3zm6 5.1h12v2.6H9zm-6 5.2h18v2.6H3zm6 5.1h12V21H9z'/%3E%3C/svg%3E");
	--elg-icon-chevron: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.6 16.6 13.2 12 8.6 7.4 10 6l6 6-6 6z'/%3E%3C/svg%3E");
	--elg-header-h: 65px;
}

/* ------------------------------------------------------------------
   Global
------------------------------------------------------------------- */
html { scroll-behavior: smooth; }
:where(section[id], .wp-block-group[id]) { scroll-margin-top: calc(var(--elg-header-h) + var(--wp-admin--admin-bar--height, 0px)); }
.wp-site-blocks { padding-top: 0; }
.wp-site-blocks > * + * { margin-block-start: 0; }
.elg-main > .wp-block-post-content > * { margin-block-start: 0; margin-block-end: 0; }

.elg-section { padding-block: 80px; }
.elg-dark { background: #000; color: #fff; }
.elg-dark :where(h1, h2, h3, h4, h5, h6) { color: #fff; }

.elg-eyebrow {
	font-size: 15px;
	font-weight: 300;
	text-transform: uppercase;
	color: #7a7a7a;
	letter-spacing: 0;
	margin: 0 0 .4em;
}
.elg-dark .elg-eyebrow { color: #bfbfbf; }
.elg-title {
	font-size: clamp(28px, 4vw, 36px);
	font-weight: 400;
	letter-spacing: -1px;
	text-transform: capitalize;
	margin: 0 0 .5em;
}
.elg-subtitle {
	font-size: 15px !important;
	font-weight: 300;
	text-transform: uppercase;
	color: #939393 !important;
	letter-spacing: 0;
	margin-top: 0;
}
.elg-center { text-align: center; }

.wp-element-button, .wp-block-button__link { padding: 12px 24px; line-height: 1.2; }
.wp-block-button__link:hover { filter: brightness(1.1); text-decoration: none; }

/* ------------------------------------------------------------------
   Header
------------------------------------------------------------------- */
header.wp-block-template-part:has(.elg-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 100;
}
.elg-header { background: #0c0c0c; color: #fff; padding-block: 0; }
.elg-header__inner {
	min-height: var(--elg-header-h);
	gap: 24px;
	padding-block: 6px;
}
.elg-header .wp-block-site-logo img { display: block; height: auto; }
.elg-nav {
	font-size: 12px;
	font-weight: 500;
	text-transform: uppercase;
	flex: 1 1 auto;
}
.elg-nav .wp-block-navigation__container { gap: 0; }
.elg-nav .wp-block-navigation-item__content {
	padding: 13px 20px;
	color: #fff;
	border-bottom: 2px solid transparent;
	text-decoration: none !important;
}
.elg-nav .wp-block-navigation-item__content:hover,
.elg-nav .wp-block-navigation-item__content:focus-visible { color: #b388ff; border-bottom-color: #8224e3; }
.elg-nav .wp-block-navigation__responsive-container-open,
.elg-nav .wp-block-navigation__responsive-container-close { color: #fcfcfc; }
.elg-nav .wp-block-navigation__responsive-container-open svg { width: 30px; height: 30px; }
.elg-nav .wp-block-navigation__responsive-container.is-menu-open { background: #f2f2f2; color: #000; }
.elg-nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content { color: #000; font-size: 15px; }

.elg-btn-phone .wp-block-button__link,
.elg-btn-red .wp-block-button__link { background: #cc1818; color: #fff; font-weight: 700; }
.elg-btn-phone .wp-block-button__link { font-size: 15px; padding: 10px 20px; white-space: nowrap; }
.elg-btn-phone .wp-block-button__link::before {
	content: ""; display: inline-block; width: 1em; height: 1em; margin-right: 6px; vertical-align: -2px;
	background: currentColor; -webkit-mask: var(--elg-icon-phone) center / contain no-repeat; mask: var(--elg-icon-phone) center / contain no-repeat;
}

/* ------------------------------------------------------------------
   Hero
------------------------------------------------------------------- */
.elg-hero { min-height: calc(100vh - var(--elg-header-h)); min-height: calc(100svh - var(--elg-header-h)); }
.elg-hero .wp-block-cover__inner-container { text-align: center; color: #fff; }
.elg-hero__kicker {
	font-family: var(--wp--preset--font-family--libre-franklin);
	font-size: 13px; font-weight: 700; text-transform: uppercase; margin: 0 0 1em;
}
.elg-hero__title {
	font-family: var(--wp--preset--font-family--libre-baskerville);
	font-size: clamp(30px, 5vw, 38px); font-weight: 700; letter-spacing: 0; color: #fff; margin: 0 0 .5em;
}
.elg-hero__text {
	font-family: var(--wp--preset--font-family--libre-franklin);
	font-size: clamp(16px, 2vw, 19px); font-weight: 400; margin: 0 0 1.4em;
}
.elg-hero .wp-block-buttons { justify-content: center; }
.elg-btn-green .wp-block-button__link { background: rgba(55, 189, 60, .84); color: #fff; }

/* ------------------------------------------------------------------
   About
------------------------------------------------------------------- */
.elg-about .wp-block-columns { gap: 40px; align-items: center; }
.elg-about .elg-eyebrow { text-align: left; }
.elg-about p:not(.elg-eyebrow) { color: #3a3a3a; }
.elg-divider {
	border: 0 !important; border-top: 2px solid #00ce1b !important;
	width: 15%; min-width: 50px; margin: 10px 0 0 !important; opacity: 1;
	background: none !important;
}

/* ------------------------------------------------------------------
   Services
------------------------------------------------------------------- */
.elg-services__grid { gap: 40px 60px; margin-top: 50px; }
.elg-service { position: relative; padding-left: 70px; }
.elg-service::before {
	content: ""; position: absolute; left: 0; top: 4px; width: 50px; height: 50px; background: #686868;
	-webkit-mask: var(--elg-icon, var(--elg-icon-justify)) center / contain no-repeat;
	mask: var(--elg-icon, var(--elg-icon-justify)) center / contain no-repeat;
}
.elg-service--eraser { --elg-icon: var(--elg-icon-eraser); }
.elg-service--justify { --elg-icon: var(--elg-icon-justify); }
.elg-service--left { --elg-icon: var(--elg-icon-left); }
.elg-service--right { --elg-icon: var(--elg-icon-right); }
.elg-service h3 { font-size: 22px; font-weight: 600; letter-spacing: 0; color: #fff; margin: 0 0 12px; }
.elg-service p { font-size: 16px; color: #686868; margin: 0; }

/* ------------------------------------------------------------------
   Carousel (core Gallery block with the "elg-carousel" class)
------------------------------------------------------------------- */
.elg-portfolio { min-height: 700px; display: flex; flex-direction: column; justify-content: center; }
.wp-block-gallery.elg-carousel {
	display: flex !important; flex-wrap: nowrap !important; gap: 9px !important;
	overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
	scrollbar-width: none; margin-top: 40px;
}
.wp-block-gallery.elg-carousel::-webkit-scrollbar { display: none; }
.wp-block-gallery.elg-carousel > .wp-block-image {
	flex: 0 0 calc((100% - 27px) / 4) !important; width: auto !important;
	scroll-snap-align: start; margin: 0 !important; position: relative; overflow: hidden;
}
.wp-block-gallery.elg-carousel > .wp-block-image img {
	height: 250px !important; width: 100% !important; object-fit: cover !important; transition: transform .4s ease;
}
.wp-block-gallery.elg-carousel > .wp-block-image::after {
	content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, .64); opacity: 0; transition: opacity .3s; pointer-events: none;
}
.wp-block-gallery.elg-carousel > .wp-block-image:hover::after { opacity: 1; }
.wp-block-gallery.elg-carousel > .wp-block-image:hover img { transform: scale(1.04); }

.wp-block-gallery.elg-carousel--single > .wp-block-image { flex-basis: 100% !important; }
.wp-block-gallery.elg-carousel--single > .wp-block-image img { height: min(70vh, 640px) !important; }
.wp-block-gallery.elg-carousel--single { margin-top: 0; gap: 0 !important; }

.elg-dots { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
.elg-dots button {
	width: 6px; height: 6px; padding: 0; border: 0; border-radius: 50%; background: #000; opacity: .25; cursor: pointer;
}
.elg-dots button[aria-current="true"] { opacity: 1; }
.elg-dots--light button { background: #fff; }

/* ------------------------------------------------------------------
   Testimonials
------------------------------------------------------------------- */
.elg-testimonials { padding-block: 130px; }
.elg-testimonials .wp-block-columns { gap: 40px; margin-top: 50px; }
.elg-quote::before {
	content: ""; display: block; width: 38px; height: 38px; margin-bottom: 20px; background: #686868;
	-webkit-mask: var(--elg-icon-quote) left center / contain no-repeat; mask: var(--elg-icon-quote) left center / contain no-repeat;
}
.elg-quote__text { font-size: 15px; font-weight: 300; line-height: 2; color: #fff; }
.elg-quote__name { font-size: 18px !important; font-weight: 600; color: #fff; margin: 1.2em 0 0; line-height: 1.4; }
.elg-quote__place { font-size: 13px; font-weight: 300; text-transform: uppercase; letter-spacing: 3px; color: #686868; margin: 0; line-height: 1.6; }

/* ------------------------------------------------------------------
   Contact
------------------------------------------------------------------- */
.elg-contact__title { font-size: 16px !important; font-weight: 600; letter-spacing: 0; text-transform: uppercase; }
.elg-contact .wp-block-columns { gap: 0; align-items: stretch; margin-top: 30px; }
.elg-contact__form { padding: 30px 30px 30px 0; }
.elg-contact__info { background: #000; color: #fff; padding: 40px 30px; text-align: center; display: flex; flex-direction: column; justify-content: center; }
.elg-contact__info p { margin: 0 0 .8em; color: #fff; font-weight: 300; }
.elg-contact__info strong { font-weight: 600; }
.elg-contact__phone { font-size: 20px; font-weight: 600 !important; letter-spacing: 0; color: #fff; margin: 0 0 .4em; }
.elg-contact__phone::before {
	content: ""; display: block; width: 40px; height: 40px; margin: 0 auto 12px; background: #686868;
	-webkit-mask: var(--elg-icon-mobile) center / contain no-repeat; mask: var(--elg-icon-mobile) center / contain no-repeat;
}
.elg-contact__phone a, .elg-contact__info a { color: inherit; }

.elg-form { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.elg-form__field { display: flex; flex-direction: column; }
.elg-form__field--full { grid-column: 1 / -1; }
.elg-form label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.elg-form input, .elg-form textarea {
	font: inherit; font-weight: 400; color: #000; background: #fff;
	border: 1px solid #69727d; border-radius: 3px; padding: 8px 14px; width: 100%; box-sizing: border-box;
}
.elg-form textarea { min-height: 120px; resize: vertical; }
.elg-form input:focus, .elg-form textarea:focus { outline: 2px solid #000; outline-offset: 1px; }
.elg-form__actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; }
.elg-form button {
	font: inherit; font-weight: 500; text-transform: uppercase; background: #000; color: #fff;
	border: 0; border-radius: 3px; padding: 12px 28px; cursor: pointer;
}
.elg-form button:hover { background: #222; }
.elg-form__hp { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.elg-form-notice { grid-column: 1 / -1; padding: 12px 16px; border-radius: 3px; margin: 0 0 15px; font-weight: 400; }
.elg-form-notice--ok { background: #e7f6e8; color: #145a17; }
.elg-form-notice--err { background: #fbe9e9; color: #8a1414; }

.elg-map { margin: 0 !important; line-height: 0; }
.elg-map iframe { width: 100%; height: 332px; border: 0; display: block; }

/* ------------------------------------------------------------------
   Footer
------------------------------------------------------------------- */
.elg-footer { background: #000; color: #fff; }
.elg-footer__cta { padding-block: 60px 30px; align-items: flex-end; gap: 30px; }
.elg-footer__eyebrow { font-size: 12px; text-transform: uppercase; color: #7a7a7a; margin: 0; text-shadow: 0 0 10px rgba(0,0,0,.3); }
.elg-footer__heading { font-size: clamp(26px, 3vw, 32px); color: #fff; margin: 0; letter-spacing: 0; text-transform: capitalize; }
.elg-footer__cols { padding-block: 40px 60px; gap: 30px; }
.elg-footer__cols h2 { font-size: 18px; font-weight: 400; color: #fff; letter-spacing: 0; margin: 0 0 18px; }
.elg-links { list-style: none; padding: 0; margin: 0; }
.elg-links li { color: rgba(255, 255, 255, .6); padding-left: 20px; position: relative; margin-bottom: 5px; font-size: 14px; }
.elg-links li::before {
	content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 12px; background: currentColor;
	-webkit-mask: var(--elg-icon-chevron) center / contain no-repeat; mask: var(--elg-icon-chevron) center / contain no-repeat;
}
.elg-links a { color: inherit; }
.elg-links a:hover { color: #fff; text-decoration: none; }
.elg-footer__bottom { background: #2b2b2b; padding-block: 28px; }
.elg-footer__copy { text-align: center; color: rgba(252, 252, 252, .44); font-size: 14px; margin: 0; }

/* ------------------------------------------------------------------
   Inner pages (privacy policy, blog, posts)
------------------------------------------------------------------- */
main.wp-block-group:not(.elg-main) { margin-top: 0 !important; padding-top: 40px; padding-bottom: 40px; }

/* ------------------------------------------------------------------
   Responsive
------------------------------------------------------------------- */
@media (max-width: 1024px) {
	.wp-block-gallery.elg-carousel > .wp-block-image { flex-basis: calc((100% - 9px) / 2) !important; }
	/* Mobile/tablet header: logo | tap-to-call icon | menu button */
	.elg-header__inner { gap: 12px; }
	.elg-header .wp-block-site-logo { flex: 1 1 auto; }
	.elg-header .wp-block-site-logo img { width: 160px !important; }
	.elg-nav { flex: 0 0 auto; order: 3; }
	.elg-phone-wrap { order: 2; }
	.elg-btn-phone .wp-block-button__link {
		font-size: 0; width: 40px; height: 40px; padding: 0; display: flex; align-items: center; justify-content: center;
	}
	.elg-btn-phone .wp-block-button__link::before { width: 18px; height: 18px; margin: 0; }
}
@media (max-width: 781px) {
	.elg-section { padding-block: 60px; }
	.elg-about .elg-eyebrow, .elg-about .elg-title { text-align: center; }
	.elg-about .elg-divider { margin-inline: auto !important; }
	.elg-contact__form { padding: 0 0 30px; }
	.elg-form { grid-template-columns: 1fr; }
	.elg-footer__cta { align-items: flex-start; }
	.elg-testimonials { padding-block: 80px; }
	.elg-portfolio { min-height: 0; }
}
@media (max-width: 600px) {
	.wp-block-gallery.elg-carousel > .wp-block-image { flex-basis: 85% !important; }
	.wp-block-gallery.elg-carousel--single > .wp-block-image { flex-basis: 100% !important; }
	.wp-block-gallery.elg-carousel--single > .wp-block-image img { height: 60vh !important; }
}
@media (prefers-reduced-motion: reduce) {
	html, .wp-block-gallery.elg-carousel { scroll-behavior: auto; }
}
