/* General Layout */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background: linear-gradient(135deg, #d9f4ff, #f1f8e9);
    color: #333;
    line-height: 1.6;
}

/* Header Styling */
header {
    text-align: center;
    padding: 20px;
    background: linear-gradient(90deg, #2e7d32, #1b5e20);
    color: white;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: bold;
}

header p {
    font-size: 1rem;
    margin-top: 10px;
    color: #e6ffe6;
}

/* Plant Cards on Homepage */
.plants {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 30px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.plant-card {
    background: #f1f8e9;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Ensure vertical alignment */
    justify-content: space-between; /* Space out content evenly */
    align-items: center; /* Center-align content horizontally */
    text-align: center;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.plant-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

/* Main Image Styling */
.plant-card img {
    width: 100%;
    max-height: 180px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.plant-card .plant-info {
    display: flex;
    flex-direction: column; /* Stack title, description, and button vertically */
    justify-content: space-between; /* Distribute space evenly */
    height: 100%; /* Ensure all cards are the same height */
    padding-top: 10px;
    flex-grow: 1; /* Push the button to the bottom */
}

.plant-card h2 {
    font-size: 1.5rem;
    color: #2e7d32;
    margin: 0 0 10px;
}
.plant-card img {
    width: 100%; /* Ensure the image scales with the card */
    max-height: 180px; /* Limit the height to avoid oversized images */
    object-fit: cover; /* Ensure the image scales without distortion */
    border-top-left-radius: 12px; /* Match the card's rounded corners */
    border-top-right-radius: 12px;
}

.plant-card p {
    font-size: 1rem;
    color: #555;
    margin: 0 0 15px;
}

.plant-card .btn {
    background: #2e7d32;
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    border-radius: 8px;
    transition: background 0.3s ease;
    align-self: center; /* Ensure the button stays centered */
    margin-top: auto; /* Push the button to the bottom */
}

.plant-card .btn:hover {
    background: #1b5e20;
}

.product-page img {
    width: 100%; /* Make the image responsive */
    max-width: 300px; /* Limit the maximum width */
    height: auto; /* Maintain the aspect ratio */
    margin: 20px auto; /* Center the image with spacing */
    display: block; /* Ensure it's treated as a block element */
    border-radius: 12px; /* Add rounded corners for a modern look */
}

/* Plant Care Tips - Static Style */
.plant-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Adjust based on screen size */
    gap: 20px;
    margin: 20px auto;
    max-width: 1200px;
    padding: 0 20px;
}

.tip-tile {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}

.tip-tile span {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #2e7d32;
}

.tip-tile h2 {
    font-size: 1.2rem;
    color: #2e7d32;
    margin-bottom: 10px;
}

.tip-tile p {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 15px;
    line-height: 1.4;
}

.tip-tile .btn {
    background: #2e7d32;
    color: white;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 6px;
    transition: background 0.3s ease;
    font-size: 0.9rem;
}

.tip-tile .btn:hover {
    background: #1b5e20;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px;
    background: #2e7d32;
    color: white;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (min-width: 768px) {
    .plant-tips {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Larger tiles for tablets/desktops */
    }
}

/* Back Button Styling */
.back-btn {
    text-decoration: none;
    color: white;
    background: #2e7d32;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1rem;
    position: absolute;
    top: 20px;
    left: 20px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background 0.3s ease, transform 0.2s ease;
    z-index: 100; /* Ensure it appears above all other elements */
}

.back-btn:hover {
    background: #1b5e20;
    transform: scale(1.05);
}

/* Adjust Back Button on Small Screens */
@media (max-width: 600px) {
    .back-btn {
        top: 10px; /* Move the button slightly closer to the top */
        left: 10px; /* Adjust left margin to fit smaller screens */
        font-size: 0.9rem; /* Slightly smaller font for compact view */
        padding: 8px 12px; /* Reduce padding for smaller screens */
    }

    header {
        padding-top: 50px; /* Add extra padding to avoid overlap with the button */
    }
}

/* Styling for the New Plant Info Section */
.new-plant-info {
    margin: 20px auto; /* Add spacing above and below the tile */
    max-width: 1200px; /* Restrict maximum width for larger screens */
    padding: 0 20px; /* Add padding for small screens */
}

.new-plant-tile {
    background: #e8f5e9; /* Soft green background */
    border-radius: 12px; /* Rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    padding: 20px; /* Internal padding for content */
    text-align: center; /* Center-align the text */
}

.new-plant-tile h2 {
    font-size: 1.8rem; /* Large, readable font size for the title */
    color: #2e7d32; /* Green color for the title */
    margin-bottom: 10px; /* Add spacing below the title */
}

.new-plant-tile p {
    font-size: 1rem; /* Regular font size for the text */
    color: #555; /* Dark gray for easy readability */
    line-height: 1.6; /* Add line spacing for better readability */
}


/* Header Section */
header {
    position: relative;
    text-align: center;
    color: #333; /* Dark text color */
    height: 250px; /* Adjust to fit your header */
    margin: 0; /* Remove unwanted margins */
    padding: 0; /* Remove unintended padding */
    overflow: hidden; /* Prevent overflow outside the header bounds */
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('images/jungle-header.png') no-repeat center center;
    background-size: cover;
    z-index: -1;
}

/* Title and Subtitle */
header h1 {
    font-size: 2rem;
    margin: 0;
    color: #333; /* Keep the title color dark */
    position: relative; /* Ensures layering above the background */
    z-index: 1; /* Stays above background */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); /* Light shadow for contrast */
}

header p {
    font-size: 1rem;
    margin-top: 10px;
    color: #555; /* Subtitle color */
    position: relative; /* Keeps subtitle above the background */
    z-index: 1; /* Stays above background */
    text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8); /* Light shadow for contrast */
}

/* Back Button */
header .back-btn {
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.9); /* Slightly opaque white for readability */
    color: #333; /* Dark button text */
    text-decoration: none;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 1rem;
    z-index: 10; /* Ensure it stays above everything */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Light shadow for depth */
    transition: background 0.3s ease, transform 0.2s ease;
}

header .back-btn:hover {
    background: rgba(255, 255, 255, 1); /* Fully opaque white on hover */
    transform: scale(1.05); /* Slight enlargement on hover */
}

/* Ensure the header has enough padding for small screens */
@media (max-width: 600px) {
    header {
        padding-top: 60px; /* Adds spacing to avoid overlap */
    }

    .back-btn {
        top: 10px; /* Adjust for small screens */
        left: 10px;
        font-size: 0.9rem;
        padding: 8px 12px;
    }
}

.break-name {
    display: inline-block;
    text-align: center;
    white-space: pre-line; /* Ensures line breaks are honored */
}

.break-name::after {
    content: "Constellation";
    display: block; /* Forces "Constellation" onto the next line */
}

/* Enhanced Dropdown Selector */
#plant-selector {
    padding: 12px 16px; /* Add more padding for a comfortable feel */
    font-size: 1rem; /* Maintain readability */
    border-radius: 20px; /* Smooth pill-shaped appearance */
    background: linear-gradient(135deg, #e8f5e9, #f1f8e9); /* Subtle gradient for depth */
    color: #2e7d32; /* Match the site's green theme */
    border: 2px solid #2e7d32; /* Green border for a modern touch */
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); /* Subtle shadow for a floating effect */
    transition: all 0.3s ease; /* Smooth hover and focus effects */
    font-weight: bold; /* Make text stand out */
}

