
@media only screen and (min-width: 992px) {
	.region-logo a.site-logo img{
		width: 18em;
	}
}
/*
body.path-frontpage .footer-wrapper .container {
	background-color: transparent;
}

body.path-frontpage .page-footer {
	background-color: #fff;
}*/

@media only screen and (min-width: 768px) {
	.dmm_main_front_page {
		background-image: url(/themes/custom/d_montana/images/WallpaperDesktop.png);
    		background-size: contain;
	        position: relative;
        	width: 100%;
        	min-height: 100vh;
	}
	
	/*body.path-frontpage .container {
		background-color: #fff;
	}*/


}

@media only screen and (max-width: 767px) {
       .dmm_main_front_page {
                background-image: url(/themes/custom/d_montana/images/WallpaperMobile.png);
                background-size: contain;
       	        position: relative;
        	width: 100%;
        	min-height: 100vh;

	}
	/*body.path-frontpage .container {
                background-color: #fff;
        }*/
	body.path-frontpage .layout-builder-powered-page {
        	position: relative;
        	z-index: 2;
	}

}

.clickable-body-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Below content */
    display: block;
    cursor: pointer;
}

@media only screen and (max-width: 768px) {
	.shariff[data-css="complete"] ul li{
	 	margin-top: 1em;
	}
    .d-only{
        display: none;
    }
}

.navbar-we-mega-menu.navbar .we-mega-menu-ul > li.dropdown-menu > a, 
.navbar-we-mega-menu.navbar .we-mega-menu-ul > li.dropdown-menu > span{
	pointer-events: none;
	cursor: default;
}

.block__title .title-text{
	font-size: 2em;
}

.block__title .title-text a{
	display: inline-block;
    vertical-align: middle;
    padding: 2px 8px 2px;
    color: #263238;
    position: relative;
    z-index: 1;
    text-decoration: none;
    
}

.view-footer .block__title {
    font-size: 0.5rem;
}

.field--name-field-channel i:not(:first-child) {
    margin-left: 0.8rem;
}

.slick--optionset--gallery-slider nav.slick__arrow button span {
    font-size: 4em;
}

.field--name-body, figcaption{
    color: #546e7a;
    font-size: .8rem;
}
.paragraph--type--quote .field--name-field-text{
    font-size: 1.4rem;
}

.cus-shadow .article-header__content,
.cus-shadow h2.teaser__headline{
   text-shadow: 1px 2px 5px rgba(0,0,0,.95);
}

.view-mg-article-headers .article-header__meta{
   font-weight: bold;
}

.view-mg-article-headers .article-header__meta div.byline{
   font-size: 18px;
}
.paragraph--type--quote .field--name-field-source{
    text-align: right;
    margin-right: 10.4em;
}
.region-search .block--search form label,
.region-search .block--search form .description{
    display: none;
}

.paragraph--type--gallery-grid figure {
    cursor: pointer;
}

.paragraph--type--image-popup .ps_img {
    cursor: pointer;
}

div.cus-ad{
    padding-bottom: .85rem;
    margin-bottom: .85rem;
    padding-left: 0.83335rem;
    width: 100%;
}
ul.lightgallery{
    padding: 0;
}

ul.lightgallery li{
   list-style-type: none;
}

@media only screen and (max-width: 767px) {
    .d-only{
        display: none;
    }
}

@media only screen and (min-width: 768px) {
    .m-only{
        display: none;
    }
}

.cus-content-ad{
    clear: both;
    padding-top: 1.5rem;
}

.field--name-field-paragraphs > div.field__item{
    clear: both;
}

.paragraph.paragraph--type--text-with-image.paragraph--view-mode--default {
    padding-top: 1.5rem;
}

#block-footer-sticky-ad-desktop .field--name-body{
    width: 728px;
    height: 90px;
    text-align: center;
    position: fixed;
    bottom: 0px;
    z-index: 10000;
    transform: translateX(-50%);
    left: 50%;
    margin-right: -50%;
}

#block-footer-sticky-ad .field--name-body{
    width: 320px;
    height: 50px;
    text-align: center;
    position: fixed;
    bottom: 0px;
    z-index: 10000;
    transform: translateX(-50%);
    left: 50%;
    margin-right: -50%;
    display: block;
}

.cus-disable-ads.cus-side-ad .layout__region--article-sidebar-right,
.cus-disable-ads .cus-content-ad,
.cus-disable-ads .cus-side-ad,
.cus-disable-ads #block-footer-sticky-ad-desktop,
.cus-disable-ads #block-footer-sticky-ad-mobile,
.cus-disable-ads .themag-layout--onecol-section .field--name-body {
    display: none;
}

.ads-page .field--name-body iframe {
    margin-top: 10px;
}
/*.layout--article-1 .layout__region--article-sidebar-right div:first-child{
    position: relative !important;
}*/




