/* JsonCut Homepage Styles */

.gradient-bg {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
}

.hero-pattern {
    background-image: radial-gradient(circle at 25% 25%, #fb9014 0%, transparent 50%), 
                      radial-gradient(circle at 75% 75%, #fb9014 0%, transparent 50%);
    opacity: 0.1;
}

.code-block {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
}

/* Hero section code block - no scroll, normal card */
.hero-code-block {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
}

/* Real world examples code blocks - scrollable with higher max-height */
.example-code-block {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    max-height: 800px;
    overflow: hidden;
    min-width: 320px; /* Minimum width before horizontal scroll */
}

.example-code-block pre {
    max-height: 720px;
    overflow-y: auto;
    overflow-x: auto; /* Allow horizontal scrolling */
    scrollbar-width: thin;
    scrollbar-color: #fb9014 #1e293b;
    white-space: pre; /* Prevent text wrapping */
    min-width: 100%;
}

.example-code-block pre::-webkit-scrollbar {
    width: 6px;
    height: 6px; /* For horizontal scrollbar */
}

.example-code-block pre::-webkit-scrollbar-track {
    background: #1e293b;
    border-radius: 3px;
}

.example-code-block pre::-webkit-scrollbar-thumb {
    background: #fb9014;
    border-radius: 3px;
}

.example-code-block pre::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

.example-code-block pre::-webkit-scrollbar-corner {
    background: #1e293b;
}

/* Responsive code block adjustments */
@media (max-width: 640px) {
    .example-code-block {
        min-width: 300px;
        overflow-x: auto;
    }
    
    .example-code-block pre {
        font-size: 0.75rem;
        line-height: 1.4;
        padding: 1rem;
    }
}

/* Media Preview Styling */
.media-preview {
    position: relative;
    overflow: hidden;
    border-radius: 1rem;
}

.media-preview img,
.media-preview video {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 0.75rem;
}

.media-preview .blur-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(45deg, rgba(251, 144, 20, 0.1), rgba(168, 85, 247, 0.1));
    filter: blur(20px);
    opacity: 0.6;
    z-index: -1;
    transform: scale(1.1);
}

.json-highlight .property { 
    color: #fb9014; 
}

.json-highlight .string { 
    color: #10b981; 
}

.json-highlight .number { 
    color: #3b82f6; 
}

.json-highlight .boolean { 
    color: #f59e0b; 
}

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

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(251, 144, 20, 0.3);
    }
    50% { 
        box-shadow: 0 0 30px rgba(251, 144, 20, 0.5);
    }
}

.pulse-glow {
    animation: pulse-glow 3s ease-in-out infinite;
}

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

.slide-in-up {
    animation: slideInUp 0.8s ease-out forwards;
}

/* AI Benefits Section */
.ai-benefit-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    transition: all 0.3s ease;
}

.ai-benefit-card:hover {
    border-color: #fb9014;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(251, 144, 20, 0.1);
}

.ai-vs-card {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #fca5a5;
}

.jsoncut-card {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 1px solid #86efac;
}

/* Feature Grid Enhancements */
.feature-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 144, 20, 0.1), transparent);
    transition: left 0.5s ease;
}

.feature-card:hover::before {
    left: 100%;
}

.feature-card:hover {
    border-color: #fb9014;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(251, 144, 20, 0.1);
}

/* Dashboard Screenshots */
.dashboard-screenshot {
    border: 2px solid #374151;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.dashboard-screenshot:hover {
    transform: scale(1.02);
    border-color: #fb9014;
    box-shadow: 0 20px 40px rgba(251, 144, 20, 0.1);
}

