/*
Theme Name: All Caclculator Online
Theme URI: https://souloftware.com/
Author: Souloftware
Description: A high-performance, modern calculator theme inspired by calculator.net, built with jQuery and a sleek dark UI.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: premium-calc
*/

/* --- Design System & Modern Tokens --- */
/* --- Design System & Modern Tokens --- */
:root {
    /* Color Palette */
    --color-primary: #007BFF;
    /* Primary Blue */
    --color-secondary: #00C2FF;
    /* Accent Cyan */
    --color-navy: #0A1F44;
    /* Dark Navy */
    --color-bg: #F8FAFC;
    /* Light Slate Background */
    --color-surface: #FFFFFF;
    /* Clean White Surface */
    --color-text-main: #1E293B;
    /* Dark Slate Text */
    --color-text-muted: #64748B;
    /* Muted Slate */
    --color-border: #E2E8F0;
    /* Light Border */

    /* Functional Colors */
    --color-success: #10B981;
    --color-error: #EF4444;
    --color-info: #00C2FF;

    /* Typography */
    --font-main: 'Inter', -apple-system, sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing & Borders */
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 32px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --container-width: 1280px;
    --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);

    /* Gradients */
    --grad-primary: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    --grad-surface: linear-gradient(180deg, #FFFFFF 0%, #F8FAFC 100%);
    --grad-navy: linear-gradient(135deg, #0A1F44 0%, #020617 100%);
}

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

body {
    background-color: var(--color-bg);
    color: var(--color-text-main);
    font-family: var(--font-main);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--color-navy);
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--color-secondary);
}

ul {
    list-style: none;
}

/* --- Layout Components --- */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 32px;
}

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 40px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--grad-primary);
    opacity: 0;
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary);
}

.card:hover::before {
    opacity: 1;
}

/* --- Input & Form Styling --- */
input,
select,
textarea {
    width: 100%;
    padding: 16px 20px;
    background: #FFFFFF;
    border: 2px solid var(--color-border);
    border-radius: var(--radius-sm);
    color: var(--color-text-main);
    font-size: 16px;
    font-family: var(--font-main);
    margin-bottom: 24px;
    transition: var(--transition);
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px rgba(0, 123, 255, 0.1);
}

label {
    display: block;
    margin-bottom: 12px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--color-text-muted);
}

.btn-primary {
    background: var(--grad-primary);
    color: white;
    border: none;
    padding: 18px 36px;
    font-size: 16px;
    font-weight: 800;
    font-family: var(--font-heading);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0, 123, 255, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 30px rgba(0, 123, 255, 0.3);
    filter: brightness(1.05);
}

/* --- Top Bar --- */
.top-bar {
    background: var(--color-navy);
    color: white;
    padding: 10px 0;
    font-size: 13px;
    font-weight: 600;
}

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

.top-bar-right a {
    color: rgba(255, 255, 255, 0.7);
    margin-left: 24px;
    transition: var(--transition);
}

.top-bar-right a:hover {
    color: white;
}

/* --- Header Styles --- */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--color-border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.03);
}

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

.logo {
    flex-shrink: 0;
}

.logo-text {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -2px;
    color: var(--color-navy);
}

.logo-accent {
    background: var(--grad-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo a img {
    max-width: 280px;
}

.main-nav {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--color-navy);
    border-radius: 3px;
    transition: var(--transition);
}

@media (max-width: 992px) {
    .main-nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 40px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        text-align: center;
        gap: 20px;
    }

    .main-nav ul.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-search,
    .btn-cta {
        display: none;
    }
}


.header-actions {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-search input {
    margin-bottom: 0;
    padding: 10px 20px;
    font-size: 14px;
    width: 200px;
    border-radius: 40px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
}

.btn-cta {
    background: var(--grad-primary);
    color: white;
    padding: 10px 24px;
    border-radius: 40px;
    font-weight: 800;
    font-size: 14px;
    font-family: var(--font-heading);
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.2);
    transition: var(--transition);
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    color: white;
}

