/* Critical Styles - Above the Fold */
:root {
    --primary: #991b1b;
    --secondary: #7f1d1d;
    --dark: #1a202c;
    --light: #f7fafc;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #2d3748;
}

body {
    background-color: #fff;
}

/* Hero Section - Critical */
.hero-section {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 50%, #7f1d1d 100%);
    padding: 60px 0;
    color: white;
    text-align: center;
}

.hero-section h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-section p {
    font-size: 1.1rem;
    margin-bottom: 20px;
    opacity: 0.95;
}

/* Search Container */
.search-container {
    margin: 30px 0;
}

.search-container input {
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    font-size: 1rem;
    width: 100%;
    max-width: 500px;
}

/* Navbar */
.main-header {
    background-color: #2d3748;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-size: 1.3rem;
    font-weight: 700;
    color: white !important;
}

.nav-link {
    color: rgba(255,255,255,0.8) !important;
    transition: color 0.3s;
}

.nav-link:hover {
    color: white !important;
}

/* Tool Cards */
.tool-card {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    background: white;
}

.tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.tool-card h5 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #2d3748;
}

.tool-card p {
    font-size: 0.9rem;
    color: #718096;
    margin-bottom: 15px;
}

.tool-icon {
    color: #667eea;
    margin-right: 8px;
    font-size: 1.3rem;
}

/* Button */
.btn-primary {
    background-color: #667eea;
    border-color: #667eea;
    border-radius: 6px;
    padding: 8px 20px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #5568d3;
    border-color: #5568d3;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

.homepage-container {
    padding: 60px 0;
}

/* Section Title */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2d3748;
    text-align: center;
}

/* Footer */
.main-footer {
    background-color: #1a202c;
    color: #cbd5e0;
    padding: 40px 0;
    margin-top: 60px;
}

.main-footer h5, .main-footer h6 {
    color: white;
    font-weight: 600;
    margin-bottom: 15px;
}

.main-footer a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s;
}

.main-footer a:hover {
    color: white;
}

/* Utility */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.col-md-4, .col-sm-6 {
    padding: 15px;
}

@media (max-width: 768px) {
    .col-md-4 {
        flex: 0 0 50%;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .col-md-4, .col-sm-6 {
        flex: 0 0 100%;
    }
    
    .hero-section h1 {
        font-size: 1.5rem;
    }
}