<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en" />

<meta property="og:image" content="https://w2.chabad.org/media/images/1154/XltL11545882.png" itemprop="image" width="150" height="150" />
<meta property="og:image:width" content="150" />
<meta property="og:image:height" content="150" />
<meta name="keywords" content="Contact,Us" />
<meta name="title" content="Contact Us - Chabad of Ellicott City" />
<meta property="og:type" content="website" />
<meta name="scope-aids" content="5054068-5054076-5077466-5094679-5094713-5094714" />
<meta name="article-keywords" content="19478-19479-19958-20962-2185-8495-8972-18927-19353-19480-2170-2898" />
<meta name="scope-aid" content="5054068" />
<meta name="scope-aid" content="5054076" />
<meta name="scope-aid" content="5077466" />
<meta name="scope-aid" content="5094679" />
<meta name="scope-aid" content="5094713" />
<meta name="scope-aid" content="5094714" />
<meta name="article-keyword" content="19478" />
<meta name="article-keyword" content="19479" />
<meta name="article-keyword" content="19958" />
<meta name="article-keyword" content="20962" />
<meta name="article-keyword" content="2185" />
<meta name="article-keyword" content="8495" />
<meta name="article-keyword" content="8972" />
<meta name="article-keyword" content="18927" />
<meta name="article-keyword" content="19353" />
<meta name="article-keyword" content="19480" />
<meta name="article-keyword" content="2170" />
<meta name="article-keyword" content="2898" />
<meta property="og:url" content="https://www.chabadellicottcity.com/templates/articlecco_cdo/aid/5094714/jewish/Contact-Us.htm" />
<meta property="twitter:card" content="summary_large_image" />
<meta property="twitter:site" content="@chabad" />
<meta property="og:title" content="Contact Us - Chabad of Ellicott City" /><link rel="canonical" href="https://www.chabadellicottcity.com/templates/articlecco_cdo/aid/5094714/jewish/Contact-Us.htm" />
<link rel="icon" type="image/png" href="https://www.chabadellicottcity.com/media/images/1154/XltL11545882.png" />
<link rel="Stylesheet" href="/css/fonts/font-awesome/font-awesome-5.css?v=98662BF4" id="kfont-awesome" type="text/css"/>
<link rel="Stylesheet" href="/css/DefaultGrid.css?v=44B79007" id="kgrid" type="text/css"/>
<link rel="Stylesheet" href="/css/Elements.css?v=E669C926" id="k6" type="text/css"/>
<link rel="Stylesheet" href="/css/vendor/ds/tokens/sites.css?v=D77AD1C0" id="ksites-ds-css" type="text/css"/>
<link rel="Stylesheet" href="/css/new/main.css?v=2B7F734E" id="k7" type="text/css"/>
<link rel="Stylesheet" href="/css/old/global.css?v=F7C22456" id="k2898" type="text/css"/>
<link rel="Stylesheet" href="/css/cco/minisites/themes/plannedgiving/styles.css?v=1F9C44F5" id="k19353" type="text/css"/>
<link rel="Stylesheet" href="https://w2.chabad.org/css/cco/minisites/global.css" id="k20962" type="text/css"/>
<link rel="Stylesheet" href="/css/bootstrap/grid.css?v=B92FCAD8" id="kbootstrap4-grid" type="text/css"/>
<link rel="Stylesheet" href="/css/Library/reader-comments.css?v=5F31D0D8" id="kCommentsStylesheet" type="text/css"/>
<link rel="Stylesheet" href="/css/inline/BookInfo.css?v=14B88022" id="kBookInfoCss" type="text/css"/>

<script>$q=[];$j=function(f){$q.push(f);}</script>
	
 
	
	<style type="text/css">
		body{margin:0;}
	</style>
	
	



<script>
	window.dataLayer = window.dataLayer || [];
	dataLayer.push({"event":"datalayer-initialized","page":{"numberOfComments":0,"publicationDate":"2021-04-08","primaryArticleId":5094714,"title":"","author":"","authorId":0,"contentLevel1":"My Site","contentLevel2":"Ways To Give","contentLevel3":"Planned Giving","contentLevel4":"Contact","contentLevel5":"Contact Us","siteName":"Chabad of Ellicott City"},"time":{"upcomingHoliday":"Shavuot","daysToUpcomingHoliday":7,"hebrewDate":"5786-02-28"}});
		dataLayer.push({ 'articleHierarchy': '-5054068-5054076-5077466-5094679-5094713-5094714-', 'keywords': '-k2898-k2170-k19480-k19353-k18927-k8972-k8495-k2185-k20962-k19958-k19479-k19478-', 'k': '-5054068-5054076-5077466-5094679-5094713-5094714--k2898-k2170-k19480-k19353-k18927-k8972-k8495-k2185-k20962-k19958-k19479-k19478-' });
	
</script>
<script>

(function(c,h,a,b,a,d){c[a]=c[a]||[];c[a].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=h.getElementsByTagName(b)[0],
j=h.createElement(b);j.async=true;
j.src='https://w6.chabad.org/mitzvah-tank.js';f.parentNode.insertBefore(j,f);
})(window,document,0,'script','dataLayer');</script>

	<!-- Start of StatCounter Code -->
	<script type="text/javascript">
	var sc_project = 12485608;var sc_partition = 96;var sc_invisible = 1;var sc_remove_link=1;var sc_security = "0844ee4e";var sc_https = 1;
	</script>
	<script type="text/javascript" src="https://secure.statcounter.com/counter/counter_xhtml.js" defer async></script>
	<noscript><img src="//c97.statcounter.com/counter.php?sc_project=12485608&amp;java=0&amp;security=0844ee4e&amp;invisible=1" border="0" /> </noscript>
	<!-- End of StatCounter Code -->