/* --- Hero Section --- */
.hero-section {
    padding: 140px 0 200px;
    background: var(--grad-navy);
    color: white;
    text-align: center;
    position: relative;
    clip-path: ellipse(150% 100% at 50% 0%);
    overflow: hidden;
}

.hero-section .container {
    position: relative;
    z-index: 10;
}

.hero-section h1 {
    font-size: 80px;
    line-height: 1;
    color: white;
    margin-bottom: 24px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    font-weight: 900;
}

.hero-section p {
    font-size: 26px;
    color: rgba(255, 255, 255, 0.6);
    max-width: 800px;
    margin: 0 auto 56px;
    font-weight: 500;
}

.hero-search {
    max-width: 720px;
    margin: 0 auto;
}

.hero-search input {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.15);
    color: white;
    padding: 24px 40px;
    border-radius: 50px;
    font-size: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
}

.hero-search input:focus {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--color-secondary);
    box-shadow: 0 40px 80px rgba(0, 123, 255, 0.3);
}

.hero-search input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* --- Decorative Elements --- */
.badge {
    background: rgba(0, 194, 255, 0.1);
    color: var(--color-secondary);
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 800;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    display: inline-block;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 194, 255, 0.2);
}

.decorative-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--color-primary);
    top: -100px;
    right: -100px;
}

.blob-2 {
    width: 300px;
    height: 300px;
    background: var(--color-secondary);
    bottom: -50px;
    left: -50px;
}

/* --- Features Bar --- */
.features-bar {
    background: #FFFFFF;
    border-bottom: 1px solid var(--color-border);
    padding: 40px 0;
    position: relative;
    z-index: 20;
    margin-top: -40px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.05);
}

.features-grid {
    display: flex;
    justify-content: space-around;
    gap: 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 20px;
}

.feature-icon {
    font-size: 32px;
    background: var(--color-bg);
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    border: 1px solid var(--color-border);
}

.feature-text h4 {
    font-size: 18px;
    margin-bottom: 4px;
}

.feature-text p {
    color: var(--color-text-muted);
    font-size: 14px;
}

@media (max-width: 768px) {
    .features-grid {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .feature-item {
        flex-direction: column;
    }
}


/* --- Section Headers --- */
.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 40px;
    margin-bottom: 15px;
}

.section-header p {
    font-size: 18px;
    color: var(--color-text-muted);
}

.section-margin {
    margin-top: 100px;
    margin-bottom: 100px;
}

/* --- Category Grid --- */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 40px;
}

/* --- Popular Grid --- */
.popular-section {
    margin-top: 80px;
}

.popular-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.popular-card {
    text-align: center;
    padding: 48px 32px;
}

.popular-icon {
    font-size: 48px;
    margin-bottom: 24px;
    background: var(--color-bg);
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin-left: auto;
    margin-right: auto;
}

.popular-card h3 {
    font-size: 24px;
    margin-bottom: 12px;
}

.popular-card p {
    font-size: 15px;
    color: var(--color-text-muted);
}

@media (max-width: 992px) {
    .popular-grid {
        grid-template-columns: 1fr;
    }
}


