html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

:root {
    --primary-color: #14631f;
    --active-color: #12591c;
}

.text-primary {
    color: var(--primary-color);
}

.bg-primary {
    background-color: var(--primary-color);
}

.hover\:text-primary:hover {
    color: var(--primary-color);
}

.hover\:bg-primary-dark:hover {
    background-color: var(--active-color);
}

.bg-primary-dark {
    background-color: var(--active-color);
}

.nav-active {
    color: var(--active-color);
}

.hero-slide {
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 1.5s;
    pointer-events: none;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.hero-text {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.4, 0, 0.2, 1), transform 1.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.hero-slide.active .hero-text {
    opacity: 1;
    transform: translateY(0);
}

.hero-text-delay-1 {
    transition-delay: 0.3s;
}

.hero-text-delay-2 {
    transition-delay: 0.6s;
}

.hero-text-delay-3 {
    transition-delay: 0.9s;
}

/* Smooth fade transitions */
.hero-slide:not(.active) .hero-text {
    opacity: 0;
    transform: translateY(30px);
    transition-delay: 0s;
}

/* Ensure background image displays properly */
.hero-slide > div:first-child {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100%;
}

/* Tab styles */
.tab-button {
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--active-color);
    border-bottom: 3px solid var(--active-color);
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Bottom Sheet Menu */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-sheet {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-radius: 24px 24px 0 0;
    z-index: 50;
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
}

.mobile-menu-sheet.active {
    transform: translateY(0);
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-close {
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-content {
    padding: 24px;
}

.mobile-menu-item {
    display: block;
    padding: 12px 0;
    color: var(--primary-color);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid #f3f4f6;
    transition: color 0.2s ease;
}

.mobile-menu-item:last-child {
    border-bottom: none;
}

.mobile-menu-item:hover {
    color: var(--active-color);
}

.mobile-menu-buttons {
    padding: 24px;
    padding-top: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mobile-menu-button {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.mobile-menu-button-login {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    background: transparent;
}

.mobile-menu-button-register {
    background: var(--primary-color);
    color: white;
}

.mobile-menu-button-register:hover {
    background: var(--active-color);
}

/* Sidebar Menu Arrow (Chevron) Styling - Green */
.sidebar .sidebar-menu .menu-arrow::before {
    border-right-color: var(--primary-color) !important;
    border-bottom-color: var(--primary-color) !important;
}

/* When menu is active, chevron should be white */
.sidebar .sidebar-menu > ul li.submenu > a.coms_active .menu-arrow::before,
.sidebar .sidebar-menu > ul li.submenu > a.subdrop .menu-arrow::before {
    border-right-color: #ffffff !important;
    border-bottom-color: #ffffff !important;
}

/* Submenu items - no background by default, only active items get gray background */
.sidebar .sidebar-menu > ul li .submenu > ul li {
    background: transparent !important;
}

.sidebar .sidebar-menu > ul li .submenu > ul li a {
    background: transparent !important;
}

/* Only active submenu item gets gray background */
.sidebar .sidebar-menu > ul li .submenu > ul li.active {
    background: #E8E9EA !important;
    border-radius: 5px;
}

.sidebar .sidebar-menu > ul li .submenu > ul li.active a {
    background: #E8E9EA !important;
    border-radius: 5px;
    color: #14631f !important;
}

/* Mobile Header Logo - Centered */
@media (max-width: 991.98px) {
    .header .header-left {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
    }
    
    .header .header-left .logo,
    .header .header-left .dark-logo {
        display: flex;
        justify-content: center;
        align-items: center;
    }
    
    .header .header-left .logo img,
    .header .header-left .dark-logo img {
        margin: 0 auto;
    }
}

/* Sticky Action Column for DataTables - Always visible on right */
.tendersTable,
.madsTable {
    width: 100% !important;
}

.tendersTable thead th.sticky-action-column,
.tendersTable tbody td.sticky-action-column,
.madsTable thead th.sticky-action-column,
.madsTable tbody td.sticky-action-column {
    position: sticky;
    right: 0;
    background-color: #fff;
    z-index: 10;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    min-width: 280px;
    width: 280px;
    white-space: nowrap;
}

.tendersTable thead th.sticky-action-column,
.madsTable thead th.sticky-action-column {
    background-color: #14631f;
    color: #fff;
    z-index: 11;
    position: sticky;
    top: 0;
    right: 0;
}

.tendersTable tbody td.sticky-action-column,
.madsTable tbody td.sticky-action-column {
    position: sticky;
    right: 0;
    background-color: #fff;
}

.tendersTable tbody tr:hover td.sticky-action-column,
.madsTable tbody tr:hover td.sticky-action-column {
    background-color: #f8f9fa;
}

/* Ensure table container allows horizontal scroll but action column stays visible */
.custom-datatable-filter {
    overflow-x: auto;
    position: relative;
}

/* Make sure DataTables wrapper doesn't interfere */
.dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
}

/* Ensure action buttons don't wrap */
.tendersTable .d-flex.flex-nowrap,
.madsTable .d-flex.flex-nowrap {
    white-space: nowrap;
    flex-wrap: nowrap;
}

.tendersTable .d-flex.flex-nowrap .btn,
.madsTable .d-flex.flex-nowrap .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

