/* Calculator99 - Corporate Professional Design 2026 */
:root {
    /* Corporate Color Palette */
    --primary-color: #0f172a;
    /* Deep Navy */
    --primary-light: #334155;
    /* Slate */
    --primary-dark: #020617;
    /* Very Dark Navy */

    --accent-color: #2563eb;
    /* Corporate Blue */
    --accent-hover: #1d4ed8;
    --accent-light: #eff6ff;

    --bg-body: #f8fafc;
    /* Enterprise Gray */
    --bg-surface: #ffffff;
    --bg-alt: #f1f5f9;

    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;

    --border-color: #e2e8f0;
    --border-focus: #2563eb;

    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Shadows settings - more subtle */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* Spacing & Radius - sharper */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --container-width: 1200px;
    --header-height: 72px;

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.25s ease-in-out;
}

/* Reset & Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-secondary);
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.025em;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

input,
button,
select,
textarea {
    font-family: inherit;
    font-size: 1rem;
}

/* Layout */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
}

/* Header - Solid & Professional */
header {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    height: var(--header-height);
    display: flex;
    align-items: center;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo-link {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    /* Solid color, no gradient */
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-link::before {
    /* Optional icon if needed, for now pure text or add svg later */
    content: '';
}

/* Navigation */
nav ul {
    display: flex;
    gap: 32px;
    align-items: center;
}

nav ul li a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 0;
    transition: color var(--transition-fast);
}

nav ul li a:hover,
nav ul li a.active {
    color: var(--accent-color);
}

/* Dropdown - Structured */
.dropdown {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    /* Align right for cleaner look if last item */
    background: var(--bg-surface);
    min-width: 240px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: 8px 0;
    z-index: 1001;
    margin-top: 1px;
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown-content a {
    display: block;
    padding: 10px 20px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: background-color var(--transition-fast);
}

.dropdown-content a:hover {
    background-color: var(--bg-alt);
    color: var(--primary-color);
}



/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 4px;
}

.mobile-menu-toggle span {
    width: 24px;
    height: 2px;
    background-color: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

/* Hero Section - Business Professional */
.hero-section {
    padding: 80px 0 60px;
    text-align: center;
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
}

.hero-section h2 {
    font-size: 2.75rem;
    margin-bottom: 24px;
    color: var(--primary-color);
    letter-spacing: -1.5px;
}

/* Highlight word styling if we added it, but general H2 is fine */

.hero-section p {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
}

/* Search Box - Clean & Rectangular */
.search-container {
    max-width: 640px;
    margin: 0 auto 40px;
    position: relative;
    z-index: 100;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

#search-input {
    width: 100%;
    padding: 16px 110px 16px 48px;
    /* left: space for 🔍 icon, right: space for Search button */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    box-shadow: var(--shadow-sm);
    font-size: 1rem;
    color: var(--text-primary);
    transition: all var(--transition-normal);
}

#search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

/* Search Icon placeholder */
.search-box::before {
    content: '🔍';
    /* Simple emoji icon or use SVG in HTML */
    position: absolute;
    left: 20px;
    font-size: 1.2rem;
    opacity: 0.5;
    pointer-events: none;
}

.search-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    background: var(--accent-color);
    border: none;
    color: white;
    font-weight: 500;
    cursor: pointer;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background-color var(--transition-fast);
}

.search-btn:hover {
    background: var(--accent-hover);
}

.search-btn svg {
    display: block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Search Results */
.search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 8px;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
}

.search-result-item {
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    border-bottom: 1px solid var(--bg-alt);
    transition: background-color var(--transition-fast);
}

.search-result-item:hover {
    background-color: var(--bg-alt);
}

.search-result-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: var(--accent-light);
    color: var(--accent-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.search-result-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-result-category {
    font-size: 0.8rem;
    color: var(--text-muted);
}


/* Main Content Area */
.calculator-categories {
    padding: 60px 0;
}

/* Category Sections */
.category-section {
    margin-bottom: 60px;
}

.category-title {
    font-size: 1.5rem;
    margin-bottom: 24px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--border-color);
    display: inline-block;
    min-width: 200px;
    color: var(--primary-color);
}

/* Calculator Grid */
.calculator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* Calculator Card - Structured & Professional */
.calculator-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: all var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Centered content */
    text-align: center;
    /* Centered text */
    height: 100%;
}

.calculator-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-color);
}

.calculator-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: var(--text-primary);
}

.calculator-card p {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
    font-size: 0.95rem;
    line-height: 1.5;
}

.btn-primary {
    background: var(--accent-color);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
    width: 100%;
    /* Full width on cards looks cleaner */
    text-align: center;
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: white;
    transform: none;
    box-shadow: none;
}

/* Forms (Inner Pages) */
.calculator-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
}

.calculator-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--primary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 20px;
}

.calculator-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.input-group input,
.input-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    background-color: var(--bg-surface);
    transition: all var(--transition-fast);
    font-size: 1rem;
    color: var(--text-primary);
}

.input-group input:focus,
.input-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px var(--accent-light);
}

.calculate-btn {
    grid-column: 1 / -1;
    background: var(--primary-color);
    color: white;
    padding: 14px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 1.1rem;
    border: none;
    cursor: pointer;
    transition: background-color var(--transition-fast);
    margin-top: 20px;
}

.calculate-btn:hover {
    background: var(--primary-light);
    transform: none;
    box-shadow: none;
}

