/* The Connect - Custom Styles */

:root {
    --primary-color: #2563eb;
    --secondary-color: #f59e0b;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f8fafc;
    --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    --gradient-secondary: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ============================================================================
   UNIVERSAL TEXT COLOR FIX FOR DARK BACKGROUNDS
   Applied globally to ensure all text is white and readable on dark backgrounds
   ============================================================================ */
body,
h1, h2, h3, h4, h5, h6,
p,
a,
span,
label,
button,
input,
textarea,
li,
dt, dd {
    color: #fff !important;
}

/* High contrast for links and buttons */
a, button {
    color: #fff !important;
    text-shadow: 0 0 2px #222;
}

/* FAQ cards and custom containers */
.faq-card, .pricing-box, .plan-header, .modal, .alert {
    color: #fff !important;
}

/* Secondary text elements */
.secondary-text, .muted, .subtitle {
    color: #eee !important;
}

/* Override any dark text utility classes */
.text-dark {
    color: #fff !important;
}

/* End Universal Text Color Fix */

body {
    font-family: var(--font-family);
    line-height: 1.6;
    /* Color managed by accessibility-wcag.css for context-aware contrast */
}

/* Navigation */
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-brand small {
    font-size: 0.75rem;
    font-weight: 400;
}

/* Hero Section */
.hero-section {
    background: var(--gradient-primary);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><pattern id="grid" width="50" height="50" patternUnits="userSpaceOnUse"><path d="M 50 0 L 0 0 0 50" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.min-vh-75 {
    min-height: 75vh;
}

/* Sruhlon Animation */
.sruhlon-animation {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ai-brain {
    position: relative;
    z-index: 2;
}

.pulse-animation {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.connection-lines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.connection-node {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: float 3s ease-in-out infinite;
}

.connection-node:nth-child(1) {
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.connection-node:nth-child(2) {
    top: 20%;
    right: 15%;
    animation-delay: 0.5s;
}

.connection-node:nth-child(3) {
    bottom: 20%;
    right: 20%;
    animation-delay: 1s;
}

.connection-node:nth-child(4) {
    bottom: 10%;
    left: 15%;
    animation-delay: 1.5s;
}

.node-label {
    font-size: 0.75rem;
    color: var(--text-on-light-secondary);
    margin-top: 0.5rem;
    font-weight: 500;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Feature Cards */
.feature-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e5e7eb !important;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.feature-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Domain Connect Form */
.domain-connect-form .input-group-lg .form-control {
    font-size: 1.1rem;
    padding: 0.75rem 1rem;
}

.domain-connect-form .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
}

/* Gradient Backgrounds */
.bg-gradient-primary {
    background: var(--gradient-primary) !important;
}

.bg-gradient-secondary {
    background: var(--gradient-secondary) !important;
}

/* Dashboard Styles */
.dashboard-header {
    background: var(--gradient-primary);
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    border: none;
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

.stat-icon.bg-primary { background-color: #dbeafe !important; color: #2563eb !important; }
.stat-icon.bg-success { background-color: #d1fae5 !important; color: #10b981 !important; }
.stat-icon.bg-warning { background-color: #fef3c7 !important; color: #f59e0b !important; }
.stat-icon.bg-info { background-color: #dbeafe !important; color: #3b82f6 !important; }

/* Domain Status Badges */
.badge.status-pending {
    background-color: #fbbf24 !important;
    color: #78350f !important;
}

.badge.status-verified {
    background-color: #10b981 !important;
    color: white !important;
}

.badge.status-failed {
    background-color: #ef4444 !important;
    color: white !important;
}

/* Forms */
.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    color: var(--primary-color);
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.25);
}

/* Enhanced CTA Buttons with Improved Readability */
.btn-primary, .internal-cta-button, .cta-button {
    background-color: #0057b7;  /* High contrast blue background */
    border-color: #0057b7;
    color: #ffffff;  /* High contrast white text */
    font-weight: 600;  /* Slightly bolder for readability */
    padding: 12px 24px;  /* Adequate padding */
    min-height: 40px;  /* Minimum touch target */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);  /* Text shadow for clarity */
    border-radius: 4px;
    transition: background-color 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
    cursor: pointer;
}

.btn-primary:hover, .internal-cta-button:hover, .cta-button:hover {
    background-color: #003f8a;  /* Darker on hover */
    border-color: #003f8a;
    color: #ffffff;  /* Maintain high contrast */
    text-decoration: none;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
}

/* Content Generator */
.content-preview {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    max-height: 400px;
    overflow-y: auto;
}

.content-preview h1, .content-preview h2, .content-preview h3,
.content-preview h4, .content-preview h5, .content-preview h6 {
    color: #1f2937;
    font-weight: 600;
}

/* Integration Cards */
.integration-card {
    border: 2px solid #e5e7eb;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.integration-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.1);
}

.integration-card.connected {
    border-color: var(--success-color);
    background-color: #f0fdf4;
}

.integration-logo {
    width: 4rem;
    height: 4rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.integration-logo.wordpress {
    background-color: #0073aa;
    color: white;
}

.integration-logo.shopify {
    background-color: #95bf47;
    color: white;
}

.integration-logo.stripe {
    background-color: #635bff;
    color: white;
}

.integration-logo.analytics {
    background-color: #ff6f00;
    color: white;
}

.integration-logo.webhook {
    background-color: #1F1F1F;
    color: white;
}

/* Loading States */
/* Enhanced button focus states for accessibility */
.btn-primary:focus, .internal-cta-button:focus, .cta-button:focus {
    background-color: #003f8a;
    border-color: #003f8a;
    box-shadow: 0 0 0 0.2rem rgba(0, 87, 183, 0.5);
    outline: none;
}

/* Secondary CTA buttons with improved contrast */
.btn-secondary {
    background-color: transparent;
    border: 2px solid #0057b7;
    color: #0057b7;
    font-weight: 600;
    padding: 10px 22px;  /* Adjust for border */
    min-height: 40px;
    text-shadow: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #0057b7;
    border-color: #0057b7;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-loading {
    position: relative;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 1rem;
    height: 1rem;
    top: 50%;
    left: 50%;
    margin-left: -0.5rem;
    margin-top: -0.5rem;
    border: 2px solid currentColor;
    border-radius: 50%;
    border-right-color: transparent;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Additional CTA button variants for different contexts */
.btn-success {
    background-color: #0f7b0f;  /* Dark green for high contrast */
    border-color: #0f7b0f;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-success:hover {
    background-color: #0a5d0a;
    border-color: #0a5d0a;
    color: #ffffff;
}

.btn-warning {
    background-color: #b45309;  /* Dark orange for high contrast */
    border-color: #b45309;
    color: #ffffff;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.btn-warning:hover {
    background-color: #92400e;
    border-color: #92400e;
    color: #ffffff;
}

/* CTA link styling for text-based CTAs */
.cta-link {
    color: #0057b7;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.3s ease;
}

.cta-link:hover {
    color: #003f8a;
    text-decoration: underline;
}

/* White background CTA buttons with black text */
.btn-light, .cta-white, .btn-outline-dark {
    background-color: #ffffff;
    border: 2px solid #000000;
    color: #000000;  /* Black text for maximum contrast */
    font-weight: 600;
    padding: 10px 22px;
    min-height: 40px;
    text-shadow: none;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.btn-light:hover, .cta-white:hover, .btn-outline-dark:hover {
    background-color: #000000;  /* Black background on hover */
    border-color: #000000;
    color: #ffffff;  /* White text on hover */
    text-shadow: none;
}

/* Form inputs - colors managed by accessibility-wcag.css */
.form-control, .form-select, .form-check-input {
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    font-weight: 500;
}

.form-control:focus, .form-select:focus {
    background-color: #ffffff;
    border-color: #0057b7;
    box-shadow: 0 0 0 0.2rem rgba(0, 87, 183, 0.25);
}

/* Card styling - colors managed by accessibility-wcag.css */
/* NOTE: Only apply to cards without inline background styles (pricing cards have their own) */
.card:not([style*="background"]), .integration-card:not([style*="background"]) {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

/* Content preview areas - colors managed by accessibility-wcag.css */
.content-preview {
    background-color: #f8fafc;
    border: 1px solid #e5e7eb;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 0.5rem;
    font-weight: 500;
}

.alert-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.alert-success {
    background-color: #d1fae5;
    color: #065f46;
}

.alert-warning {
    background-color: #fef3c7;
    color: #78350f;
}

.alert-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* Footer */
footer {
    background-color: var(--dark-color) !important;
}

footer a:hover {
    color: var(--secondary-color) !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .sruhlon-animation {
        height: 250px;
        margin-top: 2rem;
    }
    
    .connection-node {
        font-size: 1.5rem;
    }
    
    .node-label {
        font-size: 0.65rem;
    }
    
    .feature-card {
        margin-bottom: 1rem;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #666666;  /* Darker gray for better visibility */
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #333333;  /* Even darker on hover for better feedback */
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .content-preview {
        background-color: #1f2937;
        border-color: #374151;
        color: #ffffff;  /* Changed to pure white for dark mode */
    }
}

/* Text colors now managed by accessibility-wcag.css */

/* Dashboard and Component Styling - Colors managed by accessibility-wcag.css */
.dashboard-header {
    background: var(--gradient-primary) !important;
}

/* Stats Cards */
.stat-card {
    background-color: #ffffff;
}

/* Badges, alerts, forms - all colors managed by accessibility-wcag.css */

/* Content generator specific styling */
.content-result {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

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

.slide-up {
    animation: slideUp 0.3s ease-out;
}

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

/* Utility Classes */
.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box, var(--gradient-primary) border-box;
}

.shadow-soft {
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
}

.rounded-xl {
    border-radius: 1rem !important;
}

.text-purple {
    color: #8b5cf6;
}