/* General Styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

.btn-primary {
    background-color: #14532d;
    border-color: #14532d;
}

.btn-primary:hover {
    background-color: #198754;
    border-color: #198754;
}

.btn-outline-primary {
    color: #14532d;
    border-color: #14532d;
}

.btn-outline-primary:hover {
    background-color: #14532d;
    color: #fff;
    border-color: #14532d;
}

/* Card Styles */
.card {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

/* 
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.12);
}
*/

.card-img-top {
    height: 200px;
    object-fit: cover;
}

.card-img-top.tool-thumbnail {
    padding: 5px;
    background: #fff;
    border-radius: 12px;
}

/* Tool Details Page */
.tool-image {
    max-height: 300px;
    object-fit: contain;
}

.thumbnail {
    width: 100px;
    height: 100px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.thumbnail:hover, .thumbnail.active {
    border-color: #007bff;
}

.tool-thumbnail {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 10px;
    margin: 5px auto;
    display: block;
    background: #fff;
}

/* Form Styles */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
}

.required-field::after {
    content: '*';
    color: red;
    margin-left: 4px;
}

/* Group Badge Styles */
.badge-admin {
    background-color: #dc3545;
    color: white;
}

.badge-member {
    background-color: #28a745;
    color: white;
}

/* Section Tags */
.section-tag {
    display: inline-block;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 15px;
    padding: 5px 12px;
    font-size: 14px;
    color: #495057;
    text-decoration: none;
    margin-right: 5px;
    margin-bottom: 5px;
    transition: all 0.3s ease;
}

.section-tag:hover {
    background-color: #e9ecef;
    color: #212529;
}

.section-tag--active {
    background-color: #14532d;
    color: #fff;
    border-color: #14532d;
}

/* Tool Availability */
.tool-available {
    background-color: #d4edda;
    color: #155724;
    padding: 5px 10px;
    border-radius: 4px;
}

.tool-unavailable {
    background-color: #f8d7da;
    color: #721c24;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Image Upload Preview */
.image-preview {
    width: 150px;
    height: 150px;
    border: 1px solid #ced4da;
    margin: 10px;
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
    position: relative;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-preview .delete-btn {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #dc3545;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* Landing Page */
.hero {
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('/static/img/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 5rem 0;
    margin-bottom: 2rem;
}

.feature-box {
    text-align: center;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.feature-box i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #007bff;
}

/* Remove container on hover */
.remove-on-hover:hover {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.bg-primary {
    background-color: #14532d !important;
}

/* Responsive Typography */
@media (max-width: 576px) {
    body {
        font-size: 14px;
        line-height: 1.5;
    }

    h1, h2, h3, h4, h5 {
        font-size: 1.2rem;
    }
}

/* Smaller Buttons for Mobile */
@media (max-width: 576px) {
    .btn {
        padding: 4px 8px;
        font-size: 0.8rem;
    }
}

/* Compact Cards for Mobile */
@media (max-width: 576px) {
    .card {
        margin-bottom: 10px;
    }

    .card-body {
        padding: 10px;
    }

    .card-header {
        padding: 8px 10px;
    }
}

/* Responsive Images */
.card-img-top, .tool-thumbnail {
    width: 100%;
    height: auto;
    max-height: 150px;
}

/* Compact Form Inputs */
@media (max-width: 576px) {
    .form-control, .form-select {
        padding: 4px 8px;
        font-size: 0.8rem;
    }

    .form-check-input {
        width: 1rem;
        height: 1rem;
    }

    .form-check-label {
        font-size: 0.8rem;
    }
}

/* Scale img-fluid for Mobile */
@media (max-width: 768px) {
    .img-fluid {
        max-width: 80%; /* Scale the image to 80% of its container */
        height: auto; /* Maintain aspect ratio */
    }
}