/* ===================================================================
    GLOBAL STYLES & VARIABLES
=================================================================== */
:root {
    --tcolor-lighter-cream: rgb(248, 246, 244);
    --tcolor-light-cream: rgb(241, 236, 232);
    --tcolor-cream: #d1bfae;
    --tcolor-lighter-green: #e7f88f;
    --tcolor-light-green: #cbe54e;
    --tcolor-dark-green: #94b447;
    --tcolor-darker-green: #5f6833;
    --tcolor-dark: #1a1a1a;
    --font-serif: 'Roboto Slab', serif;
    --font-sans: 'Roboto', sans-serif;
}

::selection {
    background-color: white;
    color: var(--tcolor-dark);
}

.highlight::selection {
    background-color: var(--tcolor-light-green);
    color: var(--tcolor-dark);
}

body {
    background-color: var(--tcolor-dark);
    font-family: var(--font-sans);
    color: var(--tcolor-light-cream);
}

.section-headline-dark {
    font-family: var(--font-serif);
    color: var(--tcolor-dark);
}

.section-headline-light {
    font-family: var(--font-serif);
    color: white;
}

.section-headline-light .highlight,
.section-headline-dark .highlight {
    color: var(--tcolor-light-green);
}

.section-subheadline-dark {
    font-family: var(--font-sans);
    color: var(--tcolor-darker-green);
    max-width: 650px;
    margin-left: auto;
    margin-right: auto;
}

.interactive-marquee {
    cursor: grab;
}

.interactive-marquee .is-dragging {
    cursor: grabbing;
}

.secondary-ctas .cta-link {
    color: var(--tcolor-light-cream);
    text-decoration: none;
    font-family: var(--font-sans);
    border-bottom: 1px solid var(--tcolor-dark-green);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.secondary-ctas .cta-link:hover {
    color: white;
    border-color: var(--tcolor-light-green);
}

/* ===================================================================
    NAVIGATION BAR
=================================================================== */
.navbar {
    transition: background-color 0.4s ease, padding 0.4s ease;

    z-index: 9;
}

.navbar.scrolled {
    background-color: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0px 1px 2px 0px rgb(203 229 78 / 5%);
}

.navbar .nav-link {
    font-family: var(--font-sans);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

.navbar .nav-link:hover,
.navbar .nav-link.active {
    color: white;
}

.navbar .dropdown-menu {
    background-color: var(--tcolor-dark);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar .dropdown-item {
    color: rgba(255, 255, 255, 0.8);
}

.navbar .dropdown-item:hover {
    color: white;
    background-color: var(--tcolor-darker-green);
}

.navbar .btn-light-green {
    background-color: var(--tcolor-light-green);
    color: var(--tcolor-dark);
    font-weight: 600;
    border: 2px solid var(--tcolor-light-green);
    transition: all 0.3s ease;
}

.navbar .btn-light-green:hover {
    background-color: var(--tcolor-lighter-green);
    border-color: var(--tcolor-lighter-green);
    transform: translateY(-2px);
}

.navbar .btn-light-green:active {
    color: black;
}

.navbar-nav button,
.navbar-nav a {
    border-radius: 2px;
}

@media (max-width: 768px) {
    .navbar:has(.navbar-collapse.show) {
        background-color: rgba(26, 26, 26, 0.8);
        backdrop-filter: blur(10px);
        box-shadow: 0px 1px 2px 0px rgb(203 229 78 / 5%);
    }

    .navbar .navbar-collapse {
        padding: 10px 0px;
        padding-bottom: 15px;
    }

    .navbar .navbar-nav {
        width: 100% !important;
    }

    .navbar .navbar-nav .nav-item .btn {
        width: 100% !important;
    }

    .navbar .navbar-nav .nav-item:not(:last-child) {
        margin-bottom: 10px;
    }
}

/* ===================================================================
    SECTION 1: HERO
=================================================================== */
#hero {
    position: relative;
    min-height: 95svh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #101010;
}

#hero #hero-background-animation {
    position: absolute;
    top: -100px;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.1;
    background-image: url('/assets/images/ai-background/avif/frame0000.avif');
    background-size: cover;
    background-position: center;
}

#hero .hero-content-wrapper {
    position: relative;
    z-index: 5;
    padding-bottom: 150px;
    text-align: center;
}

#hero .hero-headline {
    font-family: var(--font-serif);
    color: white;
}

#hero .hero-headline .highlight {
    color: var(--tcolor-light-green);
}

#hero .hero-subheadline {
    font-family: var(--font-sans);
    max-width: 700px;
    opacity: 0.8;
}

/* --- Scrolling Logo Wall --- */
#hero #logo-wall-container {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    z-index: 5;
    /* Above background, below phone */
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}

#hero .logo-wall-track {
    display: flex;
    width: max-content;
}

#hero .logo-item img {
    max-height: 40px;
    width: auto;
    margin: 0 40px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
    filter: brightness(0) invert(1);
}

#hero .logo-item:hover img {
    opacity: 1;
}

/* --- Phone Modal System --- */
#hero #phone-demo {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 320px;
    aspect-ratio: 889 / 1791;
    contain: layout style paint;
    z-index: 10;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

#hero #phone-demo.clipped {
    transform: translate(-50%, 50%);
    z-index: 8;
}

body:not(.is-modal-active) #hero #phone-demo.clipped:hover {
    transform: translate(-50%, 45%);
}

#hero .phone-interaction-blocker {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    /* Sits on top of everything inside #phone-demo */
    border-radius: 45px;
    /* Match the phone frame's border radius */

    /* Initially visible to block clicks */
    opacity: 1;
    pointer-events: all;

    /* Make it transparent so we can see the screen behind it */
    background-color: transparent;

    /* Smoothly fade out when modal becomes active */
    transition: opacity 0.3s ease;
}

body.is-modal-active #hero #phone-demo .phone-interaction-blocker {
    opacity: 0;
    pointer-events: none;
    /* Crucial: This makes it non-clickable */
}

#hero #phone-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 10, 10, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 9;
    /* Below the modal content */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
}

#hero #phone-modal-close-btn {
    position: absolute;
    top: 30px;
    right: 30px;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    z-index: 101;
    /* Above modal content */
    transition: color 0.3s ease, transform 0.3s ease;
}

