/* Ads Public Page Styles - Optimized */

/* Critical styles only */
body {
    font-family: 'Shabnam', 'Tahoma', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* Accessibility improvements */
.text-gray-400 { color: #6b7280 !important; }
.text-gray-300 { color: #d1d5db !important; }
.text-gray-200 { color: #e5e7eb !important; }

/* Essential design elements */
.gradient-text {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typewriter effect - Desktop only */
.typewriter-effect {
    overflow: hidden;
    border-left: 1px solid #10b981;
    animation: blink-caret-left 0.75s step-end infinite;
    animation-delay: 0.8s;
    animation-fill-mode: both;
    direction: rtl;
    padding-left: 1px;
}

.typewriter-line {
    overflow: hidden;
    white-space: nowrap;
    animation: typewriter-line 2.5s steps(40, end);
    animation-fill-mode: both;
    display: block;
    width: 0;
    animation-delay: 1s;
}

.typewriter-line:nth-child(2) {
    animation-delay: 3.5s;
}

@keyframes typewriter-line {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret-left {
    from, to { border-left-color: transparent; }
    50% { border-left-color: #10b981; }
}

/* Mobile responsive - no typewriter animation, show in two lines */
@media (max-width: 768px) {
    .typewriter-effect {
        border-left: none;
        animation: none;
        padding-left: 0;
    }
    
    .typewriter-line {
        animation: none !important;
        width: 100% !important;
        white-space: normal !important;
        display: block !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }
    
    .typewriter-line:nth-child(2) {
        animation-delay: 0s !important;
    }
    
    .hero-subtitle {
        display: block !important;
    }
}

/* Highlight keywords */
.highlight-keywords {
    background: linear-gradient(120deg, #fbbf24 0%, #f59e0b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(251, 191, 36, 0.3);
    display: inline;
}

/* Collapsible filters */
.filter-toggle {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.filter-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.filter-content.expanded {
    max-height: 1000px;
    transition: max-height 0.3s ease-in;
}

.filter-icon {
    transition: transform 0.3s ease;
}

.filter-icon.rotated {
    transform: rotate(180deg);
}

/* Price badge */
.price-badge {
    color: #374151;
    font-weight: bold;
}

/* CTA button styles */
.cta-login-btn {
    background: rgba(255, 255, 255, 0.1) !important;
    backdrop-filter: blur(10px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: white !important;
    transition: all 0.3s ease !important;
}

.cta-login-btn:hover {
    background: rgba(16, 185, 129, 0.8) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3) !important;
}

/* Footer styles */
.footer-gradient {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 50%, #1e293b 100%);
    position: relative;
    z-index: 1;
}

.footer-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.9) 50%, rgba(30, 41, 59, 0.8) 100%);
    z-index: -1;
}

.footer-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Scroll animation */
.scroll-animate {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.6s ease-out;
}

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }

/* Mobile optimizations */
@media (max-width: 640px) {
    .hero-title {
        font-size: 2.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .hero-subtitle {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
    }
    
    .hero-subtitle span {
        display: block !important;
    }
    
    .hero-subtitle .highlight-keywords {
        display: inline !important;
    }
    
    .grid.grid-cols-2 {
        gap: 1rem !important;
        padding-left: 0.5rem !important;
        padding-right: 0.5rem !important;
    }
    
    .grid.grid-cols-2 > div {
        min-width: 0 !important;
        flex: 1 !important;
    }
    
    .filter-chip {
        padding: 8px 14px !important;
        font-size: 13px !important;
        min-height: 36px !important;
        border-radius: 12px !important;
    }
    
    .filter-chip i {
        font-size: 11px !important;
        margin-left: 5px !important;
    }
    
    .flex.flex-wrap.gap-2 {
        gap: 8px !important;
    }
    
    .feature-title {
        font-size: 1rem !important;
        font-weight: 600 !important;
        line-height: 1.3 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .feature-description {
        font-size: 0.875rem !important;
        line-height: 1.4 !important;
    }
    
    .footer-gradient .block.sm\\:hidden {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        padding: 1rem 0 !important;
        margin: 0 !important;
    }
    
    .footer-gradient .text-white {
        color: #ffffff !important;
        font-size: 0.875rem !important;
        font-weight: 500 !important;
    }
    
    .footer-gradient .text-gray-200 {
        color: #e5e7eb !important;
        font-size: 0.875rem !important;
    }
    
    .footer-gradient .text-blue-400 {
        color: #60a5fa !important;
        font-weight: 600 !important;
    }
    
    .footer-gradient .border-t {
        border-top-color: rgba(255, 255, 255, 0.2) !important;
        margin-top: 1rem !important;
    }
    
    .typewriter-effect {
        border-left: none;
        animation: fadeInUp 1s ease-out;
        animation-delay: 0.5s;
        animation-fill-mode: both;
    }
    
    .typewriter-line {
        animation: none;
        width: 100%;
        display: block;
    }
    
    @keyframes fadeInUp {
        from { opacity: 0; transform: translateY(20px); }
        to { opacity: 1; transform: translateY(0); }
    }
}

/* Smooth scroll indicator animation */
.scroll-indicator-container {
    animation: gentle-float 3s ease-in-out infinite;
}

.smooth-bounce {
    animation: smooth-bounce 2s ease-in-out infinite;
}

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

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

@keyframes smooth-bounce {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-3px); }
}

@keyframes fade-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Scroll indicator */
.scroll-indicator {
    position: fixed;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.scroll-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.scroll-dot.active {
    background: #10b981;
    border-color: #059669;
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.scroll-dot:hover {
    background: rgba(16, 185, 129, 0.6);
    transform: scale(1.1);
}

/* Loading screen */
#loading-screen {
    transition: opacity 0.3s ease;
}

/* Header styles */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

header .gradient-text {
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Mobile Layout Styles */
.mobile-device-only {
    display: none;
}

.desktop-device-only {
    display: block;
}

.mobile-device .mobile-device-only {
    display: block;
}

.mobile-device .desktop-device-only {
    display: none;
}

.mobile-device body {
    background: #f8f9fa;
    font-family: 'Shabnam', 'Tahoma', 'Arial', sans-serif;
}

/* Mobile Header */
.mobile-header {
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 40;
}

.mobile-header input {
    transition: all 0.3s ease;
}

.mobile-header input:focus {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.15);
}

/* Filter Chips */
.filter-chip {
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    border-radius: 8px;
    min-width: fit-content;
}

.filter-chip:active {
    transform: scale(0.95);
}

.filter-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Hide scrollbar for filter chips */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;     /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;             /* Chrome, Safari, Opera */
    width: 0;
    height: 0;
}

.scrollbar-hide::-webkit-scrollbar-track {
    display: none;
}

.scrollbar-hide::-webkit-scrollbar-thumb {
    display: none;
}

/* Smooth scrolling for filter chips */
.overflow-x-auto {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Mobile Ads List */
.mobile-ads-container {
    padding-bottom: 80px;
   
}

.mobile-ad-item {
    transition: background-color 0.2s ease;
    cursor: pointer;
}

.mobile-ad-item:active {
    background-color: #f3f4f6;
}

.mobile-ad-item:hover {
    background-color: #f9fafb;
}

/* Mobile Bottom Menu */
.mobile-bottom-menu {
    background: white;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 50;
    backdrop-filter: blur(10px);
}

.mobile-bottom-menu button {
    transition: all 0.3s ease;
    cursor: pointer;
}

.mobile-bottom-menu button:active {
    transform: scale(0.95);
}

.mobile-bottom-menu .w-12 {
    transition: all 0.3s ease;
}

.mobile-bottom-menu button:hover .w-12 {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Line clamp utility */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile specific animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-ad-item {
    animation: slideInUp 0.3s ease-out;
    transition: all 0.3s ease;
}

/* Badge Styles */
.mobile-ad-item .bg-blue-100 {
    background-color: #dbeafe;
    color: #1d4ed8;
}

.mobile-ad-item .bg-green-100 {
    background-color: #dcfce7;
    color: #166534;
}

.mobile-ad-item .bg-gray-100 {
    background-color: #f3f4f6;
    color: #374151;
}

.mobile-ad-item .bg-yellow-100 {
    background-color: #fef3c7;
    color: #92400e;
}

.mobile-ad-item .bg-green-100 {
    background-color: #dcfce7;
    color: #166534;
}

.mobile-ad-item .bg-green-50 {
    background-color: #f0fdf4;
    color: #15803d;
}

.mobile-ad-item .bg-red-100 {
    background-color: #fee2e2;
    color: #dc2626;
}

.mobile-ad-item .rounded-full {
    border-radius: 9999px;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.2;
    padding: 4px 8px;
}

/* Score badge on image */
.mobile-ad-item .relative .absolute span {
    backdrop-filter: blur(4px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    font-size: 9px;
    line-height: 1.1;
    padding: 2px 4px;
    min-width: 20px;
    text-align: center;
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .mobile-device-only {
        display: block !important;
    }
    
    .desktop-device-only {
        display: none !important;
    }
}