/* ----------------------------------------------------------------------------------------
* Diwali festive theme
* Loaded only during the festive season (see partials/diwali.php).
* ---------------------------------------------------------------------------------------- */

:root{
	--diwali-marigold			: #FF9F1C;
	--diwali-marigold-dark		: #E8590C;
	--diwali-gold				: #FFD166;
	--diwali-leaf				: #2B9348;
	--diwali-clay				: #B5502A;
	--diwali-maroon				: #7A1F2B;
}

/************************************/
/***    Toran (marigold garland)  ***/
/************************************/

.diwali-toran{
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: 70px;
	pointer-events: none;
	z-index: 99;
	overflow: hidden;
}

/* The main strand running along the header */
.diwali-toran::before{
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 12px;
	background:
		radial-gradient(circle at 6px 6px, var(--diwali-gold) 0 2px, var(--diwali-marigold) 3px 5px, var(--diwali-marigold-dark) 6px, transparent 6.5px) 0 0 / 12px 12px repeat-x;
	filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
}

.diwali-toran-drop{
	position: absolute;
	top: 8px;
	width: 12px;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform-origin: top center;
	animation: diwaliSway 4s ease-in-out infinite;
}

.diwali-toran-drop span{
	display: block;
	width: 11px;
	height: 11px;
	margin-top: -1px;
	border-radius: 50%;
	background: radial-gradient(circle, var(--diwali-gold) 0 20%, var(--diwali-marigold) 45%, var(--diwali-marigold-dark) 100%);
}