#hero #phone-modal-close-btn:hover {
    color: white;
    transform: rotate(90deg);
}

body.is-modal-active #hero #phone-modal-overlay {
    opacity: 1;
    pointer-events: all;
}

body.is-modal-active #hero #phone-demo {
    bottom: 50%;
    left: 50%;
    z-index: 100;
    cursor: default;
    /* Change cursor from 'pointer' to default */
    transform: translate(-50%, 50%);
}

@keyframes shake-error {

    0%,
    100% {
        transform: translateX(0);
    }

    10%,
    30%,
    50%,
    70%,
    90% {
        transform: translateX(-5px);
    }

    20%,
    40%,
    60%,
    80% {
        transform: translateX(5px);
    }
}

#hero .shake-error {
    animation: shake-error 0.5s ease-in-out;
}


#hero .phone-frame {
    width: 100%;
    height: auto;
}

#hero .phone-screen {
    position: absolute;
    top: 11%;
    left: 5.5%;
    width: 89%;
    height: 78%;
    border-radius: 10%;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#hero .phone-screen .screen-content {
    display: none;
}

#hero .phone-screen .screen-content.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#hero .phone-prompt-text {
    font-size: 0.8rem;
    opacity: 0.7;
}

#hero #phone-number-display {
    background: transparent;
    border: none;
    box-shadow: none;
    color: white;
    text-align: center;
    font-size: 1.5rem;
    letter-spacing: 2px;
    font-family: var(--font-sans);
}

#hero #keypad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

#hero .keypad-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    border-radius: 50%;
    aspect-ratio: 1 / 1;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.2s ease;
}

#hero .keypad-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

#hero .call-controls {
    gap: 20px;
}

#hero .call-btn,
#hero .end-call-btn {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    border: none;
    font-size: 1.8rem;
    color: white;
    background-color: var(--tcolor-dark-green);
    transition: background-color 0.2s ease;
}

#hero .call-btn:hover {
    background-color: #aacc50;
}

#hero .end-call-btn {
    background-color: #e64c3c;
    margin: 40px auto 0;
}

#hero .backspace-btn {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.5);
    font-size: 1.8rem;
    transition: color 0.2s ease;
}

#hero .backspace-btn:hover {
    color: white;
}

#hero .calling-status,
#hero .incall-status {
    font-family: var(--font-serif);
}

#hero .calling-number-display,
#hero .incall-timer {
    opacity: 0.8;
    font-size: 1.2rem;
}

#hero .incall-controls {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 40px;
}

#hero .incall-icon-btn {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: white;
    border-radius: 20%;
    padding: 10px 0;
    display: flex;
    flex-direction: column;
}

#hero .incall-icon-btn i {
    font-size: 1.5rem;
}

#hero .incall-icon-btn span {
    font-size: 0.7rem;
    margin-top: 5px;
}

/** Responsive adjustments */


@media (max-width: 450px) {
    #hero #phone-demo {
        width: 270px;
    }

    body.is-modal-active #hero #phone-demo {
        width: 75%;
    }

    #hero .phone-prompt-text {
        font-size: 0.8em;
    }

    #hero #phone-number-display {
        font-size: 1.5rem;
    }

    #hero #keypad {
        gap: 7px;
        margin-top: 10px;
    }

    #hero .call-btn,
    #hero .end-call-btn {
        width: 65px;
        height: 65px;
        font-size: 1.7rem;
    }
}

@media (max-width: 330px) {
    #hero #phone-demo {
        width: 240px;
    }

    #hero .phone-prompt-text {
        font-size: 0.5em;
    }

    #hero #keypad {
        gap: 7px;
        margin-top: 10px;
    }

    #hero #phone-number-display {
        font-size: 1rem;
    }

    #hero .call-btn,
    #hero .end-call-btn {
        width: 45px;
        height: 45px;
        font-size: 1.2rem;
    }
}

@media (max-height: 768px) {
    #hero #phone-demo.clipped {
        transform: translate(-50%, 70%);
    }
}

@media (max-height: 768px) {
    #hero #phone-demo.clipped {}
}

/* ===================================================================
    SECTION 3: PROBLEM-SOLUTION
=================================================================== */

#problem {
    background-color: var(--tcolor-dark);
    padding-top: 100px;
    padding-bottom: 120px;
}

.animation-container {
    width: 100%;
    margin: 0 auto;
    background-color: #0a0a0a;
    /* Dark container background */
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    overflow: hidden;
}

#complexity-animation {
    width: 100%;
    height: auto;
    font-family: var(--font-sans);
    padding: 40px;
}

/* --- Endpoint Styling --- */
#endpoints-group image {
    filter: invert(1);
}

.endpoint-label {
    font-size: 14px;
    font-weight: 500;
    fill: #ccc;
    /* Lighter text for dark bg */
}

/* --- Line Styling --- */
.simple-line-path {
    stroke: #666;
    /* Lighter grey for visibility */
    stroke-width: 2px;
    stroke-dasharray: 8 8;
    /* New: Marching ants animation */
    animation: marching-ants 2s linear infinite;
}

@keyframes marching-ants {
    to {
        stroke-dashoffset: -32;
        /* Double the dasharray (8+8)*2 */
    }
}

.tangled-line {
    fill: none;
    stroke: rgba(148, 180, 71, 0.5);
    stroke-width: 1.5px;
    z-index: -100;
}

#complexity-animation #arrowhead polygon {
    fill: var(--tcolor-light-green);
}

/* --- Pillar & Node Styling --- */
.pillar-box {
    fill: var(--tcolor-dark-green);
}

.pillar-label {
    fill: white;
    font-size: 14px;
    font-weight: 600;
    text-anchor: middle;
}

.node-box {
    fill: rgb(54, 54, 54);
    stroke: rgb(54, 54, 54);
}

.node-label {
    fill: #ccc;
    /* Lighter text for dark bg */
    font-size: 12px;
    text-anchor: middle;
}

/* --- Solution Styling --- */
#iqra-logo-image {
    animation: glowback 1s ease-in-out infinite alternate;
    background-color: #0a0a0a;
}

