/**
 * Custom CSS for Success Training Theme
 * 
 * @package Flatsome Success Child
 * @since 1.0.0
 */

/* ==========================================================================
   Header Z-Index Fix
   ========================================================================== */

/* Ensure header stays on top */
#wrapper-navbar,
.header-wrapper,
.header,
.stuck,
.header-top,
.header-main,
.header-bottom {
    z-index: 1000 !important;
}

/* Main content below header */
#main,
.page-wrapper {
    position: relative;
    z-index: 1;
}

/* ==========================================================================
   Additional Custom Styles
   ========================================================================== */

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s, visibility 0.5s;
}

.preloader.loaded {
    opacity: 0;
    visibility: hidden;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.back-to-top:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    font-size: 20px;
}

/* Course Card Enhancements */
.course-item .box {
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.course-item .box:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.course-item .box-image {
    position: relative;
    overflow: hidden;
}

.course-item .box-image img {
    transition: transform 0.5s ease;
}

.course-item .box:hover .box-image img {
    transform: scale(1.1);
}

.course-item .course-title {
    margin: 15px 0 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.course-item .course-title a {
    color: var(--text-color);
    text-decoration: none;
}

.course-item .course-title a:hover {
    color: var(--primary-color);
}

.course-item .course-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin: 15px 0;
}

/* Team Member Card */
.team-member .box {
    text-align: center;
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
}

.team-member .box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.team-member .box-image {
    position: relative;
    overflow: hidden;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    margin: 0 auto 20px;
}

.team-member .box-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.team-member .box:hover .box-image img {
    transform: scale(1.1);
}

.team-member .team-name {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.team-member .team-position {
    color: var(--secondary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

.team-member .team-social a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    background: #f5f5f5;
    border-radius: 50%;
    margin: 0 5px;
    transition: all 0.3s ease;
}

.team-member .team-social a:hover {
    background: var(--primary-color);
    color: #fff;
    transform: translateY(-3px);
}

/* Testimonial Card */
.testimonial-item .box {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.testimonial-item .box:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.testimonial-item .testimonial-rating {
    color: #ffc107;
    margin-bottom: 15px;
}

.testimonial-item .testimonial-rating i {
    font-size: 18px;
}

.testimonial-item .testimonial-content {
    font-style: italic;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.8;
}

.testimonial-item .testimonial-author {
    display: flex;
    align-items: center;
    gap: 15px;
}

.testimonial-item .author-image {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    overflow: hidden;
}

.testimonial-item .author-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-item .author-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.testimonial-item .author-company {
    color: #999;
    font-size: 0.9rem;
}

/* FAQ Accordion Enhancements */
.accordion-item {
    background: #fff;
    transition: all 0.3s ease;
}

.accordion-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.accordion-item.is-open .accordion-title {
    background: var(--primary-color);
    color: #fff;
}

.accordion-item.is-open .accordion-title i {
    transform: rotate(180deg);
}

.accordion-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-title i {
    transition: transform 0.3s ease;
}

.accordion-inner {
    max-height: 0;
    overflow: hidden;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.accordion-item.is-open .accordion-inner {
    max-height: 500px;
    padding-top: 20px !important;
    padding-bottom: 20px !important;
}

/* CTA Banner */
.cta-banner {
    position: relative;
    background-size: cover;
    background-position: center;
    padding: 80px 40px;
    border-radius: 12px;
    overflow: hidden;
}

.cta-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.cta-content {
    position: relative;
    z-index: 2;
    color: #fff;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.cta-subtitle {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: #fff;
}

/* Icon Box Enhancements */
.icon-box {
    text-align: center;
    padding: 30px;
    transition: all 0.3s ease;
    border-radius: 8px;
}

.icon-box:hover {
    background: #f9f9f9;
    transform: translateY(-5px);
}

.icon-box-img {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
}

.icon-box-img img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.icon-box-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
}

.icon-box-text {
    color: #666;
    line-height: 1.6;
}

/* Section Title */
.section-title {
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.section-title p {
    font-size: 1.1rem;
    color: #666;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a,
.pagination span {
    display: inline-block;
    padding: 10px 15px;
    background: #f5f5f5;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.pagination a:hover,
.pagination span.current {
    background: var(--primary-color);
    color: #fff;
}

/* Search Form */
.search-form {
    position: relative;
}

.search-form input[type="search"] {
    width: 100%;
    padding: 12px 50px 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-form input[type="search"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.search-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: var(--primary-color);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: var(--secondary-color);
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 20px 0;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs span {
    margin: 0 10px;
    color: #999;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .cta-title {
        font-size: 1.8rem;
    }
    
    .team-member .box-image {
        width: 150px;
        height: 150px;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Print Styles */
@media print {
    .header-main,
    .footer,
    .back-to-top,
    .preloader {
        display: none !important;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to Content Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}
