/*
Theme Name: Potato Varieties Database
Description: A professional WordPress theme for potato variety catalog websites with search and filter functionality
Author: Custom Theme
Version: 1.1
*/

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, #007cba 0%, #005a87 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.site-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: white;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.site-description {
    font-size: 1.1rem;
    text-align: center;
    opacity: 0.9;
    color: white;
}

/* Navigation */
.main-navigation {
    background: #005a87;
    padding: 0.5rem 0;
}

.nav-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.nav-menu a:hover {
    background-color: rgba(255,255,255,0.1);
}

/* Search and Filter Section */
.search-filters {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #007cba; /* Color Change */
}

.filter-group select,
.filter-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-group select:focus,
.filter-group input:focus {
    border-color: #007cba; /* Color Change */
    outline: none;
}

.search-button {
    background: #007cba; /* Color Change */
    color: white;
    border: none;
    padding: 0.75rem 2rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s;
}

.search-button:hover {
    background: #005a87; /* Color Change */
}

/* Variety Grid */
.varieties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.variety-card {
    background: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.variety-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #007cba; /* Color Change */
    margin-bottom: 1rem;
}

.variety-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
}

.meta-label {
    font-weight: 600;
    color: #666;
}

.meta-value {
    color: #333;
}

.variety-description {
    color: #666;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.variety-link {
    display: inline-block;
    background: #007cba; /* Color Change */
    color: white;
    padding: 0.5rem 1rem;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.variety-link:hover {
    background: #005a87; /* Color Change */
}

/* Single Variety Page */
.variety-hero {
    background: white;
    padding: 2rem 0;
    margin-bottom: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.variety-hero-title {
    font-size: 3rem;
    color: #007cba; /* Color Change */
    margin-bottom: 1rem;
}

.variety-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}

.variety-image {
    background: #f8f9fa;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.variety-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
}

.image-caption {
    margin-top: 0.5rem;
    font-weight: 600;
    color: #666;
}

.variety-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.detail-section {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.section-title {
    font-size: 1.5rem;
    color: #007cba; /* Color Change */
    margin-bottom: 1rem;
    border-bottom: 2px solid #007cba; /* Color Change */
    padding-bottom: 0.5rem;
}

.detail-grid {
    display: grid;
    gap: 0.75rem;
}

.detail-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    padding: 0.5rem;
    border-bottom: 1px solid #eee;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    color: #333;
}

/* Resistance Tags */
.resistance-tags,
.feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.resistance-tag,
.feature-tag {
    background: #e3f2fd; /* Color Change */
    color: #005a87;     /* Color Change */
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.resistance-tag.high {
    background: #d4edda;
    color: #155724;
}

.resistance-tag.moderate {
    background: #fff3cd;
    color: #856404;
}

.resistance-tag.low {
    background: #f8d7da;
    color: #721c24;
}

/* Footer */
.site-footer {
    background: #005a87; /* Color Change */
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .site-title {
        font-size: 2rem;
    }
    
    .meta-item {
      white-space: normal;
    }
    .nav-menu {
        flex-direction: column;
        gap: 0;
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .varieties-grid {
        grid-template-columns: 1fr;
    }
    
    .variety-details {
        grid-template-columns: 1fr;
    }
    
    .variety-hero-title {
        font-size: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Pagination Styling */
.pagination {
    text-align: center;
    margin: 2rem 0;
}

.pagination ul {
    list-style: none;
    display: inline-flex;
    gap: 0.5rem;
    padding: 0;
    margin: 0;
}

.pagination li {
    margin: 0;
}

.pagination a,
.pagination span {
    display: block;
    padding: 0.75rem 1rem;
    background: white;
    color: #007cba; /* Color Change */
    text-decoration: none;
    border: 2px solid #007cba; /* Color Change */
    border-radius: 4px;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination .current {
    background: #007cba; /* Color Change */
    color: white;
}

/* View Details Button Improvements */
.variety-link {
    display: block;
    text-align: center;
    padding: 10px;
    margin: 1rem auto 0 auto;
    max-width: 150px;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #007cba; /* Color Change */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #005a87; /* Color Change */
}

/* Footer Legal Menu Styles */
.footer-legal-menu {
	list-style: none; /* Removes bullets */
	padding: 0;
	margin: 0;
	display: flex;
	justify-content: center; /* Centers the menu items */
	flex-wrap: wrap; /* Allows items to wrap on small screens */
	gap: 1.5rem; /* Space between menu items */
}

.footer-legal-menu li {
	display: inline-block; /* Aligns items in a row */
}

.footer-legal-menu a {
	color: rgba(255, 255, 255, 0.7); /* Light-grey text color */
	text-decoration: none;
	font-size: 0.9rem;
	transition: color 0.3s;
}

.footer-legal-menu a:hover {
	color: white; /* Make text white on hover */
	text-decoration: underline;
}