@keyframes glowback {
    from {
        filter: drop-shadow(0 0 30px #cce54e5e);
    }

    to {
        filter: drop-shadow(0 0 10px #e7f88f5e);
    }
}

/* ===================================================================
    SECTION 4: HOW IT WORKS
=================================================================== */
#how-it-works {
    background-color: #101010;
    background-image: radial-gradient(#1a1a1a 1px, transparent 1px);
    background-size: 20px 20px;
    padding-top: 120px;
    padding-bottom: 140px;
    overflow: hidden;
}

#how-it-works .section-headline-light {
    color: #fff;
}

.section-headline-light .highlight {
    color: var(--tcolor-light-green);
}

.horizontal-scroll-container {
    position: relative;
    overflow-x: auto;
    padding: 20px 0;
    /* Hide scrollbar for a cleaner look */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
    /* Add fading edges to indicate scrollability */
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    cursor: grab;
}

.horizontal-scroll-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, and Opera */
}

.horizontal-scroll-container.active {
    cursor: grabbing;
    cursor: -webkit-grabbing;
    user-select: none;
    /* Prevents text selection while dragging */
}

.card-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
    gap: 50px;
    padding: 0 10%;
    /* Add padding so cards don't touch the faded edges */
}

.node-card {
    background-color: var(--tcolor-light-cream);
    border-radius: 12px;
    box-shadow: 3px 3px 8px rgba(245, 245, 245, 0.15);
    padding: 20px;
    position: relative;
    z-index: 2;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 0 0 320px;
    max-width: 320px;
}

.node-card:hover {
    transform: translateY(-5px);
    box-shadow: 4px 5px 14px rgba(245, 245, 245, 0.2);
}

.node-card .card-header {
    gap: 15px;
    margin-bottom: 15px;
}

.step-number {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #575451;
    line-height: normal;
}

.step-icon {
    font-size: 1.5rem;
    color: var(--tcolor-dark-green);
    line-height: normal;
}

.step-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--tcolor-dark);
    margin: 0;
    line-height: normal;
}

.card-visual {
    width: 100%;
    height: 180px;
    border-radius: 8px;
    overflow: hidden;
    background-color: #eee;
}

.card-visual video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-footer {
    margin-top: 15px;
    text-align: right;
}

.learn-more-link {
    font-family: var(--font-sans);
    text-decoration: none;
    color: var(--tcolor-darker-green);
    font-weight: 500;
}

.learn-more-link:hover {
    color: var(--tcolor-dark);
}

/* --- Marquee Styles for Node 1 --- */
.integration-marquee-wrapper {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    padding: 10px 0;

    background-color: #1f1f1f;
    background-image: radial-gradient(#292929 1px, transparent 1px);
    background-size: 20px 20px;
}

.marquee-track-integrations {
    display: flex;
    width: max-content;
    animation: marquee-integrations 40s linear infinite;
}

.marquee-track-integrations.reverse {
    animation-direction: reverse;
}

@keyframes marquee-integrations {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

.integration-logo {
    height: 35px;
    width: auto;
    margin: 0 25px;
    filter: brightness(0) invert(1);
    opacity: 0.6;
}

/* --- NEW: Specific styles for Step 2 Design Animation --- */
.design-animation-bg {
    background-color: #1f1f1f;
    background-image: radial-gradient(#292929 1px, transparent 1px);
    background-size: 20px 20px;
}

#design-animation-svg {
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
}

.connecting-line {
    fill: none;
    stroke: #aaa;
    stroke-width: 2px;
}

.node-box-main {
    fill: white;
    stroke: #eee;
}

.node-box-condition {
    fill: white;
    stroke: #eee;
}

.node-box-decision {
    fill: var(--tcolor-light-green);
}

.decision-text {
    fill: black;
    font-size: 14px;
    font-weight: 500;
    text-anchor: middle;
}

.node-content {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 100%;
}

.node-content.centered {
    justify-content: center;
    text-align: center;
}

.node-icon {
    font-size: 20px;
    color: white;
    background-color: var(--tcolor-dark-green);
    padding: 8px;
    border-radius: 8px;
    line-height: normal;
}

.node-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--tcolor-dark);
}

.placeholder-line {
    width: 80%;
    height: 8px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 5px;
}

.condition-text {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 500;
    color: var(--tcolor-dark);
}

.schedule-content {
    display: flex;
    flex-direction: column;
    padding: 5px;
}

.calendar-logos {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.calendar-logos img {
    height: 24px;
    width: auto;
}

/* ===================================================================
    SECTION 4.5: REFINE CARD SVG ANIMATION STYLES
=================================================================== */
.refine-animation-bg {
    background-color: #1f1f1f;
    background-image: radial-gradient(#292929 1px, transparent 1px);
    background-size: 20px 20px;
}

#refine-animation-svg {
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
}

.refine-connecting-line {
    fill: none;
    stroke: #d0d9e3;
    stroke-width: 2px;
}

.refine-node-box {
    fill: white;
    stroke: #e1e8f0;
}

.refine-sub-box {
    fill: #f8f9fa;
    stroke: #e9ecef;
}

.refine-title-text {
    font-size: 14px;
    font-weight: 600;
    fill: #2c3e50;
}

.refine-body-text {
    font-size: 14px;
    font-weight: 500;
    fill: #34495e;
}

.refine-body-text.sub-text {
    fill: #7f8c8d;
    font-size: 10px;
}

.refine-button rect {
    fill: #2c3e50;
}

.refine-button.review-button rect {
    fill: #e9ecef;
}

.refine-button.review-button.running rect {
    fill: #a8e374;
}

.refine-button.review-button.pending rect {
    fill: #ffec5c;
}

.refine-button-text {
    font-size: 14px;
    font-weight: 500;
    fill: white;
    text-anchor: middle;
}

.refine-button-text.small {
    font-size: 10px;
    fill: #34495e;
}

.refine-sim-title {
    font-size: 16px;
    font-weight: 600;
    fill: #2c3e50;
    text-anchor: middle;
}

.refine-tag rect {
    fill: #e9ecef;
}

#refine-passed-badge .refine-tag rect {
    fill: var(--tcolor-dark-green);
}

.refine-tag-text {
    font-size: 10px;
    font-weight: 500;
    text-anchor: middle;
    fill: #34495e;
}

#refine-passed-badge .refine-tag-text {
    fill: white;
}

/* ForeignObject Content Styling */
.sim-icon-wrapper {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.sim-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-image: linear-gradient(45deg, #a8e0e0, #f8d3f8);
}

.sim-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-size: cover;
}

