/* ===== FIXES FOR ICON COLORS ===== */

/* Fix for icons in card headers */
.card-header {
    background-color: var(--primary-color);
    color: white;
}

.card-header h5,
.card-header h6 {
    color: white !important;
}

.card-header i,
.card-header .fas,
.card-header .fa,
.card-header .far,
.card-header .fab {
    color: white !important;
}

/* Fix for icons on colored backgrounds */
.bg-primary i,
.bg-primary .fas,
.bg-primary .fa,
.bg-primary .far,
.bg-primary .fab,
.bg-success i,
.bg-success .fas,
.bg-success .fa,
.bg-success .far,
.bg-success .fab,
.bg-info i,
.bg-info .fas,
.bg-info .fa,
.bg-info .far,
.bg-info .fab,
.bg-danger i,
.bg-danger .fas,
.bg-danger .fa,
.bg-danger .far,
.bg-danger .fab,
.bg-dark i,
.bg-dark .fas,
.bg-dark .fa,
.bg-dark .far,
.bg-dark .fab {
    color: white !important;
}

/* Fix for text on colored backgrounds */
.bg-primary h1,
.bg-primary h2,
.bg-primary h3,
.bg-primary h4,
.bg-primary h5,
.bg-primary h6,
.bg-success h1,
.bg-success h2,
.bg-success h3,
.bg-success h4,
.bg-success h5,
.bg-success h6,
.bg-info h1,
.bg-info h2,
.bg-info h3,
.bg-info h4,
.bg-info h5,
.bg-info h6,
.bg-danger h1,
.bg-danger h2,
.bg-danger h3,
.bg-danger h4,
.bg-danger h5,
.bg-danger h6,
.bg-dark h1,
.bg-dark h2,
.bg-dark h3,
.bg-dark h4,
.bg-dark h5,
.bg-dark h6 {
    color: white !important;
}

/* Special case for warning background (yellow) */
.bg-warning i,
.bg-warning .fas,
.bg-warning .fa,
.bg-warning .far,
.bg-warning .fab {
    color: var(--text-dark) !important;
}

.bg-warning h1,
.bg-warning h2,
.bg-warning h3,
.bg-warning h4,
.bg-warning h5,
.bg-warning h6 {
    color: var(--text-dark) !important;
}

/* ===== MOBILE MENU FIXES ===== */

/* Ensure mobile menu dropdowns work properly */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: white;
        border-radius: 8px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        margin-top: 10px;
        padding: 15px;
    }
    
    .mega-dropdown .mega-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .mega-dropdown .mega-menu .container {
        padding: 0 !important;
    }
    
    .mega-dropdown .mega-menu .row {
        margin: 0 !important;
    }
    
    .mega-dropdown .mega-menu .col-lg-3 {
        padding: 10px 0 !important;
        border-bottom: 1px solid #eee;
    }
    
    .mega-dropdown .mega-menu .col-lg-3:last-child {
        border-bottom: none;
    }
    
    .dropdown-header {
        font-weight: bold !important;
        color: var(--primary-color) !important;
        padding: 8px 0 !important;
        margin-bottom: 5px !important;
    }
    
    .dropdown-item {
        padding: 8px 15px !important;
        color: var(--text-dark) !important;
        border-radius: 4px !important;
        margin: 2px 0 !important;
    }
    
    .dropdown-item:hover,
    .dropdown-item:focus {
        background-color: var(--primary-color) !important;
        color: white !important;
    }
    
    /* Fix for regular dropdown menus on mobile */
    .dropdown-menu {
        position: static !important;
        transform: none !important;
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
    }
    
    .dropdown-menu .dropdown-item {
        padding: 8px 15px !important;
        color: var(--text-dark) !important;
        border-radius: 4px !important;
        margin: 2px 0 !important;
    }
    
    .dropdown-menu .dropdown-item:hover,
    .dropdown-menu .dropdown-item:focus {
        background-color: var(--primary-color) !important;
        color: white !important;
    }
    
    /* Ensure dropdown toggles don't close menu */
    .nav-link.dropdown-toggle {
        cursor: pointer !important;
    }
    
    .nav-link.dropdown-toggle::after {
        transition: transform 0.3s ease !important;
    }
    
    .nav-link.dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg) !important;
    }
}

/* ===== MOBILE MENU ANIMATION ===== */
.navbar-collapse {
    transition: all 0.3s ease-in-out !important;
}

.mega-menu {
    transition: all 0.3s ease-in-out !important;
}

.dropdown-menu {
    transition: all 0.3s ease-in-out !important;
}

/* Fix for buttons with icons */
.btn-primary i,
.btn-primary .fas,
.btn-primary .fa,
.btn-primary .far,
.btn-primary .fab,
.btn-success i,
.btn-success .fas,
.btn-success .fa,
.btn-success .far,
.btn-success .fab,
.btn-info i,
.btn-info .fas,
.btn-info .fa,
.btn-info .far,
.btn-info .fab,
.btn-danger i,
.btn-danger .fas,
.btn-danger .fa,
.btn-danger .far,
.btn-danger .fab,
.btn-dark i,
.btn-dark .fas,
.btn-dark .fa,
.btn-dark .far,
.btn-dark .fab {
    color: white !important;
}

/* Fix for buttons with outline */
.btn-outline-primary:hover i,
.btn-outline-primary:hover .fas,
.btn-outline-success:hover i,
.btn-outline-success:hover .fas,
.btn-outline-info:hover i,
.btn-outline-info:hover .fas,
.btn-outline-danger:hover i,
.btn-outline-danger:hover .fas,
.btn-outline-dark:hover i,
.btn-outline-dark:hover .fas {
    color: white !important;
}

/* Fix for section-primary text */
.section-primary {
    color: white !important;
}

.section-primary h1,
.section-primary h2,
.section-primary h3,
.section-primary h4,
.section-primary h5,
.section-primary h6,
.section-primary p,
.section-primary li,
.section-primary i,
.section-primary .fas,
.section-primary .fa,
.section-primary .far,
.section-primary .fab {
    color: white !important;
}

/* Fix for text-white-50 elements */
.text-white-50 i,
.text-white-50 .fas,
.text-white-50 .fa,
.text-white-50 .far,
.text-white-50 .fab {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Fix for icons in bg-primary with opacity */
.bg-primary.bg-opacity-10 i,
.bg-primary.bg-opacity-10 .fas,
.bg-primary.bg-opacity-10 .fa,
.bg-primary.bg-opacity-10 .far,
.bg-primary.bg-opacity-10 .fab {
    color: var(--primary-color) !important;
}

.bg-primary.bg-opacity-25 i,
.bg-primary.bg-opacity-25 .fas,
.bg-primary.bg-opacity-25 .fa,
.bg-primary.bg-opacity-25 .far,
.bg-primary.bg-opacity-25 .fab {
    color: var(--primary-color) !important;
}

/* Fix for layout issues */
.hero-buttons {
    gap: 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 1.5rem;
}

.hero-section {
    overflow: hidden;
    position: relative;
    min-height: 350px;
}

.hero-section .container {
    position: relative;
    z-index: 10;
}

/* Specific layout fixes for reported issues */
/* Fix for button cut off at bottom (Note 147) */
.btn {
    margin-bottom: 10px;
}

/* Fix for text cut off at top (Note 148) */
.card-body {
    padding-top: 1.5rem;
}

/* Fix for button overlapping text (Note 207) */
.card-footer {
    padding: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Fix for button cut off at bottom (Note 233) */
.container-fluid {
    padding-bottom: 2rem;
}