/* =============================================
   TOOL-STYLE.CSS â€” PREMIUM CALCULATOR DESIGN
   ============================================= */

:root {
    --tool-bg: var(--surface);
    --tool-border: var(--border-solid);
    --tool-shadow: var(--shadow-lg);
    --tool-accent: var(--accent);
    --tool-accent-2: var(--accent-2);
    --tool-radius: 24px;
    --tool-input-bg: var(--bg-2);
}

[data-theme="light"] {
    --tool-bg: #ffffff;
    --tool-input-bg: #f8fafc;
    --tool-shadow: 0 10px 40px rgba(0,0,0,0.04);
}

/* Background Refinement */
body {
    background-attachment: fixed;
    background-image: 
        radial-gradient(circle at 10% 20%, var(--border) 0%, transparent 20%),
        radial-gradient(circle at 90% 80%, var(--border) 0%, transparent 20%);
}

.mobile-ext {
    display: none;
}

/* Base Card Styling - Wider and Professional */
.card {
    background: var(--tool-bg);
    border: 1px solid var(--tool-border);
    border-radius: var(--tool-radius);
    padding: 3.5rem 4rem; /* More internal padding */
    box-shadow: var(--tool-shadow);
    margin: 3rem auto 5rem; /* More margin around the card */
    max-width: 1300px; 
    width: 98%; 
    position: relative;
    overflow: visible;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: var(--t);
}

.card::before {
    content: '';
    position: absolute;
    top: -1px; left: -1px; right: -1px; height: 6px;
    background: linear-gradient(90deg, var(--tool-accent), var(--tool-accent-2), #10b981);
    border-radius: var(--tool-radius) var(--tool-radius) 0 0;
}

.card-header {
    margin-bottom: 3rem;
    text-align: center;
}

.card-title {
    font-family: var(--font-display);
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 0.85rem;
    letter-spacing: -0.04em;
    color: var(--text-main);
    line-height: 1.1;
}

.card-desc {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 450px;
    margin: 0 auto;
    line-height: 1.6;
    opacity: 0.9;
}

/* Form Layout - Compact 2-Column Grid */
.calc-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Two columns for compact view */
    gap: 2rem; /* Increased gap for better spacing */
    align-items: end;
}

/* Items that should span full width */
.form-group.full-width,
.radio-group,
.btn,
.box-segmented,
#metric-inputs,
#imperial-inputs {
    grid-column: span 2;
}

/* Ensure inputs inside grouped divs also use grid if needed */
#metric-inputs, #imperial-inputs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem; /* Consistent gap */
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

.form-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Input Fields */
.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.input-field {
    width: 100%;
    height: 60px;
    padding: 0 1.5rem;
    background: var(--tool-input-bg);
    border: 1px solid var(--border-solid);
    border-radius: 14px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    transition: var(--t);
    outline: none;
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.input-field:focus {
    border-color: var(--tool-accent);
    background: var(--surface-2);
    box-shadow: 0 0 0 4px var(--accent-glow), inset 0 2px 4px rgba(0,0,0,0.01);
    transform: translateY(-1px);
}

.input-with-suffix {
    padding-right: 5.5rem;
}

.input-suffix {
    position: absolute;
    right: 1.5rem;
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    pointer-events: none;
}

/* Radio Groups (Segmented Control) */
.radio-group {
    display: flex;
    background: var(--bg-3);
    padding: 6px;
    border-radius: 14px;
    gap: 6px;
    border: 1px solid var(--border-solid);
}

.radio-label {
    flex: 1;
    text-align: center;
    cursor: pointer;
    position: relative;
}

.radio-label input {
    position: absolute;
    opacity: 0;
    width: 0; height: 0;
}

.radio-label span {
    display: block;
    padding: 0.9rem;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-secondary);
    transition: var(--t);
}

