/* ============================================
   AUTOMATION SECTION - REFINED & IMPRESSIVE
   ============================================ */

.section-automation {
    background: #0f172a !important;
    color: white;
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

/* Subtle background pattern */
.section-automation::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(59, 130, 246, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.03) 0%, transparent 50%);
    pointer-events: none;
}

.section-automation .container {
    position: relative;
    z-index: 1;
}

/* Section Header */
.automation-header {
    text-align: center;
    margin-bottom: 4rem;
}

.automation-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: #ffffff !important;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.automation-subtitle {
    font-size: 1.5rem;
    color: #e2e8f0 !important;
    max-width: 900px;
    margin: 0 auto 2rem;
    line-height: 1.6;
    font-weight: 500;
}

/* Three-step comparison box */
.automation-comparison-box {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(100, 116, 139, 0.3);
    border-radius: 1rem;
    padding: 2.5rem;
    margin-bottom: 4rem;
    backdrop-filter: blur(10px);
}

.comparison-intro {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #f1f5f9 !important;
    margin-bottom: 1.5rem;
    font-weight: 600;
}

.comparison-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.comparison-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 0.75rem;
    border-left: 4px solid;
    transition: all 0.3s ease;
}

.comparison-item:hover {
    background: rgba(15, 23, 42, 0.8);
    transform: translateX(4px);
}

.comparison-item.failure {
    border-left-color: #ef4444;
}

.comparison-item.mediocre {
    border-left-color: #f59e0b;
}

.comparison-item.success {
    border-left-color: #10b981;
}

.comparison-number {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
}

.comparison-item.failure .comparison-number {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.comparison-item.mediocre .comparison-number {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.comparison-item.success .comparison-number {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
}

.comparison-content strong {
    font-weight: 700;
    font-size: 1.125rem;
    color: #ffffff !important;
}

.comparison-content {
    flex: 1;
    font-size: 1.125rem;
    line-height: 1.7;
    color: #e2e8f0 !important;
}

/* Capability Cards Grid */
.capabilities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.capability-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.25rem;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.capability-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--card-color, #3b82f6), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.capability-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
}

.capability-card:hover::before {
    opacity: 1;
}

.capability-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.capability-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 0.75rem;
    flex-shrink: 0;
}

.capability-icon img {
    width: 32px;
    height: 32px;
}

.capability-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b !important;
    margin: 0;
}

.capability-divider {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.capability-problem,
.capability-solution {
    flex: 1;
    padding: 1.25rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
}

.capability-problem {
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #1e293b !important;
}

.capability-problem strong {
    color: #ef4444 !important;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.capability-solution {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #1e293b !important;
}

.capability-solution strong {
    color: #10b981 !important;
    font-weight: 700;
    display: block;
    margin-bottom: 0.5rem;
}

.capability-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.capability-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 2rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #10b981;
}

.learn-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0.5rem;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.learn-more-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateX(4px);
}

/* Summary Table */
.automation-summary {
    background: var(--bg-lightest);
    border-radius: 1rem;
    padding: 3rem;
    margin-bottom: 3rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.summary-title {
    text-align: center;
    font-size: 2rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 2.5rem;
}

.summary-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    max-width: 1000px;
    margin: 0 auto;
}

.summary-column {
    padding: 1.5rem;
    border-radius: 0.75rem;
    border-left: 4px solid;
}

.summary-column.industry {
    background: rgba(239, 68, 68, 0.05);
    border-left-color: #ef4444;
}

.summary-column.dvp {
    background: rgba(16, 185, 129, 0.05);
    border-left-color: #10b981;
}

.summary-column h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
}

.summary-column.industry h4 {
    color: #ef4444;
}

.summary-column.dvp h4 {
    color: #10b981;
}

.summary-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.summary-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.95rem;
}

.summary-list li:last-child {
    border-bottom: none;
}

.summary-column.industry li {
    color: #64748b;
}

.summary-column.dvp li {
    color: #0f172a;
    font-weight: 600;
}

/* CTA Section */
.automation-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 1rem;
    padding: 3rem;
    text-align: center;
}

.cta-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: white;
    margin-bottom: 1rem;
}

.cta-description {
    font-size: 1.3rem;
    line-height: 1.8;
    color: white;
    max-width: 900px;
    margin: 0 auto 1.5rem;
}

.cta-note {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 800px;
    margin: 0 auto 2rem;
    font-style: italic;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-lightest);
    color: #667eea;
    padding: 1rem 2.5rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 1.125rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 12px rgba(0, 0, 0, 0.15);
}

/* Modal Styles */
.automation-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.automation-modal.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: var(--bg-lightest);
    border-radius: 1rem;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.automation-modal.active .modal-content {
    transform: scale(1);
}

.modal-header {
    padding: 2rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 0.5rem;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    font-size: 1.5rem;
    color: #64748b;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.modal-body {
    padding: 2rem;
}

.modal-section {
    margin-bottom: 2rem;
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 1rem;
}

.modal-section p {
    line-height: 1.7;
    color: #475569;
    margin-bottom: 1rem;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border-left: 3px solid #10b981;
}

.feature-icon-check {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    background: #10b981;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

.feature-text {
    flex: 1;
}

.feature-text strong {
    display: block;
    color: #0f172a;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-text span {
    color: #64748b;
    font-size: 0.9rem;
}

.config-options {
    display: grid;
    gap: 1rem;
}

.config-group {
    padding: 1.25rem;
    background: #f8fafc;
    border-radius: 0.5rem;
    border: 1px solid #e2e8f0;
}

.config-label {
    display: block;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.config-description {
    font-size: 0.875rem;
    color: #64748b;
    margin-bottom: 0.75rem;
}

.config-input,
.config-select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.config-input:focus,
.config-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.config-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.toggle-switch {
    position: relative;
    width: 48px;
    height: 24px;
    background: #cbd5e1;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.toggle-switch.active {
    background: #10b981;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 20px;
    height: 20px;
    background: var(--bg-lightest);
    border-radius: 50%;
    transition: transform 0.3s ease;
}

.toggle-switch.active::after {
    transform: translateX(24px);
}

.modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.btn-modal {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-modal-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-modal-secondary:hover {
    background: #e2e8f0;
}

.btn-modal-primary {
    background: #3b82f6;
    color: white;
}

.btn-modal-primary:hover {
    background: #2563eb;
    transform: translateY(-1px);
}