.sim-avatar.calm {
    background-image: linear-gradient(45deg, #81ecec, #74b9ff);
}

.sim-avatar.angry {
    background-image: linear-gradient(45deg, #fab1a0, #ff7675);
}

.sim-avatar.judge {
    background-image: linear-gradient(45deg, #a29bfe, #747d8c);
}

.refine-sim-text {
    font-size: 10px;
    fill: #7f8c8d;
}

.refine-sim-text.body {
    font-size: 12px;
    fill: #2c3e50;
    font-weight: 500;
}

.refine-eval-body {
    font-size: 11px;
    line-height: 1.4;
    color: #7f8c8d;
    margin: 0;
}

.progress-ring {
    font-family: var(--font-sans);
}

.progress-ring__background {
    fill: transparent;
    stroke: #e9ecef;
    stroke-width: 8;
}

.progress-ring__circle {
    fill: transparent;
    stroke: var(--tcolor-lighter-green);
    stroke-width: 8;
    stroke-linecap: round;
    transform: rotate(-90deg);
}

.progress-text {
    font-size: 16px;
    font-weight: 700;
    fill: #2c3e50;
    text-anchor: middle;
}

#refine-passed-badge rect {
    fill: var(--tcolor-dark-green);
}

#refine-passed-badge text {
    fill: white;
    font-size: 11px;
    font-weight: 600;
}

/* --- CTA Card --- */
.node-card.cta-card {
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: left;
    color: var(--tcolor-lighter-cream);
    position: relative;
    overflow: hidden;
    flex: 0 0 400px;
    max-width: 400px;

    /* --- The Magic: Layered Backgrounds --- */

    /* 1. Base Color (Bottom Layer) */
    background-color: #000000;

    /* 2. Image Layers (Dots on top, then blobs) */
    background-image:
        /* Layer 4 (Top): The subtle white dots */
        radial-gradient(rgba(231, 231, 231, 0.1) 1px, transparent 1px),

        /* Layer 3: The main light green blob */
        radial-gradient(circle at center, #caf35949 0%, transparent 70%),

        /* Layer 2: A secondary, darker green blob for depth */
        radial-gradient(circle at center, #47b46b5d 0%, transparent 70%),

        /* Layer 1: A new vibrant cyan/blue accent blob for pop */
        radial-gradient(circle at center, #76fd9859 0%, transparent 70%);

    /* 3. Define the size for each layer */
    background-size:
        20px 20px,
        /* Size for the dots */
        200% 300%,
        /* Size for light green blob */
        325% 200%,
        /* Size for dark green blob */
        200% 275%;
    /* Size for cyan blob */

    /* 4. Define the INITIAL position for each layer */
    background-position:
        0 0,
        /* Dots stay static */
        30% 100%,
        /* Light green starts bottom-left */
        100% 70%,
        /* Dark green starts bottom-right */
        60% 10%;
    /* Cyan starts top-center */

    /* 5. Hook up the new animation */
    animation: cta-blob-animation 20s ease-in-out infinite;

    box-shadow: 2px 3px 8px 2px rgba(150, 180, 71, 0.1)
}

/* The new keyframes to animate the blobs' positions */
@keyframes cta-blob-animation {
    50% {
        background-position:
            0 0,
            /* Dots stay static */
            70% 15%,
            /* Light green moves to top-right */
            20% 10%,
            /* Dark green moves to top-left */
            30% 80%;
        /* Cyan moves to bottom-center */
    }

    /* The animation will automatically return to 0%/100% state */
}

/* Ensure the hover effect remains */
.node-card.cta-card:hover {
    transform: translateY(-7px);
    box-shadow: 7px 8px 20px 0px rgb(150 180 71 / 10%)
}

/* Ensure content is visible above the background */
.cta-card-content {
    position: relative;
    z-index: 2;
    padding: 25px 30px;
    height: 100%;
}

.cta-card-headline {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
}

.cta-card-text {
    font-family: var(--font-sans);
    line-height: 1.7;
    opacity: 0.9;
    margin-bottom: 30px;
}

.node-card.cta-card .secondary-ctas {
    bottom: 0;
    position: absolute;
    margin-bottom: 22px;
}

.node-card.cta-card .secondary-ctas .cta-link {
    font-weight: 700;
}

/* ===================================================================
    SECTION 4.6: DEPLOY CARD SVG STYLES
=================================================================== */
.deploy-animation-bg {
    background-color: #1f1f1f;
    background-image: radial-gradient(#292929 1px, transparent 1px);
    background-size: 20px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#deploy-animation-svg {
    width: 100%;
    height: 100%;
    font-family: var(--font-sans);
    overflow: visible;
}

/* --- General Node & Line Styles --- */
.node-card-deploy {
    fill: white;
    stroke: #e2e8f0;
    stroke-width: 1.5px;
    transition: filter 0.3s ease;
}

.node-card-deploy.agent-card {
    filter: drop-shadow(0 4px 6px rgba(100, 116, 139, 0.1));
}

#deploy-agent-node:hover .agent-card {
    filter: drop-shadow(0 10px 15px rgba(100, 116, 139, 0.2));
}

.node-title-main {
    font-size: 16px;
    font-weight: 600;
    fill: #0f172a;
    text-anchor: middle;
}

.node-subtitle {
    font-size: 12px;
    fill: #64748b;
    text-anchor: middle;
}

.connecting-line-deploy {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2px;
}

/* --- Sound Wave Asset Styling --- */
#sound-wave-asset,
#omni-sound-wave-asset {
    opacity: 0;
    /* Hidden by default */
    color: var(--tcolor-dark-green);
    /* Use color for fill */
}

.wave-line {
    transform-origin: 50% 50%;
    /* Center origin for scaling */
}

/* --- Message Bubble Asset Styling --- */
#message-bubble-asset,
#omni-message-bubble-asset {
    opacity: 0;
    /* Hidden by default */
}

.msg-bubble-bg {
    fill: #e9e9eb;
}

.msg-text {
    fill: #242424;
    font-size: 18px;
    font-family: 'Inter', var(--font-sans);
    letter-spacing: -0.02em;
}

.typing-dot {
    fill: #999999;
}

.typing-indicator,
.omni-typing-indicator {
    opacity: 0;
}

.final-message,
.omni-final-message {
    opacity: 0;
}

#omni-animation-assets {
    opacity: 0;
}

/* ===================================================================
    SECTION 4.7: OPTIMIZE CARD STYLES
=================================================================== */
.optimize-animation-bg {
    background-color: #1f1f1f;
    background-image: radial-gradient(#292929 1px, transparent 1px);
    background-size: 20px 20px;

    padding: 15px;
    overflow: hidden;
    position: relative;
    font-family: var(--font-sans);
}

.optimize-content-scroller {
    background-color: white;

    padding: 10px;
    width: 100%;
    height: auto;
}

.dashboard-panel {
    width: 100%;
    color: var(--tcolor-dark);
}

#insights-view {
    height: 100%;
    /* Corresponds to card-visual height minus padding */
    margin-bottom: 20px;
}

#history-view {
    height: 150px;
}

