﻿:root {
    --navy-blue: #1e3a8a;
    --blue: #1e293b;
    --white-ivory: #F8F9FA;
    --teal-accent: #2DB8A3;
    --profit-success: #27ae60;
    --loss-error: #C0392B;
    --grey: #b0b0b0;
    --gold: #ffb000;
    --profit-highlight: #ef4444;
}


* {
    font-family: 'Istok Web', sans-serif;
}

html {
    overflow-x: hidden;
    scroll-behavior: smooth;
}

body {
    background-color: var(--white-ivory);
    transition: all 0.3s ease;
    overflow-x: hidden;
}

.left-bar-group {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .left-bar-group {
        width: 100%;
        justify-content: space-between;
    }
}

.top-bar {
    background: linear-gradient(to right, #0f1e40, #0f1e40);
    font-size: 0.8rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 1rem;
    color: white;
    flex-wrap: wrap;
    gap: 10px;
}


.btn-custom1 {
    background: linear-gradient(45deg, var(--teal-accent), var(--teal-accent), var(--blue));
    background-size: 400% 400%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 4s ease-in-out infinite;
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
    will-change: background-position;
    font-weight: 700;
    font-size: 17px;
}

    .btn-custom1:hover {
        transform: translateY(-15px);
        color: var(--navy-blue);
    }

@keyframes gradientShift {
    0%, 100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

    .top-bar .auth-links a {
        color: orange;
        margin-right: 4px;
        text-decoration: none;
    }

    .top-bar .auth-links .create {
        color: #00ffff;
    }

    .top-bar .tagline {
        font-weight: 500;
        color: #ddd;
    }

.search-wrapper {
    justify-content: end;
    gap: 0.5rem;
    display: flex;
    align-items: center;
    position: relative;
    width: 180px;
}

.Topsearch-input {
    background-color: #2e3c50;
    border: none;
    color: white;
    padding: 2px 5px;
    border-radius: 20px;
    height: 20px;
    font-size: 0.9rem;
    max-width: 180px;
    margin: 5px;
}



.clear-icon {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #ccc;
    font-size: 1rem;
    display: none; /* hidden by default */
}

.Topsearch-input::placeholder {
    color: #ccc;
}

.mail-link {
    font-size: 0.9rem;
    color: #00ffff;
    text-decoration: none;
}

.navbar .nav-link {
    font-weight: 500;
    color: #333;
    position: relative;
    padding-bottom: 5px;
}

    .navbar .nav-link::after {
        content: "";
        position: absolute;
        left: 0;
        bottom: 0;
        width: 0%;
        height: 2px;
        background: linear-gradient(45deg, var(--teal-accent), var(--navy-blue-dark));
        transition: width 0.3s ease;
    }

    .navbar .nav-link:hover::after,
    .navbar .nav-link.active::after {
        width: 100%;
    }

    .navbar .nav-link:hover {
        color: var(--navy-blue-dark);
    }

.navbar .btn {
    border-radius: 10px;
}

.navbar-toggler {
    border: none;
}

    .navbar-toggler:focus {
        box-shadow: none;
    }

.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    height: 10vh;
    width: 100vw;
    background-color: rgba(0, 0, 0, 0);
    z-index: 1040;
    display: none;
}

.navbar-collapse {
    transition: all 0.3s ease;
}

.menu-overlay.show {
    display: block;
}

.navbar-collapse.show {
    position: absolute;
    top: 100%;
    left: 40%;
    width: 60%;
    padding: 20px;
    background: white;
    z-index: 1050;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.search-results {
    position: absolute;
    top: 100%;
    right: 0;
    width: 300px;
    margin-top: 50px !important;
    max-height: 400px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
}

    .search-results.show {
        display: block;
    }

.search-result-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

    .search-result-item:last-child {
        border-bottom: none;
    }

    .search-result-item a {
        text-decoration: none;
        color: #333;
        display: block;
    }

        .search-result-item a:hover {
            background: #f8f9fa;
        }

    .search-result-item .title {
        font-weight: 500;
        font-size: 1rem;
    }

    .search-result-item .description {
        font-size: 0.85rem;
        color: #666;
    }

.search-results.empty::after {
    content: "No results found";
    display: block;
    padding: 10px;
    color: #666;
    font-style: italic;
}
/* 📱 Mobile & narrow devices fix */
@media (max-width: 768px) {
    .top-bar {
        flex-direction: row !important;
        justify-content: space-between;
        align-items: center;
        flex-wrap: nowrap;
        overflow-x: hidden;
    }

        .top-bar .container-fluid {
            padding-left: 0.1rem;
            padding-right: 0;
            width: 100%;
            overflow-x: hidden;
        }


        .top-bar .container-fluid > .d-flex {
            flex-wrap: nowrap !important;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            min-width: 0; /* ✅ allow shrink */
        }
    .tagline {
        font-weight: 500;
        color: #ddd;
        font-size:0.50rem;
    }
    .auth-links {
        font-size: 0.85rem;
        white-space: nowrap;
        display: flex;
        align-items: center;
        gap: 5px;
        min-width: 0;
    }

    .search-wrapper {
        flex: 1; /* ✅ flexible */
        min-width: 0;
        max-width: 180px;
    }

    .Topsearch-input {
        width: 100%;
        min-width: 0;
    }

    .mail-link {
        display: none;
    }

    .navbar-brand {
        padding-left: 10px;
    }

    footer {
        padding-top: 1.5rem !important;
        padding-bottom: 1rem !important;
    }

    .footer-logo {
        width: 45px;
        margin-bottom: 8px;
    }

    .footer-slogan {
        font-size: 0.75rem;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        justify-content: center;
    }

        .footer-links a {
            font-size: 0.8rem;
            line-height: 1.3;
        }

        .footer-links li {
            margin-bottom: 0 !important;
        }

    .social-links {
        gap: 1rem;
        justify-content: center !important;
    }

        .social-links a {
            font-size: 1.1rem;
        }

    .footer-section {
        margin-bottom: 1rem !important;
        margin-top: -10px !important;
    }

        .footer-section h6 {
            font-size: 0.9rem;
            margin-bottom: 0.5rem;
        }

        .footer-section h5 {
            font-size: 1.1rem;
            margin-bottom: 0.5rem;
        }

    .footer-copyright {
        font-size: 0.75rem;
        padding-top: 1rem !important;
        margin-top: 1rem !important;
    }
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

.footer-logo {
    width: 60px;
    height: auto;
    margin-bottom: 15px;
}

.footer-slogan {
    color: var(--grey);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 10px;
}

.footer-links a:hover {
    color: var(--teal-accent) !important;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--teal-accent) !important;
    transform: translateY(-2px);
    transition: all 0.3s ease;
}


@media (max-width: 576px) {
    .top-bar .container-fluid > .d-flex {
        gap: 0.5rem;
    }

    .auth-links {
        font-size: 0.8rem;
        gap: 4px;
    }

    .search-wrapper {
        max-width: 120px; /* Slightly smaller for ultra-small screens */
    }
}


.section-spacing {
    padding: 20px 0;
}


@media (max-width: 768px) {
  

    .section-spacing {
        padding: 15px 0;
    }

   
}
/* 📱 Mobile view: show search results overlaying navbar */
@media (max-width: 768px) {
    .search-results {
        position: fixed !important;
        top: -15px; /* adjust to sit above navbar (depends on your navbar height) */
        left: 0;
        right: 0;
        width: 80% !important;
        margin: 0;
        border-radius: 0;
        max-height: 50vh;
        z-index: 2000; /* above navbar */
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    .search-result-item {
        background: #fff;
        padding: 12px 16px;
        border-bottom: 1px solid #eee;
    }

    .search-results.show {
        display: block;
    }
    .search-result-item .title {
        font-weight: 500;
        font-size: 0.85rem;
    }

    .search-result-item .description {
        font-size: 0.75rem;
        color: #666;
    }
}
