/* Default CSS */
/* Generated by the CoffeeCup HTML Editor - www.coffeecup.com */


 /* Header Styling */
        header {
            background-color: #343a40;
            color: white;
            padding: 0;
        }
    
            header h1 {
                font-size: clamp(1.5rem, 5vw, 3rem); /* Responsive font size */
                margin: 0;
            }
        /* Default order */
        .main {
            order: 1;
        }
    
        .sidebar {
            order: 2; /* By default, sidebar comes last */
        }
    
        .sidebar-secondary {
            margin-top: 1rem;
        }

       /* Header */
.site-header {
    background: #333; /* Dark by default, adjust to your theme */
    padding: 20px 0;
    position: relative;
    z-index: 1000; /* Above content */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60px; /* Base height */
    transition: min-height 0.3s ease; /* Smooth height change on mobile */
}
.card-body .btn-outline-primary {
    padding: 10px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.card-body .btn-outline-primary:hover {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.row-cols-lg-3 .col {
    display: flex;
    align-items: center; /* Vertically center buttons in columns */
}

/* Centered wrapper */
.search-wrapper {
    position: relative;
    display: inline-block;
}

/* Icon */
.search-icon {
    font-size: 24px;
    color: #fff; /* Light on dark bg */
    cursor: pointer;
    padding: 5px;
    text-align: center;
    float: right;
}

/* Container (hidden by default) */
.search-container {
    position: absolute;
    display: none;
    z-index: 1001; /* Above header/content */
}

/* Active state */
.search-container.active {
    display: block;
    width: 300px; /* Expand left */
    left: 40px; /* Shift left from icon */
}

/* Input */
#search-input {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    background: #fff;
    color: #333; /* Dark text on light input */
    transition: all 0.5s ease;
    width: 300px; /* Expand left */
}

/* Results */
.search-results {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1001;
    display: none;
}

.search-results.active {
    display: block;
    background-color: rgb(237, 241, 245) !important;
    color: rgb(44, 39, 39) !important;
    border-color: rgb(55, 55, 59) !important;
    font-weight: 900;
    padding: 0;
}

.search-results li {
    padding: 10px;
    cursor: pointer;
}

.search-results li:hover {
    background: #f8f9fa;
}

.search-results li a {
    text-decoration: none;
    color: #007bff;
    display: block;
}
    .conversion-link{
        text-decoration: none;
    }
        .navbar {
            padding: 1rem;
        }
    
        .navbar-brand {
            font-size: 1.5rem;
            font-weight: bold;
            color: white !important;
        }
    
        /* Hamburger Menu Styling */
        .navbar-toggler {
            border-color: white;
        }
    
        .navbar-toggler-icon {
            background-image: url("data:image/svg+xml;charset=UTF8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='white' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
        }
    
        .nav-link {
            color: white !important;
            font-size: 1rem;
            padding: 0.5rem 1rem;
        }
    
        .nav-link:hover {
            color: #ddd !important;
        }
    
        .nav-item button {
            background-color: steelblue;
            border-color: white !important;
        }
    
        .active {
            
            color: steelblue !important;
            font-weight: bolder;
            border-color: blue !important;
            font-weight: 900;
            padding: 0;
        }
    
        .dropdown-menu {
            background-color: #343a40;
            border: none;
        }
    
        .dropdown-item {
            color: white !important;
        }
    
            .dropdown-item:hover {
                background-color: #495057 !important;
            }
    
        footer {
            text-align: center;
            margin-top: 2rem;
            padding: 1rem 0;
            background-color: #f8f9fa;
            color: #6c757d;
        }
		/* Sidebar Styles */
.sidebar {
    position: sticky;
    top: 20px;
}

.category-list {
    list-style: none;
    padding: 0;
}

.category-item {
    margin-bottom: 5px;
}

.category-link {
    display: block;
    padding: 10px;
    background-color: #343a40;
    color: white;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
}

.category-link:hover {
    background-color: #495057;
    color: white;
}

.subcategory-list {
    list-style: none;
    padding: 0 0 0 20px;
    display: none; /* Hidden by default */
    background-color: inherit;
    border-radius: 0 0 5px 5px;
}

.subcategory-list.active {
    display: block; /* Show when active */
}

.subcategory-item a {
    display: block;
    padding: 8px;
    color: inherit;
    text-decoration: none;
}

.subcategory-item a:hover {
    background-color: inherit;
	padding:1rem;
}
.notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px;
    border-radius: 5px;
    color: #fff;
    font-size: 16px;
    font-family: Arial, sans-serif;
    text-align: center;
    z-index: 1000;
    display: none;
    min-width: 200px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.notification.success {
    background-color: #d4edda; /* Light green */
    color: #155724; /* Dark green text */
}

.notification.error {
    background-color: #f8d7da; /* Light red */
    color: #721c24; /* Dark red text */
}

.notification.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
}
/* Overlay Styles */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
  }
  
  .overlay.active {
    opacity: 1;
    visibility: visible;
  }
  
  .overlay-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
  }
  
  .overlay-content h2 {
    margin-top: 0;
    color: #007bff;
  }
  
  .overlay-content p, .overlay-content ul {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  .overlay-content ul {
    padding-left: 20px;
  }
  
  .overlay-content a {
    color: #007bff;
    text-decoration: none;
  }
  
  .overlay-content a:hover {
    text-decoration: underline;
  }
  
  .close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5rem;
    cursor: pointer;
    color: #333;
    background: none;
    border: none;
    line-height: 1;
  }
  
  .close-btn:hover {
    color: #007bff;
  }
  
  /* Bottom Section Styles */
  #about-deltaunits .card {
    border: none;
  }
  
  #about-deltaunits .card-header {
    padding: 1rem;
  }
  
  #about-deltaunits .card-body {
    padding: 1.5rem;
  }
  
  #about-deltaunits p, #about-deltaunits ul {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  #about-deltaunits ul {
    padding-left: 20px;
  }
  
  #about-deltaunits a {
    color: #007bff;
    text-decoration: none;
  }
  
  #about-deltaunits a:hover {
    text-decoration: underline;
  }
    
        /* Float links to the right in the expanded dropdown */
        @media (max-width: 992px) {
            .navbar-nav {
                text-align: right;
            }
    
            .navbar-collapse {
                justify-content: flex-end;
            }
            .navbar-nav .nav-item:nth-child(1) { 
                order: 2; 
            }
            .navbar-nav .nav-item:nth-child(2) { 
                order: 1; 
            }
    
            .main {
                order: 2; /* Unit converter section */
            }
    
            .sidebar {
                order: 1; /* Sidebar moves below unit converter */
				position: static;
        margin-bottom: 20px;
            }
    
            .sidebar-secondary {
                margin-top: 0;
            }
            .search-container {
                top: 50%;
                right: 30px; /* Starts at icon’s right */
                transform: translateY(-50%);
                width: 0; /* Start collapsed */
            }
        
            .search-container.active {
                width: 245px; /* Expand left */
                right: 42px; /* Shift left from icon */
            }
        
            #search-input {
                width: 100%;
            }
        
            .search-results {
                width: 245px;
                right: 0; /* Align with input */
            }
        }

        /* Mobile (max-width: 767px) */
@media (max-width: 767.98px) {
    .site-header {
        flex-direction: column;
    }

    .search-container {
        top: 60px; /* Below icon */
        left: 50%;
        transform: translateX(-50%);
        width: 80%; /* Full width minus padding */
        opacity: 0; /* Start hidden */
    }

    .search-container.active {
        opacity: 1; /* Fade in */
        top: 70px; /* Slide down */
    }

    .site-header:has(.search-container.active) {
        min-height: 120px; /* Extend header */
    }

    #search-input {
        width: 100%;
    }

    .search-results {
        width: 100%;
    }
    .overlay-content {
        width: 95%;
        padding: 15px;
      }
    
      .overlay-content h2 {
        font-size: 1.5rem;
      }
    
      .overlay-content p, .overlay-content ul {
        font-size: 0.9rem;
      }
    
}
.list-inline-item a{
    text-decoration: none;
}

/* Light background adjustment */
.site-header.light {
    background: #f8f9fa;
}

.site-header.light .search-icon {
    color: #333; /* Dark on light bg */
}

.site-header.light #search-input {
    background: #fff;
    color: #333;
}