.radio-label input:checked + span {
    background: var(--surface);
    color: var(--accent);
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

[data-theme="dark"] .radio-label input:checked + span {
    background: var(--surface-2);
    color: white;
}

/* Primary Button - Full Width in Grid */
.btn {
    grid-column: span 2;
    height: 60px;
    background: linear-gradient(135deg, var(--tool-accent), var(--tool-accent-2));
    color: white !important;
    border: none;
    border-radius: 16px;
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    transition: var(--t);
    box-shadow: 0 10px 25px var(--accent-glow);
    margin-top: 0.5rem;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 35px var(--accent-glow);
    filter: brightness(1.05);
}

.btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 5px 15px var(--accent-glow);
    filter: brightness(0.95);
}

/* Result Box Styling */
.result-box {
    margin-top: 4rem;
    padding-top: 3.5rem;
    border-top: 2px dashed var(--border-solid);
    display: none;
    animation: slideUpFade 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.result-box.active {
    display: block;
}

.result-main {
    background: linear-gradient(180deg, var(--bg-2), var(--bg-3));
    border: 1px solid var(--border-2);
    border-radius: 32px;
    padding: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
}

.result-label {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.2em;
    margin-bottom: 1rem;
}

.result-value-group {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 0.6rem;
    margin: 0.5rem 0 1.5rem;
}

.result-value {
    font-size: 4.5rem;
    font-weight: 900;
    color: var(--accent-2);
    line-height: 1;
    font-family: var(--font-display);
}

.result-unit {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--tool-accent);
}

.result-category {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.result-item {
    background: var(--surface-2);
    border: 1px solid var(--border-solid);
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: var(--t);
    text-align: center;
}

.result-item:hover {
    transform: translateY(-5px);
    border-color: var(--tool-accent);
    background: var(--surface-3);
    box-shadow: var(--shadow-sm);
}

/* Result Action Bar */
.result-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 2rem;
    background: var(--bg-2);
    border-radius: 20px;
    border: 1px solid var(--border-solid);
}

.action-btn {
    flex: 1;
    min-width: 120px;
    height: 48px;
    background: var(--surface);
    border: 1px solid var(--border-solid);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: var(--t);
}

.action-btn i {
    font-size: 1rem;
    color: var(--tool-accent);
}

.action-btn:hover {
    background: var(--surface-2);
    border-color: var(--tool-accent);
    color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: var(--shadow-sm);
}

/* Breadcrumb Styling */
.breadcrumb {
    margin: 3rem auto 2rem;
    padding: 0 1rem;
    max-width: 650px;
    justify-content: flex-start;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap; /* Prevent wrapping */
    overflow-x: auto; /* Allow horizontal scroll if too long */
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar { display: none; }

.breadcrumb i { font-size: 0.8rem; margin: 0 0.5rem; color: var(--text-muted); }
.breadcrumb a { 
    display: inline-flex;
    align-items: center;
    color: var(--text-muted); 
    transition: var(--t); 
}
.breadcrumb a i { display: inline-block; } /* Show icons by default */
.breadcrumb a:hover { color: var(--tool-accent); }
.breadcrumb span { color: var(--text-main); opacity: 0.9; }

/* Content Section Refinement */
.content-section {
    background: var(--surface);
    border-radius: 32px;
    padding: 4rem;
    margin: 4rem auto;
    max-width: 1000px;
    border: 1px solid var(--border-solid);
    box-shadow: var(--shadow-sm);
}

.content-section h2 {
    font-family: var(--font-display);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    color: var(--text-main);
    letter-spacing: -0.03em;
    text-align: center;
}

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

.info-card {
    background: var(--bg-2);
    border: 1px solid var(--border-solid);
    border-radius: 20px;
    padding: 2rem;
    transition: var(--t);
}

.info-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-2);
    background: var(--surface-2);
}

.info-card h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--accent-2);
}

.info-card p {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.faq-tool-section {
    margin-top: 4rem;
    padding-top: 4rem;
    border-top: 1px solid var(--border-solid);
}

.faq-tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.faq-tool-item {
    background: var(--surface-2);
    border: 1px solid var(--border-solid);
    border-radius: 16px;
    padding: 1.5rem;
}

.faq-tool-item h4 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    display: flex;
    gap: 0.5rem;
}

