/* Custom Styles for Tower Grove East Furniture Blog */

/* Smooth scrolling and transitions */
* {
    scroll-behavior: smooth;
}

/* Custom animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

/* Utility classes for animations */
.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out;
}

.animate-slideInRight {
    animation: slideInRight 0.6s ease-out;
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

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

/* Custom hover effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Custom gradient backgrounds */
.bg-tower-grove-gradient {
    background: linear-gradient(135deg, #8b5a2b 0%, #d4a574 100%);
}

.bg-deals-gradient {
    background: linear-gradient(135deg, #1e40af 0%, #059669 50%, #ea580c 100%);
}

/* Sticky banner animations */
.sticky-banner-show {
    transform: translateY(0) !important;
}

/* Card hover effects */
.card-hover {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.card-hover::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;
}

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

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

/* Calculator input styling */
.calculator-input {
    transition: all 0.3s ease;
    border: 2px solid #e5e7eb;
}

.calculator-input:focus {
    border-color: #1e40af;
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
    outline: none;
}

/* Custom button styles */
.btn-primary {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    border: none;
    color: white;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 8px;
    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;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 15px rgba(30, 64, 175, 0.3);
}

/* Deal card special effects */
.deal-card {
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.deal-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, rgba(30, 64, 175, 0.05), transparent 30%);
    animation: rotate 4s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.deal-card:hover::after {
    opacity: 1;
}

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

.deal-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Pricing badge effects */
.price-badge {
    position: relative;
    background: linear-gradient(135deg, #dc2626, #ef4444);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 8px rgba(220, 38, 38, 0.3);
}

/* Testimonial styling */
.testimonial {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin: 16px 0;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #1e40af;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: -10px;
    left: 20px;
    font-size: 4rem;
    color: #1e40af;
    opacity: 0.3;
    font-family: Georgia, serif;
}

/* Loading states for calculators */
.loading {
    position: relative;
    pointer-events: none;
}

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

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

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

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

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Modal backdrop blur effect */
.modal-backdrop {
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

/* Typography enhancements */
.text-gradient {
    background: linear-gradient(135deg, #1e40af, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
}

/* Section separators */
.section-divider {
    position: relative;
    text-align: center;
    margin: 3rem 0;
}

.section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d1d5db, transparent);
}

.section-divider span {
    background: #f9fafb;
    padding: 0 2rem;
    color: #6b7280;
    font-weight: 500;
}

/* Interactive elements */
.interactive-element {
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.interactive-element:active {
    transform: scale(0.98);
}

/* Chart container styling */
.chart-container {
    position: relative;
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    margin: 20px 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .deal-card {
        margin-bottom: 1rem;
    }
    
    .testimonial {
        margin: 8px 0;
        padding: 16px;
    }
    
    .btn-primary {
        padding: 10px 20px;
        font-size: 0.875rem;
    }
}

/* Focus indicators for accessibility */
.focus-ring:focus {
    outline: 2px solid #1e40af;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .print-break {
        page-break-after: always;
    }
    
    body {
        font-size: 12px;
        line-height: 1.4;
    }
    
    .bg-gradient-to-r,
    .bg-gradient-to-br {
        background: #f8fafc !important;
        -webkit-print-color-adjust: exact;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .card-hover {
        border: 2px solid #000;
    }
    
    .btn-primary {
        border: 2px solid #000;
    }
    
    .testimonial {
        border: 2px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Custom utilities */
.backdrop-blur {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.text-shadow {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Component-specific styles */
.calculator-result-animation {
    animation: fadeInUp 0.5s ease-out;
}

.deal-highlight {
    position: relative;
}

.deal-highlight::after {
    content: '🔥';
    position: absolute;
    top: -5px;
    right: -5px;
    animation: pulse 1.5s ease-in-out infinite;
}

/* Sticky elements */
.sticky-top {
    position: sticky;
    top: 0;
    z-index: 30;
}

/* Layout improvements */
.container-fluid {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

/* Custom grid system */
.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

/* Interactive rating stars */
.rating-star {
    color: #fbbf24;
    transition: color 0.2s ease;
}

.rating-star:hover {
    color: #f59e0b;
}

/* Progress indicators */
.progress-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1e40af, #059669);
    transition: width 0.5s ease;
}

/* Notification styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #10b981;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

/* Enhanced form styling */
.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label {
    position: absolute;
    top: 12px;
    left: 16px;
    color: #6b7280;
    transition: all 0.2s ease;
    pointer-events: none;
    background: white;
    padding: 0 4px;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    transform: translateY(-24px) scale(0.875);
    color: #1e40af;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: border-color 0.2s ease;
    background: transparent;
}

.form-input:focus {
    border-color: #1e40af;
    outline: none;
}

/* CTA button enhancements */
.cta-button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1e40af, #1e3a8a);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.cta-button::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;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(30, 64, 175, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

/* Image lazy loading placeholders */
.image-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Improved mobile navigation */
@media (max-width: 768px) {
    .mobile-nav {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        transition: left 0.3s ease;
        z-index: 999;
    }
    
    .mobile-nav.open {
        left: 0;
    }
    
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .mobile-nav-overlay.open {
        opacity: 1;
        visibility: visible;
    }
}