﻿/**
 * YahElements Widgets Styles
 * 
 * Core styles for all YahElements widgets
 * 
 * @package YahElements
 */

/* ==========================================================================
   Base Styles
   ========================================================================== */

.yahelements-widget {
   box-sizing: border-box;
}

/* ==========================================================================
   Advanced Heading Widget
   ========================================================================== */

.yahelements-advanced-heading {
   display: flex;
   flex-direction: column;
}

.yahelements-advanced-heading .yahelements-title {
   margin: 0;
   padding: 0;
   transition: all 0.3s ease;
}

/* Gradient Text - Using CSS Variables for Global Colors support */
.yahelements-advanced-heading .yahelements-gradient-text {
   background: linear-gradient(90deg,
         var(--yah-title-gradient-1, #667eea) 0%,
         var(--yah-title-gradient-2, #764ba2) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

/* Focused Keyword - Base */
.yahelements-advanced-heading .yahelements-focused-keyword {
   color: #667eea;
   font-weight: inherit;
   transition: all 0.3s ease;
   display: inline;
}

/* Focused Keyword - Gradient Mode */
.yahelements-advanced-heading .yahelements-focused-gradient {
   background: linear-gradient(90deg,
         var(--yah-focused-gradient-1, #667eea) 0%,
         var(--yah-focused-gradient-2, #f093fb) 100%);
   -webkit-background-clip: text;
   -webkit-text-fill-color: transparent;
   background-clip: text;
}

/* Subtitle - Simple custom styling only */
.yahelements-advanced-heading .yahelements-subtitle {
   margin: 10px 0;
   display: inline-block;
   width: fit-content;
   transition: all 0.3s ease;
}

/* Description */
.yahelements-advanced-heading .yahelements-description {
   margin-top: 15px;
   line-height: 1.6;
}

/* ==========================================================================
   Separator Styles
   ========================================================================== */

/* Separator Base */
.yahelements-advanced-heading .yahelements-separator {
   width: 80px;
   height: 3px;
   flex-shrink: 0;
}

/* Separator - Solid */
.yahelements-advanced-heading .yahelements-separator-solid {
   background: #667eea;
   border: none;
}

/* Separator - Dashed */
.yahelements-advanced-heading .yahelements-separator-dashed {
   background: transparent !important;
   border: none;
   border-top-style: dashed;
   border-top-color: #667eea;
   height: 0 !important;
}

/* Separator - Dotted */
.yahelements-advanced-heading .yahelements-separator-dotted {
   background: transparent !important;
   border: none;
   border-top-style: dotted;
   border-top-color: #667eea;
   height: 0 !important;
}

/* Separator - Gradient (Using CSS Variables for Global Colors) */
.yahelements-advanced-heading .yahelements-separator-gradient {
   border: none;
   background: linear-gradient(90deg,
         var(--yah-separator-gradient-1, #667eea) 0%,
         var(--yah-separator-gradient-2, #764ba2) 50%,
         var(--yah-separator-gradient-3, #f093fb) 100%);
}

/* Separator - Custom Image */
.yahelements-advanced-heading .yahelements-separator-custom {
   background: transparent !important;
   height: auto !important;
   width: auto;
}

.yahelements-advanced-heading .yahelements-separator-custom img {
   max-width: 100%;
   height: auto;
   display: block;
}

/* ==========================================================================
   Yah Icon Box Widget
   ========================================================================== */

/* Icon Box - Base */
.yah-icon-box {
   display: flex;
   flex-direction: column;
   transition: all 0.3s ease;
}

/* Icon Box - Position Variations */
.yah-icon-box.yah-icon-position-top {
   flex-direction: column;
}

.yah-icon-box.yah-icon-position-bottom {
   flex-direction: column-reverse;
}

.yah-icon-box.yah-icon-position-left {
   flex-direction: row;
   text-align: left !important;
}

.yah-icon-box.yah-icon-position-right {
   flex-direction: row-reverse;
   text-align: right !important;
}

.yah-icon-box.yah-icon-position-left .yah-icon-box-icon,
.yah-icon-box.yah-icon-position-right .yah-icon-box-icon {
   flex-shrink: 0;
   margin-bottom: 0 !important;
}

.yah-icon-box.yah-icon-position-left .yah-icon-box-icon {
   margin-right: 20px;
}

.yah-icon-box.yah-icon-position-right .yah-icon-box-icon {
   margin-left: 20px;
}

/* Icon Box - Icon */
.yah-icon-box-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   transition: all 0.3s ease;
}

.yah-icon-box-icon i,
.yah-icon-box-icon svg {
   display: block;
}

.yah-icon-box-icon img {
   display: block;
   height: auto;
}

/* Icon Box - Content */
.yah-icon-box-content {
   flex: 1;
}

/* Icon Box - Title */
.yah-icon-box-title {
   margin: 0;
   padding: 0;
   transition: all 0.3s ease;
}

/* Icon Box - Description */
.yah-icon-box-description {
   line-height: 1.6;
   margin: 0;
}

/* Icon Box - Button */
.yah-icon-box-button {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   text-decoration: none;
   transition: all 0.3s ease;
   cursor: pointer;
}

.yah-icon-box-button:hover {
   text-decoration: none;
}

.yah-icon-box-button .yah-btn-icon-before,
.yah-icon-box-button .yah-btn-icon-after {
   display: inline-flex;
   align-items: center;
}

/* ==========================================================================
   Icon List (inside Icon Box)
   ========================================================================== */

.yah-icon-list {
   list-style: none;
   margin: 0;
   padding: 0;
   display: flex;
   flex-direction: column;
}

.yah-icon-list.yah-icon-list-inline {
   flex-direction: row;
   flex-wrap: wrap;
}

.yah-icon-list-item {
   display: flex;
   align-items: center;
   transition: all 0.3s ease;
}

.yah-icon-list-link {
   display: flex;
   align-items: center;
   text-decoration: none;
   color: inherit;
   width: 100%;
}

.yah-icon-list-link:hover {
   text-decoration: none;
}

.yah-icon-list-icon {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   flex-shrink: 0;
   transition: all 0.3s ease;
}

.yah-icon-list-text {
   transition: all 0.3s ease;
}

/* ==========================================================================
   Icon View Styles (Stacked/Framed)
   ========================================================================== */

/* Icon View - Stacked */
.yah-icon-box-icon.yah-icon-view-stacked {
   background-color: #667eea;
}

.yah-icon-box-icon.yah-icon-view-stacked i,
.yah-icon-box-icon.yah-icon-view-stacked svg {
   color: #fff;
   fill: #fff;
}

/* Icon View - Framed */
.yah-icon-box-icon.yah-icon-view-framed {
   border: 3px solid #667eea;
   background-color: transparent;
}

/* Icon Shapes */
.yah-icon-box-icon.yah-icon-shape-circle {
   border-radius: 50%;
}

.yah-icon-box-icon.yah-icon-shape-square {
   border-radius: 0;
}

.yah-icon-box-icon.yah-icon-shape-rounded {
   border-radius: 10px;
}

/* ==========================================================================
   Content Flex Display
   ========================================================================== */

.yah-icon-box-content {
   display: flex;
   flex-direction: column;
}

/* ==========================================================================
   Button Types
   ========================================================================== */

.yah-icon-box-button.yah-btn-type-info {
   background-color: #5bc0de;
   color: #fff;
}

.yah-icon-box-button.yah-btn-type-success {
   background-color: #5cb85c;
   color: #fff;
}

.yah-icon-box-button.yah-btn-type-warning {
   background-color: #f0ad4e;
   color: #fff;
}

.yah-icon-box-button.yah-btn-type-danger {
   background-color: #d9534f;
   color: #fff;
}

/* Button Icon Spacing */
.yah-icon-box-button .yah-btn-icon-before {
   margin-right: 8px;
}

.yah-icon-box-button .yah-btn-icon-after {
   margin-left: 8px;
}

/* ==========================================================================
   Rotating Gradient Border Animation
   ========================================================================== */

@keyframes yah-rotate-gradient {
   0% {
      transform: rotate(0deg);
   }

   100% {
      transform: rotate(360deg);
   }
}

.yah-icon-box.yah-animated-border {
   position: relative;
   overflow: hidden;
   z-index: 1;
}

/* Gradient rotating element - stays inside the box */
.yah-icon-box.yah-animated-border::before {
   content: '';
   position: absolute;
   inset: calc(-50% - var(--border-width, 3px));
   background: conic-gradient(from 0deg,
         var(--gradient-color-1, #ff0080),
         var(--gradient-color-2, #7928ca),
         var(--gradient-color-3, #00d4ff),
         var(--gradient-color-1, #ff0080));
   z-index: -2;
   animation: yah-rotate-gradient var(--animation-speed, 2000ms) linear infinite;
   animation-play-state: paused;
   opacity: 0;
   transition: opacity 0.3s ease;
}

/* Inner mask - inherits box background via CSS variable */
.yah-icon-box.yah-animated-border::after {
   content: '';
   position: absolute;
   inset: var(--border-width, 3px);
   background: var(--inner-bg, transparent);
   border-radius: inherit;
   z-index: -1;
}

/* Activate animation on hover */
.yah-icon-box.yah-animated-border:hover {
   border-color: transparent !important;
}

.yah-icon-box.yah-animated-border:hover::before {
   animation-play-state: running;
   opacity: 1;
}



/* ==========================================================================
   Yah Methodology Widget
   Staggered scroll animation for keywords
   ========================================================================== */

.yah-methodology-wrapper {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: center;
   gap: 5px;
}

.yah-methodology-item {
   display: inline-flex;
   align-items: center;
   flex-shrink: 0;
}

/* Keyword text - initial state (tilted/skewed + slide) */
.yah-methodology-keyword {
   opacity: 0.15;
   transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
   transform: skewY(-5deg) translateX(-30px);
   display: inline-block;
}

/* Arrow - initial state */
.yah-methodology-arrow {
   opacity: 0;
   transform: translateX(-10px);
   transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
   display: inline-flex;
   align-items: center;
}

/* Active state - keyword */
.yah-methodology-item.is-active .yah-methodology-keyword {
   opacity: 1;
   transform: skewY(0deg) translateX(0);
}

/* Active state - arrow */
.yah-methodology-item.is-active .yah-methodology-arrow {
   opacity: 1;
   transform: translateX(0);
}

/* Editor preview - show all active */
.elementor-editor-active .yah-methodology-item .yah-methodology-keyword,
.elementor-editor-preview .yah-methodology-item .yah-methodology-keyword {
   opacity: 1;
   transform: skewY(0deg) translateX(0);
}

.elementor-editor-active .yah-methodology-item .yah-methodology-arrow,
.elementor-editor-preview .yah-methodology-item .yah-methodology-arrow {
   opacity: 1;
   transform: translateX(0);
}

/* Responsive */
@media (max-width: 767px) {
   .yah-methodology-wrapper {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: center;
      gap: 5px;
   }

   .yah-methodology-arrow {
      margin: 0 8px !important;
   }
}

/* Image in methodology */
.yah-methodology-image {
   display: inline-block;
   height: auto;
   max-width: 100%;
   border-radius: 8px;
   box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
   vertical-align: middle;
   opacity: 0.15;
   transform: skewY(-5deg);
   transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.yah-methodology-item.is-active .yah-methodology-image {
   opacity: 1;
   transform: skewY(0deg);
}

.elementor-editor-active .yah-methodology-item .yah-methodology-image,
.elementor-editor-preview .yah-methodology-item .yah-methodology-image {
   opacity: 1;
   transform: skewY(0deg);
}

/* Line break for max 3 items per row */
.yah-methodology-break {
   flex-basis: 100%;
   height: 0;
}

/* ==========================================================================
   Yah Back to Top Button
   ========================================================================== */

.yah-back-to-top-button {
   position: fixed;
   display: flex;
   align-items: center;
   justify-content: center;
   cursor: pointer;
   transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
   opacity: 0;
   visibility: hidden;
   pointer-events: none;
}

/* Show State */
.yah-back-to-top-button.is-visible {
   opacity: 1;
   visibility: visible;
   pointer-events: auto;
}

/* Shapes */
.yah-back-to-top-button.yah-shape-circle {
   border-radius: 50%;
}

.yah-back-to-top-button.yah-shape-square {
   border-radius: 0;
}

/* Position Presets */
.yah-back-to-top-button.yah-position-bottom-right {
   bottom: var(--offset-vertical, 30px);
   right: var(--offset-horizontal, 30px);
}

.yah-back-to-top-button.yah-position-bottom-left {
   bottom: var(--offset-vertical, 30px);
   left: var(--offset-horizontal, 30px);
}

.yah-back-to-top-button.yah-position-top-right {
   top: var(--offset-vertical, 30px);
   right: var(--offset-horizontal, 30px);
}

.yah-back-to-top-button.yah-position-top-left {
   top: var(--offset-vertical, 30px);
   left: var(--offset-horizontal, 30px);
}

/* Icon */
.yah-button-icon {
   display: flex;
   align-items: center;
   justify-content: center;
   position: relative;
   z-index: 2;
}

/* Progress Ring - Always visible track + fill (no gap) */
.yah-progress-ring {
   --ring-width: 3px;
   --ring-color: #fff;
   position: absolute;
   top: 0;
   left: 0;
   right: 0;
   bottom: 0;
   border-radius: 50%;
   border: var(--ring-width) solid rgba(255, 255, 255, 0.25);
   box-sizing: content-box;
   margin: calc(-1 * var(--ring-width));
   pointer-events: none;
}

.yah-progress-ring::after {
   content: '';
   position: absolute;
   top: calc(-1 * var(--ring-width));
   left: calc(-1 * var(--ring-width));
   right: calc(-1 * var(--ring-width));
   bottom: calc(-1 * var(--ring-width));
   border-radius: 50%;
   background: conic-gradient(from -90deg,
         var(--ring-color) calc(var(--progress, 0) * 3.6deg),
         transparent calc(var(--progress, 0) * 3.6deg));
   -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-width)), #000 calc(100% - var(--ring-width)));
   mask: radial-gradient(farthest-side, transparent calc(100% - var(--ring-width)), #000 calc(100% - var(--ring-width)));
}

/* For square/rounded shapes */
.yah-shape-square .yah-progress-ring,
.yah-shape-rounded .yah-progress-ring {
   border-radius: inherit;
}

/* Entrance Animations */
@keyframes yahFadeIn {
   from {
      opacity: 0;
   }

   to {
      opacity: 1;
   }
}

@keyframes yahSlideUp {
   from {
      opacity: 0;
      transform: translateY(20px);
   }

   to {
      opacity: 1;
      transform: translateY(0);
   }
}

@keyframes yahScaleIn {
   from {
      opacity: 0;
      transform: scale(0);
   }

   to {
      opacity: 1;
      transform: scale(1);
   }
}

.yah-back-to-top-button.yah-entrance-fade.is-visible {
   animation: yahFadeIn 0.3s ease-out;
}

.yah-back-to-top-button.yah-entrance-slide-up.is-visible {
   animation: yahSlideUp 0.4s ease-out;
}

.yah-back-to-top-button.yah-entrance-scale.is-visible {
   animation: yahScaleIn 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* Hover Animations */
.yah-back-to-top-button.yah-hover-scale:hover {
   transform: scale(1.1);
}

@keyframes yahBounce {

   0%,
   100% {
      transform: translateY(0);
   }

   50% {
      transform: translateY(-8px);
   }
}

.yah-back-to-top-button.yah-hover-bounce:hover {
   animation: yahBounce 0.6s ease-in-out infinite;
}

@keyframes yahRotate {
   from {
      transform: rotate(0deg);
   }

   to {
      transform: rotate(360deg);
   }
}

.yah-back-to-top-button.yah-hover-rotate:hover .yah-button-icon {
   animation: yahRotate 0.6s ease-in-out;
}

/* Hide on Mobile */
@media (max-width: 767px) {
   .yah-back-to-top-button.yah-hide-mobile {
      display: none !important;
   }
}

/* Editor Mode - Keep fixed positioning visible */
.elementor-editor-active .yah-back-to-top-button,
.elementor-editor-preview .yah-back-to-top-button {
   opacity: 1 !important;
   visibility: visible !important;
   pointer-events: auto !important;
}

/* Override Elementor's widget wrapper positioning in editor */
.elementor-editor-active .elementor-widget-yah-back-to-top,
.elementor-editor-preview .elementor-widget-yah-back-to-top {
   position: static !important;
   width: auto !important;
   height: auto !important;
}

/* Static Mode - Button stays in place */
.yah-back-to-top-button.yah-mode-static {
   position: relative !important;
   top: auto !important;
   bottom: auto !important;
   left: auto !important;
   right: auto !important;
   opacity: 1 !important;
   visibility: visible !important;
   pointer-events: auto !important;
}

/* ==========================================================================
   Yah Services Carousel
   ========================================================================== */

.yah-services-carousel {
   width: 100%;
   position: relative;
}

/* Header - Flex Layout */
.yah-services-header {
   display: flex;
   justify-content: space-between;
   align-items: center;
   flex-wrap: wrap;
   gap: 20px;
   margin-bottom: 40px;
}

.yah-services-title {
   margin: 0;
   font-size: 2.5rem;
   font-weight: 700;
   line-height: 1.2;
}

.yah-services-title span {
   color: #2575fc;
}

/* Navigation Arrows */
.yah-services-nav {
   display: flex;
   gap: 10px;
}

.yah-nav-btn {
   display: flex;
   align-items: center;
   justify-content: center;
   width: 45px;
   height: 45px;
   border: none;
   border-radius: 8px;
   background-color: #2575fc;
   color: #ffffff;
   cursor: pointer;
   transition: all 0.3s ease;
}

.yah-nav-btn:hover {
   background-color: #1a5fd0;
   transform: scale(1.05);
}

.yah-nav-btn i,
.yah-nav-btn svg {
   font-size: 16px;
   width: 16px;
   height: 16px;
}

/* Swiper Container */
.yah-services-swiper {
   width: 100%;
   overflow: hidden;
}

.yah-services-swiper .swiper-slide {
   height: auto;
}

/* Service Card */
.yah-service-card {
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center;
   background-color: #ffffff;
   border-radius: 15px;
   padding: 30px 25px;
   height: 100%;
   box-sizing: border-box;
   transition: all 0.3s ease;
   text-decoration: none;
   color: inherit;
}

.yah-service-card:hover {
   transform: translateY(-5px);
   box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* Card Icon */
.yah-service-icon {
   display: flex;
   align-items: center;
   justify-content: center;
   margin-bottom: 20px;
}

.yah-service-icon i {
   font-size: 60px;
   color: #2575fc;
}

.yah-service-icon img {
   max-width: 60px;
   height: auto;
}

.yah-service-icon svg {
   width: 60px;
   height: 60px;
   fill: #2575fc;
}

/* Card Title */
.yah-service-card .yah-service-title {
   font-size: 1.25rem;
   font-weight: 600;
   margin: 0 0 15px 0;
   color: #1a1a2e;
}

/* Card Description */
.yah-service-desc {
   font-size: 0.95rem;
   color: #666666;
   line-height: 1.6;
   margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
   .yah-services-header {
      flex-direction: column;
      text-align: center;
   }

   .yah-services-title {
      font-size: 1.75rem;
   }

   .yah-services-nav {
      justify-content: center;
   }
}

/* Elementor Editor - Services Carousel Fixes */
.elementor-editor-active .yah-services-carousel {
   display: block !important;
   visibility: visible !important;
}

.elementor-editor-active .yah-services-swiper {
   overflow: visible;
}

.elementor-editor-active .yah-services-swiper .swiper-wrapper {
   display: flex;
   flex-wrap: nowrap;
}

.elementor-editor-active .yah-services-swiper .swiper-slide {
   flex-shrink: 0;
   width: 33.333% !important;
}

@media (max-width: 1024px) {
   .elementor-editor-active .yah-services-swiper .swiper-slide {
      width: 50% !important;
   }
}

@media (max-width: 768px) {
   .elementor-editor-active .yah-services-swiper .swiper-slide {
      width: 100% !important;
   }
}

/* Services Carousel - Peek effect (show exited card on left) */
.yah-services-carousel {
   overflow: hidden;
   position: relative;
}

.yah-services-carousel::before {
   content: '';
   position: absolute;
   left: -50%;
   top: 0;
   width: 50%;
   height: 100%;
   background: transparent;
   z-index: 1;
   pointer-events: none;
}

.yah-services-swiper {
   overflow: visible !important;
   clip-path: inset(0 0 0 -50%);
}
/* Services Carousel - Animated Border (same as Icon Box) */
.yah-service-card.yah-animated-border {
   position: relative;
   overflow: hidden;
   z-index: 1;
}

.yah-service-card.yah-animated-border::before {
   content: '';
   position: absolute;
   inset: calc(-50% - var(--border-width, 3px));
   background: conic-gradient(
      from 0deg,
      var(--gradient-color-1, #ff0080),
      var(--gradient-color-2, #7928ca),
      var(--gradient-color-3, #00d4ff),
      var(--gradient-color-1, #ff0080));
   z-index: -2;
   animation: yah-rotate-gradient var(--animation-speed, 2000ms) linear infinite;
   animation-play-state: paused;
   opacity: 0;
   transition: opacity 0.3s ease;
}

.yah-service-card.yah-animated-border::after {
   content: '';
   position: absolute;
   inset: var(--border-width, 3px);
   background: var(--inner-bg, #ffffff);
   border-radius: inherit;
   z-index: -1;
}

.yah-service-card.yah-animated-border:hover {
   border-color: transparent !important;
}

.yah-service-card.yah-animated-border:hover::before {
   animation-play-state: running;
   opacity: 1;
}