.faq-tool-item h4 i {
    color: var(--accent-2);
    margin-top: 0.2rem;
}

.faq-tool-item p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .content-section {
        padding: 3rem 1.5rem;
        border-radius: 0;
        margin: 2rem 0;
    }
    
    .faq-tool-grid {
        grid-template-columns: 1fr;
    }
}

/* Animations */
@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 1200px) {
    .card {
        width: 98%;
        padding: 3rem 2.5rem;
    }

    .about-tool-section {
        width: 95%;
        margin: 4rem auto;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 0.35rem !important;
    }

    .main-layout {
        padding: 0;
    }

    .card {
        padding: 1.25rem 0.75rem !important;
        border-radius: 0 !important;
        border-left: none !important;
        border-right: none !important;
        margin: 0 !important;
        width: 100% !important;
        box-shadow: none !important;
        backdrop-filter: none;
    }

    .breadcrumb {
        padding: 0 0.75rem;
        margin: 1.5rem 0 1rem;
        font-size: 0.8rem;
    }

    .calc-form,
    #metric-inputs,
    #imperial-inputs {
        grid-template-columns: 1fr !important;
        gap: 1rem;
    }

    .form-group,
    .form-group.full-width,
    .btn {
        grid-column: span 1 !important;
    }

    .card-title {
        font-size: 1.8rem;
    }

    .card-desc {
        font-size: 0.9rem;
    }

    .input-field {
        height: 65px;
        font-size: 1.15rem;
        border-radius: 16px;
    }

    .btn {
        height: 60px;
        font-size: 1.15rem;
        width: 100% !important;
        margin: 1.5rem 0 0 !important;
    }

    .result-main {
        padding: 2rem 1rem;
        border-radius: 24px;
    }

    .result-value {
        font-size: 3rem;
    }

    .result-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .result-item {
        padding: 1.5rem 1rem;
        border-radius: 20px;
    }

    .result-actions {
        padding: 1rem;
        gap: 0.5rem;
    }

    .action-btn {
        flex: 1 1 calc(50% - 0.5rem);
        height: 44px;
        font-size: 0.85rem;
    }
}

/* =============================================
   PREMIUM SECTIONS (ABOUT & FAQ)
   ============================================= */

/* About Tool Section */
.about-tool-section {
    padding: 0;
    margin: 6rem auto;
    max-width: 1100px; 
    width: 95%;
    background: var(--surface);
    border-radius: 40px;
    border: 1px solid var(--border-solid);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* Trust Bar */
.trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 2rem 3rem;
    border-bottom: 1px solid var(--border-solid);
    background: rgba(255, 255, 255, 0.02);
}

.trust-item {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0 1.5rem;
    border-right: 1px solid var(--border-solid);
}

.trust-item:last-child {
    border-right: none;
}

.trust-icon {
    width: 42px;
    height: 42px;
    min-width: 42px;
    background: var(--bg-2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.trust-text h5 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.15rem;
}

.trust-text p {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

.about-tool-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 6rem;
    align-items: center;
    padding: 6rem 5rem;
}

.about-tool-left {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.about-tool-eyebrow {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--accent);
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.about-tool-title {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-main);
    letter-spacing: -0.04em;
}

.about-tool-desc {
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--text-secondary);
    max-width: 540px;
}

.btn-get-started {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem 2.5rem;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white !important;
    border-radius: 100px;
    font-weight: 700;
    font-size: 1.1rem;
    width: fit-content;
    margin-top: 1.5rem;
    transition: var(--t);
    box-shadow: 0 10px 30px rgba(168, 85, 247, 0.3);
}

.btn-get-started:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(168, 85, 247, 0.4);
}

