/**
 * Natex Extracts - Component Styles
 */

/* Preloader */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader-content {
    text-align: center;
}

.spinner {
    width: 60px;
    height: 60px;
    position: relative;
    margin: 0 auto 20px;
}

.double-bounce1, .double-bounce2 {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: var(--primary-color);
    opacity: 0.6;
    position: absolute;
    top: 0;
    left: 0;
    animation: bounce 2s infinite ease-in-out;
}

.double-bounce2 {
    animation-delay: -1.0s;
}

@keyframes bounce {
    0%, 100% { 
        transform: scale(0.0);
    } 
    50% { 
        transform: scale(1.0);
    }
}

.preloader-logo {
    max-width: 200px;
    margin: 0 auto;
}

.preloader-logo img {
    max-width: 100%;
    height: auto;
}

.preloader-text {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

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

/* Back to Top Button */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 99;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-5px);
}

/* Social Icons */
.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: white;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Contact Form */
.contact-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-form .form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.contact-form .form-group {
    margin-bottom: 20px;
    width: 100%;
}

.contact-form .form-group.half {
    width: calc(50% - 10px);
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.contact-form .required {
    color: #e74c3c;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 2px rgba(77, 156, 45, 0.2);
}

.contact-form .submit-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-form .submit-button:hover {
    background-color: var(--primary-color-dark);
    transform: translateY(-2px);
}

.contact-form .button-icon {
    margin-left: 10px;
    transition: transform 0.3s ease;
}

.contact-form .submit-button:hover .button-icon {
    transform: translateX(5px);
}

.contact-form .submit-button.loading {
    position: relative;
    color: transparent;
}

.contact-form .submit-button.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s infinite linear;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.contact-form .form-message {
    margin-top: 20px;
    min-height: 30px;
}

.contact-form .success-message {
    padding: 10px 15px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 5px;
}

.contact-form .error-message {
    padding: 10px 15px;
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 5px;
}

/* Testimonials Slider */
.testimonials-section {
    padding: 60px 0;
    background-color: #f8fdf9;
}

.testimonials-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.testimonials-slider {
    position: relative;
    overflow: hidden;
    margin-bottom: 30px;
}

.testimonial-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.testimonial-slide:first-child {
    position: relative;
    opacity: 1;
}

.testimonial-content {
    background-color: white;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    position: relative;
}

.testimonial-quote {
    position: relative;
    padding-bottom: 20px;
}

.quote-icon {
    position: absolute;
    top: -20px;
    left: -10px;
    color: var(--primary-color);
}

.testimonial-quote p {
    font-size: 18px;
    line-height: 1.6;
    font-style: italic;
    color: #555;
}

.testimonial-author {
    display: flex;
    align-items: center;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

.author-info h4 {
    margin: 0 0 5px;
    font-size: 18px;
    color: #333;
}

.author-info p {
    margin: 0;
    font-size: 14px;
    color: #777;
}

.testimonial-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.testimonial-prev,
.testimonial-next {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.testimonial-prev:hover,
.testimonial-next:hover {
    background-color: var(--primary-color);
    color: white;
}

.testimonial-dots {
    display: flex;
    gap: 10px;
}

.testimonial-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.testimonial-dot.active {
    background-color: var(--primary-color);
    transform: scale(1.2);
}

/* FAQ Accordion */
.faq-section {
    padding: 60px 0;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

.faq-accordion {
    margin-top: 40px;
}

.faq-item {
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    background-color: white;
}

.faq-question {
    width: 100%;
    background-color: white;
    border: none;
    padding: 20px;
    text-align: left;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-icon {
    transition: transform 0.3s ease;
    color: var(--primary-color);
}

.faq-question[aria-expanded="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    overflow: hidden;
    height: 0;
    transition: height 0.3s ease;
}

.faq-answer p {
    padding: 0 20px 20px;
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .contact-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .contact-form .form-group.half {
        width: 100%;
    }
    
    .testimonial-content {
        padding: 30px 20px;
    }
    
    .testimonial-quote p {
        font-size: 16px;
    }
    
    #back-to-top {
        bottom: 20px;
        right: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 480px) {
    .testimonial-controls {
        gap: 10px;
    }
    
    .testimonial-prev,
    .testimonial-next {
        width: 30px;
        height: 30px;
    }
    
    .faq-question {
        font-size: 16px;
        padding: 15px;
    }
    
    .social-icons {
        justify-content: center;
    }
}