.diwali-toran-drop span:nth-child(even){
	background: radial-gradient(circle, #fff3b0 0 20%, var(--diwali-gold) 50%, var(--diwali-marigold) 100%);
}

/* Mango leaf at the end of every other drop */
.diwali-toran-drop.leaf::after{
	content: '';
	display: block;
	width: 12px;
	height: 18px;
	margin-top: -2px;
	background: var(--diwali-leaf);
	border-radius: 0 100% 0 100%;
	transform: rotate(45deg);
}

@keyframes diwaliSway{
	0%, 100%	{ transform: rotate(-4deg); }
	50%			{ transform: rotate(4deg); }
}

/* The sticky header already has its own bottom edge; keep the toran hidden while it slides away */
header.main-header .header-sticky.hide .diwali-toran{
	opacity: 0;
}

/************************************/
/***            Diya              ***/
/************************************/

.diwali-diya{
	position: relative;
	display: inline-block;
	width: 44px;
	height: 40px;
	flex-shrink: 0;
}

/* Clay bowl */
.diwali-diya::before{
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	width: 44px;
	height: 18px;
	background: linear-gradient(180deg, #d9733f 0%, var(--diwali-clay) 60%, #7c3418 100%);
	border-radius: 4px 4px 22px 22px / 4px 4px 18px 18px;
	box-shadow: inset 0 3px 0 rgba(255, 209, 102, 0.6);
}

/* Flame */
.diwali-diya::after{
	content: '';
	position: absolute;
	bottom: 15px;
	left: 50%;
	width: 12px;
	height: 20px;
	margin-left: -6px;
	background: radial-gradient(ellipse at 50% 75%, #fff 0 15%, var(--diwali-gold) 35%, var(--diwali-marigold) 70%, transparent 72%);
	border-radius: 50% 50% 50% 50% / 65% 65% 35% 35%;
	box-shadow: 0 0 18px 6px rgba(255, 179, 29, 0.55);
	transform-origin: bottom center;
	animation: diwaliFlicker 1.4s ease-in-out infinite alternate;
}

.diwali-diya:nth-child(2n)::after{ animation-duration: 1.1s; animation-delay: -0.4s; }
.diwali-diya:nth-child(3n)::after{ animation-duration: 1.7s; animation-delay: -0.8s; }

@keyframes diwaliFlicker{
	0%		{ transform: scale(1, 1) rotate(-2deg); opacity: 0.95; }
	40%		{ transform: scale(0.92, 1.08) rotate(2deg); opacity: 1; }
	70%		{ transform: scale(1.05, 0.95) rotate(-1deg); opacity: 0.9; }
	100%	{ transform: scale(0.96, 1.04) rotate(1deg); opacity: 1; }
}

/* Row of diyas sitting on top of the footer */
.diwali-diya-row{
	display: flex;
	justify-content: space-around;
	align-items: flex-end;
	gap: 10px;
	padding: 0 20px;
	margin-bottom: -20px;
	position: relative;
	z-index: 2;
	pointer-events: none;
}

.main-footer{
	position: relative;
}

/************************************/
/***   Fireworks canvas in hero   ***/
/************************************/

.diwali-fireworks{
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	pointer-events: none;
	z-index: 0;
}

.hero > .container,
.page-header > .container{
	position: relative;
	z-index: 1;
}

/************************************/
/***   Festival banner slider     ***/
/************************************/

.festival-banner{
	position: relative;
	margin-bottom: 60px;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 0 0 2px var(--diwali-gold), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.festival-banner .swiper-slide a{
	display: block;
}

.festival-banner img{
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1940 / 625;
}

.festival-banner-pagination{
	position: absolute;
	left: 0;
	right: 0;
	bottom: 12px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 8px;
}

.festival-banner-pagination .swiper-pagination-bullet{
	width: 10px;
	height: 10px;
	margin: 0 !important;
	background: #fff;
	opacity: 0.6;
	transition: all 0.3s ease;
}

.festival-banner-pagination .swiper-pagination-bullet-active{
	width: 26px;
	border-radius: 5px;
	background: var(--diwali-gold);
	opacity: 1;
}

/************************************/
/***       Greeting card          ***/
/************************************/

.diwali-greeting{
	position: fixed;
	left: 20px;
	bottom: 20px;
	width: 380px;
	max-width: calc(100vw - 40px);
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	padding: 22px 24px;
	background: linear-gradient(135deg, var(--diwali-maroon) 0%, #4a0f1a 100%);
	border: 1px solid rgba(255, 209, 102, 0.5);
	border-radius: 20px;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.35), 0 0 0 4px rgba(255, 209, 102, 0.12);
	color: var(--white-color);
	z-index: 999;
	opacity: 0;
	visibility: hidden;
	transform: translateY(30px) scale(0.96);
	transform-origin: bottom left;
	transition: opacity 0.5s ease, transform 0.5s ease, visibility 0.5s;
}

.diwali-greeting.show{
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

.diwali-greeting-head{
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 12px;
	padding-right: 24px;
}

.diwali-greeting-icon{
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	flex-shrink: 0;
	font-size: 30px;
	line-height: 1;
	background: radial-gradient(circle, rgba(255, 209, 102, 0.3) 0%, rgba(255, 209, 102, 0.05) 70%);
	border: 1px solid rgba(255, 209, 102, 0.4);
	border-radius: 50%;
}

.diwali-greeting-gujarati{
	display: block;
	font-family: "Anek Gujarati", var(--default-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3em;
	color: var(--diwali-marigold);
	margin-bottom: 2px;
}

.diwali-greeting h3{
	font-size: 26px;
	font-weight: 700;
	line-height: 1.1em;
	color: var(--diwali-gold);
	margin: 0;
}

.diwali-greeting p{
	font-size: 16px;
	line-height: 1.45em;
	color: rgba(255, 255, 255, 0.85);
	margin-bottom: 16px;
}

/* Festival timeline */
.diwali-timeline{
	display: flex;
	justify-content: space-between;
	position: relative;
	list-style: none;
	padding: 0;
	margin: 0 0 18px;
}

.diwali-timeline::before{
	content: '';
	position: absolute;
	top: 6px;
	left: 7%;
	right: 7%;
	height: 2px;
	background: rgba(255, 209, 102, 0.25);
}

.diwali-timeline li{
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.diwali-timeline-dot{
	position: relative;
	width: 14px;
	height: 14px;
	margin-bottom: 6px;
	background: #4a0f1a;
	border: 2px solid rgba(255, 209, 102, 0.45);
	border-radius: 50%;
}

.diwali-timeline li.done .diwali-timeline-dot{
	background: var(--diwali-marigold);
	border-color: var(--diwali-marigold);
}

.diwali-timeline li.active .diwali-timeline-dot{
	background: var(--diwali-gold);
	border-color: #fff3b0;
	box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.25), 0 0 14px 4px rgba(255, 179, 29, 0.6);
	animation: diwaliPulse 1.8s ease-in-out infinite;
}

.diwali-timeline-name{
	font-size: 11px;
	font-weight: 600;
	line-height: 1.15em;
	color: rgba(255, 255, 255, 0.65);
}

.diwali-timeline-date{
	font-size: 10px;
	line-height: 1.3em;
	color: rgba(255, 255, 255, 0.45);
}

.diwali-timeline li.active .diwali-timeline-name{
	color: var(--diwali-gold);
}

.diwali-timeline li.active .diwali-timeline-date{
	color: rgba(255, 209, 102, 0.8);
}

@keyframes diwaliPulse{
	0%, 100%	{ box-shadow: 0 0 0 4px rgba(255, 209, 102, 0.25), 0 0 14px 4px rgba(255, 179, 29, 0.6); }
	50%			{ box-shadow: 0 0 0 7px rgba(255, 209, 102, 0.1), 0 0 20px 6px rgba(255, 179, 29, 0.4); }
}

.diwali-greeting-btn{
	display: inline-block;
	padding: 11px 22px;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2em;
	color: var(--diwali-maroon);
	background: linear-gradient(90deg, var(--diwali-gold), var(--diwali-marigold));
	border-radius: 100px;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.diwali-greeting-btn:hover{
	color: var(--diwali-maroon);
	transform: translateY(-2px);
	box-shadow: 0 6px 18px rgba(255, 159, 28, 0.45);
}

.diwali-greeting-close{
	position: absolute;
	top: 10px;
	right: 12px;
	width: 32px;
	height: 32px;
	padding: 0;
	font-size: 22px;
	line-height: 30px;
	color: rgba(255, 255, 255, 0.7);
	background: transparent;
	border: none;
	border-radius: 50%;
	cursor: pointer;
}

.diwali-greeting-close:hover{
	color: var(--white-color);
	background: rgba(255, 255, 255, 0.1);
}

/* Minimised greeting: a small glowing diya that reopens the card */
.diwali-greeting-toggle{
	position: fixed;
	left: 20px;
	bottom: 20px;
	width: 56px;
	height: 56px;
	padding: 0 0 6px;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	background: linear-gradient(135deg, var(--diwali-maroon) 0%, #4a0f1a 100%);
	border: 1px solid rgba(255, 209, 102, 0.5);
	border-radius: 50%;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
	cursor: pointer;
	z-index: 998;
	opacity: 0;
	visibility: hidden;
	transform: scale(0.6);
	transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
}

.diwali-greeting-toggle.show{
	opacity: 1;
	visibility: visible;
	transform: scale(1);
}

.diwali-greeting-toggle.show:hover{
	transform: scale(1.1);
}

.diwali-greeting-toggle .diwali-diya{
	transform: scale(0.7);
	transform-origin: bottom center;
}

/************************************/
/***         Responsive           ***/
/************************************/

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

	/* Hero text sits close to the header on smaller screens: shorter drops and a little extra room */
	.diwali-toran{
		height: 40px;
	}

	.diwali-toran-drop span:nth-child(n+3){
		display: none;
	}

	.diwali-toran-drop.leaf::after{
		width: 9px;
		height: 13px;
	}

	.hero{
		padding-top: 170px;
	}

	.page-header{
		padding-top: 200px;
	}

	.diwali-diya-row .diwali-diya:nth-child(n+8){
		display: none;
	}

	.festival-banner{
		margin-bottom: 40px;
	}
}

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

	.diwali-toran-drop span{
		width: 9px;
		height: 9px;
	}

	.diwali-diya-row{
		padding: 0 10px;
	}

	.diwali-diya-row .diwali-diya:nth-child(n+6){
		display: none;
	}

	.festival-banner{
		margin-bottom: 30px;
		border-radius: 12px;
	}

	.festival-banner-pagination{
		bottom: 6px;
	}

	.festival-banner-pagination .swiper-pagination-bullet{
		width: 7px;
		height: 7px;
	}

	.festival-banner-pagination .swiper-pagination-bullet-active{
		width: 18px;
	}

	/* Card becomes a bottom sheet sitting above the WhatsApp button */
	.diwali-greeting{
		left: 12px;
		right: 12px;
		bottom: 80px;
		width: auto;
		max-width: none;
		max-height: calc(100vh - 100px);
		padding: 18px;
		border-radius: 18px;
		transform-origin: bottom center;
	}

	.diwali-greeting-head{
		gap: 12px;
		margin-bottom: 10px;
	}

	.diwali-greeting-icon{
		width: 46px;
		height: 46px;
		font-size: 24px;
	}

	.diwali-greeting-gujarati{
		font-size: 14px;
	}

	.diwali-greeting h3{
		font-size: 22px;
	}

	.diwali-greeting p{
		font-size: 14px;
		margin-bottom: 14px;
	}

	.diwali-timeline{
		margin-bottom: 16px;
	}

	.diwali-greeting-btn{
		display: block;
		text-align: center;
	}

	/* Clear of the ShareThis bar that docks along the bottom on phones */
	.diwali-greeting-toggle{
		left: 12px;
		bottom: 60px;
		width: 50px;
		height: 50px;
	}
}

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

	/* Seven festival names don't fit side by side, so the timeline scrolls */
	.diwali-timeline{
		overflow-x: auto;
		scrollbar-width: none;
		margin-left: -18px;
		margin-right: -18px;
		padding: 0 18px;
		justify-content: flex-start;
		gap: 4px;
	}

	.diwali-timeline::-webkit-scrollbar{
		display: none;
	}

	.diwali-timeline::before{
		left: 48px;
		right: auto;
		width: 384px;
	}

	.diwali-timeline li{
		flex: 0 0 60px;
	}

	.diwali-diya-row .diwali-diya:nth-child(n+5){
		display: none;
	}
}

@media (prefers-reduced-motion: reduce){

	.diwali-toran-drop,
	.diwali-diya::after,
	.diwali-timeline li.active .diwali-timeline-dot{
		animation: none;
	}
}