/* Hover Effect */
#plant-selector:hover {
    background: linear-gradient(135deg, #c8e6c9, #e8f5e9); /* Slightly brighter gradient on hover */
    border-color: #1b5e20; /* Darker green border */
    color: #1b5e20; /* Match text to the border */
    transform: scale(1.05); /* Slight zoom effect */
}

/* Focus Effect */
#plant-selector:focus {
    outline: none; /* Remove default focus outline */
    box-shadow: 0 0 8px rgba(46, 125, 50, 0.4); /* Add a glowing focus ring */
}

/* Position the Dropdown in Header */
header #plant-selector {
    position: absolute;
    top: 20px; /* Adjusted spacing for better alignment */
    left: 20px; /* Matches the placement of the previous back button */
    z-index: 100; /* Ensures visibility above other elements */
}

/* Responsive Adjustments */
@media (max-width: 600px) {
    #plant-selector {
        padding: 10px 14px; /* Compact padding for smaller screens */
        font-size: 0.9rem; /* Slightly smaller font size */
    }
    header #plant-selector {
        top: 15px; /* Adjust spacing */
        left: 15px;
    }
}

/* Dropdown Menu Customization */
#plant-selector option {
    background: #ffffff; /* White background for options */
    color: #2e7d32; /* Green text */
    font-size: 1rem; /* Maintain readability */
    padding: 10px; /* Add padding for a better option layout */
}

/* Dropdown Menu Interaction (Optional, for Compatibility) */
#plant-selector:active {
    background: linear-gradient(135deg, #c8e6c9, #e8f5e9); /* Match hover style */
    transform: scale(1.02); /* Slight zoom */
}