/* Hero Styles */
.hero {
    position: relative;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, #1a0b2e 0%, #050505 100%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: 0 2rem;
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    margin-bottom: 1.5rem;
    line-height: 1.1;
    background: linear-gradient(to bottom, #fff, var(--secondary-accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.5rem);
    color: var(--body-color);
    margin-bottom: 3rem;
    opacity: 0.9;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        gap: 1rem;
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Sliding Logos Enhancement */
.logo-slider {
    background: var(--card-bg);
    padding: 3rem 0;
    border-top: 1px solid rgba(146, 70, 247, 0.2);
    border-bottom: 1px solid rgba(146, 70, 247, 0.2);
    overflow: hidden;
    position: relative;
    /* Reduce width by 10-15px as requested */
    width: calc(100% - 12px); 
    margin-left: auto;
    margin-right: auto;
}

.logo-track {
    display: flex;
    width: max-content;
    animation: scroll var(--scroll-speed, 30s) linear infinite;
    align-items: center;
}

.logo-track:hover {
    animation-play-state: paused;
}

.logo-item {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 1.5rem; /* Increased space for clarity */
    margin: 0 3rem;
}

.company-name {
    font-family: var(--font-headline);
    font-size: 0.8rem;
    color: var(--honeydew); /* Updated to honeydew */
    text-transform: capitalize;
    letter-spacing: 1px;
    order: 2; /* Text on the right side */
}

.company-name.no-capitalize {
    text-transform: none !important;
}

.logo-item img {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
    filter: grayscale(1) brightness(2);
    opacity: 0.6;
    transition: var(--transition-smooth);
    order: 1; /* Logo on the left side */
    pointer-events: none; /* Prevent image selection/dragging */
}

.logo-item:hover img {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}

@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Problem Section - Symmetrical Responsive Grid */
.problem-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 boxes per row for >= 1024px and >= 768px */
    gap: 2rem;
    margin-top: 4rem;
}

@media (max-width: 1023px) and (min-width: 768px) {
    .problem-grid {
        grid-template-columns: repeat(4, 1fr); /* Keep 4-box row down to 768px */
    }
}

@media (max-width: 767px) and (min-width: 481px) {
    .problem-grid {
        grid-template-columns: repeat(2, 1fr); /* 2-box row for 481px to 767px */
    }
}

@media (max-width: 480px) {
    .problem-grid {
        grid-template-columns: 1fr; /* Single column below 480px */
    }
}

/* Feature Box Icon Scaling */
.problem-grid .feature-icon {
    width: auto;
    height: 2.5em; /* Doubled from 1.25em */
    fill: var(--amethyst);
    color: var(--amethyst); /* Ensure both fill and stroke (via currentColor) are covered */
    flex-shrink: 0;
    margin-bottom: 1rem; /* Restored margin-bottom for stacking above heading */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Service Box Specific Icon Color */
.service-box-replicated .feature-icon {
    fill: var(--honeydew);
    color: var(--honeydew);
}

@media (max-width: 767px) {
    .problem-grid .feature-icon {
        height: 2em; /* Doubled from 1em */
    }
}

/* Stacked layout for Feature Boxes */
.expand-on-hover, .service-box-replicated {
    display: flex;
    flex-direction: column; /* Changed to column for stacking icons above headings */
    align-items: center; /* Horizontally center icon and content */
    text-align: center; /* Center text content */
    gap: 0; /* Gap handled by margins */
}

.feature-content {
    flex: 1;
    width: 100%;
}

/* Solution Section - Symmetrical Centered Grid */
.cs-stats-grid.problem-grid {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    grid-template-columns: none; /* Override grid for flex centering */
}

.cs-stats-grid .service-box-replicated {
    flex: 0 1 calc(33.333% - 2rem);
    min-width: 300px;
    display: flex;
    flex-direction: row; /* Ensure side-by-side icon/text */
    align-items: flex-start;
    justify-content: center; /* Center content vertically in the box if needed, but flex-start is better for text */
}

@media (max-width: 1024px) {
    .cs-stats-grid .service-box-replicated {
        flex: 0 1 calc(50% - 2rem);
    }
}

@media (max-width: 768px) {
    .cs-stats-grid .service-box-replicated {
        flex: 0 1 100%;
    }
}

.problem-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid rgba(146, 70, 247, 0.1);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
    height: 100%; /* Ensure equal height */
}

.problem-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary-accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

.problem-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.problem-card:hover::before {
    transform: scaleX(1);
}

.problem-card h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--secondary-accent);
}

