/* ==========================================================================
   Epplicon Technologies - Interactive UI/UX Components
   Advanced interactive elements for enhanced user experience
   ========================================================================== */

/* --- INTERACTIVE STATISTICS COUNTER --- */
.stats-section {
    padding: 120px 0;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 50%, #1a1a3e 100%);
    color: #fff;
    position: relative;
    overflow: hidden;
}

.stats-section .section-header {
    margin-bottom: 80px;
}

.stats-section .section-header h2 {
    color: #fff;
    margin-bottom: 1rem;
}

.stats-section .subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.stats-description {
    max-width: 700px;
    margin: 1rem auto 0;
    font-size: 1.1rem;
    opacity: 0.85;
    line-height: 1.8;
}

.stats-background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.06) 0%, transparent 50%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
    animation: rotate 25s linear infinite;
    pointer-events: none;
}

.stats-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(77, 171, 247, 0.15) 0%, transparent 70%);
    animation: float 12s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    position: relative;
    z-index: 1;
}

.stat-card {
    position: relative;
    perspective: 1000px;
}

.stat-card-inner {
    text-align: center;
    padding: 3rem 2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: all 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.stat-card-inner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.stat-card:hover .stat-card-inner::before {
    left: 100%;
}

.stat-card:hover .stat-card-inner {
    transform: translateY(-15px) scale(1.02);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 30px rgba(77, 171, 247, 0.3);
}

.stat-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-bottom: 1.5rem;
}

.stat-icon {
    font-size: 3rem;
    color: #fff;
    position: relative;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    display: inline-block;
}

.stat-icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}

.stat-card:hover .stat-icon {
    transform: scale(1.15) rotate(5deg);
    color: #4dabf7;
}

.stat-card:hover .stat-icon-glow {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    background: radial-gradient(circle, rgba(77, 171, 247, 0.4) 0%, transparent 70%);
}

.stat-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.stat-number {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: block;
    background: linear-gradient(135deg, #fff 0%, #4dabf7 50%, #fff 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer-text 3s linear infinite;
    line-height: 1.2;
    transition: all 0.3s ease;
}

@keyframes shimmer-text {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.stat-card:hover .stat-number {
    transform: scale(1.1);
    background: linear-gradient(135deg, #4dabf7 0%, #fff 50%, #4dabf7 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1.3rem;
    font-weight: 600;
    opacity: 0.95;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 0.5rem;
    color: #fff;
}

.stat-card .stat-description {
    font-size: 0.95rem;
    opacity: 0.75;
    line-height: 1.6;
    margin-top: 0.5rem;
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0.5px;
}

.stat-progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin-top: 1.5rem;
    overflow: hidden;
    position: relative;
}

.stat-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4dabf7, #fff, #4dabf7);
    background-size: 200% 100%;
    border-radius: 10px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
    animation: progress-shimmer 2s linear infinite;
}

@keyframes progress-shimmer {
    0% {
        background-position: 0% center;
    }
    100% {
        background-position: 200% center;
    }
}

.stat-progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    animation: progress-glow 2s ease-in-out infinite;
}

@keyframes progress-glow {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 1;
    }
}

/* --- INTERACTIVE PROGRESS BARS --- */
.progress-section {
    padding: 80px 0;
}

.progress-item {
    margin-bottom: 2.5rem;
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.progress-label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.progress-percentage {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.progress-bar-container {
    height: 12px;
    background: var(--background-color);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #4dabf7);
    border-radius: 10px;
    width: 0%;
    transition: width 1.5s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* --- ACCORDION/FAQ COMPONENT --- */
.accordion {
    max-width: 800px;
    margin: 0 auto;
}

.accordion-item {
    background: var(--surface-color);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: var(--transition-smooth);
}

.accordion-item:hover {
    box-shadow: var(--shadow-sm);
}

.accordion-item.active {
    box-shadow: var(--shadow-md);
    border-color: var(--primary-color);
}

.accordion-header {
    padding: 1.5rem 2rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: var(--transition-fast);
}

.accordion-header:hover {
    background: var(--background-color);
}

.accordion-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--text-primary);
    flex: 1;
}

.accordion-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    transition: transform 0.3s ease;
    margin-left: 1rem;
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 2rem;
}

.accordion-item.active .accordion-content {
    max-height: 1000px;
    padding: 0 2rem 1.5rem 2rem;
}

.accordion-content p {
    color: var(--text-secondary);
    line-height: 1.8;
    margin: 0;
}

/* --- TESTIMONIALS CAROUSEL --- */
.testimonials-section {
    padding: 100px 0;
    background: var(--background-color);
    position: relative;
}