.about-tool-right {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-card-mini {
    background: var(--bg-2);
    border: 1px solid var(--border-solid);
    border-radius: 24px;
    padding: 2.25rem;
    display: flex;
    gap: 1.75rem;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backdrop-filter: blur(10px);
    position: relative;
}

.feature-card-mini::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%) scaleY(0);
    width: 4px;
    height: 40%;
    background: var(--accent);
    border-radius: 4px 0 0 4px;
    transition: all 0.4s ease;
    opacity: 0;
}

.feature-card-mini:hover {
    transform: translateX(-10px);
    border-color: var(--accent);
    background: var(--surface-2);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.feature-card-mini:hover::after {
    transform: translateY(-50%) scaleY(1);
    opacity: 1;
}

.feature-icon-mini {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: var(--bg-3);
    border: 1px solid var(--border-solid);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.25rem;
}

.feature-text-mini h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.feature-text-mini p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* FAQ Section Refined */
.faq-section-new,
.faq-section-wrap {
    padding: 5rem 0;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-header-center {
    text-align: center;
    margin-bottom: 4rem;
}

.faq-eyebrow {
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--accent-2);
    letter-spacing: 0.15em;
    margin-bottom: 0.75rem;
}

.faq-title,
.faq-section-wrap .section-header h2 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.faq-section-wrap .section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.faq-list-new,
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item-new,
.faq-item {
    background: var(--bg-2);
    border: 1px solid var(--border-solid);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--t);
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.faq-header-new,
.faq-question {
    width: 100%;
    padding: 1.25rem 1.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 700;
    text-align: left;
}

.faq-header-new span {
    flex: 1;
}

.faq-chevron {
    width: 28px;
    height: 28px;
    background: var(--bg-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--text-muted);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-body-new,
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s;
    padding: 0 1.75rem;
}

.faq-item-new.active,
.faq-item.active {
    border-color: var(--accent-2);
    background: var(--surface-2);
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
}

.faq-item-new.active .faq-chevron,
.faq-item.active .faq-chevron {
    transform: rotate(180deg);
    background: var(--accent-2);
    color: white;
}

.faq-item-new.active .faq-body-new,
.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: 2rem;
}

.faq-body-new p,
.faq-answer p {
    color: var(--text-secondary);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Scroll Top Refinement */
.scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(168, 85, 247, 0.3);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.scroll-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(168, 85, 247, 0.5);
}

@media (max-width: 992px) {
    .about-tool-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-tool-section {
        padding: 4rem 2rem;
    }
    
    .about-tool-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 1024px) {
    .trust-bar {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .trust-item {
        border-right: none;
    }
}

@media (max-width: 768px) {
    .about-tool-section {
        width: 100%;
        border-radius: 0;
        margin: 0;
        border-left: none;
        border-right: none;
    }

    .trust-bar {
        grid-template-columns: 1fr;
        padding: 2rem;
    }

    .about-tool-content {
        grid-template-columns: 1fr;
        padding: 4rem 2rem;
        gap: 4rem;
    }

    .feature-card-mini:hover {
        transform: none;
    }

    .faq-section-new {
        padding: 4rem 1.5rem;
    }
    
    .faq-title {
        font-size: 1.8rem;
    }
    
    .faq-header-new {
        padding: 1.25rem;
        font-size: 0.9rem;
    }
    
    .faq-body-new {
        padding: 0 1.5rem;
    }
    
    .faq-item-new.active .faq-body-new {
        padding-bottom: 1.5rem;
    }
    
    .feature-card-mini {
        padding: 1.5rem;
    }

    .mobile-ext {
        display: inline;
    }
}


/* Standard Mobile Menu */
.mobile-menu {
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-2);
    border-top: 1px solid var(--border-solid);
    z-index: 999;
    padding: 1.25rem 1.25rem 2rem;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.open {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
}

/* Standard Mobile Search */
.mobile-search-wrap {
    position: relative;
    margin: -1.25rem -1.25rem 1.5rem;
    padding: 1.5rem 1.25rem;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.02));
    border-bottom: 1px solid var(--border-solid);
    flex-shrink: 0;
}

