/* =========================================
   New Improvements (Preloader, BackToTop, Menu, Testimonials)
   ========================================= */

/* --- Mobile Menu Fix for Dynamic List --- */
/* The wp_nav_menu outputs a ul. We need to style it to fit the flex container. */
.nav-links-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 2rem;
    align-items: center;
}

@media (max-width: 768px) {
    .nav-links-list {
        flex-direction: column;
        width: 100%;
        gap: 2rem;
    }
}

/* --- Preloader --- */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader-content {
    position: relative;
    width: 100px;
    height: 100px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.loader-logo {
    width: 60px;
    height: auto;
    position: relative;
    z-index: 2;
    animation: pulseLogo 2s infinite ease-in-out;
}

.spinner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid rgba(255, 122, 0, 0.1);
    border-top: 3px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes pulseLogo {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.9);
        opacity: 0.8;
    }
}

body.loaded #preloader {
    opacity: 0;
    visibility: hidden;
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 90px;
    width: 50px;
    height: 50px;
    background: rgba(255, 122, 0, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid var(--color-primary);
    border-radius: 50%;
    color: var(--color-primary);
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 990;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#back-to-top:hover {
    background: var(--color-primary);
    color: #fff;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(255, 122, 0, 0.4);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

@media (max-width: 768px) {
    #back-to-top {
        bottom: 90px;
        left: 20px;
        right: auto;
    }
}



.testimonial-card {
    background: var(--color-bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    position: relative;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.testimonial-card:hover {
    border-color: rgba(255, 122, 0, 0.3);
    transform: translateY(-5px);
}

.quote-icon {
    font-size: 2rem;
    color: var(--color-primary);
    opacity: 0.5;
    margin-bottom: 1.5rem;
}

.testimonial-text {
    font-style: italic;
    font-size: 1.1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
    flex-grow: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: auto;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #2a2f45;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--color-primary);
    border: 1px solid rgba(255, 122, 0, 0.2);
    font-size: 1.2rem;
}

.client-details h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.client-role {
    color: var(--color-text-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- Page Template (Generic) --- */
.page-header {
    padding-top: 140px;
    padding-bottom: 80px;
    background-color: var(--color-bg-secondary);
    text-align: center;
    background-image: var(--gradient-grid);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.page-title {
    font-size: clamp(2.5rem, 4vw, 4rem);
    color: #fff;
    margin-bottom: 0;
}

.page-content {
    padding: 6rem 0;
    min-height: 50vh;
}

.page-content h2,
.page-content h3 {
    margin-top: 2rem;
    color: #fff;
    margin-bottom: 1rem;
}

.page-content p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

.error-404 {
    min-height: 70vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    flex-direction: column;
    padding-top: var(--header-height);
}

.error-title {
    font-size: 8rem;
    font-weight: 900;
    color: var(--color-primary);
    line-height: 1;
    margin-bottom: 1rem;
    text-shadow: 0 0 50px rgba(255, 122, 0, 0.3);
}

.error-subtitle {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #fff;
}

/* --- Mobile Menu adjustments for the specific "nav-links" modifications --- */
@media (max-width: 768px) {
    .nav-links-list {
        align-items: flex-start;
    }

    .nav-links-list li {
        width: 100%;
        text-align: left;
    }

    .nav-links-list li a {
        display: block;
        padding: 0.5rem 0;
        font-size: 1.25rem;
    }
}