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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

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

/* Header and Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    color: #6366f1;
}

.logo-icon {
    font-size: 1.5rem;
}

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

.nav-link {
    text-decoration: none;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 0.5rem 0;
}

.nav-link:hover,
.nav-link.active {
    color: #6366f1;
}

.search-container {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 2rem;
    padding: 0.5rem;
    margin-right: 1rem;
    border: 1px solid #e2e8f0;
}

.search-input {
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: 0.9rem;
    outline: none;
    width: 250px;
}

.search-input::placeholder {
    color: #9ca3af;
}

.search-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.search-btn:hover {
    background: rgba(99, 102, 241, 0.1);
}

.nav-actions {
    display: flex;
    gap: 1rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid #d1d5db;
    color: #6b7280;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-primary {
    background: #6366f1;
    border: none;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: #4f46e5;
}

/* Hero Section */
.hero {
    padding: 4rem 0;
    color: white;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.hero-left h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

/* Calculator Widget */
.calculator-widget {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.calculator-widget h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.calculator {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem;
    color: #333;
}

.display {
    margin-bottom: 1rem;
}

.display input {
    width: 100%;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    font-size: 1.5rem;
    text-align: right;
    font-weight: 600;
}

.buttons {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn:hover {
    background: #e2e8f0;
}

.btn.clear {
    background: #ef4444;
    color: white;
    border-color: #ef4444;
}

.btn.clear:hover {
    background: #dc2626;
}

.btn.operator {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.btn.operator:hover {
    background: #4f46e5;
}

.btn.equals {
    background: #f97316;
    color: white;
    border-color: #f97316;
    grid-row: span 2;
}

.btn.equals:hover {
    background: #ea580c;
}

.btn.zero {
    grid-column: span 2;
}

/* Stats Card */
.stats-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    padding: 2rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
}

.stats-card h3 {
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
}

.stat-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fbbf24;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.8;
}

.stats-card h4 {
    margin: 2rem 0 1rem 0;
    font-size: 1.1rem;
}

.category-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.5rem;
    font-size: 0.9rem;
}

.category-icon {
    font-size: 1.2rem;
}

/* Calculator Categories Section */
.calculator-categories {
    background: white;
    padding: 4rem 0;
}

.calculator-categories h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.calculator-categories > .container > p {
    text-align: center;
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

.category-tabs {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.tab-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
}

.tab-btn:hover,
.tab-btn.active {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

.calculators-grid h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.calculator-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.calculator-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border-color: #6366f1;
}

.card-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.calculator-card h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.calculator-card p {
    color: #6b7280;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.card-link {
    background: #6366f1;
    color: white;
    text-decoration: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: background 0.3s ease;
    display: inline-block;
}

.card-link:hover {
    background: #4f46e5;
}

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

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

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    border-left: 4px solid #6366f1;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.feature-card.green {
    border-left-color: #10b981;
}

.feature-card.blue {
    border-left-color: #3b82f6;
}

.feature-card.purple {
    border-left-color: #8b5cf6;
}

.feature-card.red {
    border-left-color: #ef4444;
}

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

.feature-card h3 {
    margin-bottom: 1rem;
    color: #1f2937;
}

.feature-card p {
    color: #6b7280;
    line-height: 1.6;
}

/* Testimonials Section */
.testimonials {
    background: white;
    padding: 4rem 0;
}

.testimonials h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.testimonials > .container > p {
    text-align: center;
    font-size: 1.1rem;
    color: #6b7280;
    margin-bottom: 3rem;
}

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

.testimonial-card {
    background: #f8fafc;
    padding: 2rem;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.user-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #6366f1;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.user-info h4 {
    margin-bottom: 0.25rem;
    color: #1f2937;
}

.user-info span {
    color: #6b7280;
    font-size: 0.9rem;
}

.testimonial-card p {
    color: #4b5563;
    font-style: italic;
    line-height: 1.6;
}

/* FAQ Section */
.faq {
    background: #f8fafc;
    padding: 4rem 0;
}

.faq h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #1f2937;
}

.faq-items {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e5e7eb;
}

.faq-item h3 {
    margin-bottom: 1rem;
    color: #1f2937;
    font-size: 1.1rem;
}

.faq-item p {
    color: #6b7280;
    line-height: 1.6;
}

/* Footer */
footer {
    background: #1f2937;
    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-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #f9fafb;
}

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

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

.footer-section ul li a {
    color: #d1d5db;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #6366f1;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.6;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .search-container {
        margin-right: 0.5rem;
    }
    
    .search-input {
        width: 180px;
        font-size: 0.8rem;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .hero-left h1 {
        font-size: 2rem;
    }
    
    .calculator-cards {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .nav-actions {
        display: none;
    }
    
    .search-container {
        margin-right: 0;
    }
    
    .search-input {
        width: 120px;
        padding: 0.4rem 0.8rem;
    }
    
    .hero {
        padding: 2rem 0;
    }
    
    .calculator-widget,
    .stats-card {
        padding: 1rem;
    }
    
    .buttons {
        gap: 0.25rem;
    }
    
    .btn {
        padding: 0.75rem;
        font-size: 1rem;
    }
}

/* ===============================
   LEGAL PAGES (Privacy, Terms, Contact)
   =============================== */

.legal-page {
    background: #ffffff;
    min-height: 100vh;
    padding: 4rem 0;
}

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

.legal-container h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

.legal-container h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    color: #374151;
}

.legal-container p {
    font-size: 1rem;
    line-height: 1.8;
    color: #4b5563;
    margin-bottom: 1rem;
}

.legal-container ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.legal-container ul li {
    color: #4b5563;
    margin-bottom: 0.5rem;
}

/* ===============================
   CONTACT FORM STYLING
   =============================== */

.contact-form {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 2rem;
    margin-top: 2rem;
}

.contact-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #374151;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    border: 1px solid #d1d5db;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    font-family: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #6366f1;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.contact-form button {
    background: #6366f1;
    color: #ffffff;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.contact-form button:hover {
    background: #4f46e5;
}

/* ===============================
   Footer Legal Button Styles
   =============================== */

.footer-buttons {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
}

.footer-btn {
  text-decoration: none;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #ffffff;
  background: linear-gradient(135deg, #4361ee, #4cc9f0);
  border-radius: 999px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

.footer-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(67, 97, 238, 0.4);
  background: linear-gradient(135deg, #3f37c9, #4895ef);
}

/* ===============================
   FOOTER LEGAL LINKS
   =============================== */

.footer-legal-links {
    margin-top: 1rem;
