/* ============================================
   Fixes for Responsive Navbar/Slider & Services Section
   ============================================ */

/* ========== RESPONSIVE NAVBAR FIXES ========== */
@media (max-width: 991px) {
    .professional-header {
        position: relative;
    }
    
    .navbar-wrapper {
        position: relative;
    }
    
    /* Hide Bootstrap collapse menu on mobile - use offcanvas instead */
    .navbar-collapse {
        display: none !important;
    }
    
    /* Show offcanvas menu */
    #offcanvas-menu {
        display: block !important;
    }
    
    .navbar-nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        width: 100%;
    }
    
    .nav-item {
        width: 100%;
    }
    
    .nav-link {
        padding: 15px 0 !important;
        border-bottom: 1px solid #f0f0f0;
        width: 100%;
        display: block;
    }
    
    .nav-link::after {
        display: none;
    }
    
    .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        margin-top: 10px;
        box-shadow: none;
        border: none;
        background: #f8f8f8;
        padding: 10px 0;
    }
    
    .dropdown-item {
        padding: 12px 20px;
    }
}

/* Top bar responsive fixes */
@media (max-width: 991px) {
    .top-bar-left .contact-info {
        gap: 15px;
        font-size: 13px;
        flex-wrap: wrap;
    }
    
    .top-bar-right {
        text-align: left;
        margin-top: 10px;
    }
    
    .top-bar-right .social-links {
        gap: 8px;
        justify-content: flex-start;
    }
    
    .top-bar-right .social-links li a {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

/* Hero slider responsive fixes */
@media (max-width: 991px) {
    .hero-slider {
        margin-top: 0;
    }
    
    .hero-title {
        font-size: 2.5rem !important;
    }
    
    .hero-subtitle {
        font-size: 1.1rem !important;
    }
    
    .hero-slide {
        height: 550px !important;
    }
    
    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        width: 45px;
        height: 45px;
    }
    
    #heroCarousel .carousel-control-prev {
        left: 15px;
    }
    
    #heroCarousel .carousel-control-next {
        right: 15px;
    }
    
    #heroCarousel .carousel-indicators {
        bottom: 20px;
    }
}

@media (max-width: 767px) {
    .top-bar {
        padding: 8px 0;
    }
    
    .top-bar-left .contact-info {
        flex-direction: column;
        gap: 8px;
        font-size: 12px;
    }
    
    .main-navigation {
        padding: 12px 0;
    }
    
    .navbar-brand img {
        max-height: 50px;
    }
    
    .hero-title {
        font-size: 2rem !important;
    }
    
    .hero-subtitle {
        font-size: 1rem !important;
        margin-bottom: 25px;
    }
    
    .btn-hero {
        padding: 12px 35px;
        font-size: 14px;
    }
    
    .hero-slide {
        height: 450px !important;
    }
    
    .hero-content {
        padding: 20px 15px;
    }
    
    #heroCarousel .carousel-control-prev,
    #heroCarousel .carousel-control-next {
        width: 40px;
        height: 40px;
    }
    
    #heroCarousel .carousel-control-prev {
        left: 10px;
    }
    
    #heroCarousel .carousel-control-next {
        right: 10px;
    }
}

/* ========== SERVICES SECTION FIXES ========== */
.finance-section {
    padding: 80px 0;
}

.finance-section .finance-wrapper {
    background: #fff !important;
    padding: 40px 30px !important;
    border-radius: 8px !important;
    text-align: center !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    overflow: visible !important;
    min-height: 350px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
}

/* Override the ::before pseudo-element that might be covering icons */
.finance-section .finance-wrapper.wrapper-one::before,
.finance-section .finance-wrapper.wrapper-two::before,
.finance-section .finance-wrapper.wrapper-three::before {
    opacity: 0 !important;
    visibility: hidden !important;
    z-index: -1 !important;
    display: none !important;
}

.finance-section .finance-wrapper:hover {
    transform: translateY(-10px) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15) !important;
    background: #fff !important;
}

