:root {
    --primary-color: #0078d4;
    --secondary-color: #f3f2f1;
    --accent-color: #106ebe;
    --text-color: #323130;
    --light-text: #605e5c;
    --border-color: #e1e1e1;
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    margin: 0;
    padding: 0;
    color: var(--text-color);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 0;
    box-shadow: var(--shadow);
}

header .container {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 20px;
}

header h1 {
    margin: 0;
    font-weight: 600;
}

header h1 a {
    text-decoration: none;
    color: white;
}

nav {
    justify-self: center;
}

.header-contact {
    justify-self: end;
    text-align: right;
    color: white;
}

.header-contact p {
    margin: 0;
    font-size: 0.9rem;
    font-weight: bold;
}

@media (max-width: 768px) {
    header .container {
        grid-template-columns: 1fr;
        gap: 10px;
        text-align: center;
    }
    nav {
        justify-self: center;
    }
    .header-contact {
        justify-self: center;
        text-align: center;
    }
    .search-form {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .search-container {
        width: 100%;
    }
    #suggestions {
        width: 100%;
    }
    .featured .medicine-grid,
    .feature-grid,
    .category-grid,
    .post-grid {
        grid-template-columns: 1fr;
    }
    .categories-layout {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    .category-filter {
        order: 2;
    }
    .medicines-display {
        order: 1;
    }
    .contact-content {
        flex-direction: column;
        gap: 20px;
    }
    .contact-info,
    .contact-form {
        width: 100%;
    }
    body {
        font-size: 14px;
    }
    h1, h2, h3 {
        font-size: 1.2em;
    }
}

nav ul {
    list-style: none;
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
}

nav a {
    color: white;
    text-decoration: none;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.3s;
}

nav a:hover {
    background-color: var(--accent-color);
}

.hero {
    background-color: var(--secondary-color);
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.hero p {
    color: var(--light-text);
    margin-bottom: 2rem;
}

.search-form {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
}

.search-form input {
    padding: 0.75rem;
    width: 300px;
    border: 1px solid var(--border-color);
    border-radius: 4px 0 0 4px;
    font-size: 1rem;
}

.search-form input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(0, 120, 212, 0.2);
}

.search-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.search-form button:hover {
    background-color: var(--accent-color);
}

.browse-link {
    display: inline-block;
    margin-left: 10px;
    padding: 0.75rem 1rem;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.browse-link:hover {
    background-color: var(--accent-color);
}

.search-container {
    position: relative;
}

.featured {
    padding: 4rem 0;
}

.featured h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.medicine-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.medicine-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.medicine-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.medicine-card h4 {
    margin-top: 0;
    color: var(--primary-color);
}

.medicine-card p {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.medicine-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.medicine-card a:hover {
    text-decoration: underline;
}

.features {
    background-color: var(--secondary-color);
    padding: 4rem 0;
}

.features h3 {
    text-align: center;
    margin-bottom: 2rem;
    font-weight: 600;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.feature-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    text-align: center;
    transition: box-shadow 0.3s;
}

.feature-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.feature-item h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.feature-item p {
    color: var(--light-text);
    margin-bottom: 0;
}

.about-hero, .contact-hero, .medicines-hero, .categories-hero, .blog-hero, .faq-hero {
    background-color: var(--secondary-color);
    padding: 1rem 0;
    text-align: center;
}

.about-hero h2, .contact-hero h2, .medicines-hero h2, .categories-hero h2, .blog-hero h2, .faq-hero h2 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.about-hero p, .contact-hero p, .medicines-hero p, .categories-hero p, .blog-hero p, .faq-hero p {
    color: var(--light-text);
    margin-bottom: 0;
}

.about-content, .medicines-list, .categories-list, .blog-posts, .faq-list {
    padding: 0;
}

.about-content h3, .medicines-list h3, .categories-list h3, .blog-posts h3, .faq-list h3 {
    text-align: center;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.categories-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px;
}

.category-filter {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.category-filter h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.category-filter ul {
    list-style: none;
    padding: 0;
}

.category-filter li {
    margin-bottom: 0.125rem;
}

.category-btn {
    width: 100%;
    padding: 0.25rem;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    transition: background-color 0.3s;
}

.category-btn:hover, .category-btn.active {
    background: var(--primary-color);
    color: white;
}

.medicines-display h3 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.medicines-list-style {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.medicine-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.medicine-item:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.medicine-item h4 {
    margin: 0 0 0.25rem 0;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.medicine-item p {
    margin: 0;
    color: var(--light-text);
    font-size: 0.8rem;
}



.about-content p {
    line-height: 1.6;
    margin-bottom: 1rem;
}

.contact-content {
    padding: 4rem 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.contact-info, .contact-form {
    flex: 1;
    margin: 0 2rem;
}

.contact-info h3, .contact-form h3 {
    margin-bottom: 1rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    margin-bottom: 1rem;
    font-family: var(--font-family);
}

.contact-form button {
    padding: 0.75rem 1.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: var(--accent-color);
}

.category-grid, .post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.category-card, .post-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: box-shadow 0.3s;
}

.category-card:hover, .post-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.category-card h4, .post-card h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.category-card p, .post-card p {
    color: var(--light-text);
    margin-bottom: 1rem;
}

.category-card a, .post-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.category-card a:hover, .post-card a:hover {
    text-decoration: underline;
}

.faq-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow);
}

.faq-item h4 {
    margin-top: 0;
    color: var(--primary-color);
    font-weight: 600;
}

.faq-item p {
    color: var(--light-text);
    margin-bottom: 0;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 8px;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
}

#suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
    width: 100%;
    z-index: 1000;
    display: none;
    box-shadow: var(--shadow);
}

#suggestions li {
    padding: 8px;
    cursor: pointer;
    list-style: none;
    border-bottom: 1px solid #eee;
}

#suggestions li:hover {
    background: #f0f0f0;
}

footer {
    background-color: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    text-align: left;
}

.footer-section {
    flex: 1;
    margin: 0 1rem;
}

.footer-section h4 {
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.footer-section p {
    margin: 0.25rem 0;
    color: var(--secondary-color);
}

.footer-section ul {
    list-style: none;
    padding: 0;
}

.footer-section li {
    margin-bottom: 0.25rem;
}

.footer-section a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}