/* Calqua Calculators - Premium Fintech/Stripe-like Theme */
.calqua-calc-wrapper {
    --cc-bg: #f6f9fc; /* Stripe-like ultra-light slate */
    --cc-surface: #ffffff; /* Form/cards background */
    --cc-border: #e2e8f0;
    --cc-primary: #6366f1; /* Indigo */
    --cc-primary-glow: rgba(99, 102, 241, 0.2);
    --cc-primary-hover: #4f46e5;
    --cc-text: #1a1f36; /* Crisp dark text */
    --cc-text-muted: #64748b;
    --cc-success: #10b981;
    --cc-radius: 12px;
    --cc-shadow: 0 2px 4px rgba(0,0,0,0.02), 0 8px 16px rgba(0,0,0,0.04);
    
    background: var(--cc-bg);
    color: var(--cc-text);
    border-radius: var(--cc-radius);
    padding: 3rem;
    box-shadow: var(--cc-shadow);
    border: 1px solid rgba(0,0,0,0.05);
    max-width: 1100px; /* Widened */
    margin: 3rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    position: relative;
    overflow: hidden;
}

/* Internal Layout Separators */
.calqua-calc-top-card {
    background: var(--cc-surface);
    padding: 2.5rem;
    border-radius: var(--cc-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02), 0 4px 6px rgba(0,0,0,0.02);
    border: 1px solid var(--cc-border);
    margin-bottom: 2.5rem;
}

.calqua-calc-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.calqua-calc-title {
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: #111827;
    letter-spacing: -0.02em;
}

.calqua-calc-desc {
    color: var(--cc-text-muted);
    font-size: 1.15rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Form Elements */
.calqua-calc-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 2rem;
}

.calqua-calc-form-group.full-width {
    grid-column: 1 / -1;
}

.calqua-calc-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #374151;
    font-size: 0.95rem;
}

.calqua-calc-input, .calqua-calc-select {
    width: 100%;
    padding: 0.85rem 1.2rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    color: #111827 !important; /* Forces dark contrast */
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0,0,0,0.01) inset;
    opacity: 1 !important;
    height: auto !important;
    min-height: 52px;
    line-height: normal !important;
}

.calqua-calc-select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1.2em;
    padding-right: 2.5rem; /* Make room for the arrow */
    cursor: pointer;
}

.calqua-calc-input:focus, .calqua-calc-select:focus {
    outline: none;
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 4px var(--cc-primary-glow);
}

