/* ADSMO Pro Elements – frontend. Class names follow Elementor Pro so existing styles keep working. */

/* ---------- Form */
.elementor-form .elementor-button > span { display: flex; justify-content: center; align-items: center; }
.elementor-form .elementor-button .elementor-button-text { white-space: normal; flex-grow: 0; }
.elementor-form .elementor-button svg { height: auto; }
.elementor-field-type-html { display: inline-block; }
.elementor-field-type-hidden { display: none; }
.elementor-select-wrapper { position: relative; }
.elementor-select-wrapper .select-caret-down-wrapper { position: absolute; top: 50%; transform: translateY(-50%); inset-inline-end: 10px; pointer-events: none; font-size: 11px; }
.elementor-select-wrapper .select-caret-down-wrapper i { font-size: 19px; line-height: 2; }
.elementor-select-wrapper.remove-before::before { content: "" !important; }
.elementor-form .elementor-button.adsmo-is-loading { opacity: .65; pointer-events: none; }
.elementor-form .elementor-message { margin: 10px 0; font-size: 1em; line-height: 1; }
.elementor-form .elementor-message::before { content: none; }
.elementor-form .elementor-message-success { color: #5cb85c; }
.elementor-form .elementor-message-danger { color: #d9534f; }
.elementor-form .elementor-help-inline { display: block; width: 100%; font-size: .9em; margin-top: 4px; color: #d9534f; }
.elementor-form .adsmo-recaptcha { min-height: 78px; }

/* ---------- Call to Action */
.elementor-widget-call-to-action .elementor-widget-container, .elementor-cta { overflow: hidden; }
.elementor-cta { position: relative; display: flex; transition: .5s; }
.elementor-cta--skin-classic .elementor-cta { flex-wrap: wrap; }
.elementor-cta--skin-classic .elementor-cta__bg-wrapper { position: relative; min-height: 200px; width: 100%; }
.elementor-cta--skin-classic .elementor-cta__content { transition: all .4s; width: 100%; background-color: #f7f7f7; }
.elementor-cta--skin-classic .elementor-cta__content-item,
.elementor-cta--skin-classic .elementor-cta__content-item .elementor-icon { color: #55595c; border-color: #55595c; fill: #55595c; }
.elementor-cta--skin-classic .elementor-cta__button.elementor-button { color: #55595c; border-color: #55595c; }
.elementor-cta--skin-cover .elementor-cta { display: block; }
.elementor-cta--skin-cover .elementor-cta__bg-wrapper { position: absolute; inset: 0; transition: all .4s; width: 100%; }
.elementor-cta--skin-cover .elementor-cta__content { min-height: 280px; }
.elementor-cta--skin-cover .elementor-cta__button.elementor-button,
.elementor-cta--skin-cover .elementor-cta__content-item,
.elementor-cta--skin-cover .elementor-cta__content-item .elementor-icon { color: #fff; border-color: #fff; }
.elementor-cta-layout-image-left .elementor-cta, .elementor-cta--layout-image-left .elementor-cta { flex-direction: row; flex-wrap: nowrap; }
.elementor-cta-layout-image-right .elementor-cta, .elementor-cta--layout-image-right .elementor-cta { flex-direction: row-reverse; flex-wrap: nowrap; }
.elementor-cta-layout-image-left .elementor-cta__bg-wrapper, .elementor-cta-layout-image-right .elementor-cta__bg-wrapper { width: auto; min-width: 50%; }
.elementor-cta__bg, .elementor-cta__bg-overlay { position: absolute; inset: 0; transition: all .4s; }
.elementor-cta__bg-wrapper { z-index: 1; overflow: hidden; }
.elementor-cta__bg { background-size: cover; background-position: 50%; z-index: 1; }
.elementor-cta__bg-overlay { z-index: 2; }
.elementor-cta__button.elementor-button { cursor: pointer; align-self: center; margin-left: auto; margin-right: auto; border: 2px solid #fff; background: transparent; }
.elementor-cta__button.elementor-button:hover { background: transparent; text-decoration: none; }
.elementor-cta__title { font-size: 23px; }
.elementor-cta__content { z-index: 1; overflow: hidden; display: flex; flex-wrap: wrap; align-items: center; align-content: center; padding: 35px; width: 100%; }
.elementor-cta__content, .elementor-cta__content-item { position: relative; transition: .5s; color: #fff; }
.elementor-cta__content-item { width: 100%; margin: 0; }
.elementor-cta__content-item:not(:last-child) { margin-bottom: 15px; }
.elementor-cta__content-item .elementor-icon { color: #fff; }
.elementor-cta--valign-top .elementor-cta__content { align-content: flex-start; align-items: flex-start; }
.elementor-cta--valign-middle .elementor-cta__content { align-content: center; align-items: center; }
.elementor-cta--valign-bottom .elementor-cta__content { align-content: flex-end; align-items: flex-end; }
.elementor-cta:hover .elementor-cta__bg-overlay { background-color: rgba(0, 0, 0, .3); }
@media (max-device-width: 1024px) { .elementor-cta { cursor: pointer; } }

.elementor-animated-content .elementor-animated-item--grow,
.elementor-animated-content .elementor-animated-item--shrink,
.elementor-animated-content .elementor-animated-item--move-up,
.elementor-animated-content .elementor-animated-item--move-down,
.elementor-animated-content .elementor-animated-item--fade-in { transition-property: transform, opacity; }
.elementor-animated-content .elementor-animated-item--fade-in { opacity: 0; }
.elementor-animated-content:hover .elementor-animated-item--grow { transform: scale(1.1); }
.elementor-animated-content:hover .elementor-animated-item--shrink { transform: scale(.85); }
.elementor-animated-content:hover .elementor-animated-item--move-up { transform: translateY(-30px); }
.elementor-animated-content:hover .elementor-animated-item--move-down { transform: translateY(30px); }
.elementor-animated-content:hover .elementor-animated-item--fade-in { opacity: 1; }

.elementor-bg-transform .elementor-bg { will-change: transform; }
.elementor-bg-transform-zoom-in:hover .elementor-bg, .elementor-bg-transform-zoom-out .elementor-bg { transform: scale(1.2); }
.elementor-bg-transform-zoom-out:hover .elementor-bg { transform: scale(1); }
.elementor-bg-transform-move-left .elementor-bg { transform: scale(1.2) translateX(8%); }
.elementor-bg-transform-move-left:hover .elementor-bg, .elementor-bg-transform-move-right .elementor-bg { transform: scale(1.2) translateX(-8%); }
.elementor-bg-transform-move-right:hover .elementor-bg { transform: scale(1.2) translateX(8%); }
.elementor-bg-transform-move-up .elementor-bg { transform: scale(1.2) translateY(8%); }
.elementor-bg-transform-move-down .elementor-bg, .elementor-bg-transform-move-up:hover .elementor-bg { transform: scale(1.2) translateY(-8%); }
.elementor-bg-transform-move-down:hover .elementor-bg { transform: scale(1.2) translateY(8%); }

/* Ribbon */
.elementor-ribbon { position: absolute; z-index: 1; top: 0; left: auto; right: 0; transform: rotate(90deg); width: 150px; overflow: hidden; height: 150px; }
.elementor-ribbon-inner { text-align: center; left: 0; width: 200%; transform: translateY(-50%) translateX(-50%) translateX(35px) rotate(-45deg); margin-top: 35px; font-size: 13px; line-height: 2; font-weight: 800; text-transform: uppercase; background: #000; color: #fff; }
.elementor-ribbon.elementor-ribbon-left { transform: rotate(0); left: 0; right: auto; }
.elementor-ribbon.elementor-ribbon-right { transform: rotate(90deg); left: auto; right: 0; }

/* ---------- Slides */
.elementor-widget-slides .elementor-swiper { position: relative; }
.elementor-slides-wrapper { position: relative; overflow: hidden; }
.elementor-slides .swiper-slide { position: relative; overflow: hidden; }
.elementor-slides .swiper-slide-bg { position: absolute; inset: 0; background-size: cover; background-position: 50%; background-repeat: no-repeat; min-width: 100%; min-height: 100%; }
.elementor-slides .swiper-slide-inner { background-repeat: no-repeat; background-position: 50%; position: absolute; inset: 0; padding: 50px; margin: auto; }
.elementor-slides .swiper-slide-inner, .elementor-slides .swiper-slide-inner:hover { color: #fff; display: flex; }
.elementor-slides .swiper-slide-inner .elementor-background-overlay { position: absolute; z-index: 0; inset: 0; }
.elementor-slides .swiper-slide-contents { position: relative; z-index: 1; }
.elementor-slides .swiper-slide-inner .elementor-slide-heading { font-size: 35px; font-weight: 700; line-height: 1; }
.elementor-slides .swiper-slide-inner .elementor-slide-description { font-size: 17px; line-height: 1.4; }
.elementor-slides .swiper-slide-inner .elementor-slide-description:not(:last-child),
.elementor-slides .swiper-slide-inner .elementor-slide-heading:not(:last-child) { margin-bottom: 30px; }
.elementor-slides .swiper-slide-inner .elementor-slide-button { border: 2px solid #fff; color: #fff; background: transparent; display: inline-block; }
.elementor-slides .swiper-slide-inner .elementor-slide-button,
.elementor-slides .swiper-slide-inner .elementor-slide-button:hover { background: transparent; color: inherit; text-decoration: none; }
.elementor--v-position-top .swiper-slide-inner { align-items: flex-start; }
.elementor--v-position-bottom .swiper-slide-inner { align-items: flex-end; }
.elementor--v-position-middle .swiper-slide-inner { align-items: center; }
.elementor--h-position-left .swiper-slide-inner { justify-content: flex-start; }
.elementor--h-position-right .swiper-slide-inner { justify-content: flex-end; }
.elementor--h-position-center .swiper-slide-inner { justify-content: center; }
.elementor-slides-wrapper .swiper-slide-contents.animated { animation-duration: 1s; animation-fill-mode: both; }
.elementor-widget-slides .elementor-swiper-button { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; cursor: pointer; font-size: 25px; color: hsla(0, 0%, 100%, .9); display: inline-flex; }
.elementor-widget-slides .elementor-swiper-button-prev { left: 10px; }
.elementor-widget-slides .elementor-swiper-button-next { right: 10px; }
.elementor-widget-slides .swiper-pagination { position: absolute; bottom: 10px; left: 0; width: 100%; text-align: center; z-index: 2; }
.elementor-widget-slides .swiper-pagination-bullet { display: inline-block; width: 6px; height: 6px; margin: 0 6px; border-radius: 50%; background: #000; opacity: .2; cursor: pointer; }
.elementor-widget-slides .swiper-pagination-bullet-active { opacity: 1; }
@media (max-width: 767px) {
	.elementor-slides .swiper-slide-inner { padding: 30px; }
	.elementor-slides .swiper-slide-inner .elementor-slide-heading { font-size: 23px; line-height: 1; margin-bottom: 15px; }
	.elementor-slides .swiper-slide-inner .elementor-slide-description { font-size: 13px; line-height: 1.4; margin-bottom: 15px; }
}

/* ---------- Animated Headline */
.elementor-headline { font-size: 43px; line-height: 1.2; display: block; }
.elementor-headline-dynamic-text { color: var(--dynamic-text-color, #aebcb9); }
.elementor-headline-text-wrapper { vertical-align: bottom; }
.elementor-headline-dynamic-wrapper { display: inline-block; position: relative; }
.elementor-headline-dynamic-wrapper .elementor-headline-dynamic-text { display: inline-block; position: absolute; top: 0; left: 0; }
.elementor-headline-dynamic-wrapper .elementor-headline-dynamic-text.elementor-headline-text-active { position: relative; }
.elementor-headline--style-highlight .elementor-headline-dynamic-wrapper { overflow: visible; text-align: inherit; }
.elementor-headline--style-highlight .elementor-headline-dynamic-text { z-index: 1; }
.elementor-headline--style-highlight .elementor-headline-plain-text { z-index: 1; position: relative; }
.elementor-headline--style-highlight svg { position: absolute; top: 50%; left: 50%; width: calc(100% + 20px); height: calc(100% + 20px); transform: translate(-50%, -50%); overflow: visible; }
.elementor-headline--style-highlight svg path { stroke: red; stroke-width: 9; fill: none; opacity: 0; stroke-dasharray: 0 1500; transition: .3s; }
.elementor-headline.e-animated svg path { animation: adsmo-headline-dash forwards; animation-duration: var(--animation-duration, 1.2s); animation-iteration-count: 1; }
.elementor-headline.e-animated svg path:nth-of-type(2) { animation-delay: calc(var(--animation-duration, 1.2s) / 2); }
.elementor-headline.e-hide-highlight svg path { opacity: 1; stroke-dasharray: 1500 1500; animation: adsmo-hide-highlight .4s forwards; }
@keyframes adsmo-headline-dash { 0% { stroke-dasharray: 0 1500; opacity: 1; } to { stroke-dasharray: 1500 1500; opacity: 1; } }
@keyframes adsmo-hide-highlight { 0% { opacity: 1; stroke-dasharray: 1500 1500; } to { opacity: 0; filter: blur(10px); } }
.elementor-headline--style-rotate .elementor-headline-dynamic-wrapper { text-align: left; transition: width .5s; }
.elementor-headline-animation-type-fade .elementor-headline-dynamic-text { opacity: 0; transition: opacity .5s; }
.elementor-headline-animation-type-fade .elementor-headline-dynamic-text.elementor-headline-text-active { opacity: 1; }

/* ---------- Posts */
.elementor-widget-posts::after { display: none; }
.elementor-posts-container .elementor-post { padding: 0; margin: 0; }
.elementor-posts-container .elementor-post__thumbnail { overflow: hidden; }
.elementor-posts-container .elementor-post__thumbnail img { display: block; width: 100%; max-height: none; max-width: none; transition: filter .3s; }
.elementor-posts-container .elementor-post__thumbnail__link { position: relative; display: block; width: 100%; }
.elementor-posts-container.elementor-has-item-ratio .elementor-post__thumbnail { inset: 0; }
.elementor-posts-container.elementor-has-item-ratio .elementor-post__thumbnail img { height: auto; position: absolute; top: calc(50% + 1px); left: calc(50% + 1px); transform: scale(1.01) translate(-50%, -50%); }
.elementor-posts-container.elementor-has-item-ratio .elementor-post__thumbnail img.adsmo-fit-height { height: 100%; width: auto; }
.elementor-posts .elementor-post { display: flex; flex-direction: column; transition-property: background, border, box-shadow; transition-duration: .25s; }
.elementor-posts .elementor-post__title { font-size: 18px; margin: 0; }
.elementor-posts .elementor-post__excerpt { margin-bottom: 10px; }
.elementor-posts .elementor-post__excerpt p { margin: 0; line-height: 1.5em; font-size: 14px; color: #777; }
.elementor-posts .elementor-post__text { display: flex; flex-direction: column; flex-grow: 1; }
.elementor-posts .elementor-post__meta-data { line-height: 1.3em; font-size: 12px; margin-bottom: 13px; color: #adadad; }
.elementor-posts .elementor-post__meta-data span + span::before { margin: 0 5px; }
.elementor-posts .elementor-post__read-more { font-size: 12px; font-weight: 700; align-self: flex-start; }
.elementor-posts .elementor-post__thumbnail { position: relative; }
.elementor-posts--skin-classic .elementor-post { overflow: hidden; }
.elementor-posts--align-left .elementor-post { text-align: left; }
.elementor-posts--align-right .elementor-post { text-align: right; }
.elementor-posts--align-center .elementor-post { text-align: center; }
.elementor-posts--align-center .elementor-post__read-more { align-self: center; }
.elementor-posts--thumbnail-top .elementor-post__thumbnail__link { margin-bottom: 20px; }
.elementor-posts--thumbnail-top .elementor-post__text { width: 100%; }
.elementor-posts--thumbnail-top.elementor-posts--align-center .elementor-post__thumbnail__link { margin-right: auto; margin-left: auto; }
.elementor-posts--thumbnail-left .elementor-post, .elementor-posts--thumbnail-right .elementor-post { flex-direction: row; }
.elementor-posts--thumbnail-left .elementor-post__thumbnail__link, .elementor-posts--thumbnail-right .elementor-post__thumbnail__link { flex-shrink: 0; width: 25%; }
.elementor-posts--thumbnail-left .elementor-post__thumbnail__link { order: 0; margin-right: 20px; }
.elementor-posts--thumbnail-right .elementor-post__thumbnail__link { order: 5; margin-left: 20px; }
.elementor-posts--thumbnail-none .elementor-posts-container .elementor-post__thumbnail__link { display: none; }

/* ---------- Gallery */
.adsmo-gallery { display: grid; grid-template-columns: repeat(var(--columns, 4), minmax(0, 1fr)); gap: var(--gap, 10px); }
.adsmo-gallery .elementor-gallery-item { position: relative; display: block; overflow: hidden; border: var(--image-border-width, 0) solid var(--image-border-color, transparent); border-radius: var(--image-border-radius, 0); }
.adsmo-gallery .elementor-gallery-item__image { padding-bottom: var(--aspect-ratio, 66.6667%); background-size: cover; background-position: center; transition: transform var(--content-transition-duration, 800ms); }
.adsmo-gallery .elementor-gallery-item__overlay { position: absolute; inset: 0; opacity: 0; transition: opacity var(--content-transition-duration, 800ms); }
.adsmo-gallery .elementor-gallery-item:hover .elementor-gallery-item__overlay { opacity: 1; }
.adsmo-gallery .e-gallery-item.adsmo-hidden { display: none; }
.elementor-gallery__titles-container { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 20px; margin-bottom: 20px; }
.elementor-gallery-title { cursor: pointer; }
.elementor-gallery-title.elementor-item-active { font-weight: 700; }

/* ---------- Popup */
.adsmo-popup[hidden] { display: none !important; }
.adsmo-popup { position: fixed; inset: 0; z-index: 9999; display: flex; justify-content: center; align-items: center; background-color: rgba(0, 0, 0, .8); pointer-events: all; overflow: auto; -webkit-user-select: auto; user-select: auto; }
.adsmo-popup .dialog-widget-content { position: relative; width: auto; max-width: 100%; max-height: 100%; overflow: visible; border-radius: 0; box-shadow: none; pointer-events: all; background-color: #fff; }
.adsmo-popup .dialog-message { width: 640px; max-width: 100vw; max-height: 100vh; padding: 0; overflow: auto; display: flex; }
.adsmo-popup .dialog-message > .elementor { width: 100%; }
.adsmo-popup .dialog-close-button { display: none; position: absolute; top: 20px; right: 20px; margin-top: 0; z-index: 9999; opacity: 1; cursor: pointer; font-size: 15px; line-height: 1; color: #373a3c; text-decoration: none; }
.adsmo-popup .dialog-close-button svg { fill: #373a3c; height: 1em; width: 1em; }
.adsmo-popup.adsmo-popup--open .dialog-widget-content.animated { animation-duration: .6s; animation-fill-mode: both; }
body.adsmo-popup-locked { overflow: hidden; }

/* Slide content animations (cùng tên với animate.css mà Elementor dùng) */
@keyframes fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInDown { from { opacity: 0; transform: translate3d(0, -100%, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInLeft { from { opacity: 0; transform: translate3d(-100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes fadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes zoomIn { from { opacity: 0; transform: scale3d(.3, .3, .3); } 50% { opacity: 1; } }
.swiper-slide-contents.animated.fadeInUp { animation-name: fadeInUp; }
.swiper-slide-contents.animated.fadeInDown { animation-name: fadeInDown; }
.swiper-slide-contents.animated.fadeInLeft { animation-name: fadeInLeft; }
.swiper-slide-contents.animated.fadeInRight { animation-name: fadeInRight; }
.swiper-slide-contents.animated.zoomIn { animation-name: zoomIn; }