<script>
document.addEventListener('DOMContentLoaded', () => {
  const dropdown = document.getElementById('ReserversTitle');
  if (dropdown) {
    // Add standard options dynamically
    const titles = ['Imam', 'Pastor', 'Priest', 'Other'];
    titles.forEach(title => {
      const option = document.createElement('option');
      option.value = title;
      option.textContent = title;
      dropdown.appendChild(option);
    });

    // Create elements for custom prefix input and "Add" button
    const manualPrefixContainer = document.createElement('div');
    manualPrefixContainer.id = 'manualPrefixContainer';
    manualPrefixContainer.style.marginTop = '10px';
    manualPrefixContainer.style.alignItems = 'center';
    manualPrefixContainer.style.gap = '10px';
    manualPrefixContainer.style.display = 'flex';

    const manualPrefixInput = document.createElement('input');
    manualPrefixInput.type = 'text';
    manualPrefixInput.id = 'manualPrefix';
    manualPrefixInput.placeholder = 'Enter custom prefix';

    const addButton = document.createElement('div');
    addButton.id = 'addButton';
    addButton.textContent = 'Add';
    addButton.style.padding = '8px 15px';
    addButton.style.backgroundColor = '#007bff';
    addButton.style.color = '#fff';
    addButton.style.borderRadius = '5px';
    addButton.style.cursor = 'pointer';
    addButton.style.textAlign = 'center';
    addButton.style.display = 'inline-block';
    addButton.style.userSelect = 'none';

    // Add hover effect
    addButton.addEventListener('mouseover', () => {
      addButton.style.backgroundColor = '#0056b3';
    });
    addButton.addEventListener('mouseout', () => {
      addButton.style.backgroundColor = '#007bff';
    });

    // Append input and button to container
    manualPrefixContainer.appendChild(manualPrefixInput);
    manualPrefixContainer.appendChild(addButton);

    // Event listener for dropdown selection
    dropdown.addEventListener('change', () => {
      if (dropdown.value === 'Other') {
        dropdown.parentNode.insertBefore(manualPrefixContainer, dropdown.nextSibling);
        manualPrefixInput.focus();
      } else {
        if (manualPrefixContainer.parentNode) {
          manualPrefixContainer.parentNode.removeChild(manualPrefixContainer);
        }
      }
    });

    // Event listener for the "Add" action
    addButton.addEventListener('click', () => {
      const customValue = manualPrefixInput.value.trim();
      if (customValue) {
        const customOption = document.createElement('option');
        customOption.value = customValue;
        customOption.textContent = customValue;
        dropdown.appendChild(customOption);
        dropdown.value = customValue;
        manualPrefixContainer.style.display = 'none';
        manualPrefixInput.value = '';
      } else {
        alert('Please enter a custom prefix before adding.');
      }
    });
  } else {
    console.error('Dropdown with ID #ReserversTitle not found.');
  }
});
</script><title>
	Contact Us - Chabad of Ellicott City
</title></head>
<body class="lang_en dir_ltr cco_body form secure cco_templateless_page section_branch">
	
	
		<div width="100%" class="cco_templateless_template" style="z-index:100 !important;display:block !important;left:0px !important;top:0px !important;height:30px!important;width:100% !important;line-height:30px !important; position:relative !important; margin-bottom:0 !important; padding:0;text-indent: 25px;" align="Left"><a href="//www.chabadellicottcity.com" style="display:block!important;font-size:14px !important;">&laquo; Back to&nbsp;Chabad of Ellicott City</a></div>
	
	<div class="cco_templatelates_content">
		
	<div class="co_content_container clearfix local_content" id="co_content_container">
		<div class="clearfix">
			<!-- BEGIN HEADER --><style type="text/css">
	.cco_templateless_template,
	.cco_templateless_template a {
		background: #6C0647;
	}
.sidebar-ads co\:item {
    padding: 3%;
    text-align: center;
    background: #690645;
    display: block;
    margin-bottom: 3%
}

.section_root .sidebar-ads co\:item {
    float: left;
    width: 315px;
    padding: 12px 0;
    text-align: center;
    background: #690645;
    display: block;
    margin-left: 15px
}

body.mobile.section_root .sidebar-ads co\:item {
    float: none;
    display: block;
    width: 100%;
    margin: 5px 0
}

.section_root .sidebar-ads co\:item:first-child {
    margin: 0
}

.sidebar-ads co\:item a {
    text-decoration: none;
    position: absolute;
    width: 283px;
    height: 167px
}

.sidebar-ads co\:item img {
    width: 90%
}

.sidebar-ads co\:item .caption {
    font: 12px/18px Merriweather, times, serif;
    color: #a7a6a2;
    margin-top: 15px
}
co\:item {display:unset!important}
</style>
<div id="chabad_body_page">
<div id="chabad_main_content" class="container">


<div id="chabad_head" class="header">



<div class="chabad_header header-logo" data-href="/5094679">
<a href="/5094679" class="header-title" title="Planned Giving">
<span>
Planned Giving to Chabad</span></a>
<div class="header-subtitle">
<a href="/5094679" class="header-subtitle" style="text-decoration:none">
Make Your Legacy a Jewish Future</a></div>
</div>


<div id="navigation" class="chabad_navigator_bar">
<div class="chabad_menu_content">
<ul id="menu" class="navi">
<li class="item parent arrow">
<a href="/article.asp?aid=5094680" class="parent arrow">Why Giving Matters</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=5094681">Changing Jewish Destiny</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094682">Chabad In The News</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094683">The Rebbe's Mandate</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094684">Giving In Jewish Tradition</a>
</li>
<li class="item last">
<a href="/article.asp?aid=5094685">Donor Stories</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=5094693" class="parent arrow">Ways To Give</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=5094694">Bequest</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094695">Charitable Gift Annuity</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094697">Real Estate</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094698">Life Insurance</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094699">Charitable Trusts</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094700">Retirement Plans</a>
</li>
<li class="item last">
<a href="/article.asp?aid=5094701">Planned Giving Videos</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=5094703" class="parent arrow">Gratitude</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=5094704">Jewish Legacy Society</a>
</li>
<li class="item last">
<a href="/article.asp?aid=5094705">My Story</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow">
<a href="/article.asp?aid=5094707" class="parent arrow">Resources</a>
<div class="sub_menu">
<ul>
<li class="item first">
<a href="/article.asp?aid=5094708">Bequest Form</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094709">Frequently Asked Questions</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094710">Advisor Information</a>
</li>
<li class="item">
<a href="/article.asp?aid=5094711">Planned Giving Council</a>
</li>
<li class="item last">
<a href="/article.asp?aid=5094712">Glossary of Terms</a>
</li>
</ul>
</div>
|
</li>
<li class="item parent arrow selected">
<a href="/article.asp?aid=5094713" class="parent arrow selected">Contact</a>
<div class="sub_menu">
<ul>
<li class="item first selected">
<a href="/article.asp?aid=5094714">Contact Us</a>
</li>
<li class="item last">
<a href="/article.asp?aid=5094715">Share Your Story</a>
</li>
</ul>
</div>
</li>

</ul>
</div>
</div>



</div>
<div class="break_floats" ></div>
<div id="chabad_body_content">
<div detached="true" type="static" id="ContentArea" name="content_area" class="chabad_left_column"><div id="content_page" class="content_page"><!-- END HEADER -->
			
			
			<div class="clearfix bh mobile-only align_right">ב"ה</div>
			
				<div class="master-content-wrapper " >
					

<header class="article-header cf ">
	
	
			<h1 class="article-header__title js-article-title js-page-title">Contact Us</h1>
		
			<div>
				
			</div>
		