.panel-header {
    margin-bottom: 10px;
    border-bottom: 1px solid #ddd;
    padding-bottom: 5px;
    text-align: left;
}

.breadcrumbs {
    font-size: 0.5rem;
    color: #888;
    margin-bottom: 5px;
}

.breadcrumbs strong {
    color: var(--tcolor-dark);
}

.panel-title {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin: 0;
}

.panel-tabs {
    display: flex;
    gap: 15px;
    font-size: 0.5rem;
    margin-top: 5px;
}

.tab-item {
    padding-bottom: 2px;
    color: #666;
    border-bottom: 2px solid transparent;
}

.tab-item.active {
    color: var(--tcolor-dark);
    font-weight: 500;
    border-bottom-color: var(--tcolor-dark);
}

.panel-body {
    display: flex;
    gap: 10px;
    height: calc(100% - 50px);
    /* Adjust based on header height */
}

.general-metrics {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.metric-card {
    background-color: #e9e4e0;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.5rem;
    text-align: left;
}

.metric-card.skeleton {
    background-color: transparent;
    border: 1px dashed #ccc;
}

.metric-header {
    display: flex;
    justify-content: space-between;
    color: #555;
}

.metric-value {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
    line-height: 1;
}

.agent-metrics {
    flex: 2;
}

.chart-container {
    background: var(--tcolor-lighter-cream);
    border-radius: 4px;
}

.chart-title {
    font-size: 0.6rem;
    font-weight: 500;
    margin-bottom: 2px;
    padding: 5px
}

#call-minutes-chart .chart-area {
    fill: #aed6f1;
    opacity: 0.6;
}

#call-minutes-chart .chart-line {
    fill: none;
    stroke: #3498db;
    stroke-width: 1.5;
}

#call-minutes-chart .chart-point {
    fill: #3498db;
    stroke: white;
    stroke-width: 1;
}

/* History View Styles */
.history-title {
    font-size: 0.7rem;
    font-weight: 500;
}

.history-table {
    width: 100%;
    font-size: 0.5rem;
    border-collapse: collapse;
}

.history-table th,
.history-table td {
    text-align: left;
    padding: 3px 2px;
    color: #1a1a1a;
}

.history-table th {
    font-weight: 400;
}

.history-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background-color 0.2s ease;
}

#target-row {
    cursor: pointer;
}

#target-row:hover,
#target-row.clicked {
    background-color: #e0f7fa;
}

.skeleton-row td {
    padding: 5px 0;
}

.skeleton-row td::after {
    content: '';
    display: block;
    height: 6px;
    width: 80%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    border-radius: 3px;
    animation: skeleton-shine 1.5s infinite linear;
}

@keyframes skeleton-shine {
    to {
        background-position: -200% 0;
    }
}

/* Analysis Modal Styles */
.dashboard-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 90%;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    padding: 8px;
    font-size: 0.5rem;
    z-index: 10;
    color: black;

    border: 1px solid rgb(212, 212, 212);

    /* Initial Hidden State */
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -45%) scale(0.95);
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.dashboard-modal.visible {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    font-weight: 500;
}

.modal-header button {
    background: none;
    border: none;
    font-size: 1rem;
    line-height: 0.5;
    opacity: 0.5;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 9;
    /* Below the modal, above the content */

    /* Initial Hidden State */
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease-in-out;
}

.audio-player {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #f8f9fa;
    border-radius: 4px;
    padding: 4px;
}

.play-button {
    background-color: var(--tcolor-dark-green);
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.6rem;
}

.timeline-bar {
    flex-grow: 1;
    height: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
}

.timeline-bar .progress-bar {
    width: 30%;
    height: 100%;
    background-color: var(--tcolor-dark);
    border-radius: 2px;
}

.analysis-title {
    font-size: 0.55rem;
    font-weight: 600;
    margin-top: 5px;
    margin-bottom: 5px;
}

.analysis-item {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f0;
}

.analysis-item .value {
    font-weight: 500;
}

.analysis-item .value.success::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: #2ecc71;
    border-radius: 50%;
    margin-right: 4px;
    vertical-align: middle;
}

/* ===================================================================
    SECTION 5: INDUSTRY SOLUTIONS
=================================================================== */
#industry-solutions {
    background-color: #101010;
    padding-top: 100px;
    padding-bottom: 120px;
}

#industry-solutions .section-headline-light .highlight {
    color: var(--tcolor-light-green);
}

#industry-solutions .marquee-container {
    width: 100%;
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}

#industry-solutions .marquee-track {
    display: flex;
    width: max-content;
}

@keyframes marquee-scroll {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-50%);
    }
}

#industry-solutions .industry-card {
    flex: 0 0 auto;
    width: 380px;
    height: 250px;
    margin: 0 20px;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

#industry-solutions .industry-card:hover {
    transform: scale(1.02);
}

#industry-solutions .industry-card .card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    filter: blur(2px);
    opacity: 0.3;
}

#industry-solutions .industry-card:hover .card-background {
    transform: scale(1.1);
}

#industry-solutions .industry-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgb(39 39 39 / 56%) 20% 20%, rgba(26, 26, 26, 0) 60%);
}

#industry-solutions .industry-card .card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    padding: 30px;
    color: white;
    width: 100%;
    z-index: 5;
}

#industry-solutions .industry-card .card-icon {
    font-size: 2.5rem;
    color: var(--tcolor-light-green);
    margin-bottom: 15px;
    display: block;
}