/* test */


    /* Main ad container styling */
    .gam-ad-container {
        width: 970px; /* Collapsed width for desktop */
        height: 90px; /* Collapsed height for desktop */
        position: relative;
        overflow: visible; /* IMPORTANT: Allows expanded panel to show outside */
        border-radius: 8px;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
        cursor: pointer;
        transition: all 0.3s ease;
        font-family: Arial, sans-serif;
        margin: 0 auto; /* Center the ad */
        z-index: 9;
    }

    .gam-ad-container:hover {
        box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
    }

    /* Collapsed state styling */
    .collapsed-state {
        height: 90px; /* Collapsed height */
        display: flex;
        align-items: center;
        padding: 0; /* Remove padding to let image fill */
        position: relative;
        z-index: 5; /* Ensure it's above expanded panel when collapsed */
        cursor: pointer;
    }

    .main-content {
        position: relative;
        width: 100%;
        height: 100%;
        display: flex; /* Use flex to center image if needed */
        align-items: center;
        justify-content: center;
        overflow: hidden; /* Ensure image doesn't overflow this container */
    }

    .main-content img {
        width: 100%;
        height: 100%;
        object-fit: cover; /* Ensures the image covers the area, cropping if necessary */
        display: block; /* Removes extra space below image */
    }

    .expand-indicator {
        display: none;
        position: absolute; /* Position indicator over the image */
        right: 15px;
        color: white;
        font-size: 16px;
        transition: transform 0.3s ease;
        animation: bounce 2s infinite;
        text-shadow: 0 1px 3px rgba(0,0,0,0.5); /* Add shadow for visibility over image */
    }

    @keyframes bounce {
        0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
        40% { transform: translateY(-5px); }
        60% { transform: translateY(-3px); }
    }

    .gam-ad-container.expanded .expand-indicator {
        transform: rotate(180deg);
        animation: none;
    }

    /* Expanded panel styling */
    .expanded-panel {
        position: absolute;
        top: 90px; /* Starts below the collapsed banner */
        left: 0;
        width: 100%;
        background: white;
        border-radius: 0 0 8px 8px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
        z-index: 10;
        /* Start hidden */
        height: 0;
        /* Removed overflow: hidden; from here */
        opacity: 0;
        transform: translateY(-10px);
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); /* Smooth slide animation */
    }

    .expanded-panel.show {
        /* Adjusted height to accommodate the 970x250 ad with padding */
        height: auto; /* 250px ad height + 25px top/bottom padding * 2 = 300px */
        opacity: 1;
        transform: translateY(0);
        overflow: visible; /* Add overflow visible when shown to ensure content is not clipped */
    }

    .panel-content {
        padding: 0; /* Keep padding around the ad */
        height: 100%;
        display: flex; /* Use flexbox to center the ad */
        align-items: center;
        justify-content: center;
    }

    /* Responsive classes for showing/hiding ad slots */
    .d-only { display: block; }
    .m-only { display: none; }

    /* Close button styling (remains the same) */
    .close-button {
        position: absolute;
        top: 8px;
        right: 12px;
        background: none;
        border: none;
        color: rgba(102, 126, 234, 0.7);
        font-size: 20px;
        cursor: pointer;
        opacity: 0; /* Start hidden for animation */
        transition: all 0.3s ease;
        z-index: 15;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        display: none;
    }

    .expanded-panel.show .close-button {
        opacity: 1;
    }

    .close-button:hover {
        color: #667eea;
        background: rgba(102, 126, 234, 0.1);
    }

    .ads-page .gam-ad-container iframe {
        margin-top: 0;
    }

    /* Responsive adjustments */
    @media (min-width: 1200px) {
        .gam-ad-container {
            transform: scale(1.22);
        }
    }

    @media (max-width: 768px) {
        .gam-ad-container {
            width: 320px; /* Collapsed width for mobile */
            height: 50px; /* Collapsed height for mobile */
        }
        
        .collapsed-state {
            height: 50px;
        }
        
        /* Adjust expand-indicator position for smaller screens */
        .expand-indicator {
            right: 10px;
            font-size: 14px;
        }

        .expanded-panel {
            top: 50px; /* Starts below collapsed banner for mobile */
        }
        
        .expanded-panel.show {
            /* Adjusted height for mobile to accommodate 320x50 ad */
            height: 100px; /* 50px ad height + 25px top/bottom padding * 2 = 100px */
        }

        /* Show mobile ad, hide desktop ad on small screens */
        .d-only { display: none; }
        .m-only { display: block; }
    }


/* Center the pushdown content */
.pushdown-collapsed,
.pushdown-expanded {
  position: relative;
  margin: 0 auto;
  text-align: center;
}

.pushdown-desktop .pushdown-collapsed,
.pushdown-desktop .pushdown-expanded {
  max-width: 970px;
}

.pushdown-mobile .pushdown-collapsed,
.pushdown-mobile .pushdown-expanded {
  max-width: 360px;
}

/* Images */
.pushdown-collapsed img,
.pushdown-expanded img {
  display: block;
  margin: 0 auto;
  cursor: pointer;
}

/* Hover areas for expand/collapse */
.pushdown-collapsed,
.pushdown-expanded {
  cursor: pointer;
}

/* Push page content down */
body.pushdown-active {
  padding-top: 90px; /* Collapsed height */
}