</header>
				</div>
			
			<div class="body_wrapper clearfix co_body">
				<div class="" id="co_body_container">
					
					<div id="ContentBody">
						
						
							<div class="content-area-parent no_margin">
								
	<div id="cco_body">
		<div class="content  no_margin no_overflow" id="co_content_container">
			
			
	

	<article class="content js-content" >
	


		<div class="notice error">
			<div class="h1">Due to Shabbat observance this form is currently disabled</div>
			<div class="small_top_margin">Due to the sanctity of <b>Shabbat</b>, this form cannot accept new submissions until <b>Saturday, May 16, 9:01 PM</b>.</div>
			<div class="small_top_margin">Thank you.</div>
		</div>
	
	<div class="break_floats"></div>
	

<div class="content-footer">
	<!-- END CACHE -->
	
	
	
		<div class="section-articles below-article clearfix" id="MoreInSection" data-list-name="more in this section">
			<h2 class="below-article__title">More in this section</h2>
			<div class="bs-container">
				<div class="bs-row">
					
		<div class="section-articles__column col-md-6 ">
			<ul class="small-links small-links--orange">
				
		<li class="small-links__item ">
			
			<a class="link_item" href="/templates/articlecco_cdo/aid/5094715/jewish/Share-Your-Story.htm" data-aid="5094715">Share Your Story</a>
		</li>
		
	
			</ul>
		</div>
	
				</div>
			</div> 
		</div>
	
		

	
	
</div>
	</article>

		</div>
	</div>
</div>
						
						<div class="break_floats"></div>
						
					</div>
				</div>
				
				
				
			</div>
			
			<!-- BEGIN FOOTER --></div></div><div class="co_section">
<div class="co_section_head">
<div>In this Section</div>
</div>
<div class="co_section_body">
<div class="co_section_gradient">
<div class="co_section_text">
<div class="item first">
<span>●</span>
<a href="/article.asp?aid=5094714">Contact Us</a>
</div>
<div class="item last">
<span>●</span>
<a href="/article.asp?aid=5094715">Share Your Story</a>
</div>
</div>
</div>
</div>
<div class="co_section_footer" ></div>
</div>
<div class="chabad_right_column">
<div class="caption" id="contact-address">

<p>Rabbi Yanky Baron<br/>                 Chabad of Ellicott City<br/>                 9785 Statae Route 99,<br/>                 Ellicott City, MD, 21042<br/>                 443-676-3837<br/>
<a href="mailto:rabbi@chabadellicottcity.com">                 rabbi@chabadellicottcity.com</a></p>
<p></p>
</div>
<ul class="sidebar-ads">


<li>

<a href="/5094681" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-jewish-destiny.png" alt="Changing Jewish Destiny" border="0" />
<div class="caption">
Changing Jewish Destiny</div>

</li>



<li>

<a href="/5094705" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-testimony.png" border="0" />
<div class="caption">
My Story</div>
</li>



<li>

<a href="/5094701" ></a>

<img src="https://w2.chabad.org/images/Shluchim/minisites/themes/plannedgiving/sidebar-thumbs-planned-giving.png" border="0" />
<div class="caption">
Planned Giving Videos</div>

</li>


</ul>

</div></div>
</div>
<div id="border_bottom" ></div>
</div>
<!-- END FOOTER -->
		</div>
		
		<aside class="page-tools-sidebar js-page-tools-sidebar hide_for_print">
<div class="page-tools js-page-tools-menu">
<div class="page-tools__section page-tools__section--share">
<a class="page-tools__tool js-share-popup page-tools__tool--facebook" data-share-url="https://www.facebook.com/dialog/share?app_id=188669250943&amp;display=popup&amp;href=https%3a%2f%2fwww.chabadellicottcity.com%2ftemplates%2farticlecco_cdo%2faid%2f5094714%2fjewish%2fContact-Us.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dFB">
				<i class="fa fa-facebook"></i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--twitter" data-share-url="https://twitter.com/intent/tweet?text=Contact+Us+-+Chabad+of+Ellicott+City&amp;url=https%3a%2f%2fwww.chabadellicottcity.com%2ftemplates%2farticlecco_cdo%2faid%2f5094714%2fjewish%2fContact-Us.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dtwitter&amp;via=Chabad">
				<i class="fa fa-twitter"></i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--whatsapp d-lg-none js-share-whatsapp" data-share-url="whatsapp://send?text=Contact+Us+-+Chabad+of+Ellicott+City https%3a%2f%2fwww.chabadellicottcity.com%2ftemplates%2farticlecco_cdo%2faid%2f5094714%2fjewish%2fContact-Us.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dwhatsapp">
				<i class="fa fa-whatsapp">
					<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50" fill="#128c7e" width="1em" height="1em"><path d="M25 2C12.318 2 2 12.318 2 25c0 3.96 1.023 7.854 2.963 11.29L2.037 46.73c-.096.343-.003.711.245.966.191.197.451.304.718.304.08 0 .161-.01.24-.029l10.896-2.699C17.463 47.058 21.21 48 25 48c12.682 0 23-10.318 23-23S37.682 2 25 2zm11.57 31.116c-.492 1.362-2.852 2.605-3.986 2.772-1.018.149-2.306.213-3.72-.231-.857-.27-1.957-.628-3.366-1.229-5.923-2.526-9.791-8.415-10.087-8.804-.295-.389-2.411-3.161-2.411-6.03s1.525-4.28 2.067-4.864c.542-.584 1.181-.73 1.575-.73s.787.005 1.132.021c.363.018.85-.137 1.329 1.001.492 1.168 1.673 4.037 1.819 4.33.148.292.246.633.05 1.022s-.294.632-.59.973-.62.76-.886 1.022c-.296.291-.603.606-.259 1.19s1.529 2.493 3.285 4.039c2.255 1.986 4.158 2.602 4.748 2.894.59.292.935.243 1.279-.146.344-.39 1.476-1.703 1.869-2.286s.787-.487 1.329-.292c.542.194 3.445 1.604 4.035 1.896.59.292.984.438 1.132.681.148.242.148 1.41-.344 2.771z"/></svg>
				</i>
			</a>
<a class="page-tools__tool js-share-popup page-tools__tool--pinterest d-none d-lg-block" data-share-url="http://pinterest.com/pin/create/button/?url=https%3a%2f%2fwww.chabadellicottcity.com%2ftemplates%2farticlecco_cdo%2faid%2f5094714%2fjewish%2fContact-Us.htm%23utm_medium%3dpage_tools%26utm_content%3ddesktop%26utm_source%3dpinterest&amp;description=Contact+Us+-+Chabad+of+Ellicott+City">
				<i class="fa fa-pinterest"></i>
			</a>
