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

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

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

/* Header */
header {
    background: linear-gradient(135deg, #2d5016, #4a7c59);
    color: white;
    padding: 0.8rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(10px);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 70px;
}

.logo {
    flex-shrink: 0;
}

.logo h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
    background: linear-gradient(45deg, #ffffff, #a8d5ba);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0;
    margin: 0;
    padding: 0;
    align-items: center;
}

.nav-links li {
    position: relative;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
    display: block;
}

.nav-links a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #a8d5ba;
    transform: translateY(-1px);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #a8d5ba;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-links a:hover::after {
    width: 80%;
}

/* Language Switcher */
.language-switcher {
    margin-left: 1.5rem;
}

.language-switcher button {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 10px 18px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.language-switcher button:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* RTL Support */
body.rtl {
    direction: rtl;
    text-align: right;
}

body.rtl nav {
    flex-direction: row-reverse;
}

body.rtl .nav-links {
    flex-direction: row-reverse;
}

body.rtl .language-switcher {
    margin-left: 0;
    margin-right: 1.5rem;
}

body.rtl .logo h1 {
    text-align: right;
}

body.rtl .herbs-grid {
    direction: rtl;
}

body.rtl .herb-item {
    direction: rtl;
    text-align: right;
}

body.rtl .herb-content {
    text-align: right;
}

body.rtl .herb-tags {
    justify-content: flex-end;
}

body.rtl .modal-content {
    direction: rtl;
    text-align: right;
}

body.rtl .close {
    left: 1rem;
    right: auto;
}

body.rtl .hero-content {
    text-align: center;
    direction: rtl;
}

body.rtl .hero-content h2 {
    text-align: center;
    font-family: 'Arial', sans-serif;
    word-spacing: 0.15em;
    letter-spacing: 0.02em;
    line-height: 1.4;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

body.rtl .hero-content p {
    text-align: center;
    font-family: 'Arial', sans-serif;
    line-height: 1.8;
    word-spacing: 0.1em;
    max-width: 80%;
    margin-left: auto;
    margin-right: auto;
    padding: 0 2rem;
}

body.rtl .search-container {
    text-align: center;
}

body.rtl .herb-benefits ul,
body.rtl .detail-section ul {
    padding-right: 1.5rem;
    padding-left: 0;
}

body.rtl .warning-icon {
    margin-left: 0.5rem;
    margin-right: 0;
}

body.rtl .pagination-container {
    direction: rtl;
}

body.rtl .share-buttons {
    justify-content: flex-end;
}

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #68b684;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    display: none;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.scroll-to-top:hover {
    background: #5aa372;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

/* Print Styles */
@media print {
    .quick-nav-section,
    .pagination-container,
    .share-buttons,
    header,
    .search-container,
    .scroll-to-top {
        display: none !important;
    }

    .herb-item {
        break-inside: avoid;
        margin-bottom: 2rem;
        box-shadow: none;
        border: 1px solid #ddd;
    }

    .herbs-list {
        grid-template-columns: 1fr;
    }
}

/* Loading Animation */
.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #68b684;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced focus styles for accessibility */
.pagination-btn:focus,
.share-btn:focus,
.action-btn:focus,
#searchInput:focus {
    outline: 2px solid #68b684;
    outline-offset: 2px;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(45, 80, 22, 0.7), rgba(74, 124, 89, 0.7)), 
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><rect fill="%234a7c59" width="1200" height="600"/><g fill-opacity="0.1"><circle fill="%23fff" cx="200" cy="200" r="50"/><circle fill="%23fff" cx="800" cy="150" r="30"/><circle fill="%23fff" cx="1000" cy="300" r="40"/></g></svg>');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    max-width: 900px;
    padding: 2rem;
    z-index: 2;
    position: relative;
}

