/* Applications Page Specific Styles */
.applications-container {
    background-color: #f8f9fa; /* Light background for the content container */
    padding: 3rem;
    border-radius: 0.75rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    color: #000; /* Default text color for light mode */
}

.container{
    background-color: transparent !important; /* Ensure container background is white */
}

.applications-heading {
    font-size: 3rem;
    font-weight: 700;
    color: #000; /* Use a darker primary color for heading */
}

.applications-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #dee2e6; /* Light border */
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    background-color: #fff; /* White background for each item */
}

.app-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.75rem 1.5rem rgba(0, 0, 0, 0.15);
    border-color: var(--primary-light); /* Highlight border on hover */
}

.app-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary); /* Icon background matches primary color */
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.app-text {
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000; /* Dark text for light mode */
}

/* Specific styling for the 'Fe/Mn' stacked icon */
.icon-stacked {
    position: relative;
    font-size: 2rem; /* Base font size for the stacked icon */
    width: 60px;
    height: 60px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: var(--primary);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.icon-stacked-base {
    position: absolute;
    font-size: 1.5rem; /* Smaller icon inside the circle */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.icon-stacked-text {
    position: absolute;
    font-size: 0.8rem; /* Size for Fe/Mn text */
    font-weight: bold;
    bottom: 5px; /* Position it at the bottom of the circle */
    right: 5px; /* Position it at the right of the circle */
    background-color: var(--primary-dark); /* Small background for contrast */
    color: #fff;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    line-height: 1;
    z-index: 10; /* Ensure text is on top */
}

/* Dark Mode Overrides for applications.css */
[data-bs-theme="dark"] .applications-container {
    background-color: var(--card-dark); /* Dark card background */
    color: var(--text-dark); /* Light text */
    border-color: var(--border-dark);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.3); /* Darker shadow */
}

[data-bs-theme="dark"] .applications-heading {
    color: var(--primary-light); /* Lighter primary color for dark mode heading */
}

[data-bs-theme="dark"] .app-item {
    background-color: var(--header-dark); /* Slightly lighter dark for item backgrounds */
    border-color: var(--border-dark);
}

[data-bs-theme="dark"] .app-item:hover {
    border-color: var(--primary); /* Lighter primary for hover border in dark mode */
}

[data-bs-theme="dark"] .app-icon {
    background-color: var(--primary); /* Keep primary for icon background */
}

[data-bs-theme="dark"] .app-text {
    color: var(--text-dark); /* Ensure app item text is light */
}

[data-bs-theme="dark"] .icon-stacked-text {
    background-color: var(--primary); /* Adjusted dark mode background for stacked text */
}

/* Responsive adjustments for the grid */
@media (max-width: 768px) {
    .applications-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 1rem;
    }
    .applications-heading {
        font-size: 2.2rem;
    }
    .app-icon {
        width: 50px;
        height: 50px;
        font-size: 1.6rem;
    }
    .app-text {
        font-size: 0.85rem;
    }
    .icon-stacked {
        width: 50px;
        height: 50px;
    }
    .icon-stacked-base {
        font-size: 1.2rem;
    }
    .icon-stacked-text {
        font-size: 0.7rem;
    }
}

@media (max-width: 576px) {
    .applications-grid {
        grid-template-columns: 1fr; /* Single column on very small screens */
    }
    .applications-container {
        padding: 2rem 1rem;
    }
}
