/**
 * Awwwesome Widgets for Elementor
 * Main Stylesheet
 */

/* =============================================
   CSS VARIABLES
   ============================================= */
:root {
    --aww-primary: #6366f1;
    --aww-secondary: #8b5cf6;
    --aww-transition: 0.3s ease;
}

/* =============================================
   MARQUEE TEXT WIDGET
   ============================================= */
.aww-marquee-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.aww-marquee-container.has-fade::before,
.aww-marquee-container.has-fade::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 80px;
    z-index: 10;
    pointer-events: none;
}

.aww-marquee-container.has-fade::before {
    left: 0;
    background: linear-gradient(to right, var(--aww-fade-color, #ffffff) 0%, transparent 100%);
}

.aww-marquee-container.has-fade::after {
    right: 0;
    background: linear-gradient(to left, var(--aww-fade-color, #ffffff) 0%, transparent 100%);
}

.aww-marquee-wrapper {
    display: flex;
    width: 100%;
    overflow: hidden;
}

.aww-marquee-track {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    will-change: transform;
    animation: aww-marquee-scroll-left 20s linear infinite;
}

.aww-marquee-track.aww-marquee-direction-right {
    animation-name: aww-marquee-scroll-right;
}

.aww-marquee-wrapper.aww-marquee-pause-hover:hover .aww-marquee-track {
    animation-play-state: paused;
}

.aww-marquee-item {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 60px;
    white-space: nowrap;
    transition: all 0.3s ease;
}

.aww-marquee-item a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
}

.aww-marquee-item-text {
    font-size: 2rem;
    font-weight: 600;
    letter-spacing: -0.02em;
    transition: color 0.3s ease;
}

.aww-marquee-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.aww-marquee-item-image img {
    display: block;
    max-height: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

.aww-marquee-item:hover {
    transform: scale(1.05);
}

@keyframes aww-marquee-scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

@keyframes aww-marquee-scroll-right {
    0% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* =============================================
   CURRENT TIME WIDGET
   ============================================= */
.aww-current-time {
    display: inline-block;
}

.aww-current-time.aww-layout-inline {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
    flex-wrap: wrap;
}

.aww-current-time.aww-layout-stacked {
    display: flex;
    flex-direction: column;
    gap: 0.25em;
}

.aww-time-display {
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
}

.aww-time-segments {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.aww-time-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px 20px;
    background: #f3f4f6;
    border-radius: 8px;
    min-width: 70px;
}

.aww-time-segment .aww-time-value {
    font-size: 2em;
    font-weight: 700;
    line-height: 1;
}

.aww-time-segment-label {
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.5em;
    color: #9ca3af;
}

.aww-time-prefix,
.aww-time-suffix {
    opacity: 0.8;
}

/* =============================================
   GRAIN EFFECT WIDGET
   ============================================= */
.aww-grain-container {
    position: relative;
    display: flex;
    justify-content: center;
    overflow: hidden;
    background-repeat: no-repeat;
}

.aww-grain-overlay {
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
    z-index: 1;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    opacity: 0.3;
}

.aww-grain-overlay.aww-grain-animated {
    animation: aww-grain-animation 0.5s steps(10) infinite;
}

.aww-grain-overlay.aww-grain-speed-slow {
    animation-duration: 1s;
}

.aww-grain-overlay.aww-grain-speed-fast {
    animation-duration: 0.2s;
}

.aww-grain-overlay.aww-grain-color {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

@keyframes aww-grain-animation {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0%); }
    70% { transform: translate(0%, 15%); }
    80% { transform: translate(3%, 20%); }
    90% { transform: translate(-10%, 10%); }
}

.aww-grain-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

.aww-grain-heading {
    margin: 0 0 0.5em;
    font-size: 2.5rem;
    font-weight: 700;
}

.aww-grain-text {
    margin: 0;
    font-size: 1.125rem;
}

/* =============================================
   DITHER EFFECT WIDGET
   ============================================= */
.aww-dither-container {
    position: relative;
    display: inline-block;
    overflow: hidden;
    line-height: 0;
}

.aww-dither-image {
    display: block;
    width: 100%;
    height: auto;
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
}

.aww-dither-canvas {
    display: block;
    width: 100%;
    height: auto;
}

.aww-dither-container.aww-hover-reveal:hover .aww-dither-image {
    opacity: 1;
    z-index: 2;
}

.aww-dither-container.aww-hover-reveal:hover .aww-dither-canvas {
    opacity: 0;
}

.aww-dither-container.aww-hover-zoom:hover {
    transform: scale(1.05);
}

.aww-dither-caption {
    line-height: 1.4;
    margin-top: 0.75em;
}

.aww-dither-caption.aww-caption-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    margin-top: 0;
    padding: 1em;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
}

/* =============================================
   ADVANCED BUTTON WIDGET
   ============================================= */
.aww-advanced-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    font-weight: 500;
    line-height: 1.4;
}

.aww-btn-content {
    display: inline-flex;
    align-items: center;
    position: relative;
    z-index: 2;
}

.aww-btn-icon {
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
}

.aww-btn-text-hover {
    display: none;
}

/* Button Sizes */
.aww-btn-size-xs { padding: 6px 12px; font-size: 12px; }
.aww-btn-size-sm { padding: 8px 18px; font-size: 14px; }
.aww-btn-size-md { padding: 12px 28px; font-size: 16px; }
.aww-btn-size-lg { padding: 16px 36px; font-size: 18px; }
.aww-btn-size-xl { padding: 20px 48px; font-size: 20px; }

/* Style Presets */
.aww-btn-solid {
    background-color: var(--aww-primary);
    border-color: transparent;
}

.aww-btn-outline {
    background: transparent;
    border-color: var(--aww-primary);
    color: var(--aww-primary);
}

.aww-btn-outline:hover {
    background-color: var(--aww-primary);
    color: #fff;
}

.aww-btn-ghost {
    background: transparent;
    border-color: transparent;
    color: currentColor;
}

.aww-btn-ghost:hover {
    background: rgba(0, 0, 0, 0.05);
}

.aww-btn-glass {
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
}

.aww-btn-glass.aww-glass-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
    pointer-events: none;
    border-radius: inherit;
}

.aww-btn-gradient {
    border: none;
    background: linear-gradient(135deg, var(--aww-primary), var(--aww-secondary));
}

.aww-btn-neon {
    background: transparent;
    border: 2px solid var(--neon-color, #00ff88);
    color: var(--neon-color, #00ff88);
    text-shadow: 0 0 10px var(--neon-color, #00ff88);
}

.aww-btn-neon:hover {
    background: var(--neon-color, #00ff88);
    color: #000;
    text-shadow: none;
    box-shadow: 0 0 20px var(--neon-color, #00ff88), 0 0 40px var(--neon-color, #00ff88);
}

.aww-btn-cyber {
    background: linear-gradient(135deg, var(--cyber-color-1, #ff0080), var(--cyber-color-2, #00ffff));
    border: none;
    position: relative;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.aww-btn-cyber::after {
    content: '';
    position: absolute;
    inset: 2px;
    background: #0a0a0a;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    z-index: 1;
}

.aww-btn-cyber .aww-btn-content {
    z-index: 3;
    background: linear-gradient(135deg, var(--cyber-color-1, #ff0080), var(--cyber-color-2, #00ffff));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.aww-btn-cyber:hover::after {
    background: transparent;
}

.aww-btn-cyber:hover .aww-btn-content {
    -webkit-text-fill-color: #0a0a0a;
}

.aww-btn-minimal {
    background: transparent;
    border: none;
    padding-left: 0;
    padding-right: 0;
    position: relative;
}

.aww-btn-minimal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s ease;
}

.aww-btn-minimal:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Hover Effects */
.aww-hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.aww-hover-push:hover {
    transform: translateY(2px);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.aww-hover-pulse:hover {
    animation: aww-btn-pulse 0.6s ease-in-out;
}

@keyframes aww-btn-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.aww-hover-shake:hover {
    animation: aww-btn-shake 0.5s ease-in-out;
}

@keyframes aww-btn-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-5px); }
    40% { transform: translateX(5px); }
    60% { transform: translateX(-5px); }
    80% { transform: translateX(5px); }
}

.aww-hover-glow:hover {
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.5), 0 0 40px rgba(99, 102, 241, 0.3);
}

/* Fill/Sweep Effects */
.aww-hover-fill-up::before,
.aww-hover-fill-down::before,
.aww-hover-sweep-right::before,
.aww-hover-sweep-left::before,
.aww-hover-slide-bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--fill-color, var(--aww-primary));
    z-index: 1;
    transition: transform 0.3s ease;
}

.aww-hover-fill-up::before {
    transform: translateY(100%);
}

.aww-hover-fill-up:hover::before {
    transform: translateY(0);
}

.aww-hover-fill-down::before {
    transform: translateY(-100%);
}

.aww-hover-fill-down:hover::before {
    transform: translateY(0);
}

.aww-hover-sweep-right::before {
    transform: translateX(-100%);
}

.aww-hover-sweep-right:hover::before {
    transform: translateX(0);
}

.aww-hover-sweep-left::before {
    transform: translateX(100%);
}

.aww-hover-sweep-left:hover::before {
    transform: translateX(0);
}

.aww-hover-slide-bg::before {
    transform: translateX(-100%) skewX(-15deg);
    width: 120%;
}

.aww-hover-slide-bg:hover::before {
    transform: translateX(0) skewX(-15deg);
}

.aww-hover-border-fade {
    border-color: transparent;
}

.aww-hover-border-fade:hover {
    border-color: currentColor;
}

/* Ripple Effect */
.aww-btn-ripple {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
    pointer-events: none;
    opacity: 0;
}

.aww-hover-ripple:hover .aww-btn-ripple {
    width: 300%;
    height: 300%;
    opacity: 1;
}

/* Icon Slide Effect */
.aww-hover-icon-slide .aww-btn-icon {
    transition: transform 0.3s ease;
}

.aww-hover-icon-slide:hover .aww-btn-icon {
    transform: translateX(5px);
}

.aww-hover-icon-slide.aww-btn-icon-left:hover .aww-btn-icon {
    transform: translateX(-5px);
}

/* Text Swap Effect */
.aww-hover-text-swap .aww-btn-text,
.aww-hover-text-swap .aww-btn-text-hover {
    display: inline-block;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.aww-hover-text-swap .aww-btn-text-hover {
    position: absolute;
    opacity: 0;
    transform: translateY(100%);
}

.aww-hover-text-swap:hover .aww-btn-text {
    opacity: 0;
    transform: translateY(-100%);
}

.aww-hover-text-swap:hover .aww-btn-text-hover {
    opacity: 1;
    transform: translateY(0);
}

/* Magnetic Effect - JS controlled */
.aww-hover-magnetic {
    transition: transform 0.1s ease-out;
}

/* =============================================
   RESPONSIVE & ACCESSIBILITY
   ============================================= */
@media (max-width: 768px) {
    .aww-marquee-item-text {
        font-size: 1.5rem;
    }
    
    .aww-marquee-item {
        margin-right: 40px;
    }
    
    .aww-time-segments {
        flex-wrap: wrap;
    }
    
    .aww-time-segment {
        min-width: 60px;
        padding: 10px 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aww-marquee-track,
    .aww-grain-overlay.aww-grain-animated {
        animation-play-state: paused;
    }
    
    .aww-advanced-btn,
    .aww-advanced-btn::before,
    .aww-advanced-btn::after {
        transition: none;
    }
}

/* Focus states for accessibility */
.aww-advanced-btn:focus-visible {
    outline: 2px solid var(--aww-primary);
    outline-offset: 3px;
}

.aww-marquee-item a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
}

/* =============================================
   ANIMATED TITLE WIDGET (GSAP)
   ============================================= */
.aww-animated-title {
    overflow: hidden;
}

.aww-animated-title-text {
    margin: 0;
    line-height: 1.2;
}

/* Gradient text */
.aww-animated-title-text.aww-gradient-text {
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Highlight styles */
.aww-title-highlight {
    position: relative;
    display: inline;
}

.aww-highlight-underline .aww-title-highlight {
    text-decoration: underline;
    text-decoration-thickness: 3px;
    text-underline-offset: 4px;
}

.aww-highlight-background .aww-title-highlight {
    padding: 0.1em 0.3em;
    border-radius: 4px;
}

.aww-highlight-marker .aww-title-highlight {
    padding: 0 0.1em;
}

/* Split text elements */
.aww-text-char,
.aww-text-word,
.aww-text-line {
    display: inline-block;
}

.aww-text-char {
    white-space: pre;
}

.aww-text-word {
    white-space: nowrap;
    margin-right: 0.25em;
}

.aww-text-line {
    display: block;
    overflow: hidden;
}

.aww-text-line-inner {
    display: block;
}

/* Masked animation containers */
.aww-mask-wrapper {
    overflow: hidden;
    display: inline-block;
}

.aww-mask-wrapper .aww-text-word,
.aww-mask-wrapper .aww-text-line-inner {
    display: inline-block;
}

/* Typewriter cursor */
.aww-typewriter-cursor {
    display: inline-block;
    width: 2px;
    height: 1em;
    background: currentColor;
    margin-left: 2px;
    animation: aww-cursor-blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes aww-cursor-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* =============================================
   ANIMATED TEXT WIDGET (GSAP)
   ============================================= */
.aww-animated-text {
    position: relative;
}

.aww-animated-text-content {
    line-height: 1.7;
}

.aww-animated-text-content p {
    margin-bottom: 1em;
}

.aww-animated-text-content p:last-child {
    margin-bottom: 0;
}

/* Split text in paragraphs */
.aww-animated-text .aww-text-word {
    display: inline-block;
    margin-right: 0.25em;
    will-change: transform, opacity;
}

.aww-animated-text .aww-text-char {
    display: inline-block;
    will-change: transform, opacity;
}

.aww-animated-text .aww-text-line {
    display: block;
    overflow: hidden;
}

.aww-animated-text .aww-text-paragraph {
    display: block;
    margin-bottom: 1em;
}

.aww-animated-text .aww-text-paragraph:last-child {
    margin-bottom: 0;
}

/* Highlight reveal effect */
.aww-highlight-word {
    position: relative;
    display: inline-block;
}

.aww-highlight-word::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 40%;
    background: var(--aww-highlight-color, #fef08a);
    transform: scaleX(0);
    transform-origin: left;
    z-index: -1;
    transition: transform 0.3s ease;
}

.aww-highlight-word.is-active::before {
    transform: scaleX(1);
}

/* 3D perspective for flip effects */
.aww-perspective {
    perspective: 1000px;
}

.aww-flip-element {
    transform-style: preserve-3d;
    backface-visibility: hidden;
}

/* Initial hidden states for animations */
.aww-animated-title[data-aww-animation]:not([data-aww-animation="none"]) .aww-animated-title-text,
.aww-animated-text[data-aww-animation]:not([data-aww-animation="none"]) .aww-animated-text-content {
    visibility: hidden;
}

.aww-animated-title.aww-initialized .aww-animated-title-text,
.aww-animated-text.aww-initialized .aww-animated-text-content {
    visibility: visible;
}

/* Scrub opacity base state */
.aww-scrub-opacity .aww-text-word,
.aww-scrub-opacity .aww-text-char {
    opacity: var(--aww-inactive-opacity, 0.2);
    transition: opacity 0.1s ease;
}

/* =============================================
   GSAP REDUCED MOTION
   ============================================= */
@media (prefers-reduced-motion: reduce) {
    .aww-animated-title[data-aww-animation] .aww-animated-title-text,
    .aww-animated-text[data-aww-animation] .aww-animated-text-content {
        visibility: visible !important;
    }
    
    .aww-text-char,
    .aww-text-word,
    .aww-text-line,
    .aww-text-line-inner {
        opacity: 1 !important;
        transform: none !important;
        filter: none !important;
    }
}

