/* General Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f0f8ff; /* Light Alice Blue */
    color: #2f4f4f; /* Dark Slate Gray */
    line-height: 1.6;
    padding: 20px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Header Styles */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 2px solid #778899; /* Light Slate Gray */
    margin-bottom: 2rem;
}

.header-left .title {
    font-size: 2rem;
    color: #4682b4; /* Steel Blue */
}

.header-left .title i {
    margin-right: 0.5rem;
}

.header-right .back-home-btn {
    background-color: #4682b4; /* Steel Blue */
    color: #fff;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

.header-right .back-home-btn:hover {
    background-color: #36648b; /* Darker Steel Blue */
}

.header-right .back-home-btn i {
    margin-right: 0.3rem;
}

/* Intro Section */
.intro {
    text-align: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.intro p {
    font-size: 1.1rem;
    color: #556b2f; /* Dark Olive Green */
}

/* Formula Categories */
.formula-categories {
    margin-bottom: 3rem;
}

.formula-categories h2 {
    font-size: 1.6rem;
    color: #4682b4; /* Steel Blue */
    margin-bottom: 1rem;
}

.formula-categories h2 i {
    margin-right: 0.5rem;
}

.formula-categories ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
}

.formula-categories ul li a {
    color: #4682b4; /* Steel Blue */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.formula-categories ul li a:hover {
    color: #36648b; /* Darker Steel Blue */
    transform: translateY(-2px);
}

.formula-categories ul li a i {
    margin-right: 0.3rem;
}

/* Main Content Container */
.formulas-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Category Sections */
.category-section {
    margin-bottom: 3rem;
}

.category-section h2 {
    font-size: 1.8rem;
    color: #2f4f4f; /* Dark Slate Gray */
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Formula Card */
.formula-card {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.formula-card h3 {
    font-size: 1.4rem;
    color: #2f4f4f; /* Dark Slate Gray */
    margin-bottom: 0.75rem;
}

.formula-card p {
    font-size: 1.1rem;
    color: #556b2f; /* Dark Olive Green */
    margin-bottom: 1rem;
    line-height: 1.4;
}

.formula-card .formula {
    font-family: 'Roboto Slab', monospace;
    font-size: 1.2rem;
    color: #4682b4; /* Steel Blue */
    margin-bottom: 0.5rem;
}

.formula-card .formula-description {
    font-style: italic;
    color: #696969; /* Dim Gray */
}

.formula-card .details-link {
    color: #2e8b57; /* Sea Green */
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease, border-bottom 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.formula-card .details-link:hover {
    color: #228b22; /* Forest Green */
}

/* Footer Styles */
.footer {
    text-align: center;
    padding: 1rem 0;
    border-top: 2px solid #778899; /* Light Slate Gray */
    margin-top: 4rem;
    color: #556b2f; /* Dark Olive Green */
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .header {
        flex-direction: column;
        text-align: center;
    }

    .header-left {
        margin-bottom: 1rem;
    }

    .formula-categories ul {
        flex-direction: column;
        align-items: center;
    }

    .formula-categories ul li {
        margin-bottom: 0.5rem;
    }
}