/* Ensure wrapper background stays white on hover - override the background image */
.finance-section .finance-wrapper:hover.wrapper-one::before,
.finance-section .finance-wrapper:hover.wrapper-two::before,
.finance-section .finance-wrapper:hover.wrapper-three::before {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
}

/* Ensure all content stays above any background */
.finance-section .finance-wrapper .caption,
.finance-section .finance-wrapper h3,
.finance-section .finance-wrapper p,
.finance-section .finance-wrapper .link {
    position: relative !important;
    z-index: 10 !important;
}

.finance-section .finance-wrapper .caption {
    position: relative !important;
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    background-color: #f36d38 !important;
    margin: 0 auto 25px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: visible !important;
    z-index: 10 !important;
}

/* Override original CSS that might be hiding icons - remove padding-top */
.finance-section .finance-wrapper .caption img {
    padding-top: 0 !important;
    padding: 0 !important;
}

/* Make sure caption container doesn't hide overflow */
.finance-section .finance-wrapper .caption {
    overflow: visible !important;
}

/* Default icon - always visible */
.finance-section .finance-wrapper .caption > img {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 45px !important;
    height: auto !important;
    max-width: 45px !important;
    max-height: 45px !important;
    padding: 0 !important;
    padding-top: 0 !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 2 !important;
    display: block !important;
    object-fit: contain !important;
}

/* Ensure default icons are visible even if some files are missing */
.finance-section .finance-wrapper .caption img:not(.hover-icon img) {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Hover icon container */
.finance-section .finance-wrapper .caption .hover-icon {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    width: 45px !important;
    height: 45px !important;
    padding: 0 !important;
    margin: 0 !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: all 0.3s ease !important;
    z-index: 3 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Hover icon image */
.finance-section .finance-wrapper .caption .hover-icon img {
    width: 45px !important;
    height: auto !important;
    max-width: 45px !important;
    max-height: 45px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: block !important;
    object-fit: contain !important;
}

/* On hover - hide default icon, show hover icon */
.finance-section .finance-wrapper:hover .caption {
    background-color: #fff !important;
}

.finance-section .finance-wrapper:hover .caption > img {
    opacity: 0 !important;
    visibility: hidden !important;
    transform: translate(-50%, -50%) scale(0.8) !important;
}

.finance-section .finance-wrapper:hover .caption .hover-icon {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, -50%) scale(1) !important;
}

.finance-section .finance-wrapper:hover .caption .hover-icon img {
    opacity: 1 !important;
    visibility: visible !important;
}

.finance-section .finance-wrapper h3 {
    color: #333 !important;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
    transition: color 0.3s ease;
}

/* Override white text on hover - keep dark text */
.finance-section .finance-wrapper:hover h3 {
    color: #f36d38 !important;
}

.finance-section .finance-wrapper p {
    color: #666 !important;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

/* Override white text on hover - keep readable dark text */
.finance-section .finance-wrapper:hover p {
    color: #555 !important;
}

.finance-section .finance-wrapper .link {
    color: #f36d38 !important;
    font-weight: 600;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    display: inline-block;
}

.finance-section .finance-wrapper .link:hover {
    color: #e55a2b !important;
    text-decoration: none;
    transform: translateX(5px);
}

/* Responsive fixes for services */
@media (max-width: 991px) {
    .finance-section .finance-wrapper {
        margin-bottom: 30px;
        min-height: auto;
    }
}

@media (max-width: 767px) {
    .finance-section {
        padding: 60px 0;
    }
    
    .finance-section .finance-wrapper {
        padding: 30px 20px;
        margin-bottom: 25px;
    }
    
    .finance-section .finance-wrapper .caption {
        width: 100px;
        height: 100px;
        margin-bottom: 20px;
    }
    
    .finance-section .finance-wrapper .caption img,
    .finance-section .finance-wrapper .caption .hover-icon {
        width: 70px;
    }
    
    .finance-section .finance-wrapper h3 {
        font-size: 20px;
    }
    
    .finance-section .finance-wrapper p {
        font-size: 14px;
    }
}

/* Ensure text is visible */
.finance-section .section-title h2 {
    color: #333 !important;
}

.finance-section .section-title p {
    color: #666 !important;
}