.hero-content h2 {
    font-size: clamp(2rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #ffffff, #a8d5ba, #ffffff);
    background-size: 200% 200%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientShift 4s ease-in-out infinite;
    word-spacing: 0.1em;
    text-align: center;
    max-width: 90%;
    margin-left: auto;
    margin-right: auto;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-content p {
    font-size: clamp(1rem, 2.5vw, 1.3rem);
    line-height: 1.8;
    margin-bottom: 2.5rem;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
    opacity: 0.95;
    font-weight: 400;
    text-align: center;
    word-spacing: 0.05em;
    padding: 0 1rem;
}

.cta-button {
    background: linear-gradient(135deg, #68b684, #5aa372);
    color: white;
    padding: clamp(12px, 2vw, 18px) clamp(24px, 4vw, 40px);
    border: none;
    border-radius: 50px;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 8px 30px rgba(104, 182, 132, 0.4);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    background: linear-gradient(135deg, #5aa372, #4a7c59);
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 40px rgba(104, 182, 132, 0.6);
}

.cta-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* Herbs Section */
.herbs-section {
    padding: 80px 0;
    background: white;
}

.herbs-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2d5016;
}

.search-container {
    text-align: center;
    margin-bottom: 3rem;
}

#searchInput {
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 25px;
    width: 300px;
    outline: none;
    transition: border-color 0.3s ease;
}

#searchInput:focus {
    border-color: #68b684;
}

.herbs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.herb-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

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

.view-all-container {
    text-align: center;
    margin-top: 3rem;
}

.view-all-button {
    display: inline-block;
    background: #68b684;
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: bold;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.view-all-button:hover {
    background: #5aa372;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Quick Navigation Section */
.quick-nav-section {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 1rem 0;
    border-bottom: 1px solid #dee2e6;
}

.quick-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.nav-stats {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
    padding: 0.5rem 1rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.quick-actions {
    display: flex;
    gap: 1rem;
}

.action-btn {
    background: #68b684;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 15px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #5aa372;
    transform: translateY(-1px);
}

/* Enhanced Search Container */
.search-container {
    position: relative;
    max-width: 500px;
    margin: 0 auto 3rem;
}

.search-btn {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: #68b684;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn:hover {
    background: #5aa372;
}

/* All herbs page styles */
.herbs-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

/* Herb item styling */
.herb-item {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 2rem;
    transition: all 0.3s ease;
    border-left: 4px solid #68b684;
}

.herb-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.herb-header h3 {
    color: #2d5016;
    margin-bottom: 0.5rem;
    font-size: 1.4rem;
}

.herb-family {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.herb-description {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.herb-benefits h4,
.herb-toxicity h4,
.herb-share h4 {
    color: #2d5016;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.herb-benefits ul {
    list-style: none;
    padding: 0;
}

.herb-benefits li {
    padding: 0.3rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.herb-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #68b684;
    font-weight: bold;
}

.herb-toxicity {
    background: #fff3cd;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid #ffc107;
    margin: 1.5rem 0;
}

.warning-icon {
    color: #ffc107;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.share-btn.facebook {
    background: #1877f2;
    color: white;
}

.share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.share-btn.whatsapp {
    background: #25d366;
    color: white;
}

.share-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.herb-item {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-left: 5px solid #68b684;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.herb-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.herb-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #68b684, #4a7c59);
}

/* Social Sharing Styles */
.herb-share {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e9ecef;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
    text-decoration: none;
}

.share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.share-btn.facebook {
    background: #1877f2;
}

.share-btn.facebook:hover {
    background: #166fe5;
}

.share-btn.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

.share-btn.whatsapp {
    background: #25d366;
}

.share-btn.whatsapp:hover {
    background: #22c55e;
}

/* Pagination Styles */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.pagination-btn {
    background: white;
    color: #495057;
    border: 2px solid #dee2e6;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    min-width: 45px;
}

.pagination-btn:hover:not(.disabled) {
    background: #68b684;
    color: white;
    border-color: #68b684;
    transform: translateY(-1px);
}

.pagination-btn.active {
    background: #68b684;
    color: white;
    border-color: #68b684;
}

.pagination-btn.disabled {
    background: #f8f9fa;
    color: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-info {
    background: #f8f9fa;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #495057;
    margin: 0 1rem;
    font-weight: 500;
}

.herb-header h3 {
    color: #2d5016;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.herb-family {
    color: #666;
    font-style: italic;
    margin-bottom: 1rem;
}

.herb-description {
    margin-bottom: 1.5rem;
}

.herb-benefits h4, .herb-toxicity h4 {
    color: #4a7c59;
    margin-bottom: 0.5rem;
}

.herb-benefits ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.herb-benefits li {
    margin-bottom: 0.5rem;
    color: #555;
}

.herb-toxicity {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1rem;
}

.warning-icon {
    margin-right: 0.5rem;
}

.herb-content {
    padding: 1.5rem;
}

.herb-content h3 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: #2d5016;
}

.herb-scientific {
    font-style: italic;
    color: #666;
    margin-bottom: 1rem;
}

.herb-uses {
    color: #555;
    margin-bottom: 1rem;
}

.herb-rating {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stars {
    color: #ffc107;
}

.herb-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #e8f5e8;
    color: #2d5016;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* About Section */
.about-section {
    padding: 80px 0;
    background: #f8f9fa;
}

.about-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2d5016;
}

.about-section p {
    font-size: 1.1rem;
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem;
    color: #555;
}

.warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 10px;
    padding: 1.5rem;
    text-align: center;
    color: #856404;
    margin-top: 2rem;
}

/* Contact Section */
.contact-section {
    padding: 80px 0;
    background: white;
}

.contact-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2d5016;
}

.contact-section p {
    text-align: center;
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}

.contact-info {
    text-align: center;
}

.contact-info p {
    font-size: 1.1rem;
    margin: 0.5rem 0;
    color: #333;
}

/* Footer */
footer {
    background: #2d5016;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: #666;
}

.close:hover {
    color: #333;
}

.modal h3 {
    color: #2d5016;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.modal-herb-image {
    text-align: center;
    font-size: 4rem;
    margin: 1rem 0;
}

.detail-section {
    margin: 1.5rem 0;
}

.detail-section h4 {
    color: #4a7c59;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.detail-section p, .detail-section ul {
    color: #555;
```text
    line-height: 1.6;
}

.detail-section ul {
    padding-left: 1.5rem;
}

/* Desktop and Large Screen Optimizations */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        padding: 0 40px;
    }

    .herbs-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2.5rem;
    }

    .herbs-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 3rem;
    }

    .hero {
        background-attachment: fixed;
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .hero-content {
        max-width: 1100px;
        padding: 4rem 2rem;
        text-align: center;
    }

    .hero-content h2 {
        font-size: clamp(3rem, 5vw, 4.5rem);
        margin-bottom: 2.5rem;
        line-height: 1.2;
        word-spacing: 0.1em;
        letter-spacing: -0.01em;
        max-width: 95%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content p {
        font-size: clamp(1.2rem, 2vw, 1.4rem);
        max-width: 850px;
        margin: 0 auto 3rem;
        line-height: 1.7;
        word-spacing: 0.05em;
        padding: 0 2rem;
    }

    .nav-links a {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .herb-item {
        padding: 2.5rem;
    }

    .modal-content {
        max-width: 800px;
        padding: 3rem;
    }
}

@media (min-width: 1600px) {
    .container {
        max-width: 1600px;
        padding: 0 60px;
    }

    .herbs-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .herbs-list {
        grid-template-columns: repeat(3, 1fr);
    }

    .hero-content {
        max-width: 1200px;
        padding: 5rem 3rem;
    }

    .hero-content h2 {
        font-size: clamp(4rem, 4.5vw, 5rem);
        line-height: 1.15;
        margin-bottom: 3rem;
        word-spacing: 0.08em;
        max-width: 95%;
    }

    .hero-content p {
        font-size: clamp(1.3rem, 1.8vw, 1.5rem);
        max-width: 900px;
        line-height: 1.7;
        margin-bottom: 3.5rem;
        padding: 0 2rem;
    }

    .nav-links a {
        padding: 1.2rem 2rem;
        font-size: 1.1rem;
    }
}

/* Ultra-wide screen support */
@media (min-width: 2000px) {
    .container {
        max-width: 1900px;
    }

    .herbs-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .herbs-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Enhanced desktop navigation */
@media (min-width: 1024px) {
    .hero-content {
        max-width: 950px;
        padding: 3rem 1.5rem;
    }

    .hero-content h2 {
        font-size: clamp(2.5rem, 4vw, 3.5rem);
        line-height: 1.25;
        margin-bottom: 2rem;
        word-spacing: 0.08em;
        letter-spacing: -0.01em;
        max-width: 92%;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-content p {
        font-size: clamp(1.1rem, 2.2vw, 1.3rem);
        max-width: 800px;
        margin: 0 auto 2.5rem;
        line-height: 1.7;
        word-spacing: 0.05em;
        padding: 0 1.5rem;
    }

    .nav-links a:hover {
        transform: translateY(-2px);
    }

    .herb-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    }

    .herb-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    }
}

/* Enhanced scrollbar for desktop */
@media (min-width: 1024px) {
    ::-webkit-scrollbar {
        width: 12px;
    }

    ::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb {
        background: #68b684;
        border-radius: 10px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: #5aa372;
    }
}

/* Desktop-specific search improvements */
@media (min-width: 1024px) {
    .search-container {
        max-width: 600px;
    }

    #searchInput {
        width: 400px;
        padding: 18px 25px;
        font-size: 1.1rem;
    }

    .search-btn {
        padding: 12px;
        right: 8px;
    }
}

/* Enhanced Modal for desktop */
@media (min-width: 1024px) {
    .modal-content {
        margin: 3% auto;
        max-width: 900px;
        max-height: 90vh;
    }

    .close {
        font-size: 2.5rem;
        right: 1.5rem;
        top: 1.5rem;
    }

    .close:hover {
        transform: scale(1.1);
        color: #68b684;
    }
}

/* Desktop typography improvements */
@media (min-width: 1024px) {
    body {
        font-size: 1.1rem;
        line-height: 1.7;
    }

    .herbs-section h2,
    .about-section h2,
    .contact-section h2 {
        font-size: 3rem;
    }

    .herb-header h3 {
        font-size: 1.6rem;
    }

    .herb-description {
        font-size: 1.1rem;
        line-height: 1.7;
    }
}

/* Error handling and debugging styles */
.error-boundary {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    text-align: center;
}

.debug-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
    padding: 0.5rem;
    border-radius: 4px;
    font-size: 0.85rem;
    font-family: monospace;
}

/* Loading skeleton for better UX */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Performance optimizations */
.optimized-content {
    contain: layout style paint;
    content-visibility: auto;
}

/* Enhanced Mobile Responsiveness with Performance Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    header {
        padding: 0.5rem 0;
        will-change: transform;
    }

    nav {
        padding: 0 1rem;
        height: auto;
        min-height: 70px;
        contain: layout;
    }

    .nav-links {
        gap: 0;
        will-change: transform;
    }

    .nav-links a {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }

    .logo h1 {
        font-size: 1.4rem;
    }

    .language-switcher {
        margin-left: 1rem;
    }

    body.rtl .language-switcher {
        margin-left: 0;
        margin-right: 1rem;
    }

    .hero {
        background-attachment: scroll;
        min-height: 100vh;
        padding: 2rem 0;
    }

    .hero-content {
        padding: 1.5rem;
        max-width: 100%;
    }

    .hero-content h2 {
        font-size: clamp(1.8rem, 7vw, 2.5rem);
        line-height: 1.1;
        margin-bottom: 1rem;
        padding: 0 10px;
    }

    .hero-content p {
        font-size: clamp(0.95rem, 4vw, 1.1rem);
        line-height: 1.5;
        margin-bottom: 2rem;
        padding: 0 10px;
    }

    .herbs-grid {
        grid-template-columns: 1fr;
        contain: layout;
    }

    .herbs-list {
        grid-template-columns: 1fr;
        contain: layout;
    }

    #searchInput {
        width: calc(100% - 60px);
    }

    .search-container {
        width: 100%;
        padding: 0 1rem;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1rem;
        will-change: transform;
    }

    .quick-nav {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    .nav-stats {
        justify-content: center;
        gap: 1rem;
    }

    .stat-item {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .share-buttons {
        justify-content: center;
        contain: layout;
    }

    .pagination-container {
        gap: 0.3rem;
        contain: layout;
    }

    .pagination-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.8rem;
        min-width: 40px;
    }

    .page-info {
        width: 100%;
        text-align: center;
        margin: 1rem 0 0 0;
    }
}

/* Hamburger menu for mobile */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #2d5016, #4a7c59);
        flex-direction: column;
        box-shadow: 0 4px 20px rgba(0,0,0,0.3);
        border-radius: 0 0 15px 15px;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        width: 100%;
    }

    .nav-links a {
        display: block;
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .hero-content h2 {
        font-size: 2.2rem;
        line-height: 1.2;
    }

    .hero-content p {
        font-size: 1.1rem;
        margin-bottom: 2rem;
    }

    .cta-button {
        padding: 12px 24px;
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    nav {
        flex-wrap: nowrap;
        height: auto;
        padding: 0.5rem 1rem;
        position: relative;
    }

    .logo {
        order: 1;
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }

    .nav-links {
        order: 2;
        width: 100%;
        justify-content: center;
        background: rgba(0,0,0,0.1);
        border-radius: 10px;
        padding: 0.5rem;
        margin-bottom: 0.5rem;
    }

    .nav-links a {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    .language-switcher {
        order: 3;
        margin: 0;
        align-self: center;
    }

    .language-switcher button {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    body.rtl nav {
        flex-direction: column;
    }

    body.rtl .nav-links {
        flex-direction: row;
    }

    .hero {
        min-height: 90vh;
        padding: 1rem 0;
    }

    .hero-content {
        padding: 1rem;
    }

    .hero-content h2 {
        font-size: clamp(1.6rem, 7vw, 2.2rem);
        line-height: 1.2;
        margin-bottom: 1.2rem;
        padding: 0 0.8rem;
        word-spacing: 0.03em;
        white-space: normal;
        word-break: break-word;
        hyphens: auto;
    }

    .hero-content p {
        font-size: clamp(0.95rem, 4.2vw, 1.1rem);
        line-height: 1.5;
        margin-bottom: 1.8rem;
        padding: 0 0.8rem;
        word-spacing: 0.02em;
        text-wrap: balance;
    }

    body.rtl .hero-content h2 {
        word-break: keep-all;
        overflow-wrap: break-word;
        line-height: 1.3;
    }

    body.rtl .hero-content p {
        word-break: keep-all;
        overflow-wrap: break-word;
    }
}
/* Performance Optimizations */
.herb-card,
.herb-item {
    contain: layout style paint;
    content-visibility: auto;
    contain-intrinsic-size: 0 300px;
}

/* Critical CSS - Above the fold */
.hero {
    content-visibility: visible;
}

/* Loading states for better UX */
.herb-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Lazy loaded images */
img.lazy {
    opacity: 0;
    transition: opacity 0.3s;
}

img.lazy.loaded {
    opacity: 1;
}

/* Optimize will-change usage */
.herb-card:hover,
.share-btn:hover,
.cta-button:hover {
    will-change: transform;
}

.herb-card:not(:hover),
.share-btn:not(:hover),
.cta-button:not(:hover) {
    will-change: auto;
}

/* GPU acceleration for smooth scrolling */
.scroll-to-top {
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Reduce paint complexity */
.herb-item,
.herb-card {
    transform: translateZ(0);
}

/* Optimize font loading */
@font-display: swap;

/* Reduce layout thrashing */
.herbs-grid,
.herbs-list {
    contain: layout;
}

/* Network optimization hints */
.prefetch-hint {
    content: '';
    display: none;
}

/* Critical resource hints */
.critical-resource {
    font-display: swap;
}

/* Chrome-specific fixes */
@supports (-webkit-appearance: none) {
    /* Chrome/Safari specific styles */
    .herb-card, .herb-item {
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }

    .scroll-to-top {
        -webkit-transform: translateZ(0);
        -webkit-backface-visibility: hidden;
    }
}

/* SEO and Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Semantic HTML improvements */
article.herb-item {
    scroll-margin-top: 100px;
}

/* Better heading hierarchy for SEO */
.herb-header h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.herb-header .scientific-name {
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Structured data styling */
.structured-data {
    display: none;
}

/* Better text contrast for accessibility and SEO */
.herb-description {
    color: #333;
    line-height: 1.6;
}

.herb-benefits li {
    color: #444;
    margin-bottom: 0.3rem;
}

/* Breadcrumb styling for navigation */
.breadcrumb {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: #68b684;
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Language indicator for SEO */
.language-indicator {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.5rem;
}

/* Ensure proper font rendering in Chrome */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Fix Chrome scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

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

::-webkit-scrollbar-thumb {
    background: #68b684;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a9c75;
}

/* Optimize animations for 60fps */
@media (prefers-reduced-motion: no-preference) {
    .herb-card {
        transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Memory-efficient shadows */
.herb-card,
.herb-item {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.herb-card:hover,
.herb-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Benefits grid styling */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.benefit-item {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border-left: 4px solid #68b684;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.benefit-item h3 {
    color: #2d5016;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.benefit-item p {
    color: #555;
    line-height: 1.6;
}

/* RTL support for benefits grid */
body.rtl .benefits-grid {
    direction: rtl;
}

body.rtl .benefit-item {
    direction: rtl;
    text-align: right;
    border-left: none;
    border-right: 4px solid #68b684;
}

/* Enhanced desktop performance optimizations */
@media (min-width: 1024px) {
    /* Smooth scrolling for desktop */
    html {
        scroll-behavior: smooth;
        scroll-padding-top: 100px;
    }

    /* Enhanced transitions for desktop */
    .herb-card,
    .herb-item,
    .cta-button,
    .view-all-button,
    .share-btn {
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Desktop focus improvements */
    button:focus,
    input:focus,
    a:focus {
        outline: 3px solid #68b684;
        outline-offset: 2px;
        border-radius: 4px;
    }

    /* Desktop keyboard navigation */
    .nav-links a:focus {
        background: rgba(255, 255, 255, 0.2);
        transform: scale(1.05);
    }

    /* Desktop loading states */
    .herb-card.loading,
    .herb-item.loading {
        background: linear-gradient(90deg, #f8f9fa 25%, #e9ecef 50%, #f8f9fa 75%);
        background-size: 200% 100%;
        animation: shimmer 1.5s infinite;
    }

    @keyframes shimmer {
        0% { background-position: 200% 0; }
        100% { background-position: -200% 0; }
    }

    /* Desktop grid improvements */
    .herbs-grid,
    .herbs-list {
        gap: 2rem;
    }

    /* Desktop pagination enhancements */
    .pagination-container {
        margin: 4rem 0;
    }

    .pagination-btn {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-width: 50px;
    }

    .pagination-btn:hover:not(.disabled) {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    }
}

/* Print optimizations for desktop */
@media print {
    * {
        color: black !important;
        background: white !important;
    }

    .herb-item {
        border: 2px solid #ddd;
        margin-bottom: 2rem;
        padding: 1.5rem;
        break-inside: avoid;
    }

    .herbs-list {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .herb-header h3 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }

    .share-buttons,
    .pagination-container,
    .search-container,
    header,
    footer {
        display: none !important;
    }
}