/*
 * Theme Name: Forge Intelligence
 * Version: 2.0
 * Description: Private AI Knowledge Systems - Secure AI infrastructure and workflow automation for businesses
 * Author: Forge Intelligence
 */

/**
 * Custom Styling for the FluentForm Submission Button
 */
form.fluent_form_3 .wpf_has_custom_css.ff-btn-submit {
    background-color: var(--wp--preset--color--secondary) !important;
    color: #fff !important;
    border-color: var(--wp--preset--color--secondary) !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    padding: 0.75rem 2rem !important;
    transition: all 0.2s ease !important;
}

form.fluent_form_3 .wpf_has_custom_css.ff-btn-submit:hover {
    filter: brightness(1.1) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

/*
 * Smooth scrolling for anchor links
 */
html {
    scroll-behavior: smooth;
}

.wp-block-site-title a:hover {
    opacity: 80%;
}

.wp-block-navigation-item {
    color: var(--wp--preset--color--paragraph-text);
}

.wp-block-navigation-item:hover {
    color: var(--wp--preset--color--secondary);
    opacity: 1;
}

.wp-block-button:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/*
Remove padding from blocks wrapper
*/
.wp-site-blocks {
    padding: 0;
}

:where(.wp-site-blocks)>* {
    margin-block-start: 0;
}

summary h4 {
    display: inline;
    margin-left: 10px;
}

.header-block {
    position: relative;
    z-index: 1;
    border-bottom: 1px solid #e2e8f0;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
}

.hide-from-site-frontend {
    display: none;
}

/*
 * Link styles
 */
a {
    text-decoration-thickness: 1px !important;
    text-underline-offset: 0.15em;
    transition: color 0.2s ease;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
    outline-width: 2px;
    outline-style: solid;
    outline-color: var(--wp--preset--color--secondary);
}

.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
    margin-bottom: 3px;
}

/* ==========================================
   PRICING CALCULATOR
   ========================================== */

.pricing-calculator {
    max-width: 1200px;
    margin: 0 auto;
    font-family: var(--wp--preset--font-family--body, 'Inter', sans-serif);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 3rem;
    align-items: start;
}

/* Config panel */
.calc-config {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.calc-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1.5rem;
    transition: box-shadow 0.2s ease;
}

.calc-section:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.calc-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.calc-label {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--wp--preset--color--primary, #0f172a);
    display: block;
    margin-bottom: 0.5rem;
}

.calc-section-header .calc-label {
    margin-bottom: 0;
}

.calc-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--wp--preset--color--secondary, #3b82f6);
    background: rgba(59, 130, 246, 0.08);
    padding: 0.25rem 0.75rem;
    border-radius: 6px;
}

/* Sliders */
.calc-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: linear-gradient(to right,
        var(--wp--preset--color--secondary, #3b82f6) var(--fill, 0%),
        #e5e7eb var(--fill, 0%));
    outline: none;
    transition: background 0.1s;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--wp--preset--color--secondary, #3b82f6);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
    transition: transform 0.15s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--wp--preset--color--secondary, #3b82f6);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

.calc-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: #9ca3af;
    margin-top: 0.4rem;
}

/* Feature toggles */
.calc-features-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.calc-feature-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
    border: 1px solid transparent;
}

.calc-feature-toggle:hover {
    background: #f8fafc;
}

.calc-feature-toggle.active {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.15);
}

.calc-feature-toggle input[type="checkbox"] {
    display: none;
}

