/* 
 * Mahi GST Calculator - Main Stylesheet
 * Theme: Professional Finance (White + Light Blue)
 */

:root {
    /* Color Palette */
    --primary-color: #e53e3e;
    /* Red Brand */
    /* Professional Red */
    --secondary-color: #c53030;
    /* Darker Red for Actions */
    --accent-color: #2f855a;
    /* Green for Results/Success (Left Green as it is standard for 'Success') */
    --background-color: #f4f8fb;
    /* Very Light Blue Tone Background */
    --card-bg: #ffffff;
    /* Pure White for Cards */
    --text-primary: #1a202c;
    /* Dark Slate for Headings */
    --text-secondary: #4a5568;
    /* Gray for body text */
    --border-color: #e2e8f0;
    /* Light Gray Border */
    --input-bg: #f7fafc;
    /* Light Input Background */

    /* Typography */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --font-size-base: 16px;

    /* Spacing & Shadows */
    --container-width: 1200px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.05);
    --radius: 8px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background: url('bg.png') no-repeat center center fixed;
    background-size: cover;
    background-color: var(--background-color);
    /* Fallback */
    color: var(--text-primary);
    line-height: 1.6;
    font-size: var(--font-size-base);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 60px 0;
}

.grid {
    display: grid;
    gap: 20px;
}

/* Grid Columns Utility */
.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 768px) {

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
}

/* Typography Utilities */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #004494;
    transform: translateY(-1px);
}

.btn-outline {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: white;
}

.btn-block {
    width: 100%;
}

/* Form Elements */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background-color: var(--input-bg);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.1);
}

/* Card Component */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transition: box-shadow 0.3s ease;
}

/* Header/Navbar */
.navbar {
    background: white;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar-inner {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.brand-logo {
    height: 48px;
    width: auto;
    object-fit: contain;
}

.nav-links {
    display: flex;
    gap: 25px;
    list-style: none;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color);
}

.lang-toggle {
    margin-left: 20px;
    background: var(--input-bg);
    padding: 4px;
    border-radius: 4px;
    display: inline-flex;
}

.lang-btn {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-secondary);
}

.lang-btn.active {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-sm);
}

/* Mobile Menu Trigger */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* simple hidden for now, can add JS toggle */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
    }

    .nav-links.show {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }
}

/* Footer */
.footer {
    background: var(--text-primary);
    color: white;
    padding: 60px 0 20px;
    margin-top: 60px;
}

.footer h3 {
    color: white;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #a0aec0;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #4a5568;
    text-align: center;
    color: #a0aec0;
}

/* Results Table */
.results-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.results-table th,
.results-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.results-table th {
    background-color: var(--input-bg);
    font-weight: 600;
    color: var(--text-primary);
}

.total-row td {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

/* How To Use Section */
.how-to-section {
    background: #fff;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.step-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.step-number {
    display: inline-block;
    background: var(--input-bg);
    color: var(--text-secondary);
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-weight: 600;
}

.step-icon-wrapper {
    width: 80px;
    height: 80px;
    background: var(--background-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
}

.step-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.step-text {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 1rem;
}

/* FAQ Section */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    margin-bottom: 10px;
    overflow: hidden;
}

.faq-question {
    padding: 15px 20px;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.faq-question:hover {
    background: var(--input-bg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #fff;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.faq-item.active .faq-answer {
    padding: 15px 20px;
    max-height: 200px;
    /* Approximate max height */
    border-top: 1px solid var(--border-color);
}

.faq-item.active .fa-chevron-down {
    transform: rotate(180deg);
}

/* Tool List Link Styles */
.tool-list a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.tool-list a:hover {
    text-decoration: underline;
    color: #003d82;
}

/* Social & Engagement Styles */
.engagement-bar {
    position: fixed;
    bottom: 30px;
    right: 30px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 2000;
}

.engagement-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    text-decoration: none;
}

.engagement-btn:hover {
    transform: scale(1.1) translateY(-5px);
    color: white;
}

.btn-check {
    background: #3b82f6;
}

.btn-like {
    background: #ef4444;
}

.btn-share {
    background: #10b981;
}

.engagement-btn .tooltip {
    position: absolute;
    right: 75px;
    background: #1e293b;
    color: white;
    padding: 8px 15px;
    border-radius: 8px;
    font-size: 0.8rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.3s;
}

.engagement-btn:hover .tooltip {
    opacity: 1;
}

.like-count {
    position: absolute;
    top: -5px;
    right: -5px;
    background: white;
    color: #ef4444;
    font-size: 0.7rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Checklist UI */
.modern-checklist {
    background: white;
    border-radius: 20px;
    padding: 30px;
    border: 1px solid #f1f5f9;
}

.check-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #f8fafc;
}

.check-item:last-child {
    border: none;
}

.check-box {
    width: 24px;
    height: 24px;
    border: 2px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
}

.check-box.checked {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}