<a class="page-tools__tool" onclick="showEmailLayer(this);">
<i class="fa fa-envelope"></i>
</a>
</div>
<div class="page-tools__section page-tools__section--other js-page-tool-other">
<div class="page-tools__tool popover-parent d-lg-block">
<div class="popover popover--right align_left nowrap">
<div class="popover__content">
<label class="bold bottom_margin block">
Print Options:
</label>
<form class="vcenter" name="print-form" onsubmit="coPrint(event, 5094713);return false;">
<div>
<label><input type="checkbox" name="print-green"><span title="Save paper and ink">Print without images <i class="fa fa-leaf text-green"></i></span></label>
</div>
<br/>
<div class="center">
<button class="co-button page-tools__print-button">Print</button>
</div>
</form>
</div>
</div>
<i class="fa fa-print"></i>
</div>
</div>
</div>
<div class="js-fab-wrapper fab-wrapper">
<div class="fab">
<i class="fab-icon"></i>
</div>
</div>
</aside>
<!-- END CACHE -->
	</div>

	</div>

	<div id="BodyContainer">
		<div class="g960 footer">
			<div class="poweredby large_bottom_margin">
				



	<div class="footer3">
		<span class="footer-title" >Chabad of Ellicott City</span>
		<div class="footer-address">
			<span class="footer-street">9785 Route 99 </span>
			<span class="footer-city-state">Ellicott City, MD 21042</span>
		</div>
			<span>443-676-3837</span>
	</div>
	<img src="https://w2.chabad.org/images/global/spacer.gif" width="1" height="6" border="0" /><br />



Powered by <a href="https://www.chabad.org/" target="_new" class="">Chabad.org</a> &copy; 1993-2026 <a href="/4026210" target="_blank" class="privacy-link">Privacy Policy</a>




			</div>
		</div>
	</div>
	
	

	
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery-1.8.3.min.js?v=14C45307"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery/jquery.tools.expose.min.js?v=AB0A58F7"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/os/jquery.tools.1.2.7.min.js?v=FBC14E36"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/co/dist/CoLib.js?v=F809B22F"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/WebComponents/bundles/magen-cdo-global.js?v=95D39855"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/templates/plannedgiving/custom.js?v=8742C543"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/modules/pagetools.js?v=930B07AB"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/multimedia/infolayer.js?v=ED1B8531"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/commentsloader.js?v=AD6AAB79"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/minisites.js?v=F38E4DA5"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/subscribeprompt.js?v=86D84DC2"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/templates/FormDecoder.js?v=83AF6F1A"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/custom/deprecated.js?v=D506A83E"></script>
<script type="text/javascript" src="https://w2.chabad.org/scripts/js/OverrideJSDocumentWrite.js?v=9A0227AA"></script><script>$j = $j.fn ? $j : jQuery;$j(()=>{$q.forEach(f=>{try{f.call(window);}catch(ex){console.error(ex);}});})</script>
	

