/* Custom Elementor Widget: Hero Spotlight Slider Styles */

/* -------------------------------------------------------------
 * 1. Base Structure & Slider Wrapper
 * ------------------------------------------------------------- */
.cg-hero-slider-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    background-color: #090d16;
}

.cg-hero-slider {
    position: relative;
    width: 100%;
    height: 650px; /* Default height */
}

/* -------------------------------------------------------------
 * 2. Slider Item (Slides)
 * ------------------------------------------------------------- */
.cg-hero-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                visibility 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.cg-hero-slide-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Background overlay to ensure text legibility */
.cg-hero-slide-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(9, 13, 22, 0.65);
    z-index: 1;
}

.cg-hero-slide-item > .cg-header-container {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* -------------------------------------------------------------
 * 3. Two-Column Grid Layout (Content & Hotspot)
 * ------------------------------------------------------------- */
.cg-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    width: 100%;
}

/* -------------------------------------------------------------
 * 4. Content Column (Left Side)
 * ------------------------------------------------------------- */
.cg-hero-content {
    max-width: 580px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cg-hero-title {
    color: #ffffff;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0;
    letter-spacing: -1px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

.cg-hero-slide-item.active .cg-hero-title {
    opacity: 1;
    transform: translateY(0);
}

.cg-hero-desc {
    color: #cbd5e1;
    font-size: 16px;
    line-height: 1.6;
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.cg-hero-slide-item.active .cg-hero-desc {
    opacity: 1;
    transform: translateY(0);
}

.cg-hero-cta-wrap {
    margin-top: 10px;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.6s;
}

.cg-hero-slide-item.active .cg-hero-cta-wrap {
    opacity: 1;
    transform: translateY(0);
}

.cg-hero-cta {
    display: inline-block;
    padding: 14px 32px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    text-decoration: none;
    background-color: #6DC05A;
    color: #ffffff;
    border-radius: 4px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 14px rgba(109, 192, 90, 0.2);
}

.cg-hero-cta:hover {
    background-color: #154683;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(21, 70, 131, 0.3);
}

/* -------------------------------------------------------------
 * 5. Interactive Hotspot Column (Right Side)
 * ------------------------------------------------------------- */
.cg-hero-spotlight-area {
    position: relative;
    height: 400px;
    width: 100%;
}

.cg-hero-hotspot-group {
    position: absolute;
    z-index: 5;
    /* Custom coordinates from repeater are rendered inline */
}

/* Hotspot Line Connections */
.cg-hero-hotspot-group::before {
    content: '';
    position: absolute;
    top: 10px;
    left: -60px;
    width: 60px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.cg-hero-hotspot-group::after {
    content: '';
    position: absolute;
    top: 10px;
    right: -100px;
    width: 100px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

/* Glassmorphic Hotspot Tag ("Trust") */
.cg-hero-hotspot-tag {
    position: absolute;
    top: -12px;
    left: -150px;
    padding: 8px 24px;
    background-color: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    font-style: italic;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

.cg-hero-slide-item.active .cg-hero-hotspot-tag {
    opacity: 1;
    transform: translateX(0);
}

/* Pulsing Circle Hotspot */
.cg-hero-hotspot-pulse {
    position: relative;
    width: 20px;
    height: 20px;
    background-color: #6DC05A;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 0 0 rgba(109, 192, 90, 0.7);
    animation: cg-hotspot-pulse-anim 2s infinite;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 6;
}

.cg-hero-hotspot-pulse::after {
    content: '';
    width: 8px;
    height: 8px;
    background-color: #ffffff;
    border-radius: 50%;
    display: block;
}

@keyframes cg-hotspot-pulse-anim {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(109, 192, 90, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 15px rgba(109, 192, 90, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(109, 192, 90, 0);
    }
}

/* Hotspot Tooltip Panel */
.cg-hero-hotspot-tooltip {
    position: absolute;
    top: -45px;
    left: 120px;
    width: 260px;
    background-color: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.35);
    padding: 16px 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 7;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.8s;
}

/* Left pointing decorator on tooltip connection */
.cg-hero-hotspot-tooltip::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 1px;
    background: rgba(255, 255, 255, 0.4);
}

.cg-hero-slide-item.active .cg-hero-hotspot-tooltip {
    opacity: 1;
    transform: translateX(0);
}

.cg-hero-hotspot-tooltip-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-align: left;
}

.cg-hero-tooltip-title {
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.2px;
}

.cg-hero-tooltip-desc {
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.4;
    margin: 0;
}

.cg-hero-tooltip-link {
    color: #6DC05A;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 5px;
    transition: color 0.3s ease;
    display: inline-block;
}

.cg-hero-tooltip-link:hover {
    color: #154683;
}

/* -------------------------------------------------------------
 * 6. Navigation Controls (Prev/Next Arrows)
 * ------------------------------------------------------------- */
.cg-hero-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 10;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.cg-hero-nav-btn svg {
    fill: #ffffff;
    transition: fill 0.3s ease, transform 0.2s ease;
}

.cg-hero-prev {
    left: 40px;
}

.cg-hero-next {
    right: 40px;
}

.cg-hero-nav-btn:hover {
    background: #6DC05A;
    border-color: #6DC05A;
    box-shadow: 0 4px 15px rgba(109, 192, 90, 0.3);
}

.cg-hero-nav-btn:hover svg {
    transform: scale(1.1);
}

.cg-hero-prev:hover svg {
    transform: translateX(-2px) scale(1.1);
}

.cg-hero-next:hover svg {
    transform: translateX(2px) scale(1.1);
}

/* -------------------------------------------------------------
 * 7. Responsive Breakpoints
 * ------------------------------------------------------------- */
@media (max-width: 1024px) {
    .cg-hero-slider {
        height: auto !important;
        min-height: 700px;
    }
    
    .cg-hero-slide-item {
        position: relative;
        padding: 80px 0;
        display: flex;
        align-items: center;
        min-height: 700px;
    }
    
    .cg-hero-grid {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }
    
    .cg-hero-content {
        max-width: 100%;
        align-items: center;
    }
    
    .cg-hero-title {
        font-size: 38px;
    }
    
    .cg-hero-spotlight-area {
        height: 250px;
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    /* Reposition hotspot elements to look cleaner stacked */
    .cg-hero-hotspot-group {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        display: flex;
        align-items: center;
        gap: 20px;
    }
    
    .cg-hero-hotspot-group::before,
    .cg-hero-hotspot-group::after,
    .cg-hero-hotspot-tooltip::before {
        display: none; /* Hide connections on mobile to preserve layout */
    }
    
    .cg-hero-hotspot-tag {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        opacity: 1 !important;
    }
    
    .cg-hero-hotspot-tooltip {
        position: relative !important;
        left: 0 !important;
        top: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        width: 250px;
    }
    
    .cg-hero-nav-btn {
        width: 40px;
        height: 40px;
    }
    
    .cg-hero-prev {
        left: 15px;
    }
    
    .cg-hero-next {
        right: 15px;
    }
}

@media (max-width: 480px) {
    .cg-hero-slide-item {
        padding: 60px 0;
        min-height: 650px;
    }
    
    .cg-hero-title {
        font-size: 30px;
    }
    
    .cg-hero-desc {
        font-size: 14px;
    }
    
    .cg-hero-cta {
        padding: 12px 26px;
        font-size: 13px;
    }
    
    .cg-hero-hotspot-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .cg-hero-hotspot-tooltip {
        width: 100%;
        max-width: 260px;
    }
}
