/* 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: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* ✅ Logo Fix */
.logo-text {
    font-size: 1.5rem;
    color: #2c3e50;
    font-weight: 700;
    display: inline-block;
    position: relative;
}

/* optional underline animation */
.logo-text::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0%;
    height: 2px;
    background-color: #3498db;
    transition: width 0.3s ease;
}

.logo-text:hover::after {
    width: 100%;
}

.nav-list {
    list-style: none;
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-list li {
    margin: 0;
}

.nav a {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.nav a:hover,
.nav a.active {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 4rem 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    margin-top: 0.5rem;
}

/* Calculator Section */
.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.calculator {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 3rem;
    margin-top: 2rem;
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.optional {
    color: #888;
    font-weight: 400;
    font-size: 0.9em;
}

.form-group input {
    padding: 0.75rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
    width: 100%;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.input-hint {
    color: #888;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    display: block;
}

.rpm-range {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.rpm-input-group {
    flex: 1;
    min-width: 150px;
}

.rpm-label {
    display: block;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.rpm-input-group input {
    width: 100%;
}

.calculate-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    margin-top: 1rem;
    width: 100%;
    touch-action: manipulation;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

.calculate-btn:focus {
    outline: 3px solid rgba(102, 126, 234, 0.3);
    outline-offset: 2px;
}

/* Results Section */
.calculator-result {
    margin-top: 2rem;
    padding: 2rem;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.calculator-result h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
}

.result-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #fff;
    border-radius: 6px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.result-range {
    margin-top: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 6px;
    text-align: center;
}

.result-range p {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.result-label {
    font-weight: 500;
    color: #555;
}

.result-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: #2c3e50;
}

.result-range .result-value {
    color: #fff;
}

.disclaimer-box {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 1rem;
    margin-top: 1rem;
}

.disclaimer-box p {
    color: #856404;
    font-size: 0.95rem;
    margin: 0;
}

/* Content Section */
.content-section {
    padding: 3rem 0;
    background: #fff;
}

.seo-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.seo-content h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.seo-content h3 {
    font-size: 1.5rem;
    color: #34495e;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.seo-content p {
    margin-bottom: 1.25rem;
    color: #555;
    font-size: 1.05rem;
    line-height: 1.8;
}

.seo-content ul,
.seo-content ol {
    margin-bottom: 1.25rem;
    padding-left: 2rem;
    color: #555;
    line-height: 1.8;
}

.seo-content li {
    margin-bottom: 0.5rem;
}

.content-disclaimer {
    background: #e8f4f8;
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    margin-top: 2rem;
    font-style: italic;
}

/* Footer */
.footer {
    background: #2c3e50;
    color: #ecf0f1;
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 0.5rem;
    color: #fff;
}

.footer-section p {
    color: #bdc3c7;
}

.footer-links h4 {
    margin-bottom: 1rem;
    color: #fff;
}

.footer-links ul {
    list-style: none;
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s;
    line-height: 2;
}

.footer-links a:hover {
    color: #3498db;
}

.footer-bottom {
    border-top: 1px solid #34495e;
    padding-top: 1.5rem;
    text-align: center;
    color: #95a5a6;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .logo-text {
        font-size: 1.6rem;
        font-weight: 700;
        color: #2c3e50;
        display: inline-block;
    }

    .nav-list {
        gap: 1rem;
        justify-content: center;
    }

    .hero {
        padding: 2.5rem 0;
    }

    .hero-title {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        padding: 0 1rem;
    }

    .calculator {
        padding: 1.5rem;
        margin-top: 1.5rem;
    }

    .rpm-range {
        flex-direction: column;
    }

    .rpm-input-group {
        width: 100%;
    }

    .result-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }

    .result-value {
        font-size: 1.1rem;
    }

    .seo-content {
        padding: 1rem;
    }

    .seo-content h2 {
        font-size: 1.6rem;
    }

    .seo-content h3 {
        font-size: 1.3rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-section {
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.5rem;
        padding: 0 1rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .calculator {
        padding: 1rem;
        border-radius: 8px;
    }

    .calculate-btn {
        padding: 0.875rem 1.5rem;
        font-size: 1rem;
    }

    .calculator-result {
        padding: 1.5rem;
    }

    .seo-content h2 {
        font-size: 1.4rem;
    }

    .seo-content h3 {
        font-size: 1.2rem;
    }

    .seo-content p {
        font-size: 1rem;
    }

    .container {
        padding: 0 15px;
    }
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    .calculate-btn {
        min-height: 44px;
    }

    .form-group input {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .nav a {
        padding: 0.5rem;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}