.calqua-calc-btn {
    grid-column: 1 / -1;
    display: block;
    width: 100%;
    padding: 1.1rem;
    background: var(--cc-primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px var(--cc-primary-glow), 0 2px 4px -1px rgba(0,0,0,0.06);
    margin-top: 1rem;
}

.calqua-calc-btn:hover {
    background: var(--cc-primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 12px -2px var(--cc-primary-glow), 0 3px 7px -3px rgba(0,0,0,0.1);
}

/* Results Box */
.calqua-calc-results {
    margin-top: 2.5rem;
    padding: 2rem;
    background: #f0fdf4; /* Very light subtle green */
    border: 1px solid #bbf7d0;
    border-radius: 12px;
    display: none;
    animation: fadeIn 0.5s ease;
}

.calqua-calc-results.show {
    display: block;
}

.calqua-calc-results h3 {
    color: #065f46;
    margin-top: 0;
    font-size: 1.5rem;
    font-weight: 700;
    border-bottom: 1px solid #d1fae5;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

/* Recommendation Box */
.calqua-calc-recommendation {
    margin-top: 2.5rem;
    padding: 2rem;
    background: linear-gradient(135deg, #ffffff, #f8fafc);
    border: 2px solid var(--cc-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 2rem;
    animation: slideUp 0.6s ease 0.3s both;
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.1);
}

.calqua-rec-img {
    width: 100px;
    height: 100px;
    object-fit: contain;
    background: #fff;
    border-radius: 8px;
    padding: 5px;
}

.calqua-rec-content {
    flex: 1;
}

.calqua-rec-title {
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 0 0.5rem 0;
    color: #111827;
}

.calqua-rec-desc {
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.calqua-rec-btn {
    display: inline-block;
    padding: 1rem 2rem;
    background: var(--cc-success);
    color: white !important;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.2s;
    white-space: nowrap;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

.calqua-rec-btn:hover {
    background: #059669;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(16, 185, 129, 0.3);
}

/* Content Area Below Calculator (SEO Text & FAQ) */
.calqua-calc-content-area {
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--cc-border);
}

.calqua-calc-prose {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

.calqua-calc-prose h3, .calqua-calc-prose h4 {
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1.25rem;
    font-weight: 700;
}

.calqua-calc-prose ul {
    margin-left: 1.5rem;
    margin-bottom: 2rem;
}

.calqua-calc-prose li {
    margin-bottom: 0.75rem;
}

/* FAQs */
.calqua-calc-faq {
    margin-top: 4rem;
    padding: 2.5rem;
    background: #ffffff;
    border: 1px solid var(--cc-border);
    border-radius: var(--cc-radius);
    box-shadow: 0 1px 3px rgba(0,0,0,0.02);
}

.calqua-calc-faq h3 {
    font-size: 1.8rem;
    color: #111827;
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
    font-weight: 800;
}

.faq-item {
    margin-bottom: 1.25rem;
    background: #ffffff;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.2s;
}

.faq-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}

.faq-question {
    padding: 1.5rem;
    margin: 0;
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1f2937;
    background: #f9fafb;
    transition: background 0.2s;
}

.faq-question:hover {
    background: #f3f4f6;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--cc-primary);
}

.faq-item.active .faq-question {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
}

.faq-item.active .faq-question::after {
    content: '-';
}

.faq-answer {
    padding: 1.5rem;
    color: #4b5563;
    line-height: 1.7;
    font-size: 1.05rem;
    display: none;
    background: #ffffff;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------
   CALQUA DIRECTORY HUB STYLES
   ------------------------------- */
.calqua-hub-wrapper {
    max-width: 1200px;
    margin: 4rem auto;
    font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, sans-serif;
}

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

.calqua-hub-title {
    font-size: 3.5rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #0f172a;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #0f172a, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calqua-hub-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto 2.5rem auto;
    line-height: 1.6;
}

.calqua-hub-search-container {
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05), 0 8px 10px -6px rgba(0,0,0,0.01);
    border-radius: 9999px;
    background: white;
    transition: box-shadow 0.3s ease;
}

.calqua-hub-search-container:hover, .calqua-hub-search-container:focus-within {
    box-shadow: 0 20px 25px -5px rgba(59, 130, 246, 0.1), 0 10px 10px -5px rgba(59, 130, 246, 0.04);
}

.calqua-hub-search-icon {
    position: absolute;
    left: 1.5rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

#calqua_hub_search {
    width: 100%;
    padding: 1.2rem 1.5rem 1.2rem 3.5rem;
    font-size: 1.1rem;
    border: 2px solid #e2e8f0;
    border-radius: 9999px;
    outline: none;
    transition: border-color 0.3s ease;
    background: transparent;
}

#calqua_hub_search:focus {
    border-color: #3b82f6;
}

/* Bento Grid */
.calqua-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.calqua-hub-card {
    display: block;
    text-decoration: none !important;
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.02), 0 2px 4px -1px rgba(0,0,0,0.02);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
    animation: fadeInUp 0.6s ease-out backwards;
}

.calqua-hub-grid .calqua-hub-card:nth-child(1) { animation-delay: 0.05s; }
.calqua-hub-grid .calqua-hub-card:nth-child(2) { animation-delay: 0.1s; }
.calqua-hub-grid .calqua-hub-card:nth-child(3) { animation-delay: 0.15s; }
.calqua-hub-grid .calqua-hub-card:nth-child(4) { animation-delay: 0.2s; }

.calqua-hub-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.05), 0 10px 10px -5px rgba(0,0,0,0.02);
    border-color: #cbd5e1;
}

.calqua-hub-card-inner {
    padding: 2rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.calqua-hub-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 9999px;
    margin-bottom: 1.25rem;
    width: max-content;
}

.badge-blue { background: #e0f2fe; color: #0284c7; }
.badge-purple { background: #f3e8ff; color: #9333ea; }
.badge-green { background: #dcfce7; color: #16a34a; }
.badge-orange { background: #ffedd5; color: #ea580c; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-indigo { background: #e0e7ff; color: #4f46e5; }

.calqua-hub-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 0.75rem 0;
    line-height: 1.3;
}

.calqua-hub-card-desc {
    font-size: 0.95rem;
    color: #64748b;
    line-height: 1.6;
    margin: 0 0 1.5rem 0;
    flex-grow: 1;
}

.calqua-hub-card-footer {
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.9rem;
    font-weight: 700;
    color: #3b82f6;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.calqua-hub-card:hover .calqua-hub-card-footer {
    color: #2563eb;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .calqua-hub-title { font-size: 2rem; }
    .calqua-hub-wrapper { padding: 0 1rem; margin: 2rem auto; overflow-x: hidden; }
    .calqua-hub-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .calqua-hub-search-container {
        margin: 0 0.5rem;
    }
    #calqua_hub_search {
        font-size: 1rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}
@media (max-width: 768px) {
    .calqua-calc-wrapper {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    .calqua-calc-top-card {
        padding: 1.5rem;
    }
    .calqua-calc-form {
        grid-template-columns: 1fr;
    }
    .calqua-calc-recommendation {
        flex-direction: column;
        text-align: center;
        padding: 1.5rem;
    }
    .calqua-calc-title {
        font-size: 1.8rem;
    }
    .calqua-calc-faq {
        padding: 1.5rem;
    }
}