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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

strong {
    font-weight: 600;
}

/* Header Styles */
header {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.search-container {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
}

#search-input {
    padding: 0.5rem;
    border: none;
    border-radius: 4px 0 0 4px;
    width: 300px;
    max-width: 80%;
}

#search-button {
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

.highlight {
    background-color: yellow;
    color: black;
}

/* Navigation Styles */
nav {
    background-color: #34495e;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

nav ul {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: #3498db;
}

/* Main Content Styles */
main {
    padding: 2rem 0;
}

section {
    margin-bottom: 3rem;
}

section h2 {
    color: #2c3e50;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #3498db;
}

section p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.section-link {
    text-align: right;
    margin-top: 1.5rem;
}

.section-link a {
    color: #3498db;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.section-link a:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Calculator Image */
.calculator-image {
    text-align: center;
    margin: 2rem 0;
}

.calculator-image img, .calculator-image object {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Keys Grid */
.keys-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5rem;
}

.key-card {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.key {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: #3498db;
    color: white;
    font-size: 1.5rem;
    font-weight: bold;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.key-card h3 {
    color: #2c3e50;
    margin-bottom: 0.5rem;
}

/* FAQ Section */
.faq-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(500px, 1fr));
    gap: 1.5rem;
}

.faq-item {
    background-color: white;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

/* Footer Styles */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 2rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3 {
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #3498db;
    text-decoration: underline;
}

.copyright {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
}

/* Responsive Styles */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    nav ul li {
        margin: 0.5rem 0;
    }
    
    .keys-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    }
    
    .faq-container {
        grid-template-columns: 1fr;
    }
}

/* Key Color Variations */
#basic .key {
    background-color: #3498db; /* Blue */
}

#memory .key {
    background-color: #e74c3c; /* Red */
}

#scientific .key {
    background-color: #2ecc71; /* Green */
}

#special .key {
    background-color: #9b59b6; /* Purple */
}

/* Hover Effects for Interactive Elements */
.key-card:hover .key {
    transform: scale(1.1);
    transition: transform 0.3s;
}

/* Introduction Section */
#intro p {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    text-align: justify;
}

/* Animation for Key Cards */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.key-card {
    animation: fadeIn 0.5s ease-out forwards;
}

.keys-grid .key-card:nth-child(1) { animation-delay: 0.1s; }
.keys-grid .key-card:nth-child(2) { animation-delay: 0.2s; }
.keys-grid .key-card:nth-child(3) { animation-delay: 0.3s; }
.keys-grid .key-card:nth-child(4) { animation-delay: 0.4s; }
.keys-grid .key-card:nth-child(5) { animation-delay: 0.5s; }
.keys-grid .key-card:nth-child(6) { animation-delay: 0.6s; }
.keys-grid .key-card:nth-child(7) { animation-delay: 0.7s; }
.keys-grid .key-card:nth-child(8) { animation-delay: 0.8s; }

/* Tooltip */
.tooltip {
    position: absolute;
    padding: 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    pointer-events: none;
    z-index: 1000;
    font-size: 0.9rem;
    max-width: 250px;
}

/* Breadcrumbs */
.breadcrumbs {
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.breadcrumbs a {
    color: #3498db;
    text-decoration: none;
}

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

.breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #777;
}

/* Page-specific styles */
.page-header {
    background-color: #3498db;
    color: white;
    padding: 3rem 0;
    margin-bottom: 2rem;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.page-header p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
} 