/* Main stylesheet for SWAUS Metals & Alloys Database */

/* Global Styles */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --steel-blue: #4682B4;
    --copper-orange: #B87333;
    --gold-yellow: #FFD700;
    --silver-gray: #C0C0C0;
    --iron-gray: #43464B;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    background-color: #f8f9fa;
}

/* Cards and elements styling */
.metal-card, .alloy-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.metal-card:hover, .alloy-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card-img-top {
    height: 180px;
    object-fit: cover;
    background-color: #eee;
}

.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
}

/* Category colors */
.transition-metals { background-color: var(--steel-blue); color: white; }
.noble-metals { background-color: var(--gold-yellow); color: #333; }
.post-transition-metals { background-color: var(--copper-orange); color: white; }
.alkali-metals { background-color: #F08080; color: white; }
.alkaline-earth-metals { background-color: #CD853F; color: white; }
.lanthanides { background-color: #9932CC; color: white; }
.actinides { background-color: #8B0000; color: white; }

.ferrous-alloys { background-color: var(--iron-gray); color: white; }
.aluminum-alloys { background-color: var(--silver-gray); color: #333; }
.copper-alloys { background-color: var(--copper-orange); color: white; }
.nickel-alloys { background-color: #708090; color: white; }
.titanium-alloys { background-color: #708090; color: white; }

/* Property tables */
.property-table th {
    width: 40%;
    background-color: #f8f9fa;
}

/* Element symbol styling */
.element-symbol {
    font-size: 4rem;
    font-weight: bold;
    line-height: 1;
    color: var(--primary-color);
}

.element-number {
    font-size: 1.2rem;
    font-weight: bold;
}

.element-weight {
    font-size: 1rem;
    color: var(--secondary-color);
}

/* 3D visualization container */
#visualization-container {
    width: 100%;
    height: 400px;
    background-color: #eee;
    margin-bottom: 2rem;
    position: relative;
}

/* Loading spinner */
.loading-spinner {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
}

/* Compare tool */
.compare-item {
    position: relative;
    padding: 1rem;
    border: 1px solid #ddd;
    border-radius: 0.25rem;
    margin-bottom: 1rem;
}

.compare-item .remove-item {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    cursor: pointer;
}

.compare-property-match {
    background-color: #d4edda;
}

.compare-property-different {
    background-color: #f8d7da;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .element-symbol {
        font-size: 3rem;
    }
    
    #visualization-container {
        height: 300px;
    }
}

.tabs-nav {
    display: flex;
    background-color: var(--primary-color);
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-x: auto;
}

.tabs-nav li {
    flex-shrink: 0;
}

.tabs-nav li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--light-text);
    font-weight: 600;
    transition: var(--transition);
}

.tabs-nav li.active a {
    background-color: var(--secondary-color);
    color: white;
}

.tabs-nav li a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.tabs-content {
    padding: 2rem;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

.panel-columns {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
}

.main-content {
    flex: 1 1 65%;
    min-width: 300px;
}

.sidebar {
    flex: 1 1 30%;
    min-width: 250px;
}

.element-image {
    margin-bottom: 1.5rem;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.image-caption {
    font-size: 0.875rem;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
    color: #666;
}

.element-at-a-glance {
    background-color: var(--light-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
}

.element-at-a-glance h4 {
    margin-bottom: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.element-at-a-glance ul {
    list-style: none;
    padding: 0;
}

.element-at-a-glance li {
    margin-bottom: 0.5rem;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 0.5rem;
}

.characteristics-list {
    list-style: none;
    padding: 0;
}

.characteristics-list li {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px dashed var(--border-color);
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.property {
    background-color: var(--light-color);
    padding: 1rem;
    border-radius: var(--border-radius);
}

.property h4 {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

.related-list {
    columns: 2;
    column-gap: 2rem;
}

.references-list {
    padding-left: 1.5rem;
    font-size: 0.9rem;
}

/* Search Page 
-------------------------------------------------- */
.search-form {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.search-form .form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.search-form .form-group {
    flex: 1 1 200px;
}

.search-results {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 1.5rem;
}

.search-results-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.result-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.result-item:last-child {
    border-bottom: none;
}

.result-item h3 {
    margin-bottom: 0.5rem;
}

.result-item .meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.result-item .result-details {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
}

.result-item .detail {
    flex: 1 1 150px;
    background-color: var(--light-color);
    padding: 0.5rem;
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.result-item .detail strong {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #666;
}

/* Responsive Styles
-------------------------------------------------- */
@media (max-width: 992px) {
    .container {
        width: 95%;
    }
    
    .column.third, .column.fourth {
        flex: 0 0 calc(50% - 1rem);
    }
    
    .site-header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 1rem;
    }
    
    .search-box {
        width: 100%;
        margin-top: 1rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.75rem;
    }
    
    .hero-section {
        padding: 3rem 0;
    }
    
    .column.half, .column.third, .column.fourth {
        flex: 0 0 100%;
    }
    
    .main-nav ul {
        flex-direction: column;
    }
    
    .main-nav li {
        margin: 0;
        text-align: center;
    }
    
    .main-nav li a {
        padding: 0.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .element-header {
        flex-direction: column;
        text-align: center;
    }
    
    .element-symbol {
        margin-right: 0;
        margin-bottom: 1.5rem;
    }
    
    .tabs-nav li a {
        padding: 0.75rem;
    }
    
    .tabs-content {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding: 2rem 0;
    }
    
    .hero-section h1 {
        font-size: 1.75rem;
    }
    
    .search-box-large input {
        padding: 0.75rem;
    }
    
    .tabs-nav {
        flex-wrap: wrap;
    }
    
    .tabs-nav li {
        flex: 0 0 50%;
    }
    
    .tabs-nav li a {
        text-align: center;
    }
    
    .panel-columns {
        flex-direction: column;
    }
    
    .main-content, .sidebar {
        width: 100%;
    }
} 