/**
 * APIVerve CTA Section Component - Consistent with site design system
 * 
 * Features:
 * - Matches existing site styling patterns
 * - Uses site's button classes and design system
 * - Clean, minimal design consistent with other sections
 * - Responsive design with mobile-first approach
 * - Dark mode support
 * 
 * Usage:
 * 1. Include this CSS file in your HTML
 * 2. Add HTML structure with .cta-section class
 * 3. Uses existing .btn classes from site
 */

/* CTA Section Component - Enhanced with animated elements */
.cta-section {
    padding: 3rem 0; /* Reduced from 6rem to 3rem */
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.03) 0%, 
        rgba(16, 185, 129, 0.03) 50%, 
        rgba(139, 92, 246, 0.03) 100%);
    border-top: 1px solid var(--color-border, #e5e7eb);
    position: relative;
    overflow: hidden;
}

/* CTA Background Canvas Container */
.cta-web-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 1;
    pointer-events: none;
}

.cta-network-canvas {
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.4;
}

/* CTA Content Container - Matches other sections */
.cta-section .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.cta-section .cta-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* CTA Text Section - Matches section headers */
.cta-section .cta-text {
    margin-bottom: 3rem;
}

.cta-section .cta-title {
    font-size: 2rem; /* Reduced from 2.5rem */
    font-weight: 700;
    color: var(--color-text-primary, #111827);
    margin: 0 0 1rem 0; /* Reduced margin from 1.5rem */
    line-height: 1.2;
}

.cta-section .cta-title .highlight {
    background: linear-gradient(135deg, var(--color-primary, #0066cc), #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cta-section .cta-description {
    font-size: 1rem; /* Reduced from 1.25rem */
    color: var(--color-text-secondary, #4b5563);
    margin: 0 0 1.5rem 0; /* Added bottom margin */
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* CTA Actions Section */
.cta-section .cta-actions {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem; /* Add margin for small text */
}

/* CTA Small Text */
.cta-section .cta-small-text {
    font-size: 0.875rem;
    color: var(--color-text-tertiary, #6b7280);
    margin: 0;
    text-align: center;
    font-weight: 400;
}

/* CTA Buttons - Using site's existing button system */
.cta-section .cta-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-section .cta-button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg, 0.75rem);
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 200px;
    
    /* Primary button styling */
    background-color: var(--color-primary, #0066cc);
    color: var(--color-text-inverse, #ffffff);
    border-color: var(--color-primary, #0066cc);
}

.cta-section .cta-button-primary:hover {
    background-color: var(--color-primary-hover, #0052a3);
    border-color: var(--color-primary-hover, #0052a3);
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.cta-section .cta-button-primary:focus {
    outline: 2px solid var(--color-primary, #0066cc);
    outline-offset: 2px;
}

.cta-section .cta-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: var(--radius-lg, 0.75rem);
    transition: all 0.2s ease;
    border: 2px solid transparent;
    min-width: 200px;
    
    /* Secondary button styling */
    background-color: transparent;
    color: var(--color-text-primary, #111827);
    border-color: var(--color-border, #e5e7eb);
}

.cta-section .cta-button-secondary:hover {
    background-color: var(--color-surface, #f9fafb);
    border-color: var(--color-text-tertiary, #6b7280);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.cta-section .cta-button-secondary:focus {
    outline: 2px solid var(--color-primary, #0066cc);
    outline-offset: 2px;
}

/* Button Icons */
.cta-section .cta-button-primary i,
.cta-section .cta-button-secondary i {
    font-size: 0.875rem;
    transition: transform 0.2s ease;
}

.cta-section .cta-button-primary .fa-key,
.cta-section .cta-button-secondary .fa-book {
    margin-right: 0.25rem;
}

.cta-section .cta-button-primary .fa-arrow-right {
    margin-left: 0.25rem;
}

.cta-section .cta-button-primary:hover .fa-arrow-right {
    transform: translateX(2px);
}

/* CTA Features - Pill Style */
.cta-section .cta-features {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.cta-section .cta-feature {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: var(--color-surface, #f9fafb);
    border: 1px solid var(--color-border, #e5e7eb);
    border-radius: 9999px; /* Full rounded pill */
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text-secondary, #4b5563);
    white-space: nowrap;
}

.cta-section .cta-feature i {
    color: var(--color-success, #10b981);
    font-size: 0.75rem;
    flex-shrink: 0;
}

/* Dark mode adjustments */
[data-theme="dark"] .cta-section {
    background: linear-gradient(135deg, 
        rgba(59, 130, 246, 0.05) 0%, 
        rgba(16, 185, 129, 0.05) 50%, 
        rgba(139, 92, 246, 0.05) 100%);
    border-top-color: #374151;
}

[data-theme="dark"] .cta-section::before {
    background-image: radial-gradient(circle, rgba(59, 130, 246, 0.08) 1px, transparent 1px);
}

[data-theme="dark"] .cta-web-line {
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(96, 165, 250, 0.2) 50%, 
        transparent 100%);
}

[data-theme="dark"] .cta-web-dot {
    background: #60a5fa;
}

[data-theme="dark"] .cta-section .cta-title {
    color: #f8fafc;
}

[data-theme="dark"] .cta-section .cta-title .highlight {
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .cta-section .cta-description {
    color: #d1d5db;
}

[data-theme="dark"] .cta-section .cta-button-primary {
    background-color: var(--color-primary, #0066cc);
    border-color: var(--color-primary, #0066cc);
    color: #ffffff;
}

[data-theme="dark"] .cta-section .cta-button-primary:hover {
    background-color: var(--color-primary-hover, #0052a3);
    border-color: var(--color-primary-hover, #0052a3);
}

[data-theme="dark"] .cta-section .cta-button-secondary {
    color: #f8fafc;
    border-color: #4b5563;
}

[data-theme="dark"] .cta-section .cta-button-secondary:hover {
    background-color: #374151;
    border-color: #6b7280;
}

[data-theme="dark"] .cta-section .cta-feature {
    background-color: #374151;
    border-color: #4b5563;
    color: #d1d5db;
}

[data-theme="dark"] .cta-section .cta-small-text {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cta-section {
        padding: 2.5rem 0; /* Reduced from 4rem */
    }
    
    .cta-section .cta-actions {
        flex-direction: column; /* Stack buttons vertically on mobile */
        gap: 0.75rem;
    }
    
    .cta-section .cta-title {
        font-size: 1.75rem; /* Reduced from 2rem */
        margin-bottom: 0.75rem;
    }
    
    .cta-section .cta-description {
        font-size: 0.9375rem; /* Reduced from 1.125rem */
    }
    
    .cta-section .cta-text {
        margin-bottom: 2.5rem;
    }
    
    .cta-section .cta-actions {
        gap: 2rem;
    }
    
    .cta-section .cta-buttons {
        flex-direction: column;
        gap: 0.75rem;
        width: 100%;
        max-width: 320px;
    }
    
    .cta-section .cta-button-primary,
    .cta-section .cta-button-secondary {
        width: 100%;
        min-width: auto;
    }
    
    .cta-section .cta-features {
        gap: 0.75rem;
    }
}

@media (max-width: 640px) {
    .cta-section {
        padding: 2rem 0; /* Reduced from 3rem */
    }
    
    .cta-section .cta-title {
        font-size: 1.5rem; /* Reduced from 1.75rem */
    }
    
    .cta-section .cta-description {
        font-size: 0.875rem; /* Reduced from 1rem */
    }
    
    .cta-section .cta-button-primary,
    .cta-section .cta-button-secondary {
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
        min-width: 180px;
    }
    
    .cta-section .cta-feature {
        font-size: 0.8125rem;
        padding: 0.375rem 0.75rem;
    }
    
    .cta-section .cta-feature i {
        font-size: 0.6875rem;
    }
}

@media (max-width: 480px) {
    .cta-section {
        padding: 1.5rem 0; /* Reduced from 2.5rem */
    }
    
    .cta-section .container {
        padding: 0 0.75rem;
    }
    
    .cta-section .cta-title {
        font-size: 1.25rem; /* Reduced from 1.5rem */
        line-height: 1.3;
    }
    
    .cta-section .cta-description {
        font-size: 0.8125rem; /* Reduced from 0.9375rem */
    }
    
    .cta-section .cta-text {
        margin-bottom: 2rem;
    }
    
    .cta-section .cta-actions {
        gap: 1.5rem;
    }
    
    .cta-section .cta-features {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
    
    .cta-section .cta-feature {
        justify-content: center;
        width: 100%;
        max-width: 240px;
    }
}

/* Large screens */
@media (min-width: 1200px) {
    .cta-section {
        padding: 4rem 0; /* Reduced from 7rem to 4rem */
    }
    
    .cta-section .cta-title {
        font-size: 2.25rem; /* Reduced from 3rem */
    }
    
    .cta-section .cta-description {
        font-size: 1.125rem; /* Reduced from 1.375rem */
    }
    
    .cta-section .cta-text {
        margin-bottom: 3.5rem;
    }
    
    .cta-section .cta-actions {
        gap: 3rem;
    }
    
    .cta-section .cta-buttons {
        gap: 1.5rem;
    }
    
    .cta-section .cta-features {
        gap: 1.5rem;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cta-section .cta-button-primary,
    .cta-section .cta-button-secondary {
        border-width: 3px;
    }
    
    .cta-section .cta-button-primary:focus,
    .cta-section .cta-button-secondary:focus {
        outline-width: 3px;
    }
    
    .cta-section .cta-feature {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .cta-section .cta-button-primary,
    .cta-section .cta-button-secondary,
    .cta-section .cta-button-primary i {
        transition: none;
    }
    
    .cta-section .cta-button-primary:hover,
    .cta-section .cta-button-secondary:hover {
        transform: none;
    }
    
    .cta-section .cta-button-primary:hover .fa-arrow-right {
        transform: none;
    }
}

/* Print styles */
@media print {
    .cta-section {
        background: white !important;
        border: 1px solid black;
        page-break-inside: avoid;
    }
    
    .cta-section .cta-title,
    .cta-section .cta-description {
        color: black !important;
    }
    
    .cta-section .cta-button-primary,
    .cta-section .cta-button-secondary {
        border-color: black !important;
        color: black !important;
        background: white !important;
    }
    
    .cta-section .cta-feature {
        border-color: black !important;
        color: black !important;
        background: white !important;
    }
    
    .cta-section .cta-feature i {
        color: #059669 !important;
    }
}