/* ===================================
   GlassTime - Section Spacing & Layout Fixes
   =================================== */

/* ====================
   Section Spacing Fixes
   ==================== */

/* Stats Section - Fixed positioning */
section.no-bottom.bg-transparent {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

section.no-bottom.bg-transparent + section {
    margin-top: 0 !important;
    padding-top: 100px !important;
}

/* About Section */
section.relative {
    padding-top: 80px;
    padding-bottom: 80px;
    position: relative;
    overflow: visible;
}

/* Expertise Skills Section */
section.relative + section.relative {
    padding-top: 60px;
}

/* Ensure sections don't overlap */
section {
    position: relative;
    clear: both;
}

/* ====================
   Counter Fixes
   ==================== */

/* Counter container */
.de_count {
    position: relative;
    z-index: 1;
    padding: 10px 0;
}

.de_count h3 {
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.de_count h3 span.timer {
    display: inline;
}

/* Counter title/label */
.de_count h3 + * {
    font-size: 14px;
    opacity: 0.9;
}

/* ====================
   Progress Bar Fixes
   ==================== */

/* Progress bar container */
.skill-bar {
    position: relative;
    margin-bottom: 30px;
    z-index: 1;
}

.skill-bar h5 {
    margin-bottom: 15px;
    font-weight: 600;
}

/* Progress bar wrapper */
.de-progress {
    position: relative;
    height: 8px;
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: visible;
    margin-bottom: 10px;
}

/* Progress bar itself */
.de-progress .progress-bar {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #2C5F8D 0%, #4A90E2 100%);
    border-radius: 10px;
    width: 0;
    transition: width 1.5s ease-out;
}

html[dir="rtl"] .de-progress .progress-bar {
    left: auto;
    right: 0;
}

/* Progress value label */
.de-progress .value {
    position: absolute;
    top: -30px;
    right: 0;
    font-size: 14px;
    font-weight: 600;
    color: #2C5F8D;
}

html[dir="rtl"] .de-progress .value {
    right: auto;
    left: 0;
}

/* Ensure progress bars don't overflow their container */
.skill-bar.style-2 {
    overflow: visible;
    padding-bottom: 10px;
}

/* ====================
   Stats Card Positioning
   ==================== */

.mt-min-150 {
    margin-top: -150px !important;
}

/* Ensure stats card has proper z-index */
.bg-color.relative.z-2 {
    z-index: 2;
    position: relative;
}

/* Stats card shadow */
.bg-color.relative.z-2.shadow {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* ====================
   RTL Specific Fixes
   ==================== */

html[dir="rtl"] .ps-5 {
    padding-left: 0 !important;
    padding-right: 3rem !important;
}

html[dir="rtl"] .start-40px {
    left: auto !important;
    right: 40px !important;
}

/* ====================
   Mobile Navbar Logo Fix
   - Prevent showing 2 logos on mobile (logo-main + logo-mobile)
   - Keep only .logo-mobile for small screens
   ==================== */

@media (max-width: 991px){
    header #logo img.logo-main,
    header #logo img.logo-scroll{
        display: none !important;
    }
    header #logo img.logo-mobile{
        display: inline-block !important;
    }
}

html[dir="rtl"] .me-3 {
    margin-right: 0 !important;
    margin-left: 1rem !important;
}

html[dir="rtl"] .ms-2 {
    margin-left: 0 !important;
    margin-right: 0.5rem !important;
}

/* ====================
   Gradient Edge Fixes
   ==================== */

.gradient-edge-top,
.gradient-edge-bottom {
    pointer-events: none;
    z-index: 1;
}

section {
    position: relative;
    z-index: 2;
}

/* ====================
   Mobile Responsive Fixes
   ==================== */

@media (max-width: 991px) {
    section.relative {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    section.no-bottom.bg-transparent + section {
        padding-top: 80px !important;
    }
    
    .mt-min-150 {
        margin-top: -100px !important;
    }
}

@media (max-width: 767px) {
    section.relative {
        padding-top: 40px;
        padding-bottom: 40px;
    }
    
    section.no-bottom.bg-transparent + section {
        padding-top: 60px !important;
    }
    
    .mt-min-150 {
        margin-top: -80px !important;
    }
    
    .de_count h3 {
        font-size: 32px !important;
    }
    
    .skill-bar {
        margin-bottom: 25px;
    }
}

/* ====================
   Counter Animation Enhancement
   ==================== */

.de_count.wow.fadeInRight {
    opacity: 0;
    animation-fill-mode: both;
}

.de_count.wow.fadeInRight.animated {
    opacity: 1;
}

/* ====================
   Testimonials Section Spacing
   ==================== */

.bg-color-op-2 {
    padding-top: 80px;
    padding-bottom: 80px;
}

@media (max-width: 767px) {
    .bg-color-op-2 {
        padding-top: 60px;
        padding-bottom: 60px;
    }
}

/* ====================
   Fix for Overlapping Elements
   ==================== */

.container.relative.z-2 {
    z-index: 2;
    position: relative;
}

/* Ensure proper stacking context */
section > .container {
    position: relative;
    z-index: 2;
}

/* ====================
   Button and Interactive Elements
   ==================== */

.btn-main {
    z-index: 3;
    position: relative;
}

/* ====================
   Text and Typography
   ==================== */

h2, h3, h4, h5 {
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

/* ====================
   Image and Media Fixes
   ==================== */

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

/* ====================
   Utility Classes
   ==================== */

.overflow-visible {
    overflow: visible !important;
}

.overflow-hidden {
    overflow: hidden !important;
}

.z-1 { z-index: 1 !important; }
.z-2 { z-index: 2 !important; }
.z-3 { z-index: 3 !important; }

/* ====================
   Smooth Animations
   ==================== */

.timer,
.progress-bar,
.de_count {
    will-change: transform, opacity;
}

/* ====================
   Fix for WOW Animations
   ==================== */

.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible;
}