.testimonial-carousel {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.testimonial-slide {
    display: none;
    text-align: center;
    padding: 3rem 2rem;
    background: var(--surface-color);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    animation: fadeIn 0.5s ease;
}

.testimonial-slide.active {
    display: block;
}

.testimonial-quote {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.8;
    position: relative;
    padding: 0 2rem;
}

.testimonial-quote::before,
.testimonial-quote::after {
    content: '"';
    font-size: 4rem;
    color: var(--primary-color);
    opacity: 0.3;
    position: absolute;
    font-family: Georgia, serif;
}

.testimonial-quote::before {
    top: -20px;
    left: 0;
}

.testimonial-quote::after {
    bottom: -40px;
    right: 0;
}

.testimonial-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary-color);
}

.testimonial-author-info h4 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.testimonial-author-info p {
    margin: 0.25rem 0 0 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.testimonial-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: none;
    cursor: pointer;
    transition: var(--transition-fast);
    padding: 0;
}

.testimonial-dot.active,
.testimonial-dot:hover {
    background: var(--primary-color);
    transform: scale(1.2);
}

.testimonial-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition-fast);
    z-index: 10;
}

.testimonial-nav:hover {
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-md);
}

.testimonial-nav.prev {
    left: -25px;
}

.testimonial-nav.next {
    right: -25px;
}

/* --- IMAGE LIGHTBOX/GALLERY --- */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
    aspect-ratio: 4/3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 110, 253, 0);
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-item:hover::after {
    background: rgba(13, 110, 253, 0.3);
    content: '🔍';
    font-size: 2rem;
}

/* Lightbox */
.lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.lightbox.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
}

.lightbox-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.lightbox-nav:hover {
    background: rgba(255, 255, 255, 0.3);
}

.lightbox-nav.prev {
    left: -70px;
}

.lightbox-nav.next {
    right: -70px;
}

/* --- INTERACTIVE TIMELINE --- */
.timeline {
    position: relative;
    padding: 3rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--border-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    width: 50%;
    padding: 0 3rem;
}

.timeline-item:nth-child(odd) {
    left: 0;
    text-align: right;
    padding-right: 4rem;
}

.timeline-item:nth-child(even) {
    left: 50%;
    text-align: left;
    padding-left: 4rem;
}

.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid var(--surface-color);
    border-radius: 50%;
    top: 0;
    box-shadow: 0 0 0 4px var(--border-color);
    transition: var(--transition-smooth);
}

.timeline-item:nth-child(odd) .timeline-dot {
    right: -2rem;
}

.timeline-item:nth-child(even) .timeline-dot {
    left: -2rem;
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.3);
    box-shadow: 0 0 0 4px var(--primary-color), 0 0 20px rgba(13, 110, 253, 0.5);
}

.timeline-content {
    background: var(--surface-color);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
}

.timeline-item:hover .timeline-content {
    box-shadow: var(--shadow-md);
    transform: translateY(-5px);
}

.timeline-date {
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.timeline-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.timeline-description {
    color: var(--text-secondary);
    line-height: 1.8;
}

/* --- PARALLAX EFFECTS --- */
.parallax-section {
    position: relative;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.parallax-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background-size: cover;
    background-position: center;
    opacity: 0.3;
    will-change: transform;
}

.parallax-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
}

/* --- INTERACTIVE SERVICE CARDS (Enhanced) --- */
.service-card-interactive {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card-interactive::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s;
}

.service-card-interactive:hover::before {
    left: 100%;
}

.service-card-interactive .icon {
    position: relative;
    z-index: 1;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .timeline::before {
        left: 2rem;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        text-align: left !important;
        padding-left: 4rem !important;
        padding-right: 0 !important;
    }

    .timeline-item:nth-child(odd) .timeline-dot,
    .timeline-item:nth-child(even) .timeline-dot {
        left: 0.5rem;
    }

    .testimonial-nav {
        display: none;
    }

    .lightbox-nav {
        display: none;
    }

    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 2rem;
    }

    .stat-number {
        font-size: 3rem;
    }

    .stat-card-inner {
        padding: 2.5rem 1.5rem;
    }

    .stat-icon {
        font-size: 2.5rem;
    }

    .stat-label {
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    .accordion-header {
        padding: 1rem 1.5rem;
    }

    .accordion-content {
        padding: 0 1.5rem;
    }

    .accordion-item.active .accordion-content {
        padding: 0 1.5rem 1rem 1.5rem;
    }

    .testimonial-quote {
        font-size: 1.1rem;
        padding: 0 1rem;
    }

    .image-gallery {
        grid-template-columns: 1fr;
    }

    .stats-section {
        padding: 80px 0;
    }

    .stats-section .section-header {
        margin-bottom: 50px;
    }

    .stats-description {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-card-inner {
        padding: 2rem 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .stat-icon {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    .stat-card .stat-description {
        font-size: 0.85rem;
    }
}