<script  language="javascript" type="text/javascript"> Co.Settings      = {CacheClassName:'js-cache-default',MosadName:'Chabad of Ellicott City'}; Co.ArticleId     = '5094714';Co.SectionId     = 5077466;Co.PartnerSiteId = 0;Co.SiteId        = 11215;Co.IsMobilePage  = false;Co.IsResponsive  = false;Co.DbDomain      = 'chabadellicottcity.com';Co.LanguageCode  = '';Co.LoginStatus   = 'None';</script>
	
	
<script>
//<![CDATA[
    /* <-----------Upcoming Events Carousel (Google Sheets) ---------> */
    if (window.location.pathname === '/' || window.location.pathname === '/default.aspx' || window.location.pathname === '') {

        (async function() {

            // Global Error listener to catch broken images safely without triggering Cloudflare WAF via inline onerror attributes
            document.addEventListener('error', function(e) {
                if (e.target && e.target.tagName && e.target.tagName.toLowerCase() === 'img') {
                    if (!e.target.dataset.fallbackApplied) {
                        e.target.dataset.fallbackApplied = 'true';
                        e.target.src = 'https://placehold.co/400x300/eee/ccc?text=Image+Not+Found';
                    }
                }
            }, true);

            // =========================================================
            // CONFIGURATION
            // =========================================================
            const SHEET_ID = '1EPGntfwESm5hdd-RPpR7kmNARdvi9dpDT3YrJnO0ens'; 
            const TARGET_LOCATION = 'Chabad of Ellicott City'; 
            const MAX_EVENTS = 10; 
            // =========================================================

            // Using \u0026 to guarantee XML/WAF parsers don't break on the ampersand
            const EVENTS_URL = `https://docs.google.com/spreadsheets/d/${SHEET_ID}/gviz/tq?tqx=out:json\u0026sheet=Events`;
            const SETTINGS_URL = `https://docs.google.com/spreadsheets/d/${SHEET_ID}/gviz/tq?tqx=out:json\u0026sheet=Settings`;
            
            let categoryColors = {}; 
            let locationLogos = {};
            let demoColors = {}; 
            let capacityColors = {}; // New: Store capacity tag colors
            const dayOfWeekMap = { 'sunday':0, 'monday':1, 'tuesday':2, 'wednesday':3, 'thursday':4, 'friday':5, 'saturday':6 };

            function parseGoogleJson(text) {
                return JSON.parse(text.substring(text.indexOf('{'), text.lastIndexOf('}') + 1));
            }

            // Generate Calendar Links
            function createCalendarLinks(title, desc, loc, dateObj, timeStr) {
                let hours = 0, mins = 0;
                if (timeStr) {
                    const match = timeStr.match(/(\d+):(\d+)\s*(AM|PM)/i);
                    if (match) {
                        hours = parseInt(match[1]); mins = parseInt(match[2]);
                        if (match[3].toUpperCase() === 'PM' && hours < 12) hours += 12;
                        if (match[3].toUpperCase() === 'AM' && hours === 12) hours = 0;
                    }
                }
                
                const start = new Date(dateObj);
                start.setHours(hours, mins, 0);
                const end = new Date(start.getTime() + 60 * 60 * 1000); 
                
                const formatICSDate = (d) => {
                    return d.getUTCFullYear() + String(d.getUTCMonth() + 1).padStart(2, '0') + String(d.getUTCDate()).padStart(2, '0') + 'T' + String(d.getUTCHours()).padStart(2, '0') + String(d.getUTCMinutes()).padStart(2, '0') + String(d.getUTCSeconds()).padStart(2, '0') + 'Z';
                };

                const startStr = formatICSDate(start);
                const endStr = formatICSDate(end);
                
                const tempDiv = document.createElement('div');
                tempDiv.innerHTML = desc || '';
                const cleanDesc = tempDiv.textContent || tempDiv.innerText || '';

                const gCalUrl = `https://calendar.google.com/calendar/render?action=TEMPLATE\u0026text=${encodeURIComponent(title)}\u0026dates=${startStr}/${endStr}\u0026details=${encodeURIComponent(cleanDesc)}\u0026location=${encodeURIComponent(loc)}`;
                
                const icsContent = `BEGIN:VCALENDAR\nVERSION:2.0\nBEGIN:VEVENT\nDTSTART:${startStr}\nDTEND:${endStr}\nSUMMARY:${title}\nDESCRIPTION:${cleanDesc}\nLOCATION:${loc}\nEND:VEVENT\nEND:VCALENDAR`;
                
                const blob = new Blob([icsContent], { type: 'text/calendar;charset=utf-8' });
                const icsUrl = URL.createObjectURL(blob);

                return { gCalUrl, icsUrl };
            }

            // Generate Pre-filled Email Body
            function generateEmailBody(ev, dateTimeStr) {
                const instName = ev.institution || 'Chabad Ellicott City';
                let body = `Dear ${instName} Events Team,\n\n`;
                body += `I would like to sign up for the following event:\n\n`;
                body += `Event Name: ${ev.title}\n`;
                body += `Event Date: ${dateTimeStr}\n\n`;
                body += `Number of Attendees: [# of people]\n`;
                body += `Names of Attendees: [List names]\n\n`;
                body += `* For new attendees, please provide your contact information below. Returning members may leave this section blank if we already have your details on file. *\n`;
                body += `Home Address: [Put Home Address Here]\n`;
                body += `Phone Number: [Put Phone Number Here]\n\n`;

                // Add payment section ONLY if price text exists
                if (ev.priceText) {
                    body += `Pricing Info: ${ev.priceText}\n\n`;
                    body += `Payment Commitment:\n`;
                    if (ev.donateLink) {
                        body += `[ ] I will pay in advance online (${ev.donateLink})\n`;
                    } else {
                        body += `[ ] I will pay in advance online\n`;
                    }
                    body += `[ ] I will pay at the door\n`;
                    body += `[ ] I will make an additional donation in the amount of: $______\n`;
                    body += `[ ] Please send me payment instructions\n\n`;
                    body += `Total Amount Committing to Pay: $[Amount]\n\n`;
                }

                body += `Additional Notes (optional):\n`;
                body += `[Any dietary restrictions, seating requests, etc.]\n\n`;
                body += `Please confirm my registration at your earliest convenience.\n\n`;
                body += `Thank you,\n`;
                body += `[Your Name]\n`;
                body += `[Your Email]\n`;
                body += `[Your Phone Number]`;

                return encodeURIComponent(body);
            }

            const runTransformation = async () => {
                try {
                    // Fetch Settings for Colors, Logos, and Capacity Tags
                    try {
                        const setRes = await fetch(SETTINGS_URL);
                        const setData = parseGoogleJson(await setRes.text());
                        if (setData && setData.table && setData.table.rows) {
                            setData.table.rows.forEach(row => {
                                const catName = row.c[0] ? String(row.c[0].v).trim() : null;
                                const catColor = row.c[1] ? String(row.c[1].v).trim() : null;
                                if(catName && catColor) categoryColors[catName.toLowerCase()] = catColor;

                                const locName = row.c[2] ? String(row.c[2].v).trim() : null;
                                const locLogo = row.c[3] ? String(row.c[3].v).trim() : null;
                                if(locName && locLogo) locationLogos[locName.toLowerCase()] = locLogo;
                                
                                const demoName = row.c[4] ? String(row.c[4].v).trim() : null;
                                const demoColor = row.c[5] ? String(row.c[5].v).trim() : null;
                                if(demoName && demoColor) demoColors[demoName.toLowerCase()] = demoColor;

                                // Column I (index 8) and J (index 9) for Capacity Updates
                                const capName = row.c[8] ? String(row.c[8].v).trim() : null;
                                const capColor = row.c[9] ? String(row.c[9].v).trim() : null;
                                if(capName && capColor) capacityColors[capName.toLowerCase()] = capColor;
                            });
                        }
                    } catch (err) { console.warn("Could not load Settings.", err); }

                    // Fetch Events
                    let processedEvents = [];
                    const today = new Date();
                    today.setHours(0,0,0,0);

                    const evRes = await fetch(EVENTS_URL);
                    const evText = await evRes.text();
                    if (evText.toLowerCase().includes('<!doctype html>')) return;

                    const evData = parseGoogleJson(evText);
                    const rows = evData.table.rows;

                    rows.forEach(row => {
                        const getVal = (idx) => (row.c && row.c[idx] && row.c[idx].v !== null) ? String(row.c[idx].v).trim() : '';
                        
                        const title = getVal(0);
                        if(!title) return; 

                        const location = getVal(5); // Location in Col F
                        const institution = getVal(12); // Institution in Col M
                        
                        // FIX: Only verify the Institution column M. (Using "ellicot" to catch both "ellicott" and "ellicot")
                        if (!institution.toLowerCase().includes('chabad of ellicot')) return; 

                        const description = getVal(1) || '';
                        const imageSrc = getVal(2) || 'https://placehold.co/600x400/eee/ccc?text=Event+Image';
                        const demographics = getVal(3);
                        const eventType = getVal(4);
                        
                        // ROBUST DATE PARSER (Fixes Calendar Picker variations)
                        let dateObj = null;
                        let dateVal = row.c && row.c[6] ? row.c[6].v : null;
                        let fDateVal = row.c && row.c[6] ? row.c[6].f : null;

                        if (typeof dateVal === 'string' && dateVal.startsWith('Date(')) {
                            const parts = dateVal.match(/Date\((\d+),(\d+),(\d+)\)/);
                            if (parts) dateObj = new Date(parts[1], parts[2], parts[3]);
                        } else if (typeof dateVal === 'number') {
                            dateObj = new Date(Math.round((dateVal - 25569) * 86400 * 1000));
                            dateObj = new Date(dateObj.getTime() + dateObj.getTimezoneOffset() * 60000);
                        } else if (dateVal) {
                            dateObj = new Date(dateVal);
                        } else if (fDateVal) {
                            dateObj = new Date(fDateVal);
                        }

                        // Fix: Force date to evaluate at exactly midnight local time
                        if (dateObj) {
                            dateObj.setHours(0,0,0,0);
                        }

                        // TIME PARSER
                        let time = (row.c && row.c[7] && row.c[7].f) ? row.c[7].f : String(getVal(7));
                        if (time.startsWith('Date(')) {
                            const tParts = time.match(/Date\((\d+),(\d+),(\d+),(\d+),(\d+),(\d+)\)/);
                            if (tParts) {
                                let h = parseInt(tParts[4], 10);
                                let m = parseInt(tParts[5], 10);
                                let ampm = h >= 12 ? 'PM' : 'AM';
                                h = h % 12 || 12; m = m < 10 ? '0' + m : m;
                                time = `${h}:${m} ${ampm}`;
                            }
                        }

                        const isRecurring = String(getVal(8)).toLowerCase() === 'true' || String(getVal(8)).toLowerCase() === 'yes';
                        const dayOfWeekStr = String(getVal(9)).toLowerCase();
                        const untilDateRaw = row.c && row.c[10] ? row.c[10].v : null;
                        let moreInfoLink = getVal(11) || '#';

                        // Extract new columns
                        const contactPhone = getVal(13); // Column N
                        const contactEmail = getVal(14); // Column O
                        const smsMessage = getVal(15);   // Column P (NEW SMS BODY FIX)
                        const capacityUpdate = getVal(16); // Column Q
                        const donateLink = getVal(17);     // Column R
                        const priceText = getVal(18);      // Column S

                        const displayTitle = title.replace('[E]', '').trim();

                        if (isRecurring && dayOfWeekMap[dayOfWeekStr] !== undefined && untilDateRaw) {
                            let currentDate = new Date();
                            currentDate.setHours(0,0,0,0);
                            
                            let untilDate = null;
                            if(typeof untilDateRaw === 'string' && untilDateRaw.startsWith('Date(')){
                                const parts = untilDateRaw.match(/Date\((\d+),(\d+),(\d+)\)/);
                                if(parts) untilDate = new Date(parts[1], parts[2], parts[3]);
                            } else { untilDate = new Date(untilDateRaw); }

                            const targetDay = dayOfWeekMap[dayOfWeekStr];

                            if (untilDate) {
                                let loopCount = 0; 
                                while (currentDate <= untilDate && loopCount < 365) {
                                    if (currentDate.getDay() === targetDay && currentDate >= today) {
                                        const calLinks = createCalendarLinks(displayTitle, description, location, currentDate, time);
                                        // Pass smsMessage into processed Events array
                                        processedEvents.push({ title: displayTitle, description, imageSrc, eventType, demographics, location, institution, contactPhone, contactEmail, smsMessage, capacityUpdate, donateLink, priceText, time, moreInfoLink, dateObj: new Date(currentDate), calLinks });
                                    }
                                    currentDate.setDate(currentDate.getDate() + 1);
                                    loopCount++;
                                }
                            }
                        } 
                        else if (dateObj && dateObj >= today) {
                            const calLinks = createCalendarLinks(displayTitle, description, location, dateObj, time);
                            // Pass smsMessage into processed Events array
                            processedEvents.push({ title: displayTitle, description, imageSrc, eventType, demographics, location, institution, contactPhone, contactEmail, smsMessage, capacityUpdate, donateLink, priceText, time, moreInfoLink, dateObj: dateObj, calLinks });
                        }
                    });

                    const featuredEvents = processedEvents.sort((a, b) => a.dateObj - b.dateObj).slice(0, MAX_EVENTS);

                    if (featuredEvents.length === 0) return;

                    // --- DOM Injection Logic ---
                    const eventsSection = document.createElement('div');
                    eventsSection.className = 'injected-featured-events-section';
                    eventsSection.id = 'injected-upcoming-events-section';

                    eventsSection.innerHTML = `
                      <div class="injected-featured-events-header"><h2>Upcoming Events</h2></div>
                    `;

                    const carouselContainer = document.createElement('div');
                    carouselContainer.className = 'injected-events-carousel-container';
                    const carouselWrapper = document.createElement('div');
                    carouselWrapper.className = 'injected-events-carousel-wrapper';

                    featuredEvents.forEach((ev) => {
                        let tagColor = 'var(--color-primary-navy)'; 
                        if (ev.eventType && categoryColors[ev.eventType.toLowerCase()]) tagColor = categoryColors[ev.eventType.toLowerCase()];
                        
                        let dColor = '#888888';
                        if (ev.demographics && demoColors[ev.demographics.toLowerCase()]) dColor = demoColors[ev.demographics.toLowerCase()];

                        let capColor = '#ff6b6b'; // Default attention color
                        if (ev.capacityUpdate && capacityColors[ev.capacityUpdate.toLowerCase()]) capColor = capacityColors[ev.capacityUpdate.toLowerCase()];

                        let logoHtml = '';
                        if (ev.institution && locationLogos[ev.institution.toLowerCase()]) {
                            logoHtml = `<img src="${locationLogos[ev.institution.toLowerCase()]}" class="uec-inst-logo" alt="Logo" />`;
                        }

                        const dateStr = ev.dateObj.toLocaleDateString('en-US', { weekday: 'long', month: 'long', day: 'numeric' }).toUpperCase();
                        let timeText = ev.time ? ev.time.trim().toUpperCase() : '';
                        if (timeText) timeText = timeText.replace(/(\d)([AP]M)$/, '$1 $2');
                        const dateTimeString = timeText ? `${dateStr} | ${timeText}` : dateStr;

                        const card = document.createElement('div');
                        card.className = 'unified-event-card';
                        
                        // FIX: Updated Phone button to use SMS intent and icon, combined with Column P Text
                        let smsHref = '';
                        if (ev.contactPhone) {
                            const cleanPhone = ev.contactPhone.replace(/[^\d+]/g, '');
                            const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) || (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);
                            const separator = isIOS ? '&' : '?';
                            smsHref = `sms:${cleanPhone}${ev.smsMessage ? separator + 'body=' + encodeURIComponent(ev.smsMessage) : ''}`;
                        }
                        let phoneBtn = smsHref ? `<a href="${smsHref}" class="uec-btn-icon" title="Text Us"><i class="fas fa-sms"></i></a>` : '';
                        
                        // Pre-filled email body logic
                        let emailBodyEncoded = generateEmailBody(ev, dateTimeString);
                        let emailBtn = ev.contactEmail ? `<a href="mailto:${ev.contactEmail}?subject=${encodeURIComponent(ev.title)}&body=${emailBodyEncoded}" class="uec-btn-icon" title="Email to Register"><i class="fas fa-envelope"></i></a>` : '';

                        card.innerHTML = `
                            <div class="uec-image">
                                <a href="${ev.moreInfoLink}">
                                    <img src="${ev.imageSrc}" alt="${ev.title}" />
                                </a>
                            </div>
                            <div class="uec-body">
                                <div class="uec-header-row">
                                    <div class="uec-tags">
                                        ${ev.capacityUpdate ? `<span class="uec-category uec-pulse-tag" style="background-color: ${capColor}">${ev.capacityUpdate}</span>` : ''}
                                        ${ev.eventType ? `<span class="uec-category" style="background-color: ${tagColor}">${ev.eventType}</span>` : ''}
                                        ${ev.demographics ? `<span class="uec-category" style="background-color: ${dColor}">${ev.demographics}</span>` : ''}
                                    </div>
                                    ${logoHtml}
                                </div>
                                
                                <div class="uec-date"><i class="far fa-clock"></i> ${dateTimeString}</div>
                                ${ev.location ? `<div class="uec-location"><i class="fas fa-map-marker-alt"></i> ${ev.location}</div>` : ''}
                                
                                <h3 class="uec-title"><a href="${ev.moreInfoLink}">${ev.title}</a></h3>
                                <div class="uec-desc" title="${ev.description.replace(/"/g, '\u0026quot;')}">${ev.description}</div>
                                
                                <div class="uec-actions">
                                    <div class="uec-main-action-row">
                                        <a href="${ev.moreInfoLink}" class="uec-btn-main">MORE INFO</a>
                                        ${phoneBtn}
                                        ${emailBtn}
                                    </div>
                                    <div class="uec-cal-col">
                                        <a href="${ev.calLinks.gCalUrl}" target="_blank" class="uec-btn-cal" title="Add to Google Calendar">
                                            <i class="fab fa-google"></i> Add to Google Calendar
                                        </a>
                                        <a href="${ev.calLinks.icsUrl}" download="event.ics" class="uec-btn-cal" title="Add to Apple/Outlook Calendar">
                                            <i class="fab fa-apple"></i> Add to Apple / Outlook
                                        </a>
                                    </div>
                                </div>
                            </div>
                        `;
                        carouselWrapper.appendChild(card);
                    });

                    const viewAllCard = document.createElement('a');
                    viewAllCard.className = 'unified-event-card view-all-card';
                    viewAllCard.href = 'https://www.chabadellicottcity.com/templates/articlecco_cdo/aid/7286655/jewish/Upcoming-Events.htm';
                    viewAllCard.innerHTML = `
                      <div class="view-all-content">
                        <h3>View All</h3><p>Upcoming Events</p><span class="view-all-arrow">→</span>
                      </div>
                    `;
                    carouselWrapper.appendChild(viewAllCard);

                    carouselContainer.appendChild(carouselWrapper);
                    eventsSection.appendChild(carouselContainer);

                    const swipeHint = document.createElement('div');
                    swipeHint.className = 'mobile-swipe-hint';
                    swipeHint.innerHTML = '<span>Swipe for more events</span> <span class="arrow">→</span>';
                    eventsSection.appendChild(swipeHint);

                    // FIX: Check total children (including View All card) so arrows appear properly
                    if (carouselWrapper.children.length > 3) {
                        const prevButton = document.createElement('button');
                        prevButton.className = 'events-carousel-arrow prev'; prevButton.innerHTML = '❮';
                        const nextButton = document.createElement('button');
                        nextButton.className = 'events-carousel-arrow next'; nextButton.innerHTML = '❯';
                        carouselContainer.appendChild(prevButton); carouselContainer.appendChild(nextButton);

                        let currentIndex = 0;
                        const itemsToShowDesktop = 3;
                        const totalItems = carouselWrapper.children.length;

                        const updateCarousel = () => {
                            if (carouselWrapper.children.length === 0) return;
                            const cardWidth = carouselWrapper.children[0].offsetWidth;
                            const gap = 30;
                            const totalMove = (cardWidth + gap) * currentIndex;
                            carouselWrapper.style.transform = `translateX(-${totalMove}px)`;
                            prevButton.disabled = currentIndex === 0;
                            nextButton.disabled = currentIndex >= totalItems - itemsToShowDesktop;
                        };

                        prevButton.addEventListener('click', () => { if (currentIndex > 0) { currentIndex--; updateCarousel(); } });
                        nextButton.addEventListener('click', () => { if (currentIndex < totalItems - itemsToShowDesktop) { currentIndex++; updateCarousel(); } });

                        updateCarousel();
                        window.addEventListener('resize', updateCarousel);
                    }

                    // FIX: Prevent javascript crash if your selector string is empty
                    let insertionPoint = null;
                    try {
                        insertionPoint = document.querySelector('#BodyContainer > div > div.g960 > div > div.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.g960.no_margin.g960.no_margin > div > div:nth-child(2)'); 
                    } catch(e) {}
                    
                    if (insertionPoint && insertionPoint.parentElement) {
                        insertionPoint.parentElement.insertBefore(eventsSection, insertionPoint);
                    } else {
                        document.body.appendChild(eventsSection);
                    }

                } catch (error) { console.error('Error fetching data:', error); }
            };

            const injectCSS = () => {
                const style = document.createElement('style');
                style.textContent = `
                    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');
                    :root { --color-accent-green: #afc78b; --color-accent-plum: #6b1457; --color-primary-navy: #212459; --color-bg-light: #f8f9fa; }
                    .injected-featured-events-section { padding: 80px 20px; background-color: var(--color-bg-light); font-family: "Inter", sans-serif; box-sizing: border-box; }
                    .injected-featured-events-header { text-align: center; margin-bottom: 50px; max-width: 800px; margin-left: auto; margin-right: auto; }
                    .injected-featured-events-header h2 { font-size: 42px; font-weight: 800; color: var(--color-primary-navy); letter-spacing: -1px; margin-bottom: 10px; position: relative; display: inline-block; }
                    .injected-featured-events-header h2:after { content: ''; display: block; width: 60px; height: 4px; background: var(--color-accent-green); margin: 15px auto 0; border-radius: 2px; }
                    .injected-events-carousel-container { position: relative; max-width: 1200px; margin: 0 auto; overflow: hidden; padding: 20px 0 40px 0; }
                    .injected-events-carousel-wrapper { display: flex; gap: 30px; transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1); }
                    
                    /* UNIFIED CARD STYLES FOR HOMEPAGE */
                    .unified-event-card { 
                        flex: 0 0 calc(33.333% - 20px); background: #ffffff; border-radius: 16px; overflow: hidden; 
                        box-shadow: 0 10px 40px -10px rgba(33, 36, 89, 0.1); display: flex; flex-direction: column; 
                        border: 1px solid rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; height: 100%;
                    }
                    .unified-event-card:hover { transform: translateY(-8px); box-shadow: 0 20px 50px -10px rgba(33, 36, 89, 0.2); }
                    
                    .uec-image { position: relative; height: 200px; overflow: hidden; background-color: #eee; flex-shrink: 0; }
                    .uec-image img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.5s ease; }
                    .unified-event-card:hover .uec-image img { transform: scale(1.05); }
                    
                    .uec-body { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
                    
                    .uec-header-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; gap: 10px; }
                    .uec-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
                    .uec-category { 
                        display: inline-flex; align-items: center; justify-content: center;
                        font-size: 10px; font-weight: 700; text-transform: uppercase; 
                        padding: 4px 12px; border-radius: 50px; 
                        color: white; white-space: nowrap; 
                    }
                    .uec-pulse-tag {
                        box-shadow: 0 0 0 0 rgba(0, 0, 0, 1);
                        transform: scale(1);
                        animation: pulse-tag 2s infinite;
                    }
                    @keyframes pulse-tag {
                        0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0.2); }
                        70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); }
                        100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(0, 0, 0, 0); }
                    }
                    
                    .uec-inst-logo { max-height: 28px; max-width: 90px; object-fit: contain; }
                    
                    .uec-date { font-family: "Inter", sans-serif; color: var(--color-primary-navy); font-weight: 800; font-size: 13px; letter-spacing: 0.5px; margin-bottom: 4px; display: flex; align-items: center; gap: 6px; }
                    .uec-location { font-family: "Inter", sans-serif; font-size: 13px; font-weight: 500; color: #555; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
                    
                    .uec-title { font-family: "Inter", sans-serif; color: var(--color-primary-navy); margin: 0 0 10px; line-height: 1.3; }
                    .uec-title a { font-size: 20px !important; font-weight: 800 !important; color: var(--color-primary-navy) !important; text-decoration: none; transition: color 0.2s; }
                    .uec-title a:hover { color: var(--color-accent-plum) !important; }
                    
                    .uec-desc { font-size: 13px; color: #666; line-height: 1.5; margin: 0 0 20px; flex-grow: 1; max-height: 60px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
                    
                    .uec-actions { margin-top: auto; display: flex; flex-direction: column; gap: 8px; }
                    
                    .uec-main-action-row { display: flex; gap: 8px; width: 100%; align-items: stretch; margin-bottom: 8px; }
                    .uec-btn-main { 
                        flex-grow: 1; display: flex; align-items: center; justify-content: center;
                        background-color: var(--color-primary-navy); color: #ffffff !important; 
                        padding: 10px; border-radius: 8px; text-decoration: none; font-weight: 700; text-align: center; 
                        border: 2px solid var(--color-primary-navy); transition: all 0.2s; font-size: 14px; margin: 0;
                    }
                    .uec-btn-main:hover { background-color: var(--color-accent-plum); border-color: var(--color-accent-plum); color: #ffffff !important; }
                    
                    .uec-btn-icon { width: 42px; display: flex; align-items: center; justify-content: center; background-color: #f0f0f0; color: #555; border-radius: 8px; text-decoration: none; transition: all 0.2s; flex-shrink: 0; font-size: 16px; border: 1px solid #ddd; }
                    .uec-btn-icon:hover { background-color: var(--color-primary-navy); color: white; border-color: var(--color-primary-navy); }
                    
                    .uec-cal-col { display: flex; flex-direction: column; gap: 8px; }
                    .uec-btn-cal { 
                        display: block; width: 100%; text-align: center; padding: 8px; border-radius: 8px; font-size: 12px; font-weight: 600; 
                        color: #555 !important; background: #f0f0f0; text-decoration: none; transition: all 0.2s; box-sizing: border-box; 
                    }
                    .uec-btn-cal:hover { background: #e0e0e0; color: #222 !important; }
                    .uec-btn-cal i { margin-right: 4px; }
                    
                    /* -- APPLE & GOOGLE MOBILE ICON FIX -- */
                    .uec-cal-col a.uec-btn-cal i.fab,
                    .uec-cal-col a.uec-btn-cal i.fas { 
                        background: transparent !important; border-radius: 0 !important; width: auto !important; height: auto !important; 
                        padding: 0 !important; margin: 0 4px 0 0 !important; display: inline-block !important; 
                        color: inherit !important; line-height: inherit !important; text-align: left !important; box-shadow: none !important; 
                    }
                    .uec-cal-col a.uec-btn-cal i.fab::before,
                    .uec-cal-col a.uec-btn-cal i.fas::before { 
                        position: static !important; transform: none !important; 
                    }

                    .view-all-card { justify-content: center; align-items: center; text-align: center; background-color: #ffffff; border: 2px dashed var(--color-accent-green); text-decoration: none; }
                    .view-all-card:hover { background-color: #fcfcfc; border-color: var(--color-accent-plum); }
                    .view-all-card .view-all-content h3 { font-size: 22px; font-weight: 800; color: var(--color-accent-plum); margin: 0 0 5px; text-transform: uppercase; font-family: "Inter", sans-serif; }
                    .view-all-card .view-all-content p { font-size: 15px; color: #888; margin: 0 0 15px; font-family: "Inter", sans-serif; }
                    .view-all-card .view-all-arrow { font-size: 32px; font-weight: bold; color: var(--color-accent-green); transition: transform 0.3s; display: inline-block; }
                    .view-all-card:hover .view-all-arrow { transform: translateX(5px); color: var(--color-accent-plum); }

                    .events-carousel-arrow { position: absolute; top: 50%; transform: translateY(-50%); background-color: #fff; border: 1px solid #eee; border-radius: 50%; width: 48px; height: 48px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 18px; color: var(--color-primary-navy); z-index: 10; transition: all 0.2s; }
                    .events-carousel-arrow:hover { background-color: var(--color-primary-navy); color: #fff; }
                    .events-carousel-arrow.prev { left: 0px; }
                    .events-carousel-arrow.next { right: 0px; }
                    .mobile-swipe-hint { display: none; text-align: center; margin-top: 10px; font-family: "Inter", sans-serif; color: #999; font-size: 13px; align-items: center; justify-content: center; gap: 8px; }
                    
                    @media (max-width: 1250px) { .events-carousel-arrow.prev { left: 10px; } .events-carousel-arrow.next { right: 10px; } }
                    @media (max-width: 900px) { .unified-event-card { flex-basis: calc(50% - 15px); } }
                    @media (max-width: 600px) {
                      .injected-featured-events-header h2 { font-size: 28px; }
                      .injected-events-carousel-container { overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: none; -ms-overflow-style: none; padding: 0 20px 20px 20px; margin: 0 -20px; }
                      .injected-events-carousel-container::-webkit-scrollbar { display: none; }
                      .injected-events-carousel-wrapper { width: max-content; transform: none !important; padding-right: 20px; gap: 15px; }
                      .unified-event-card { flex-basis: 85vw; scroll-snap-align: start; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }
                      .events-carousel-arrow { display: none; }
                      .mobile-swipe-hint { display: flex; }
                    }
                `;
                document.head.appendChild(style);
            };

            injectCSS();
            if (document.readyState === 'complete' || document.readyState === 'interactive') runTransformation();
            else window.addEventListener('DOMContentLoaded', runTransformation);

        })();
    }
//]]>
</script>
</body>
</html>