/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    text-decoration: none;
    color: #2c3e50;
    transition: color 0.3s ease;
}

a:hover {
    color: #3498db;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: 2.5rem;
    color: #2c3e50;
}

h2 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 40px;
    color: #2c3e50;
}

h3 {
    font-size: 1.5rem;
    color: #2c3e50;
}

p {
    margin-bottom: 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    color: white;
    border: 2px solid #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
    color: white;
}

.btn-secondary {
    background-color: transparent;
    color: #3498db;
    border: 2px solid #3498db;
}

.btn-secondary:hover {
    background-color: #3498db;
    color: white;
}

/* Header */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 15px 0;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 30px;
}

nav ul li a {
    font-weight: 500;
}

/* Hero Section */
.hero {
    padding: 80px 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    flex: 1;
    padding-right: 40px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.cta-buttons {
    margin-top: 30px;
}

.cta-buttons .btn {
    margin-right: 15px;
}

/* Features Section */
.features {
    padding: 80px 0;
    background-color: white;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.feature-icon {
    margin-bottom: 20px;
}

/* How It Works Section */
.how-it-works {
    padding: 80px 0;
    background-color: #f5f7fa;
}

.steps {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-top: 40px;
}

.step {
    flex: 1;
    min-width: 300px;
    text-align: center;
    padding: 20px;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: #3498db;
    color: white;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 20px;
}

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background-color: white;
}

.testimonial-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 30px;
    padding: 20px 0;
    scrollbar-width: none; /* Firefox */
}

.testimonial-slider::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.testimonial {
    flex: 0 0 auto;
    width: 350px;
    scroll-snap-align: start;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-content {
    margin-bottom: 20px;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-author img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    margin-right: 15px;
    object-fit: cover;
}

/* Download Section */
.download {
    padding: 80px 0;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    text-align: center;
}

.download h2,
.download p {
    color: white;
}

.download-buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    margin-top: 40px;
}

/* Newsletter Section */
.newsletter {
    padding: 60px 0;
    background-color: #f5f7fa;
    text-align: center;
}

.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
}

.newsletter-form input {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid #ddd;
    border-radius: 30px 0 0 30px;
    font-size: 1rem;
    outline: none;
}

.newsletter-form button {
    border-radius: 0 30px 30px 0;
    border: none;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #ecf0f1;
}

.footer-col ul li a:hover {
    color: #3498db;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.social-links a:hover {
    background-color: #3498db;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    color: #bdc3c7;
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero .container {
        flex-direction: column;
    }
    
    .hero-content {
        padding-right: 0;
        margin-bottom: 40px;
        text-align: center;
    }
    
    .steps {
        flex-direction: column;
    }
    
    .step {
        margin-bottom: 40px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    header .container {
        flex-direction: column;
    }
    
    .logo {
        margin-bottom: 20px;
    }
    
    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 0 15px 10px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: 30px;
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: 30px;
    }
}

@media (max-width: 576px) {
    .cta-buttons {
        display: flex;
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
    }
    
    .download-buttons {
        flex-direction: column;
        align-items: center;
    }
}

/* Calculator Section */
.calculator-section {
    padding: 80px 0;
    background-color: white;
}

.calculator-container {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.calculator {
    width: 100%;
    max-width: 400px;
    background-color: #f8f9fa;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.calculator-display {
    background-color: #2c3e50;
    color: white;
    padding: 20px;
    text-align: right;
    position: relative;
}

.calculator-expression {
    font-size: 1rem;
    min-height: 24px;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 8px;
    word-break: break-all;
}

.calculator-result {
    font-size: 2.5rem;
    font-weight: 700;
    min-height: 60px;
    word-break: break-all;
}

.calculator-history {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2c3e50;
    z-index: 10;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    padding: 20px;
    overflow-y: auto;
}

.calculator-history.show {
    transform: translateY(0);
}

.history-title {
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: 15px;
    text-align: center;
}

.history-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.history-item {
    padding: 10px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
}

.history-item:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.history-expression {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 5px;
}

.history-result {
    font-size: 1.1rem;
    font-weight: 500;
}

.calculator-buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: #ddd;
}

.calc-btn {
    border: none;
    background-color: white;
    font-size: 1.25rem;
    padding: 20px 0;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.calc-btn:hover {
    background-color: #f1f1f1;
}

.calc-btn:active {
    background-color: #e6e6e6;
}

.calc-btn.number {
    background-color: #f8f9fa;
}

.calc-btn.operator {
    background-color: #ecf0f1;
    color: #3498db;
    font-weight: 700;
}

.calc-btn.function {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.calc-btn.equals {
    background-color: #3498db;
    color: white;
    font-weight: 700;
}

.calculator-advanced-toggle {
    padding: 10px;
    text-align: center;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

.calculator-advanced {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background-color: #ddd;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.calculator-advanced.show {
    max-height: 200px;
}

/* Premium Features */
.premium-features {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 30px;
    margin: 40px 0;
}

.premium-feature {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    text-align: center;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    transition: transform 0.3s ease;
}

.premium-feature:hover {
    transform: translateY(-10px);
    background-color: rgba(255, 255, 255, 0.2);
}

.premium-icon {
    margin-bottom: 20px;
}

.premium-feature h3 {
    color: white;
}

.premium-feature p {
    color: rgba(255, 255, 255, 0.8);
}