.problem-card p {
    font-size: 0.95rem;
    color: rgba(243, 252, 240, 0.8);
}

/* ROI Calculator Redesign */
.roi-section {
    background: linear-gradient(180deg, #050505 0%, #0d0c0e 100%);
}

.roi-container {
    max-width: 800px; /* Centered, symmetrical width */
    margin: 0 auto;
    background: #000;
    padding: 4rem;
    border-radius: 30px;
    border: 1px solid rgba(146, 70, 247, 0.2);
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.roi-form {
    width: 100%;
}

#roi-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* Perfect 2x2 symmetrical grid */
    grid-template-rows: auto auto auto; /* Rows for form groups and button */
    gap: 2rem;
    align-items: start;
}

/* Make the button span both columns */
.roi-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
}

@media (max-width: 768px) {
    #roi-form { 
        grid-template-columns: 1fr; /* Single column on mobile */
        gap: 1.5rem; 
    }
    .roi-container { 
        padding: 1.5rem; 
        width: 100%;
        max-width: 100%;
    }
    /* Adjust mobile font sizes */
    .form-group label {
        font-size: 0.8rem;
    }
    .result-value {
        font-size: 1.75rem;
    }
    .disclaimer {
        font-size: 0.75rem;
    }
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

@media (max-width: 480px) {
    .roi-container {
        padding: 1rem;
    }
    .result-value {
        font-size: 1.5rem;
    }
    .form-group input, .form-group select {
        padding: 0.75rem;
    }
}

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

.form-group label {
    font-family: var(--font-body);
    font-size: 0.75rem;
    color: var(--secondary-accent);
    text-transform: capitalize;
}

.form-group input, .form-group select {
    background: #111;
    border: 1px solid #333;
    padding: 1rem;
    color: #fff;
    border-radius: 8px;
    font-family: var(--font-body);
    transition: border-color 0.3s ease;
    width: 100%;
}

.form-group input:focus, .form-group select:focus {
    border-color: var(--secondary-accent);
    outline: none;
}

.form-group input.error {
    border-color: #ff4444;
}

.error-message {
    color: #ff4444;
    font-size: 0.75rem;
    font-family: var(--font-body);
    min-height: 1.25rem;
}

/* Disclaimer styles */
.disclaimer {
    font-size: 0.8rem;
    color: rgba(243, 252, 240, 0.6);
    font-family: var(--font-body);
    text-align: center;
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

/* Make repetitive task percentage form group span both columns */
#roi-form .form-group:nth-child(5) {
    grid-column: span 2;
    width: 100%;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.roi-actions {
    grid-column: span 2;
    display: flex;
    justify-content: center;
    margin-top: 1rem;
    width: 100%;
}

@media (max-width: 768px) {
    .roi-actions { grid-column: span 1; }
    #roi-form .form-group:nth-child(5) {
        grid-column: span 1;
        max-width: 100%;
    }
}

