/* Reset and Base 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;
}

/* Header Styles */
.main-header {
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 1rem 0;
}

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

.nav-brand h1 a {
    color: #2c3e50;
    text-decoration: none;
    font-size: 1.8rem;
    font-weight: 700;
}

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

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

.nav-menu a:hover {
    color: #3498db;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Calculators Section */
.calculators-section {
    padding: 4rem 0;
}

.calculators-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.calculator-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid #e9ecef;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.calculator-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

.calculator-card h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.calculator-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.calculator-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.75rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background 0.3s, transform 0.2s;
}

.calculator-link:hover {
    background: #2980b9;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
}

/* Scientific Calculator Styles */
.calculator-page {
    min-height: 100vh;
    background: #f8f9fa;
}

.calculator-container {
    max-width: 600px;
    margin: 0 auto;
}

.calculator-display {
    background: #1a1a1a;
    color: #00ff00;
    font-family: 'Courier New', monospace;
    font-size: 2rem;
    padding: 1rem;
    border-radius: 10px;
    text-align: right;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    word-break: break-all;
    border: 2px solid #333;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.calculator-keypad {
    display: grid;
    gap: 10px;
    margin-top: 1rem;
}

.calculator-keypad.scientific {
    grid-template-columns: repeat(5, 1fr);
}

.calc-btn {
    background: #e9ecef;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    min-height: 60px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.calc-btn:hover {
    background: #dee2e6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.calc-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.calc-btn.operator {
    background: #007bff;
    color: white;
}

.calc-btn.operator:hover {
    background: #0056b3;
}

.calc-btn.equals {
    background: #28a745;
    color: white;
}

.calc-btn.equals:hover {
    background: #1e7e34;
}

.calc-btn.clear {
    background: #dc3545;
    color: white;
}

.calc-btn.clear:hover {
    background: #c82333;
}

/* Algebra Calculator Styles */
.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.algebra-types, .algebra-calculator {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.algebra-btn {
    border: 1px solid #007bff;
    color: #007bff;
    background: white;
}

.algebra-btn.active {
    background: #007bff;
    color: white;
}

.algebra-btn:hover {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.result-card {
    border-radius: 10px;
}

.step-item {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f1f3f4;
}

.step-item:last-child {
    border-bottom: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .calculator-display {
        font-size: 1.5rem;
        min-height: 60px;
        padding: 0.75rem;
    }
    
    .calc-btn {
        padding: 0.75rem;
        font-size: 1rem;
        min-height: 50px;
    }
    
    .calculator-keypad.scientific {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
}

@media (max-width: 576px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .calculator-keypad.scientific {
        grid-template-columns: repeat(3, 1fr);
    }
}
    margin-top: 3rem;
}

.calculator-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.calculator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.calculator-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.calculator-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.calculator-card p {
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.calc-link {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: background 0.3s;
}

.calc-link:hover {
    background: #2980b9;
}

/* Features Section */
.features {
    background: white;
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c3e50;
}

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

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.feature h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.feature p {
    color: #666;
    line-height: 1.6;
}

/* About Section */
.about {
    padding: 4rem 0;
    background: #f8f9fa;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.about p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #666;
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

/* Contact Section */
.contact {
    padding: 4rem 0;
    background: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #2c3e50;
}

.contact > .container > p {
    text-align: center;
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 2rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

.submit-btn {
    background: #e74c3c;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-btn:hover {
    background: #c0392b;
}

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

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

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
}

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

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

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

.footer-section a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #34495e;
    color: #bdc3c7;
}

/* Calculator Page Styles */
.calculator-page {
    padding: 2rem 0;
    min-height: 70vh;
}

.calculator-container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

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

.calculator-header h1 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
}

.calculator-header p {
    font-size: 1.1rem;
    color: #666;
}

.calculator-form {
    margin-bottom: 2rem;
}

.input-group {
    margin-bottom: 1.5rem;
}

.input-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: #3498db;
}

.calculator-buttons {
    text-align: center;
    margin: 2rem 0;
}

.calculate-btn {
    background: #3498db;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 25px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.calculate-btn:hover {
    background: #2980b9;
}

.result-section {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 10px;
    margin-top: 2rem;
    text-align: center;
}

.result-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
}

.result-value {
    font-size: 2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 1rem;
}

/* Breadcrumb */
.breadcrumb {
    padding: 1rem 0;
    background: #f8f9fa;
}

.breadcrumb-list {
    display: flex;
    list-style: none;
    gap: 0.5rem;
    align-items: center;
}

.breadcrumb-list li {
    color: #666;
}

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

.breadcrumb-list a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-menu ul {
        gap: 1rem;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .calculators-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .calculators-section {
        padding: 2rem 0;
    }
    
    .calculator-card {
        padding: 1.5rem;
    }
}
