body {
    font-family: 'Lora', serif;
    background-color: white;
    margin: 0;
    /* padding: 20px; */
}

header {
    position: sticky;
    top: 0;
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

header .logo {
    display: flex;
    align-items: center;
}

header .logo i {
    font-size: 24px;
    margin-right: 10px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 15px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    text-decoration: none;
    color: white;
    font-weight: bold;
}

nav ul li a.active {
    text-decoration: underline;
}





.container {
    max-width: 800px;
    margin: auto;
    background: rgb(248, 250, 248);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.1);
}

#logo{
    color: white;
}
h1 {
    text-align: center;
    color: #338033;
    font-family: 'Poppins', sans-serif;
}
.herb {
    margin-bottom: 20px;
    padding: 15px;
    border-bottom: 2px solid #ddd;
    background-color: #eaf4e3;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    display: block; /* Ensure proper display handling */
}
h2 {
    color: #1b4332;
}
p {
    margin: 5px 0;
    line-height: 1.6;
}
.caution {
    color: red;
    font-weight: bold;
}
.highlight {
    background-color: #ffeb3b;
    padding: 2px 0;
    border-radius: 3px;
}
.search-bar {
    display: block;
    margin: 20px auto;
    text-align: center;
}
input[type="text"] {
    padding: 8px;
    width: 70%;
    font-size: 16px;
}
button {
    padding: 8px 12px;
    font-size: 16px;
    cursor: pointer;
    background-color: #2c6e49;
    color: white;
    border: none;
    border-radius: 4px;
}

/* Herb Modal Styles */
.herb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 5% auto;
    padding: 20px;
    width: 90%;
    max-width: 800px;
    border-radius: 12px;
    animation: slideIn 0.3s ease-out;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.herb-details {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-top: 20px;
}

.herb-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.herb-info {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.herb-category {
    display: inline-block;
    padding: 5px 12px;
    background-color: #eaf4e3;
    color: #2c6e49;
    border-radius: 20px;
    font-size: 14px;
}

.info-section {
    background-color: #f8f8f8;
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.info-section h3 {
    color: #2c6e49;
    margin-bottom: 10px;
}

@keyframes slideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .herb-details {
        grid-template-columns: 1fr;
    }
}

/* Add smooth transitions for showing/hiding herbs */
#herbList {
    transition: all 0.3s ease;
}

.herb-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.main-image {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.main-image img:hover {
    transform: scale(1.05);
}

.image-thumbnails {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding: 0.5rem;
}

.thumbnail {
    width: 60px;
    height: 60px;
    border-radius: 4px;
    cursor: pointer;
    object-fit: cover;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.thumbnail:hover {
    opacity: 1;
    transform: scale(1.1);
}

.thumbnail.active {
    opacity: 1;
    border: 2px solid #2c6e49;
}

@media (max-width: 768px) {
    .image-thumbnails {
        justify-content: center;
    }
}

/* Add to your existing styles */
.herb-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 800px;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideIn 0.3s ease;
}

.close-btn {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    z-index: 1001;
}

.close-btn:hover {
    color: #2c6e49;
}

.highlight {
    background-color: #ffeb3b;
    padding: 2px 4px;
    border-radius: 3px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { transform: translateY(-20px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}