#industry-solutions .industry-card .card-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    margin-bottom: 10px;
}

#industry-solutions .industry-card .card-text {
    font-family: var(--font-sans);
    opacity: 0.8;
    line-height: 1.6;
}

/* ===================================================================
    SECTION 6: INTERACTIVE TOOLKIT SECTION
=================================================================== */
#agency-solutions {
    background-color: var(--tcolor-dark);
    padding-top: 100px;
    padding-bottom: 100px;
}

#agency-solutions .section-headline-light .highlight {
    color: var(--tcolor-light-green);
}

/* --- Left Panel: Controls --- */
#agency-solutions .feature-controls {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#agency-solutions .feature-controls .feature-control-btn {
    background: transparent;
    border: none;
    text-align: left;
    width: 100%;
    padding: 25px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
    color: var(--tcolor-light-cream);
    transition: background-color 0.6s ease;

    border-radius: 6px;
    margin-bottom: 15px;
}

#agency-solutions .feature-controls .feature-control-btn .control-icon {
    font-size: 1.5rem;
    color: var(--tcolor-dark-green);
    transition: color 0.6s ease;
    line-height: normal;
}

#agency-solutions .feature-controls .feature-control-btn .control-title {
    font-family: var(--font-serif);
    font-size: 1.25rem;
    margin-bottom: 0;
    /* Margin is now on the description */
    font-weight: 500;
    transition: color 0.6s ease;
    margin-top: 1px;
}

/* --- Description Hiding/Showing Logic --- */
#agency-solutions .feature-controls .feature-control-btn .control-desc {
    font-family: var(--font-sans);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    max-height: 100;
    opacity: 0;
    overflow: hidden;
    margin-top: -100px;
    position: relative;
    z-index: -1;

}

#agency-solutions .feature-controls .feature-control-btn.active .control-desc {
    transition: all 0.6s ease-in-out, margin 0s, position 0s;
    max-height: 100px;
    opacity: 0.7;
    margin-top: 8px;
    position: static;
}

/* --- Active & Hover States for Controls --- */
#agency-solutions .feature-controls .feature-control-btn:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

#agency-solutions .feature-controls .feature-control-btn.active {
    background-color: #101010;
}

#agency-solutions .feature-controls .feature-control-btn.active .control-title {
    color: white;
    margin-top: 0px;
}

#agency-solutions .feature-controls .feature-control-btn.active .control-icon {
    color: var(--tcolor-light-green);
}

/* --- Progress Bar --- */
#agency-solutions .feature-controls .feature-control-btn .progress-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background-color: var(--tcolor-light-green);
    transform: scaleX(0);
    transform-origin: left;

    border-bottom-left-radius: 6px;
    border-bottom-right-radius: 6px;
}

/* --- Right Panel: Visual Canvas --- */
#agency-solutions .feature-visuals {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 400px;
}

/* --- Cross-Fade Logic for Panes --- */
#agency-solutions .feature-visuals .feature-pane {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    padding: 0px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#agency-solutions .feature-visuals .feature-pane.active {
    opacity: 1;
    pointer-events: auto;
}

#agency-solutions .feature-visuals .feature-pane img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* --- Responsive Adjustments --- */
@media (max-width: 991px) {
    #agency-solutions .feature-visuals {
        margin-top: 30px;
        min-height: 300px;
        padding: 20px;
    }

    #agency-solutions .feature-visuals {
        margin-top: 30px;
        min-height: 100%;
        width: 100%;
        padding: 0;
        aspect-ratio: 696/530;
    }

    #agency-solutions .feature-visuals .feature-pane,
    #agency-solutions .feature-visuals .feature-pane img {
        height: auto;
        width: 100%;
        min-width: 100%;
        padding: 0;
        margin: 0;
    }
}

/* ===================================================================
    SECTION 7: SUCCESS STORIES
=================================================================== */
#success-stories {
    background-color: var(--tcolor-dark);
    padding-top: 100px;
    padding-bottom: 120px;
}

#success-stories .success-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
}

#success-stories .success-grid .case-study-card {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    color: white;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

#success-stories .success-grid .card-large {
    grid-area: 1 / 1 / 3 / 2;
}

#success-stories .success-grid .card-small {
    padding: 30px;
}

#success-stories .success-grid .card-small:nth-of-type(2) {
    grid-area: 1 / 2 / 2 / 3;
}

#success-stories .success-grid .card-small:nth-of-type(3) {
    grid-area: 2 / 2 / 3 / 3;
}

#success-stories .success-grid .case-study-card .card-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#success-stories .success-grid .case-study-card:hover .card-background {
    transform: scale(1.05);
}

#success-stories .success-grid .case-study-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(14, 14, 14, 0.9) 5%, rgba(14, 14, 14, 0.8) 40%, rgba(14, 14, 14, 0.5) 100%);
    z-index: 1;
}

#success-stories .success-grid .case-study-card .card-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

#success-stories .success-grid .card-large .card-logo-wrapper {
    height: 100px;
    margin-bottom: 50px;
}

#success-stories .success-grid .card-large hr {}

#success-stories .success-grid .card-large .card-logo-wrapper img {
    height: 100%;
    width: auto;
}

#success-stories .success-grid .card-small .card-logo-wrapper {
    height: 40px;
}

#success-stories .success-grid .card-small hr {}

#success-stories .success-grid .card-small .card-logo-wrapper img {
    height: 100%;
    width: auto;
}

#success-stories .success-grid .card-story-headline {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    line-height: 1.3;
    max-width: 90%;
    margin-bottom: 10px;
}

#success-stories .success-grid .metrics-cluster {
    display: flex;
    justify-content: space-between;
}

#success-stories .success-grid .metric-item {
    text-align: left;
    margin-top: 10px;
    width: 27%;
}

#success-stories .success-grid .metric-number {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    color: var(--tcolor-light-green);
    display: block;
    width: fit-content;
}

#success-stories .success-grid .metric-label {
    font-family: var(--font-sans);
    opacity: 0.8;
    margin-bottom: 0;
    width: fit-content;
}

#success-stories .success-grid .card-small .card-content.centered-metric {
    text-align: center;
    justify-content: center;
    align-items: center;
    height: 100%;
}

