/* ============================================
   CTA BUTTON ENHANCEMENTS
   Consistent styling, accessibility, hover effects
   ============================================ */

/* Primary CTA Button */
.theme-btn,
.btn-primary,
button[type="submit"],
a.theme-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 14px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 16px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.25);
    position: relative;
    overflow: hidden;
}

.theme-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.theme-btn:hover,
.theme-btn:focus {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.35);
    color: #ffffff !important;
}

.theme-btn:hover::before {
    opacity: 1;
}

.theme-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.theme-btn span,
.theme-btn i {
    position: relative;
    z-index: 1;
}

/* Secondary CTA Button */
.btn-secondary,
.outline-btn,
.theme-btn.outline-btn {
    background: transparent;
    border: 2px solid #667eea;
    color: #667eea !important;
    box-shadow: none;
}

.btn-secondary::before,
.outline-btn::before {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.btn-secondary:hover,
.outline-btn:hover {
    color: #ffffff !important;
    border-color: #667eea;
}

.btn-secondary:hover::before,
.outline-btn:hover::before {
    opacity: 1;
}

/* White/Light variant for dark backgrounds */
.theme-btn.btn-light {
    background: #ffffff;
    color: #667eea !important;
    box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.theme-btn.btn-light::before {
    background: #f9fafb;
}

.theme-btn.btn-light:hover {
    color: #764ba2 !important;
    box-shadow: 0 8px 24px rgba(255, 255, 255, 0.3);
}

/* Icon Buttons */
.btn-icon {
    min-width: 48px;
    padding: 12px;
}

.btn-icon i {
    margin: 0 !important;
}

/* Button Sizes */
.btn-sm,
.theme-btn.btn-sm {
    min-height: 40px;
    padding: 10px 24px;
    font-size: 14px;
}

.btn-lg,
.theme-btn.btn-lg {
    min-height: 56px;
    padding: 18px 40px;
    font-size: 18px;
}

/* Button with Icon */
.theme-btn i {
    margin-left: 8px;
    transition: transform 0.3s ease;
}

.theme-btn:hover i {
    transform: translateX(4px);
}

.theme-btn i.icon-left {
    margin-left: 0;
    margin-right: 8px;
}

.theme-btn:hover i.icon-left {
    transform: translateX(-4px);
}

/* Loading State */
.theme-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.theme-btn.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: btn-spin 0.6s linear infinite;
}

@keyframes btn-spin {
    to { transform: rotate(360deg); }
}

/* Disabled State */
.theme-btn:disabled,
.theme-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Button Group */
.btn-group {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-group .theme-btn {
    margin: 0;
}

/* CTA Section Buttons */
.cta-section .theme-btn {
    min-width: 200px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .theme-btn {
        min-height: 48px;
        padding: 12px 24px;
        font-size: 15px;
        width: 100%;
        max-width: 100%;
    }

    .btn-group {
        flex-direction: column;
        width: 100%;
    }

    .btn-group .theme-btn {
        width: 100%;
    }

    .theme-btn.btn-sm {
        padding: 10px 20px;
    }
}

/* Focus States - WCAG Compliant */
.theme-btn:focus {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

.theme-btn:focus:not(:focus-visible) {
    outline: none;
}

.theme-btn:focus-visible {
    outline: 3px solid #667eea;
    outline-offset: 3px;
}

/* Specific Button Styles */
.btn-discovery-call {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px 24px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 14px rgba(102, 126, 234, 0.2);
}

.btn-discovery-call:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-discovery-call i {
    font-size: 16px;
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.25);
}

.btn-success:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.35);
}

/* Danger/Warning Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white !important;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}

.btn-danger:hover {
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.35);
}

/* Ghost Button (Minimal) */
.btn-ghost {
    background: transparent;
    border: none;
    color: #667eea !important;
    box-shadow: none;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-ghost:hover {
    color: #764ba2 !important;
    text-decoration: underline;
    box-shadow: none;
    transform: none;
}

/* Link-style Button */
.btn-link {
    background: none;
    border: none;
    color: #3b82f6;
    text-decoration: underline;
    padding: 0;
    min-height: auto;
    font-weight: 500;
}

.btn-link:hover {
    color: #1e40af;
    background: none;
    transform: none;
    box-shadow: none;
}

/* Sticky CTA */
.sticky-cta {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 999;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sticky-cta .theme-btn {
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.4);
}

/* Ripple Effect */
.theme-btn.ripple {
    position: relative;
    overflow: hidden;
}

.theme-btn.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.theme-btn.ripple:active::after {
    width: 300px;
    height: 300px;
}

/* Animated Gradient */
.theme-btn.animated-gradient {
    background: linear-gradient(270deg, #667eea, #764ba2, #667eea);
    background-size: 400% 400%;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .theme-btn {
        box-shadow: 0 4px 14px rgba(102, 126, 234, 0.4);
    }

    .theme-btn:hover {
        box-shadow: 0 8px 24px rgba(102, 126, 234, 0.5);
    }

    .btn-secondary,
    .outline-btn {
        border-color: #818cf8;
        color: #818cf8 !important;
    }
}

/* Print Styles */
@media print {
    .theme-btn {
        border: 2px solid #000;
        background: none !important;
        color: #000 !important;
        box-shadow: none !important;
    }
}