/* Results Container */
.results-container {
    margin-top: 40px;
    padding: 24px;
    background: var(--bg-alt);
    border: 1px solid var(--border-color);
    /* Subtle border instead of color block */
    border-radius: var(--radius-lg);
}

.results-container h3 {
    text-align: left;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.summary-item {
    background: var(--bg-surface);
    padding: 20px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    text-align: left;
    /* More professional alignment */
}

.summary-item h4 {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.summary-item p {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Charts */
.chart-container {
    background: var(--bg-surface);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 40px;
    height: 400px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Tables - Data Heavy Design */
.table-container {
    overflow-x: auto;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

th,
td {
    padding: 12px 20px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
}

th:first-child,
td:first-child {
    text-align: left;
}

th {
    background-color: var(--bg-alt);
    color: var(--text-primary);
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
}

tr:last-child td {
    border-bottom: none;
}

tr:hover {
    background-color: var(--bg-alt);
}

/* Features Section */
.features-section {
    padding: 80px 0;
    background: var(--bg-surface);
    border-top: 1px solid var(--border-color);
}

.features-section h2 {
    text-align: center;
    margin-bottom: 60px;
    color: var(--primary-color);
}

.feature-item {
    text-align: center;
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    transition: border-color var(--transition-fast);
}

.feature-item:hover {
    border-color: var(--accent-color);
}

.feature-item h3 {
    font-size: 1.25rem;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-item p {
    color: var(--text-secondary);
}

/* Testimonials - Card based */
.testimonials-section {
    padding: 80px 0;
    background: var(--bg-body);
}

.testimonials-section h2 {
    text-align: center;
    margin-bottom: 40px;
}

.testimonial-card {
    background: var(--bg-surface);
    padding: 24px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}

.stars {
    color: var(--warning-color);
    margin-bottom: 12px;
    font-size: 1rem;
}

.testimonial-text {
    font-size: 1rem;
    font-style: italic;
    margin-bottom: 16px;
    color: var(--text-secondary);
    line-height: 1.5;
}

.testimonial-author {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

/* Content Pages (About, Privacy, Description) */
.description-section,
.faq-section {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px;
    margin-bottom: 48px;
    box-shadow: var(--shadow-sm);
}

.description-section h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 32px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.description-section h3 {
    font-size: 1.5rem;
    color: var(--primary-light);
    margin-top: 40px;
    margin-bottom: 16px;
}

.description-section p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.8;
    max-width: 800px;
    /* Optimal reading width */
}

.description-section ul,
.description-section ol {
    margin-bottom: 32px;
    padding-left: 24px;
    max-width: 800px;
}

.description-section li {
    margin-bottom: 12px;
    color: var(--text-secondary);
    padding-left: 8px;
}

.description-section ul li {
    list-style-type: disc;
}

.description-section ol li {
    list-style-type: decimal;
}

/* Add subtle accent to lists */
.description-section li::marker {
    color: var(--accent-color);
    font-weight: bold;
}

.faq-container details {
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-surface);
}

.faq-container summary {
    padding: 16px 20px;
    background: var(--bg-alt);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color var(--transition-fast);
}

.faq-container summary:hover {
    background-color: #e2e8f0;
}

.faq-container summary::after {
    content: '+';
    font-size: 1.25rem;
    font-weight: 400;
}

.faq-container details[open] summary::after {
    content: '-';
}

.faq-container details p {
    padding: 20px;
    color: var(--text-secondary);
    line-height: 1.6;
    border-top: 1px solid var(--border-color);
}

/* Footer - Deep Navy data-rich look */
footer {
    background-color: var(--primary-dark);
    color: #cbd5e1;
    /* Light slate text */
    padding: 60px 0;
    text-align: center;
    border-top: 1px solid #1e293b;
}

.footer-links {
    margin-top: 24px;
    display: flex;
    justify-content: center;
    gap: 24px;
}

.footer-links a {
    color: #cbd5e1;
    font-weight: 500;
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .hero-section h2 {
        font-size: 2rem;
    }

    .logo-link {
        font-size: 1.3rem;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-surface);
        padding: 24px;
        box-shadow: var(--shadow-lg);
        border-bottom: 1px solid var(--border-color);
        align-items: flex-start;
        gap: 0;
    }

    nav ul.show {
        display: flex;
    }

    nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--border-color);
    }

    nav ul li a {
        display: block;
        padding: 16px 0;
        width: 100%;
    }

    .dropdown {
        flex-wrap: wrap;
        width: 100%;
    }

    .dropbtn {
        width: 100%;
    }

    .dropdown-content {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 0 0 16px;
        background: var(--bg-alt);
        display: none;
        /* JS toggles 'active' class on dropdown parent usually, or we use CSS hover workaround for mobile */
        width: 100%;
    }

    /* Ensure dropdown opens on click for mobile if JS handles it */
    .dropdown.active .dropdown-content {
        display: block;
    }

    .calculator-form {
        grid-template-columns: 1fr;
    }

    .search-input {
        padding-left: 20px;
        /* Adjust if icon is removed/moved */
    }
}


/* User Requested Specific Width */
.description-section,
.faq-section {
    max-width: 1152px;
    margin-left: auto;
    margin-right: auto;
}

/* Calculator Section Spacing */
.calculator-section {
    margin-top: 30px;
}

.hidden {
    display: none !important;
}