#success-stories .success-grid .single-metric {
    font-size: 3rem;
}

#success-stories .success-grid .card-small .metric-label {
    font-size: 1rem;
    line-height: 1.4;
    font-family: var(--font-serif);
}

/* ===================================================================
    SECTION 7.5: FOUNDER'S MISSION CARD
=================================================================== */

/* --- Wrapper for spacing --- */
#success-stories .founder-card-wrapper {
    grid-column: 1 / -1;
    /* Make it span the full width of the parent grid */
}

/* --- Concept 1: The Visionary's Blueprint --- */
#success-stories #founder-card-blueprint {
    background-color: #101010;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    /* ADD THIS to ensure canvas resizes correctly */
    min-height: 280px;
}

#success-stories #blueprint-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.03;
    /* We can make this a bit more visible */
    transition: opacity 0.5s;
}

#success-stories #founder-card-blueprint:hover #blueprint-canvas {
    opacity: 0.05;
    /* Make it more prominent on hover */
}


#success-stories #founder-card-blueprint .card-content {
    position: relative;
    z-index: 2;
    gap: 40px;
    pointer-events: none;
}

#success-stories #founder-card-blueprint .mission-text-content {
    flex: 3;
    /* Takes up more space */
}

#success-stories #founder-card-blueprint .mission-logo-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

#success-stories #founder-card-blueprint .mission-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    font-weight: 600;
    color: white;
    margin-bottom: 15px;
}

#success-stories #founder-card-blueprint .mission-quote {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--tcolor-light-cream);
    opacity: 0.9;
    margin-bottom: 20px;
}

#success-stories #founder-card-blueprint .mission-quote strong {
    color: var(--tcolor-light-green);
    font-weight: 500;
    pointer-events: all;
}

#success-stories #founder-card-blueprint .attribution {
    font-family: var(--font-sans);
    font-style: italic;
    color: var(--tcolor-cream);
}

#success-stories #founder-card-blueprint .badal-logo-blueprint {
    max-width: 150px;
    animation: blueprint-glow 4s ease-in-out infinite alternate;
}

@keyframes blueprint-glow {
    from {
        filter: drop-shadow(0 0 15px rgba(203, 229, 78, 0.1));
    }

    to {
        filter: drop-shadow(0 0 50px rgba(203, 229, 78, 0.3));
    }
}

@media (max-width: 991px) {
    #success-stories .success-grid {
        display: flex !important;
        flex-direction: column !important;
    }

    #success-stories .card-story-headline {
        font-size: 1.5rem;
    }

    #success-stories .metric-number {
        font-size: 3rem;
    }

    #success-stories .single-metric {
        font-size: 4.5rem;
    }
}

@media (max-width: 500px) {
    #success-stories #founder-card-blueprint .card-content {
        flex-direction: column;
    }

    #success-stories #founder-card-blueprint .mission-logo-content {
        display: none;
    }

    #success-stories .card-story-headline {
        font-size: 1.5em !important;
    }

    #success-stories .success-grid .case-study-card {
        padding: 30px;
    }

    #success-stories .success-grid .metric-number {
        font-size: 2rem;
    }

    #success-stories .success-grid .metric-label {
        font-size: 0.9em;
    }

    #success-stories #founder-card-blueprint .mission-title {
        font-size: 1.5em;
    }

    #success-stories .small-card-inner-flex {
        flex-direction: column !important;
        align-items: start !important;
        gap: 10px;
    }
}

@media (max-width: 300px) {
    #success-stories .card-story-headline {
        font-size: 1.3em !important;
    }

    #success-stories .success-grid .case-study-card {
        padding: 20px;
    }

    #success-stories .success-grid .metrics-cluster {
        flex-direction: column;
    }

    #success-stories .success-grid .metric-item {
        width: 100%;
    }
}

/* ===================================================================
    SECTION 9: FINAL CTA
=================================================================== */
#final-cta {
    position: relative;
    overflow: hidden;

    /* --- V3: BACKGROUND OVERHAUL --- */
    /* This exactly mimics the style of the "How It Works" CTA card */
    background-color: #000000;
    background-image:
        /* Layer 4 (Top): The subtle white dots */
        radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px),
        /* Layer 3: The main light green blob */
        radial-gradient(circle at center, #caf3593a 0%, transparent 60%),
        /* Layer 2: A secondary, darker green blob for depth */
        radial-gradient(circle at center, #47b46b4d 0%, transparent 65%),
        /* Layer 1: A vibrant cyan/blue accent blob for pop */
        radial-gradient(circle at center, #76fd984a 0%, transparent 70%);
    background-size:
        20px 20px,
        /* Size for dots */
        300% 300%,
        /* Size for light green blob */
        325% 200%,
        /* Size for dark green blob */
        200% 275%;
    /* Size for cyan blob */
    background-position:
        0 0,
        /* Dots stay static */
        30% 100%,
        /* Light green starts bottom-left */
        100% 70%,
        /* Dark green starts bottom-right */
        60% 10%;
    /* Cyan starts top-center */

    /* Re-using the blob animation keyframes */
    animation: cta-blob-animation 20s ease-in-out infinite;
}

/* Ensure the keyframes exist if they were removed */
@keyframes cta-blob-animation {
    50% {
        background-position:
            0 0,
            70% 15%,
            20% 10%,
            30% 80%;
    }
}

#final-cta-wrapper {}

#final-cta .cta-text-content {
    padding: 100px 100px;
}

#final-cta .cta-text-content .hero-headline {
    color: white;
}

#final-cta .cta-text-content .hero-subheadline {
    color: var(--tcolor-light-cream);
    opacity: 0.9;
}

/* V3: Styles for the split-button container */
#final-cta .cta-button-stack {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: -webkit-fill-available;
    /* A fixed, substantial height */
    /* Rounded corners for the entire container */
    overflow: hidden;
    /* This is crucial for rounding the inner button corners */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* V3: Style for each half of the split button */
#final-cta .btn-cta-split {
    flex: 1;
    /* Each link takes up 50% of the parent's height */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    text-decoration: none;
    font-family: var(--font-serif);
    font-size: 1.8rem;
    font-weight: 500;
    line-height: 1.2;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

#final-cta .btn-cta-split i {
    font-size: 2.2rem;
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.6;
}