.category-card h2 {
    font-size: 28px;
    border-bottom: none;
    margin-bottom: 32px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.category-card h2::before {
    content: '';
    width: 40px;
    height: 40px;
    background: var(--grad-primary);
    border-radius: 12px;
    display: inline-block;
}

.calc-list li a {
    color: var(--color-text-main);
    padding: 12px 0;
    border-bottom: 1px solid var(--color-border);
}

.calc-list li:last-child a {
    border-bottom: none;
}

.calc-list li a::before {
    content: none;
}

.calc-list li a:hover {
    color: var(--color-primary);
    padding-left: 10px;
}

.view-all {
    color: var(--color-primary);
    text-transform: none;
    font-size: 16px;
    border-bottom: 2px solid transparent;
    display: inline-block;
}

.view-all:hover {
    border-bottom-color: var(--color-primary);
}


/* --- Footer --- */
.site-footer {
    background: #FFFFFF;
    border-top: 1px solid var(--color-border);
    padding: 100px 0 60px;
    margin-top: 120px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-info h3 {
    font-size: 32px;
    margin-bottom: 24px;
    color: var(--color-navy);
}

.footer-info p {
    color: var(--color-text-muted);
    font-size: 18px;
    max-width: 350px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--color-navy);
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: var(--color-text-muted);
    font-size: 15px;
}

.footer-social {
    display: flex;
    gap: 20px;
}

.footer-social a {
    color: var(--color-text-muted);
    font-weight: 700;
}



/* --- Utilities --- */
.text-center {
    text-align: center;
}

.mt-20 {
    margin-top: 20px;
}

.mt-40 {
    margin-top: 40px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-40 {
    margin-bottom: 40px;
}

/* --- Calculator Single Template --- */
.calculator-wrapper {
    max-width: 1200px;
    margin: 60px auto;
}

.calculator-header h1 {
    font-size: 56px;
    margin-bottom: 60px;
    text-align: center;
    color: var(--color-navy);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 420px;
    gap: 48px;
    align-items: start;
}

@media (max-width: 1100px) {
    .calculator-grid {
        grid-template-columns: 1fr;
    }
}

.calculator-tool {
    padding: 60px;
    background: #FFFFFF;
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg);
}

.calculator-results {
    position: sticky;
    top: 120px;
    background: var(--grad-navy);
    color: white;
    padding: 48px;
    border: none;
    box-shadow: var(--shadow-xl);
}

.calculator-results h2 {
    font-size: 24px;
    color: white;
    margin-bottom: 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 15px;
}

#calc-results-content {
    font-size: 16px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

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

.result-label {
    color: rgba(255, 255, 255, 0.6);
    font-weight: 600;
}

.result-value {
    font-weight: 800;
    color: white;
    font-size: 22px;
    font-family: var(--font-heading);
}

.calculator-content {
    margin-top: 80px;
    line-height: 1.8;
}

.calculator-content h2 {
    font-size: 32px;
    margin: 60px 0 24px;
}

.calculator-content p {
    font-size: 18px;
    margin-bottom: 24px;
    color: var(--color-text-muted);
}

.w-100 {
    width: 100%;
}

.flex-1 {
    flex: 1;
}

.flex-2 {
    flex: 2;
}

.form-group {
    margin-bottom: 24px;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 5px;
}

@media (max-width: 600px) {
    .form-row {
        flex-direction: column;
        gap: 0;
    }
}

/* --- Unit Toggle System --- */
.input-with-toggle {
    position: relative;
    display: flex;
}

.input-with-toggle input {
    padding-right: 80px;
}

.unit-toggle {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    display: flex;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 36px;
    border: 1px solid var(--glass-border);
}

.unit-toggle span {
    padding: 0 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text-muted);
    transition: var(--transition);
}

.unit-toggle span.active {
    background: var(--grad-primary);
    color: white;
}

.advanced-toggle-wrapper {
    margin: 30px 0;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

.btn-text {
    background: none;
    border: none;
    color: var(--color-secondary);
    cursor: pointer;
    font-weight: 700;
    font-family: var(--font-heading);
    padding: 0;
    font-size: 15px;
}

.btn-text:hover {
    color: var(--color-primary);
}

.calc-section-title {
    font-weight: 800;
    margin: 30px 0 15px;
    color: var(--color-text-muted);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.inline-input {
    display: inline-block;
    width: auto !important;
    margin: 0 8px !important;
    padding: 8px 12px !important;
    margin-bottom: 0 !important;
}

.result-display {
    font-weight: 800;
    color: var(--color-secondary);
    font-size: 24px;
    font-family: var(--font-heading);
}