.mobile-search-wrap > i {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); /* Match image muted color */
    font-size: 1rem;
    z-index: 2;
}

.mobile-search-wrap input {
    width: 100%;
    height: 48px;
    padding: 0 1rem 0 3.5rem;
    background: var(--surface);
    border: 1px solid var(--border-solid);
    border-radius: 99px; /* Pill shape */
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    outline: none;
    transition: var(--t);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.mobile-search-wrap input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--accent-glow);
    background: var(--surface);
}
.search-results-overlay {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border-solid);
    border-radius: var(--r);
    box-shadow: var(--shadow-lg);
    z-index: 2000;
    max-height: 420px;
    overflow-y: auto;
    display: none;
}

/* Mobile specific search result adjustments */
.mobile-search-results {
    position: absolute;
    top: calc(100% - 0.5rem);
    left: 1.25rem;
    right: 1.25rem;
    margin-top: 0.5rem;
    max-height: 60vh;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-solid);
    background: var(--surface);
    border-radius: 20px;
    z-index: 1001;
}
[data-theme="dark"] .mobile-search-wrap {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(99, 102, 241, 0.05));
}

/* =============================================
   ULTRA-MOBILE OPTIMIZATION (STUNNING AESTHETICS)
   ============================================= */
@media (max-width: 546px) {
    /* HERO TITLE - Maximum Impact */
    h1, .hero-title, .card-title, .hero-title span { font-size: 2.1rem !important; letter-spacing: -0.03em !important; line-height: 1.1 !important; }
    .hero-subtitle { font-size: 1.05rem !important; line-height: 1.6 !important; opacity: 1; }
    .hero-eyebrow { font-size: 0.9rem !important; font-weight: 700 !important; }

    /* Other Typography (Balanced) */
    h2, .section-title, .category-title { font-size: 1.4rem !important; letter-spacing: -0.01em !important; }
    h3 { font-size: 1.2rem !important; }
    h4 { font-size: 1.05rem !important; }
    p, .footer-brand p, .calc-card p, .card-desc { font-size: 0.9rem !important; line-height: 1.6 !important; opacity: 1; }
    a, .nav-links a, .footer-col a, label, .input-label, .form-label, span, .breadcrumb { font-size: 0.85rem !important; }

    /* Spacing & Layout Optimization */
    .container, .navbar-inner, .hero, .footer-inner, .faq-section-wrap, .tool-container, .card {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        max-width: 100% !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .hero { padding-top: 2rem !important; padding-bottom: 2rem !important; min-height: auto !important; }
    .calc-grid, .grid, .calc-form { gap: 1rem !important; }
    .form-group { gap: 0.4rem !important; }
    
    /* Card & Component Refinement */
    .calc-card, .card, .tool-container, .result-box, .result-main, .result-item {
        padding: 1rem !important;
        border-radius: 14px !important;
        margin-bottom: 0.85rem !important;
    }
    
    .card-header { margin-bottom: 1.25rem !important; }
    .result-box { margin-top: 1.5rem !important; padding-top: 1.5rem !important; }

    /* Form Elements */
    .input-field, .search-bar, select {
        height: 44px !important;
        font-size: 0.95rem !important;
        padding: 0 0.85rem !important;
        border-radius: 10px !important;
    }

    .btn-primary, .btn-ghost, .btn-calculate, .btn-premium {
        height: 46px !important;
        padding: 0 1.25rem !important;
        font-size: 0.95rem !important;
        border-radius: 10px !important;
        width: 100% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        margin-top: 0.4rem !important;
    }

    /* Icon & Visual Scaling */
    .category-icon, .card-icon-wrap, .logo-icon, .divider-icon-box, .feature-icon-wrap, .step-num {
        width: 36px !important;
        height: 36px !important;
        min-width: 36px !important;
        font-size: 1rem !important;
    }
    
    .logo-text { font-size: 1.1rem !important; }
    
    /* Result Specifics */
    .result-value { font-size: 2.2rem !important; }
    .result-label, .res-label { font-size: 0.75rem !important; }
}

