/**
 * Plant Care Website Styles
 * Main stylesheet for the plant care website
 */

/* Global styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

a {
    color: #28a745;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Navigation */
.main-nav {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-size: 1.5rem;
    font-weight: bold;
    color: #28a745;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: #555;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #28a745;
    text-decoration: none;
}

.login-btn {
    background-color: #28a745;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.login-btn:hover {
    background-color: #218838;
    text-decoration: none;
}

.language-switcher {
    margin-left: 1.5rem;
    font-size: 0.9rem;
}

.language-switcher a {
    padding: 0 0.2rem;
}

.language-switcher a.active {
    font-weight: bold;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    color: #555;
    cursor: pointer;
}

/* Plant header section */
.plant-header {
    background-color: #ffffff;
    padding: 2rem 0;
    margin-bottom: 2rem;
}

.plant-title {
    margin-bottom: 1.5rem;
    color: #2e7d32;
    font-size: 2.5rem;
    text-align: center;
}

.plant-subtitle {
    background-color: #e8f5e9;
    color: #4caf50;
    margin-bottom: 1.5rem;
    font-style: italic;
    text-align: center;
    padding: 1rem;
    border-radius: 4px;
    display: inline-block;
    width: 100%;
}

/* Categories tags */
.plant-categories {
    margin: 0.5rem 0 1.5rem 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.tag {
    font-size: 0.8rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 20px;
    background-color: #f0f0f0;
    color: #555;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: inline-flex;
    align-items: center;
}

.tag::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
    background-color: currentColor;
}

.tag.easy-care {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.tag.low-light {
    background-color: #e3f2fd;
    color: #1565c0;
}

.tag.rare {
    background-color: #fff3e0;
    color: #e65100;
}

.tag.flowering {
    background-color: #fce4ec;
    color: #c2185b;
}

.tag.air-purifying {
    background-color: #e0f2f1;
    color: #00796b;
}

.tag.pet-friendly {
    background-color: #f1f8e9;
    color: #558b2f;
}

.tag.drought-tolerant {
    background-color: #fff8e1;
    color: #ff8f00;
}

.tag.trailing {
    background-color: #e8eaf6;
    color: #3949ab;
}

.tag.variegated {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

.tag.uncategorized {
    background-color: #f5f5f5;
    color: #757575;
}

/* Button styles */
.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
    min-width: 150px;
    text-align: center;
}

.button i {
    font-size: 1rem;
}

.button-primary {
    background-color: #28a745;
    color: white;
    border-radius: 30px;
}

.button-blue {
    background-color: #28a745;
    color: white;
    border-radius: 30px;
}

.button-secondary {
    background-color: #6c757d;
    color: white;
    border-radius: 30px;
}

.button-orange {
    background-color: #f39c12;
    color: white;
    border-radius: 30px;
}

.button-danger {
    background-color: #dc3545;
    color: white;
    border-radius: 30px;
}

.button:hover {
    opacity: 0.9;
    text-decoration: none;
}

form.inline-form {
    display: inline-flex;
    margin: 0;
    padding: 0;
    align-items: center;
}

form.inline-form button {
    margin: 0;
}

/* Plant image gallery */
.plant-image-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.plant-image-gallery img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
}

/* Care guide section */
.care-guide {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.care-guide h2 {
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.care-guide h2 .care-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.care-guide h2 .icon-light {
    background-color: #fff3cd;
    color: #856404;
}

.care-guide h2 .icon-water {
    background-color: #d1ecf1;
    color: #0c5460;
}

.care-guide h2 .icon-humidity {
    background-color: #cce5ff;
    color: #004085;
}

.care-guide h2 .icon-temperature {
    background-color: #f8d7da;
    color: #721c24;
}

.care-guide h2 .icon-soil {
    background-color: #d4edda;
    color: #155724;
}

.care-guide h2 .icon-fertilizer {
    background-color: #e2e3e5;
    color: #383d41;
}

.care-guide h2 .icon-repotting {
    background-color: #fff3cd;
    color: #856404;
}

.care-guide h2 .icon-pruning {
    background-color: #d1ecf1;
    color: #0c5460;
}

.care-guide h2 .icon-pests {
    background-color: #f8d7da;
    color: #721c24;
}

.care-guide h2 .icon-winter {
    background-color: #cce5ff;
    color: #004085;
}

.care-guide h2 .icon-propagation {
    background-color: #d4edda;
    color: #155724;
}

.care-guide ul {
    list-style: none;
    padding-left: 0;
}

.care-guide li {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    position: relative;
}

.care-guide li:before {
    content: "•";
    color: #28a745;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.care-guide strong {
    color: #2c3e50;
}

.care-guide p {
    margin-top: 2rem;
    line-height: 1.8;
}

/* Plant grid on homepage */
.plant-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.plant-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.plant-card-image {
    height: 200px;
}

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

.plant-card-content {
    padding: 1rem;
}

.plant-card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.plant-card-subtitle {
    font-size: 0.9rem;
    font-style: italic;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.plant-card-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 1rem;
}

/* Search and filter section */
.search-filter {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-box {
    flex: 1;
    min-width: 250px;
}

.search-box input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.filter-box {
    flex: 1;
    min-width: 250px;
}

.filter-box select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

/* Gallery page */
.gallery-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.gallery-item {
    position: relative;
}

.gallery-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.gallery-actions {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.03);
}

.gallery-item:hover .gallery-actions {
    opacity: 1;
}

.gallery-actions .button {
    padding: 5px 10px;
    min-width: auto;
}

/* Forms */
.form-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
    color: #2c3e50;
}

.form-control {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
}

.form-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

textarea.form-control {
    min-height: 150px;
}

/* Messages */
.message {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.message-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Authentication forms */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
}

.auth-title {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-links {
    margin-top: 1.5rem;
    text-align: center;
}

/* Form Validation */
.form-control:invalid {
    border-color: #ff526f;
}

/* Language Switcher for Edit Pages */
.language-switcher-top {
    background-color: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px 15px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.current-language {
    font-size: 1.1em;
}

.lang-badge {
    background-color: #4285F4;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 5px;
}

.switch-language {
    display: flex;
    gap: 10px;
}

.button-small {
    padding: 4px 10px;
    font-size: 0.9em;
}

.language-notice {
    background-color: #fff8dc;
    border-left: 4px solid #ffd700;
    padding: 10px 15px;
    margin-bottom: 20px;
    font-size: 0.95em;
    line-height: 1.4;
    border-radius: 0 4px 4px 0;
}

/* Footer */

/* Source toggle buttons */
.source-toggle-btn {
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    margin: 0 2px;
    border: 1px solid #007bff;
    background-color: transparent;
    color: #007bff;
    transition: all 0.3s ease;
    cursor: pointer;
}

.source-toggle-btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
}

.source-toggle-btn.active {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

.source-toggle-btn:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Responsive styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100%;
        background-color: #fff;
        flex-direction: column;
        align-items: flex-start;
        padding: 2rem;
        box-shadow: 2px 0 5px rgba(0,0,0,0.1);
        transition: left 0.3s ease;
        z-index: 1000;
    }
    
    .nav-links.active {
        left: 0;
    }
    
    .language-switcher {
        margin-left: 0;
        margin-top: 1.5rem;
    }
    
    .actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .plant-image-gallery {
        grid-template-columns: 1fr;
    }
    
    .search-filter {
        flex-direction: column;
    }
} 