/**
 * Advanced Modern Styling
 * Enhanced visual improvements for specific components
 */

/* Enhanced Preloader */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 1;
    transition: opacity 0.6s ease;
}

.loader-container {
    text-align: center;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

.loader-text {
    color: #ffffff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Enhanced Header */
#header {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

#header.header-scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Enhanced Navigation */
#mainnav ul li {
    position: relative;
}

#mainnav ul li a {
    padding: 10px 20px;
    font-weight: 500;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 6px;
    position: relative;
    overflow: hidden;
}

#mainnav ul li a::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transition: all 0.3s ease;
    z-index: -1;
    border-radius: 6px;
}

#mainnav ul li a:hover::before,
#mainnav ul li.current_page_item a::before {
    left: 0;
}

#mainnav ul li a:hover,
#mainnav ul li.current_page_item a {
    color: #ffffff;
    transform: translateY(-2px);
}

/* Enhanced Revolution Slider */
.rev_slider_wrapper {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.title-slide {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 800;
    line-height: 1.2;
}

.sub-title.position {
    background: rgba(255, 255, 255, 0.9);
    padding: 8px 16px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
    display: inline-block;
    color: #333 !important;
    font-weight: 600;
}

/* Enhanced Icon Boxes */
.iconbox.style3 {
    background: #ffffff;
    border-radius: 20px;
    padding: 3rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
}

.iconbox.style3::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    transform: scaleX(0);
    transition: transform 0.4s ease;
    transform-origin: left;
}

.iconbox.style3:hover::before {
    transform: scaleX(1);
}

.iconbox.style3:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.iconbox.style3 .box-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    transition: all 0.4s ease;
    position: relative;
}

.iconbox.style3 .box-icon::before {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.iconbox.style3:hover .box-icon {
    transform: scale(1.1) rotate(10deg);
}

.iconbox.style3:hover .box-icon::before {
    opacity: 0.2;
}

.iconbox.style3 .box-icon i {
    font-size: 2.5rem;
    color: #ffffff;
    transition: all 0.4s ease;
}

.iconbox.style3:hover .box-icon i {
    transform: scale(1.1);
}

.iconbox.style3 .box-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #333;
}

.iconbox.style3 .box-title a {
    color: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0;
    animation: none;
}

.iconbox.style3:hover .box-title a {
    opacity: 1;
    animation: textGradient 0.5s ease;
}

@keyframes textGradient {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

.iconbox.style3 p {
    color: #666;
    line-height: 1.8;
    font-size: 1rem;
}

/* Enhanced Buttons */
.flat-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 50px;
    padding: 15px 35px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
    color: #ffffff !important;
    text-decoration: none;
}

.flat-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
    color: #ffffff !important;
}

.flat-button.style2 {
    background: transparent;
    border: 2px solid #ffffff;
    color: #ffffff !important;
    box-shadow: none;
}

.flat-button.style2:hover {
    background: #ffffff;
    color: #333 !important;
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.3);
}

/* Enhanced Sections */
.flat-row {
    padding: 6rem 0;
    position: relative;
}

.flat-row.section-iconbox {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    position: relative;
}

.flat-row.section-iconbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.flat-row.v4.bg-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.flat-row.v4.bg-section .title,
.flat-row.v4.bg-section .sub-title {
    color: #ffffff;
}

/* Enhanced Title Sections */
.title-section.style3 .title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.title-section .sub-title.style3 {
    font-size: 1.2rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 3rem;
}

/* Go Top Button Enhancement */
.go-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.go-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.go-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(102, 126, 234, 0.4);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    .title-section.style3 .title {
        font-size: 2.2rem;
    }
    
    .iconbox.style3 {
        padding: 2rem 1.5rem;
        margin-bottom: 2rem;
    }
    
    .iconbox.style3 .box-icon {
        width: 70px;
        height: 70px;
    }
    
    .iconbox.style3 .box-icon i {
        font-size: 2rem;
    }
    
    .flat-row {
        padding: 4rem 0;
    }
    
    .flat-button {
        padding: 12px 25px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .title-section.style3 .title {
        font-size: 1.8rem;
    }
    
    .iconbox.style3 {
        padding: 1.5rem 1rem;
    }
    
    .go-top {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
    }
}