#final-cta .btn-cta-split:hover i {
    transform: translateX(10px);
    opacity: 1;
}

#final-cta #final-cta-buttons {
    height: -webkit-fill-available;
    width: 50% !important;
}

/* Top Half (Book a Demo) */
#final-cta .btn-cta-split.secondary {
    background-color: rgba(26, 26, 26, 0.4);
    color: white;
    /* The dividing line */
    backdrop-filter: blur(5px);
}

#final-cta .btn-cta-split.secondary:hover {
    background-color: rgba(26, 26, 26, 0.8);
    color: white;
}

/* Bottom Half (Get Started) */
#final-cta .btn-cta-split.primary {
    background-color: var(--tcolor-light-green);
    color: var(--tcolor-dark);
}

#final-cta .btn-cta-split.primary:hover {
    background-color: var(--tcolor-lighter-green);
    box-shadow: 0 -10px 20px rgba(203, 229, 78, 0.2);
}

@media (max-width: 991px) {
    #final-cta-wrapper {
        flex-direction: column !important;
    }

    #final-cta #final-cta-buttons {
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        min-height: 400px !important;
        max-height: 50vh !important;
    }

    #final-cta .cta-text-content {
        padding: 70px 60px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    #final-cta .cta-text-content {
        padding: 60px 40px !important;
    }

    #final-cta #final-cta-buttons {
        height: 50vh !important;
        min-height: 250px !important;
    }
}

/* ===================================================================
    SECTION 10: COMMUNITY
=================================================================== */
#community-section {
    position: relative;
    background-color: #0a0a0a;
    padding-top: 100px;
    padding-bottom: 100px;
    overflow: hidden;
}

#community-section #community-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

#community-section .community-card {
    background-color: rgba(42, 42, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 30px;
    height: 100%;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 0 0px rgba(203, 229, 78, 0);
}

#community-section .community-card:hover {
    background-color: rgba(42, 42, 42, 0.5);
    transform: translateY(-10px);
}

#community-section .card-icon-wrapper {
    margin-bottom: 0;
    height: 80px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
    /* Prevents the icon from shrinking */
}

#community-section .card-logo {
    height: 60px;
    width: auto;
}

.community-card-details {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

#community-section .community-card .card-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: white;
    margin-bottom: 15px;
}

/* This new class is for the outline button style */
.btn-community-cta {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: rgba(255, 255, 255, 0.9);
    border-radius: 50px;
    padding: 8px 24px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-community-cta:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* ===================================================================
    SECTION 11: FOOTER
=================================================================== */
#main-footer {
    background-color: var(--tcolor-dark);
    color: var(--tcolor-light-cream);
}

#main-footer .main-footer-content {
    padding: 80px 0;
}

#main-footer .footer-heading {
    font-family: var(--font-sans);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    margin-bottom: 20px;
    color: white;
}

#main-footer .footer-subtext {
    opacity: 0.7;
    line-height: 1.6;
}

#main-footer .footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

#main-footer .footer-links li {
    margin-bottom: 12px;
}

#main-footer .footer-links a {
    color: rgba(241, 236, 232, 0.7);
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

#main-footer .footer-links a:hover {
    color: white;
    padding-left: 5px;
}

#main-footer #newsletter-form .form-control {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 12px 20px;
}

#main-footer #newsletter-form .form-control::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

#main-footer #newsletter-form .form-control:focus {
    background-color: rgba(255, 255, 255, 0.1);
    box-shadow: none;
    border-color: var(--tcolor-light-green);
}

#main-footer .btn-subscribe {
    background-color: var(--tcolor-light-green);
    color: var(--tcolor-dark);
    font-size: 1.2rem;
    padding: 0 25px;
    border: none;
    transition: background-color 0.3s ease;
}

#main-footer .btn-subscribe:hover {
    background-color: var(--tcolor-lighter-green);
}

#main-footer .sub-footer-bar {
    padding: 25px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

#main-footer .footer-brand .footer-logo {
    height: 50px;
    width: auto;
    margin-right: 5px;
}

#main-footer .footer-brand span {
    font-size: 0.9rem;
    opacity: 0.6;
}

#main-footer .footer-brand a {
    color: rgba(241, 236, 232, 0.6);
    transition: color 0.3s ease, transform 0.3s ease;
}

#main-footer .footer-brand a:hover {
    color: rgba(241, 236, 232, 0.8);
    transform: scale(1.1);
}

#main-footer .footer-socials a {
    color: rgba(241, 236, 232, 0.6);
    font-size: 1.2rem;
    margin-left: 25px;
    transition: color 0.3s ease, transform 0.3s ease;
}

#main-footer .footer-socials a:hover {
    color: white;
    transform: scale(1.1);
}

#main-footer .final-statement {
    text-align: center;
}

#main-footer .final-statement h2 {
    font-family: var(--font-sans);
    font-weight: bolder;
    font-size: 9.4em;
    letter-spacing: 5px;
    margin: 0;
    line-height: normal;
    color: var(--tcolor-light-green);
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    #main-footer .final-statement h2 {
        font-size: 6em;
    }

}

@media (max-width: 500px) {
    #main-footer .final-statement h2 {
        font-size: 4em;
    }

}

@media (max-width: 350px) {
    #main-footer .final-statement h2 {
        font-size: 3.5em;
    }

}

/* ===================================================================
    RESPONSIVE ADJUSTMENTS
=================================================================== */
@media (max-width: 991px) {
    .flowchart-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 40px;
    }

    .node-1,
    .node-2,
    .node-3,
    .node-4,
    .node-5 {
        grid-area: auto !important;
        width: 100%;
        justify-self: auto;
    }

    .flowchart-lines {
        display: none;
    }

    .final-cta-block {
        padding: 40px;
        text-align: center;
    }

    .cta-text-content {
        padding: 40px;
    }

    .cta-buttons {
        justify-content: center;
    }

    .visual-foreground {
        transform: rotateY(-5deg) rotateX(2deg) scale(1);
    }
}

@media (max-width: 767px) {
    .agency-pillars-grid {
        grid-template-columns: 1fr;
    }

    .slogan-banner p {
        font-size: 1.2rem;
    }

    .sub-footer-bar .d-flex {
        flex-direction: column;
        align-items: center !important;
        gap: 20px;
    }
}