/**
 * Custom Layout & Site Styling for GTL Web Portal
 * Theme Color Palette: Navy Blue (#06387e), Accent Blue (#0d6efd), Accent Amber (#ff9800)
 * Matching D:\gtl_demo_theme\1 specification
 */

/* Brand text color helpers */
.text-orange {
    color: #ff9800 !important;
}

.text-orange:hover {
    color: #e68900 !important;
    text-decoration: underline !important;
}

.hover-orange:hover {
    color: #acd0fc !important;
    text-decoration: underline !important;
}

/* Custom box shadow helper */
.shadow2 {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

/* Achievement list styling */
.achievement-list b {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    color: #06387e;
}

/* Smooth hover transition for rounded content cards */
.bg-white.border.rounded-4 {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.bg-white.border.rounded-4:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

/* Header Site Search Dropdown & Results Styling */
#siteSearchResults {
    top: 100%;
    right: 0;
    min-width: 280px;
}

.search-result-item {
    padding: 8px 12px;
    border-bottom: 1px solid #f1f1f1;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: #333;
    transition: background-color 0.2s;
}

.search-result-item:hover {
    background-color: #edf4ff;
    text-decoration: none;
    color: #06387e;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-title {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 2px;
}

.search-result-desc {
    font-size: 0.75rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.search-result-type {
    font-size: 0.65rem;
    text-transform: uppercase;
    background-color: #edf4ff;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: bold;
    color: #06387e;
    margin-left: 6px;
}

/* ==========================================================================
   Home Hero Banner Slider Styling
   ========================================================================== */
.banner-slide-wrapper {
    position: relative;
    overflow: hidden;
    width: 100%;
    height: auto;
}

.banner-caption-overlay {
    position: absolute;
    left: 5%;
    bottom: 12%;
    z-index: 10;
    max-width: 50%;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    animation: fadeInUp 0.8s ease-out;
}

.banner-title {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    color: #06387e;
    margin-bottom: 8px;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
    line-height: 1.25;
}

.banner-desc {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 400;
    color: #4a4a4a;
    margin: 0;
    font-size: 1.0rem;
    line-height: 1.45;
}

@media (max-width: 991.98px) {
    .banner-caption-overlay {
        max-width: 70%;
        bottom: 10%;
        padding: 16px 20px;
    }
    .banner-title {
        font-size: 1.35rem;
    }
    .banner-desc {
        font-size: 0.9rem;
    }
}

@media (max-width: 575.98px) {
    .banner-caption-overlay {
        max-width: 90%;
        left: 5%;
        bottom: 8%;
        padding: 12px 16px;
        border-radius: 8px;
    }
    .banner-title {
        font-size: 1.1rem;
        margin-bottom: 4px;
    }
    .banner-desc {
        font-size: 0.8rem;
    }
}

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

/* ==========================================================================
   Frontend Popup Modal Styling
   ========================================================================== */
.front-popup-modal .modal-content {
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid #06387e;
}

.front-popup-header {
    background: linear-gradient(135deg, #06387e 0%, #001a40 100%);
}

.front-popup-image {
    max-height: 70vh;
    object-fit: contain;
    background: #f8f9fa;
}

.front-popup-html {
    line-height: 1.7;
}

/* ==========================================================================
   Dynamic Page Sub-Content & List Group Hover Styling
   ========================================================================== */
.bg-hover-light {
    transition: all 0.25s ease-in-out !important;
    border-left: 4px solid transparent !important;
}

.bg-hover-light:hover {
    background-color: #edf4ff !important;
    padding-left: 1.5rem !important;
    border-left: 4px solid #06387e !important;
}

.menu-item-text {
    color: #333333;
    transition: color 0.2s ease-in-out;
}

.bg-hover-light:hover .menu-item-text {
    color: #06387e !important;
}

.font-weight-500 {
    font-weight: 500 !important;
}

.font-weight-bold {
    font-weight: 700 !important;
}

/* ==========================================================================
   Prevent scroll-top button from overlapping with bottom-right chatbot widget (Desktop)
   ========================================================================== */
.scroll-top {
    left: 20px !important;
    right: auto !important;
    bottom: 20px !important;
}

/* ==========================================================================
   Mobile Floating Action Buttons (Scroll-Top & Accessibility Widget)
   Fix for mobile view: Prevent buttons from covering content / text on narrow screens
   ========================================================================== */
@media (max-width: 768px) {
    .scroll-top {
        left: auto !important;
        right: 14px !important;
        bottom: 14px !important;
        width: 36px !important;
        height: 36px !important;
        border-radius: 50% !important;
        z-index: 1000 !important;
    }

    .scroll-top i {
        font-size: 20px !important;
    }

    .uw-widget-custom-trigger {
        right: 14px !important;
        bottom: 58px !important;
        width: 36px !important;
        height: 36px !important;
        max-width: 36px !important;
        padding: 7px !important;
        border-radius: 50% !important;
        z-index: 1000 !important;
    }

    .uw-widget-custom-trigger img {
        width: 20px !important;
        height: 20px !important;
    }

    .uw-widget-custom-trigger span {
        display: none !important;
    }
}

/* ==========================================================================
   Tender Section & Tab Styling (Theme 1 Palette)
   ========================================================================== */
.tender-pills .nav-link {
    color: #495057;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 50rem;
    font-weight: 600;
    padding: 0.45rem 1.15rem;
    font-size: 0.88rem;
    transition: all 0.25s ease;
}

.tender-pills .nav-link:hover {
    background-color: #edf4ff;
    color: #06387e;
    border-color: #06387e;
}

.tender-pills .nav-link.active {
    background-color: #06387e !important;
    color: #ffffff !important;
    border-color: #06387e !important;
    box-shadow: 0 4px 12px rgba(6, 56, 126, 0.25);
}

.tender-pills .nav-link.active .badge {
    background-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
    border-color: transparent !important;
}

.tender-card {
    border: 1px solid #eef0f3;
    background-color: #ffffff;
    border-radius: 0.75rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.tender-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    border-color: #06387e;
}

.tender-title a {
    color: #1a1a1a;
    line-height: 1.4;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tender-title a:hover {
    color: #06387e;
}

.tender-btn-sm {
    border: 1px solid #06387e;
    color: #06387e;
    background-color: transparent;
    border-radius: 50rem;
    padding: 0.32rem 0.85rem;
    font-size: 0.8rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.tender-btn-sm:hover {
    background-color: #06387e;
    border-color: #06387e;
    color: #ffffff;
}

.gem-notice-card {
    background: #edf4ff;
    border-left: 5px solid #06387e !important;
    border-radius: 0.75rem;
}

.gem-notice-icon {
    width: 42px;
    height: 42px;
    background: rgba(6, 56, 126, 0.15);
    color: #06387e;
    font-size: 1.3rem;
}

.tender-search-input:focus {
    border-color: #06387e;
    box-shadow: 0 0 0 0.2rem rgba(6, 56, 126, 0.2);
}

/* ==========================================================================
   Tender Details Page Styling
   ========================================================================== */
.tender-detail-card {
    background-color: #ffffff;
    border: 1px solid #eef0f3;
    border-radius: 0.85rem;
}

.tender-detail-title {
    color: #06387e;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}

.tender-meta-bar {
    background-color: #f8f9fa;
    border: 1px solid #eef0f3;
    border-radius: 0.5rem;
    padding: 0.65rem 1rem;
}

.tender-doc-card {
    background-color: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease;
}

.tender-doc-card:hover {
    background-color: #edf4ff;
    border-color: #06387e;
    transform: translateX(3px);
}

.tender-doc-badge {
    background-color: #edf4ff;
    color: #06387e;
    font-weight: 700;
    font-size: 0.75rem;
    border: 1px solid #b8d5ff;
    border-radius: 0.25rem;
    padding: 0.2rem 0.5rem;
}

.tender-doc-link {
    color: #1a1a1a;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.tender-doc-link:hover {
    color: #06387e;
}

/* ==========================================================================
   Achievements Grid Styling (.achievements3 - Theme 1 Specification)
   ========================================================================== */
.achievements3 .card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    border-radius: 0.75rem;
    overflow: hidden;
    background-color: #ffffff;
    border: 1px solid #eef0f3 !important;
}

.achievements3 .card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 24px rgba(6, 56, 126, 0.12) !important;
    border-color: #06387e !important;
}

.achievements3 .card-body {
    padding: 0.75rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fcfdfe;
}

.achievements3 .card-body img {
    height: 280px !important;
    width: 100% !important;
    object-fit: contain;
    background-color: #ffffff;
    border-radius: 0.5rem;
    transition: transform 0.3s ease;
}

.achievements3 .card:hover .card-body img {
    transform: scale(1.02);
}

.achievements3 .card-header {
    background-color: #ffffff !important;
    border-bottom: 0 !important;
    border-top: 1px solid #f1f3f5 !important;
    padding: 1rem !important;
}

.achievements3 h1 {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: #06387e !important;
    min-height: 54px;
    margin-bottom: 0 !important;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-align: left;
}

/* Hide lengthy paragraph descriptions on the card grid to maintain compact, uniform height */
.achievements3 h1 + p,
.achievements3 .card-header p {
    display: none !important;
}