.toggle-track {
    width: 36px;
    height: 20px;
    background: #d1d5db;
    border-radius: 10px;
    position: relative;
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.calc-feature-toggle.active .toggle-track {
    background: var(--wp--preset--color--secondary, #3b82f6);
}

.toggle-thumb {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.calc-feature-toggle.active .toggle-thumb {
    transform: translateX(16px);
}

.toggle-label {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.toggle-price,
.toggle-included {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.toggle-included {
    color: var(--wp--preset--color--secondary, #3b82f6);
}

/* Radio groups */
.calc-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.calc-radio {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.calc-radio:hover {
    background: #f8fafc;
}

.calc-radio.active {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.2);
}

.calc-radio input[type="radio"] {
    display: none;
}

.radio-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #d1d5db;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.2s ease;
}

.calc-radio.active .radio-dot {
    border-color: var(--wp--preset--color--secondary, #3b82f6);
}

.calc-radio.active .radio-dot::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--wp--preset--color--secondary, #3b82f6);
}

.calc-radio span:not(.radio-dot):not(.radio-price) {
    flex: 1;
    font-size: 0.9rem;
    color: #374151;
    font-weight: 500;
}

.radio-price {
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

/* Output card */
.calc-output {
    position: sticky;
    top: 120px;
}

.calc-output-card {
    background: linear-gradient(135deg, var(--wp--preset--color--primary, #0f172a) 0%, #1e293b 100%);
    border-radius: 16px;
    padding: 2rem;
    color: #fff;
    box-shadow: 0 20px 60px -15px rgba(15, 23, 42, 0.4);
}

.calc-output-header {
    margin-bottom: 0.5rem;
}

.calc-output-label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 600;
}

.calc-price-display {
    margin-bottom: 1rem;
}

.calc-price-range {
    font-size: 2rem;
    font-weight: 800;
    display: block;
    background: linear-gradient(135deg, #60a5fa, #38bdf8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.calc-price-period {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 400;
}

.calc-price-note {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Breakdown */
.calc-breakdown {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.calc-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
}

.calc-breakdown-row.total {
    font-weight: 700;
    color: #fff;
    font-size: 0.95rem;
}

.calc-breakdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.5rem 0;
}

/* CTA button */
.calc-cta-button {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, var(--wp--preset--color--secondary, #3b82f6), #2563eb);
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: 10px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.calc-cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
    color: #fff;
}

.calc-cta-subtext {
    text-align: center;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 0.75rem;
}

/* Trust signals */
.calc-trust {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}

.calc-trust-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: #6b7280;
    font-weight: 500;
}

.calc-trust-item svg {
    color: var(--wp--preset--color--secondary, #3b82f6);
}

/* Responsive */
@media (max-width: 900px) {
    .calc-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .calc-output {
        position: static;
    }

    .calc-price-range {
        font-size: 1.6rem;
    }
}

@media (max-width: 480px) {
    .calc-section {
        padding: 1rem;
    }

    .calc-output-card {
        padding: 1.5rem;
    }

    .calc-trust {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
}

/* ==========================================
   SERVICES GRID
   ========================================== */

.service-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1) !important;
}

/* ==========================================
   HERO SECTION ENHANCEMENTS
   ========================================== */

.wp-block-bronkbuilderwp-hero-block .wp-block-cover {
    position: relative;
}

.wp-block-bronkbuilderwp-hero-block .wp-block-button__link {
    transition: all 0.2s ease;
}

.wp-block-bronkbuilderwp-hero-block .wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.wp-block-bronkbuilderwp-hero-block .is-style-outline .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.1);
}

/* ==========================================
   ABOUT SECTION STATS
   ========================================== */

#about .wp-block-group > p:first-child {
    font-variant-numeric: tabular-nums;
}

/* ==========================================
   RESPONSIVE ADJUSTMENTS
   ========================================== */

@media (max-width: 782px) {
    .services-grid .wp-block-column {
        flex-basis: 100% !important;
    }
}

/* ==========================================
   CONTACT SECTION
   ========================================== */

#contact {
    scroll-margin-top: 80px;
}

#about, #services, #pricing {
    scroll-margin-top: 80px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
    outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
    outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1,
h2,
h3,
h4,
h5,
h6,
blockquote,
caption,
figcaption,
p {
    text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
    display: block;
}

/*
 * Fix website header to always show at top of page and have colors from the theme
 */
.site-header {
    position: fixed;
    width: 100%;
    background-color: var(--wp--preset--color--background);
    z-index: 1000;
    border-bottom: 1px solid;
    box-shadow:
        0 1px 3px 0 rgb(0 0 0 / 0.1),
        0 1px 2px -1px rgb(0 0 0 / 0.1);
    /* Add a bottom box shadow to the header block */
}

.site-header img {
    height: auto;
    width: calc(var(--wp--preset--spacing--40) * 2);
}

/* Adjust for admin bar on desktop */
.admin-bar .site-header {
    top: 32px !important;
    /* WordPress admin bar height on desktop */
}

/* Adjust for admin bar on mobile devices */
@media screen and (max-width: 782px) {
    .admin-bar .site-header {
        top: 46px !important;
        /* WordPress admin bar height on mobile */
    }
}

/* For very small screens where WP removes the admin bar */
@media screen and (max-width: 600px) {
    .admin-bar .site-header {
        top: 0 !important;
    }
}

/*
 * Make the separator between the footer and content, not so thick
 */
.wp-block-separator {
    border: none !important;
    border-top: 1px solid !important;
}

#products .wp-block-column {
    transition: scale 0.15s ease-in-out;
}

#products .wp-block-column:hover {
    scale: 105%;
}

/*Fix overflow of some unsplash images in certain browsers  */
img {
    width: 100%;
}

.footer-contact-columns .wp-block-group {
    text-align: center;
}

.footer-contact-columns {
    align-items: center;
}