/* Improved Cards */
.benefit-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .benefit-comparison {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Buttons */
.btn-primary {
    background: linear-gradient(135deg, #fb9014 0%, #ea580c 100%);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(251, 144, 20, 0.3);
}

/* Loading States */
.loading-btn {
    opacity: 0.75;
    cursor: not-allowed;
}

.loading-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid transparent;
    border-top: 2px solid #ffffff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design Improvements */
@media (max-width: 640px) {
    .code-block {
        padding: 1rem;
    }
    
    .json-highlight pre {
        font-size: 0.75rem;
    }
    
    .float-animation {
        animation: none;
    }
}

/* Stats Display */
.stat-item {
    text-align: center;
    padding: 1rem;
    border-radius: 0.5rem;
    background: rgba(251, 144, 20, 0.1);
    border: 1px solid rgba(251, 144, 20, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #fb9014;
    display: block;
}

.stat-label {
    color: #9ca3af;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Interactive Examples */
.example-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.example-tab {
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    border: 2px solid #374151;
    background: #1f2937;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    min-width: 140px;
    text-align: center;
}

.example-tab:hover {
    border-color: #fb9014;
    color: #ffffff;
    transform: translateY(-2px);
}

.example-tab.active {
    border-color: #fb9014;
    background: #fb9014;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(251, 144, 20, 0.3);
}

.example-content {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

.example-content.active {
    display: block;
}

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

.example-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.example-grid > div {
    min-width: 0; /* Prevent grid items from overflowing */
    width: 100%;
}

/* Ensure code blocks don't exceed their container width */
.example-grid .example-code-block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.example-grid .example-code-block pre {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Mobile toggle switch */
.mobile-toggle {
    display: none;
    justify-content: center;
    margin-top: 1rem;
}

.mobile-toggle-switch {
    background: rgba(31, 41, 55, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid #374151;
    border-radius: 2rem;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.mobile-toggle-btn {
    padding: 0.5rem 0.75rem;
    border-radius: 1.5rem;
    border: none;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.mobile-toggle-btn:hover {
    color: #ffffff;
}

.mobile-toggle-btn.active {
    background: #fb9014;
    color: #ffffff;
    box-shadow: 0 2px 4px rgba(251, 144, 20, 0.3);
}

/* Tablet responsive - keep side by side but reduce gap */
@media (max-width: 1024px) and (min-width: 769px) {
    .example-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
}

/* Mobile responsive - stack vertically */
@media (max-width: 768px) {
    .example-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    /* Horizontal scrollable example tabs */
    .example-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 0.75rem;
        justify-content: flex-start;
        padding: 0.5rem 0;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
        scrollbar-color: #fb9014 #1f2937;
    }
    
    .example-tabs::-webkit-scrollbar {
        height: 4px;
    }
    
    .example-tabs::-webkit-scrollbar-track {
        background: #1f2937;
        border-radius: 2px;
    }
    
    .example-tabs::-webkit-scrollbar-thumb {
        background: #fb9014;
        border-radius: 2px;
    }
    
    .example-tab {
        flex-shrink: 0;
        min-width: 140px;
        white-space: nowrap;
    }
    
    /* Container for scroll indicators */
    .example-tabs-container {
        position: relative;
        margin-bottom: 2rem;
    }
    
    /* Add scroll indicators */
    .example-tabs-container::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, #111827, transparent);
        pointer-events: none;
        z-index: 2;
    }
    
    .example-tabs-container::after {
        content: '';
        position: absolute;
        right: 0;
        top: 0;
        bottom: 0;
        width: 20px;
        background: linear-gradient(to left, #111827, transparent);
        pointer-events: none;
        z-index: 2;
    }
    
    /* Scroll hint indicator */
    .scroll-hint {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        color: #fb9014;
        font-size: 0.75rem;
        opacity: 0.7;
        animation: pulse-hint 2s infinite;
        pointer-events: none;
        z-index: 3;
    }
    
    @keyframes pulse-hint {
        0%, 100% { opacity: 0.7; }
        50% { opacity: 1; }
    }
    
    /* Mobile toggle positioning */
    .mobile-toggle {
        display: flex;
    }
    
    .example-grid {
        display: block;
    }
    
    .example-grid > div {
        margin-bottom: 1.5rem;
    }
    
    .example-grid .order-1,
    .example-grid .order-2 {
        order: unset;
    }
    
    /* Preview section styling */
    .mobile-preview-section {
        display: block;
        text-align: center; /* Center align content */
    }
    
    /* Center media preview content on mobile */
    .mobile-preview-section .media-preview,
    .mobile-preview-section .relative {
        margin: 0 auto;
        display: block;
    }
    
    /* Center grid containers inside preview sections */
    .mobile-preview-section .grid {
        justify-items: center;
    }
    
    /* Ensure images are centered */
    .mobile-preview-section img,
    .mobile-preview-section video {
        margin: 0 auto;
        display: block;
    }
    
    /* Hide code by default on mobile, show preview */
    .mobile-code-section {
        display: none;
    }
    
    /* When code is active, show code and hide preview */
    .mobile-code-active .mobile-code-section {
        display: block;
    }
    
    .mobile-code-active .mobile-preview-section {
        display: none;
    }
    
    /* Adjust mobile toggle for smaller screens */
    .mobile-toggle-btn {
        font-size: 0.7rem;
        padding: 0.4rem 0.6rem;
    }
    
    /* Ensure proper spacing when toggle is shown */
    .mobile-preview-section + .mobile-toggle {
        margin-top: 1rem;
        margin-bottom: 1rem;
    }
}

/* New Benefit and Value Cards */
.benefit-card {
    padding: 1.5rem;
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    border-radius: 1rem;
    transition: all 0.3s ease;
}

.benefit-card:hover {
    border-color: #fb9014;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(251, 144, 20, 0.1);
}

.value-card {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    border: 1px solid #374151;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(251, 144, 20, 0.1), transparent);
    transition: left 0.5s ease;
}

.value-card:hover::before {
    left: 100%;
}

.value-card:hover {
    border-color: #fb9014;
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(251, 144, 20, 0.1);
}