/* Initially hidden results */
.roi-results {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 20px;
    display: none; /* Hidden by default */
    flex-direction: column;
    align-items: center; /* Centered results */
    text-align: center;
    border: 1px solid rgba(146, 70, 247, 0.1);
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.roi-results.active {
    display: flex;
    animation: fadeIn 0.5s ease forwards;
}

@media (max-width: 768px) {
    .roi-results {
        padding: 2rem;
    }
}

@media (max-width: 480px) {
    .roi-results {
        padding: 1.5rem;
    }
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    width: 100%;
    max-width: 100%;
    margin-bottom: 2rem;
    place-items: center;
}

@media (max-width: 600px) {
    .results-grid { 
        grid-template-columns: 1fr; 
        gap: 2rem;
        place-items: center; 
    }
}

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

.result-item {
    margin-bottom: 2rem;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.result-label {
    font-size: 0.8rem;
    color: rgba(243, 252, 240, 0.6);
    margin-bottom: 0.5rem;
    width: 100%;
}

.result-value {
    font-family: var(--font-headline);
    font-size: 2.5rem;
    color: var(--secondary-accent);
    width: 100%;
    max-width: 100%;
    word-wrap: break-word;
    word-break: break-all;
    text-align: center;
}

@media (max-width: 600px) {
    .result-value {
        font-size: 1.75rem;
    }
}

@media (max-width: 480px) {
    .result-value {
        font-size: 1.5rem;
    }
}

.persuasive-phrase {
    font-style: italic;
    color: var(--body-color);
    margin: 2rem 0;
    min-height: 3rem;
}

/* Testimonials Section */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 3rem;
    margin-top: 4rem;
}

.testimonial-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid rgba(146, 70, 247, 0.1);
    transition: var(--transition-smooth);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    border-color: var(--secondary-accent);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.testimonial-header {
    margin-bottom: 2rem;
}

.testimonial-logo {
    max-width: 200px;
    max-height: 80px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(1) brightness(2);
    opacity: 0.6;
    transition: var(--transition-smooth);
}

.testimonial-card:hover .testimonial-logo {
    filter: grayscale(0) brightness(1);
    opacity: 1;
}

.testimonial-quote {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--body-color);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    font-size: 0.95rem;
    color: var(--secondary-accent);
    font-weight: bold;
}

/* CTA Section Redesign */
.final-cta {
    background: #050505; /* Dark background from palette */
    text-align: center;
    padding: 120px 0;
    border-top: 1px solid rgba(146, 70, 247, 0.1);
}

.final-cta h2 {
    color: var(--secondary-accent); /* Purple heading */
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: 1.5rem;
}

.final-cta p {
    color: var(--body-color); /* Correct contrast */
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* FAQ Section */
.faq-section {
    background: #050505;
    padding: 100px 0;
    border-top: 1px solid rgba(146, 70, 247, 0.1);
}

.faq-container {
    max-width: 900px;
    margin: 4rem auto 0;
    display: flex;
    flex-direction: column;
}

.faq-item {
    background: transparent;
    transition: var(--transition-smooth);
    border-radius: 8px;
}

.faq-item:hover {
    background: rgba(146, 70, 247, 0.03);
}

.faq-question {
    width: 100%;
    padding: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: none;
    border: none;
    color: var(--secondary-accent);
    font-family: 'Michroma', sans-serif;
    font-size: 1.125rem; /* 18px */
    letter-spacing: 0.05em;
    text-align: left;
    cursor: pointer;
    transition: color 0.3s ease;
    outline: none;
}

.faq-question:focus-visible {
    box-shadow: 0 0 0 2px var(--secondary-accent);
}

.faq-question:hover {
    color: #fff;
}

.faq-icon {
    width: 20px;
    height: 20px;
    position: relative;
    flex-shrink: 0;
    margin-left: 1.5rem;
}

.faq-icon::before, .faq-icon::after {
    content: '';
    position: absolute;
    background-color: var(--secondary-accent);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-icon::before {
    width: 2px;
    height: 100%;
    left: 50%;
    transform: translateX(-50%);
}

.faq-icon::after {
    width: 100%;
    height: 2px;
    top: 50%;
    transform: translateY(-50%);
}

.faq-item.active .faq-icon::before {
    transform: translateX(-50%) rotate(90deg);
}

.faq-item.active .faq-icon::after {
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), padding 0.4s ease;
    padding: 0 2rem;
    color: var(--body-color);
    line-height: 1.6;
    font-family: 'Exo 2', sans-serif;
    font-size: 1rem; /* 16px */
    opacity: 0;
    transform: translateY(-10px);
}

.faq-item.active .faq-answer {
    max-height: 1000px;
    padding: 0 2rem 2.5rem;
    opacity: 1;
    transform: translateY(0);
}

.faq-divider {
    border: 0;
    height: 1px;
    background: rgba(243, 252, 240, 0.2); /* Neutral color with 20% opacity */
    margin: 0;
    width: 100%;
}
