/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

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

/* Header */
.site-header {
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    padding: 1rem 0;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    color: #2563eb;
    text-decoration: none;
}

.logo a {
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #2563eb;
}

/* Main Content */
main {
    min-height: calc(100vh - 200px);
    padding: 2rem 0;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 3rem;
}

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

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
}

/* Category Grid */
.converter-categories {
    margin-bottom: 3rem;
}

.converter-categories h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e293b;
}

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

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

.category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.category-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1e293b;
}

.converter-list {
    list-style: none;
    margin-bottom: 1rem;
}

.converter-list li {
    margin-bottom: 0.5rem;
}

.converter-list a {
    color: #2563eb;
    text-decoration: none;
    transition: color 0.3s;
}

.converter-list a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.view-all {
    color: #64748b;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.view-all:hover {
    color: #2563eb;
}

/* Converter Page */
.converter-page {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.converter-header {
    text-align: center;
    margin-bottom: 2rem;
}

.converter-header h1 {
    font-size: 2rem;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.converter-description {
    color: #64748b;
    font-size: 1.1rem;
}

/* Converter Tool */
.converter-card {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto 2rem;
    padding: 2rem;
    background: #f8fafc;
    border-radius: 8px;
    align-items: end;
}

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
    font-size: 1.1rem;
}

.input-group input {
    padding: 1rem;
    font-size: 1.2rem;
    border: 2px solid #e2e8f0;
    border-radius: 6px;
    transition: border-color 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #2563eb;
}

.input-group input[readonly] {
    background-color: #f1f5f9;
    cursor: pointer;
}

.converter-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

#swap-units {
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

#swap-units:hover {
    background: #1e40af;
    transform: rotate(180deg);
}

.conversion-formula {
    text-align: center;
    color: #64748b;
    margin-bottom: 2rem;
}

/* Converter Content */
.converter-content {
    max-width: 800px;
    margin: 0 auto;
}

.conversion-info h2,
.conversion-info h3 {
    color: #1e293b;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.conversion-info ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.conversion-info li {
    margin-bottom: 0.5rem;
}

/* Related Converters */
.related-converters {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e2e8f0;
}

.related-converters h2 {
    margin-bottom: 1rem;
    color: #1e293b;
}

.converter-links {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
    list-style: none;
}

.converter-links a {
    color: #2563eb;
    text-decoration: none;
}

.converter-links a:hover {
    text-decoration: underline;
}

/* Features Section */
.features {
    margin: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 2rem;
    color: #1e293b;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature {
    text-align: center;
    padding: 2rem;
}

.feature h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.feature p {
    color: #64748b;
}

/* Ad Container */
.ad-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 1rem;
    text-align: center;
}

/* Footer */
.site-footer {
    background-color: #1e293b;
    color: white;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

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

.footer-section h3 {
    margin-bottom: 1rem;
    color: #fff;
}

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

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

.footer-section a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #334155;
    color: #94a3b8;
}

/* Responsive Design */
@media (max-width: 768px) {
    .converter-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .converter-arrow {
        transform: rotate(90deg);
    }
    
    #swap-units:hover {
        transform: rotate(270deg);
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr;
    }
    
    .nav-menu {
        gap: 1rem;
    }
}
