/* ============================================
   ECLAN THEME - ADDITIONAL COMPONENT STYLES
   ============================================ */

/* Scroll Progress Bar */
.ec-scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--ec-gradient-1);
    z-index: 10001;
    transition: width 0.1s linear;
}

/* Back to Top */
.ec-back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: var(--ec-radius-full);
    background: var(--ec-primary);
    color: var(--ec-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--ec-transition);
    z-index: 999;
    border: none;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.3);
}

.ec-back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ec-back-to-top:hover {
    background: var(--ec-primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.4);
}

/* Mobile Menu Overlay */
.ec-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    z-index: 998;
    opacity: 0;
    visibility: hidden;
    transition: all var(--ec-transition);
}

.ec-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Preloader */
.ec-preloader {
    position: fixed;
    inset: 0;
    background: var(--ec-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

.ec-preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.ec-preloader-spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--ec-border);
    border-top-color: var(--ec-primary);
    border-radius: 50%;
    animation: ec-spin 0.8s linear infinite;
}

/* Smooth anchor scroll offset */
html {
    scroll-padding-top: 100px;
}

/* Custom Selection */
::selection {
    background: rgba(37, 99, 235, 0.15);
    color: var(--ec-primary-dark);
}

/* Service detail single page */
.ec-service-single-content {
    max-width: none;
}

.ec-service-single-content .entry-content h2 {
    font-size: 1.75rem;
    margin-top: 2.5em;
    margin-bottom: 0.75em;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--ec-border);
}

.ec-service-single-content .entry-content h3 {
    font-size: 1.35rem;
}

/* Sticky Header Animation */
.ec-header {
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Portfolio Filter Animation */
.ec-portfolio-item {
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.ec-portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    position: absolute;
    pointer-events: none;
}

/* Form Submit Loading State */
.ec-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

.ec-btn.loading i {
    animation: ec-spin 0.6s linear infinite;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Print Styles */
@media print {
    .ec-header,
    .ec-footer,
    .ec-back-to-top,
    .ec-scroll-progress,
    .ec-cta {
        display: none !important;
    }

    .ec-page-header {
        background: none !important;
        color: #000 !important;
        padding: 20px 0 !important;
    }

    .ec-page-header h1,
    .ec-page-header p {
        color: #000 !important;
    }

    body {
        font-size: 12pt;
        color: #000;
    }
}
