/* Professional Interface Styles for MeilleurPrixTn.net */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    min-height: 100vh;
}

/* Shared non-home page theme */
.site-page {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.site-page .container.py-5,
.site-page .container.my-5,
.site-page .container.p-4,
.site-page .container.p-5 {
    max-width: 1120px;
}

.site-page h1 {
    color: #0f172a;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.site-page .lead {
    color: #475569;
}

.site-page .card,
.site-page .content-section,
.site-page .alert,
.site-page .bg-light.rounded {
    border-radius: 1rem;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
}

.site-page .card-body {
    padding: 1.25rem;
}

.site-page .btn-primary,
.site-page .btn-outline-primary {
    border-radius: 999px;
}

.site-page .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
}

.site-page .btn-outline-primary {
    border-color: #3b82f6;
    color: #3b82f6;
}

.site-page .btn-outline-primary:hover {
    background: #3b82f6;
    color: #ffffff;
}

/* Navigation */
.navbar {
    border-bottom: 1px solid #e2e8f0;
    padding: 1rem 0;
}

.navbar .container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
}

.navbar-brand {
    font-size: 1.75rem;
    font-weight: 700;
}

.navbar-brand .text-primary {
    color: #3b82f6 !important;
}

.navbar-brand .text-secondary {
    color: #64748b !important;
}

.navbar-nav {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.navbar-nav .nav-link {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
    background-color: #f8fafc;
    color: #3b82f6 !important;
}

/* Mobile Navigation */
@media (max-width: 576px) {
    .navbar .container {
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
        width: 100%;
        text-align: center;
    }
    
    .navbar-brand i {
        font-size: 1rem;
    }
    
    .navbar-nav {
        width: 100%;
        flex-direction: row !important;
        justify-content: center;
        gap: 1rem;
        margin: 0 !important;
    }
    
    .navbar-nav .nav-link {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
        white-space: nowrap;
    }
}

/* Main Container */
.main-container {
    padding: 0 0 3rem;
    min-height: calc(100vh - 120px);
}

/* Ad Placeholders - Only for large screens */
.ad-placeholder {
    background: #ffffff;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    height: 700px;
    max-width: 160px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
    margin-top: 2rem;
    transition: all 0.3s ease;
    margin-left: auto;
    margin-right: auto;
}

/* Extra large desktop */
@media (min-width: 1400px) {
    .ad-placeholder {
        height: 900px;
        max-width: 200px;
    }
}

/* Ad positioning - minimal margins to prevent overlap */
.left-ad {
    margin-left: auto;
    margin-right: 0;
}

.right-ad {
    margin-left: 0;
    margin-right: auto;
}

/* Extra large screens - slightly more spacing */
@media (min-width: 1400px) {
    .left-ad {
        margin-right: 0.5rem;
    }

    .right-ad {
        margin-left: 0.5rem;
    }
}

.ad-placeholder:hover {
    border-color: #3b82f6;
    background: #f8fafc;
}

.ad-content {
    text-align: center;
    padding: 1rem;
}

.ad-content i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Mobile Ad Banner */
.mobile-ad-banner {
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-ad-banner:hover {
    border-color: #3b82f6;
    background: #ffffff !important;
}

.mobile-ad-banner i {
    font-size: 1.5rem;
    display: block;
}

/* In-feed Ad Card */
.ad-card {
    background: #f8fafc;
    border: 2px dashed #cbd5e1 !important;
    min-height: 120px;
}

.ad-card:hover {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
}

/* Hero Section */
.hero-section {
    padding: 2rem 0;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    margin: 0 -15px 2rem -15px;
    color: white;
    border-radius: 0 0 2rem 2rem;
    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 100" fill="white" opacity="0.1"><polygon points="0,0 0,100 1000,100 1000,20 0,0"/></svg>') no-repeat;
    background-size: cover;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 1.5rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 700;
    color: #fbbf24;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 1rem;
    opacity: 0.9;
    font-weight: 500;
}

/* Search Section */
.search-section {
    margin-bottom: 2rem;
}

.search-card {
    background: white;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.search-card:hover {
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.search-input-group {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.search-input-wrapper {
    flex: 1;
    position: relative;
}

.search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: #64748b;
    z-index: 2;
}

.search-input {
    width: 100%;
    padding: 1rem 1.25rem 1rem 3rem;
    border: 2px solid #e2e8f0;
    border-radius: 0.875rem;
    font-size: 1rem;
    background: #f8fafc;
    transition: all 0.3s ease;
}

.search-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border: none;
    border-radius: 0.875rem;
    padding: 1rem 2rem;
    font-weight: 600;
    font-size: 1rem;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

/* Shared logo rendering */
.logo-frame {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    height: 84px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-frame-dark {
    background: #0f172a;
    border-color: #1e293b;
}

.partner-logo-unified {
    max-width: 150px;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Simple back link under header */
.top-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #475569;
    font-weight: 500;
    font-size: 0.92rem;
    text-decoration: none;
    margin-bottom: 0.45rem;
    padding: 0.2rem 0;
    transition: all 0.2s ease;
}

.top-back-link i {
    color: #3b82f6;
    font-size: 0.85rem;
}

.top-back-link:hover {
    color: #1d4ed8;
    transform: translateX(-2px);
}

.top-back-link:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.25);
    outline-offset: 3px;
    border-radius: 999px;
}

/* Floating home button */
.floating-home-btn {
    position: fixed;
    right: 16px;
    bottom: 86px;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.35);
    z-index: 1040;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.floating-home-btn:hover {
    color: #ffffff;
    transform: scale(1.06);
    box-shadow: 0 16px 30px rgba(30, 64, 175, 0.45);
}

.floating-home-btn:focus-visible {
    outline: 3px solid rgba(147, 197, 253, 0.8);
    outline-offset: 4px;
}

.floating-ai-badge {
    position: fixed;
    right: 16px;
    bottom: 20px;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.92);
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
    z-index: 1040;
    border: 1px solid rgba(96, 165, 250, 0.35);
    font-size: 0.88rem;
    font-weight: 600;
    pointer-events: none;
}

.floating-ai-badge i {
    color: #60a5fa;
}

.floating-ai-badge::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55);
    animation: aiPulse 1.8s infinite;
    margin-left: 0.2rem;
}

@keyframes aiPulse {
    0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

@media (max-width: 768px) {
    .floating-home-btn {
        right: 12px;
        left: auto;
        bottom: 68px;
        width: 48px;
        height: 48px;
    }

    .floating-home-btn:hover {
        transform: scale(1.06);
    }

    .floating-ai-badge {
        right: 12px;
        left: auto;
        bottom: 14px;
        padding: 0.55rem 0.75rem;
        font-size: 0.8rem;
    }

    .floating-ai-badge span {
        display: none;
    }
}

/* FAQ page */
.faq-hero {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(30, 64, 175, 0.08));
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 1.5rem;
    padding: 1.5rem;
}

.faq-kicker {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: #3b82f6;
    font-weight: 700;
}

.faq-lead {
    max-width: 760px;
}

.faq-item {
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.faq-summary {
    list-style: none;
    cursor: pointer;
    padding: 1.1rem 1.25rem;
    font-weight: 600;
    color: #0f172a;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.faq-summary::marker,
.faq-summary::-webkit-details-marker {
    display: none;
}

.faq-summary::after {
    content: '\f078';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: #3b82f6;
    transition: transform 0.2s ease;
}

.faq-item[open] .faq-summary::after {
    transform: rotate(180deg);
}

.faq-item[open] .faq-summary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(255, 255, 255, 1));
}

.faq-answer {
    padding: 0 1.25rem 1.25rem;
    color: #475569;
}

.faq-item:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.faq-tools .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.12);
}

.faq-tools .input-group-text {
    border-color: #e2e8f0;
}

.faq-tools .btn {
    border-radius: 999px;
}

/* Infinite partner marquee */
.partners-marquee-wrap {
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.partners-marquee-track {
    display: flex;
    width: max-content;
    gap: 1rem;
    animation: partnersMarquee 32s linear infinite;
}

.partners-marquee-item {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px;
    min-width: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.partners-marquee-name {
    font-size: 0.9rem;
    color: #334155;
    font-weight: 600;
}

/* Footer links visibility */
.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
}

.footer-link-item {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0.35rem 0.5rem;
    border-radius: 0.5rem;
    color: #94a3b8;
    text-decoration: none;
    background: rgba(148, 163, 184, 0.08);
    transition: all 0.2s ease;
    font-size: 0.86rem;
    line-height: 1.2;
}

.footer-link-item:hover {
    color: #e2e8f0;
    background: rgba(59, 130, 246, 0.2);
}

@media (max-width: 576px) {
    .footer-links-grid {
        grid-template-columns: 1fr;
    }
}

@keyframes partnersMarquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .partners-marquee-track {
        animation: none;
    }
}

.search-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Search Progress Indicator */
.search-progress {
    width: 100%;
    max-width: 500px;
    margin: 0 auto 20px;
}

.search-progress .progress {
    border-radius: 50px;
    background-color: #e2e8f0;
    overflow: hidden;
}

.search-progress .progress-bar {
    transition: width 0.3s ease;
    border-radius: 50px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.search-elapsed-time {
    font-family: monospace;
}

/* Popular Searches */
.popular-searches {
    border-top: 1px solid #e2e8f0;
    padding-top: 1.25rem;
}

.popular-title {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

.popular-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.popular-tag {
    border: 1px solid #3b82f6;
    color: #3b82f6;
    padding: 0.4rem 0.8rem;
    border-radius: 1.5rem;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.popular-tag:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-1px);
}

/* Shared page hero and section heading system for non-home pages */
.page-hero {
    position: relative;
    padding: 1.35rem 1.4rem;
    border-radius: 1.15rem;
    border: 1px solid rgba(148, 163, 184, 0.25);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.13), rgba(30, 64, 175, 0.07));
    overflow: hidden;
}

.page-hero::after {
    content: '';
    position: absolute;
    right: -30px;
    top: -30px;
    width: 120px;
    height: 120px;
    border-radius: 999px;
    background: radial-gradient(circle, rgba(96, 165, 250, 0.26), rgba(96, 165, 250, 0));
}

.page-hero-kicker {
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.75rem;
    color: #1d4ed8;
    font-weight: 700;
    margin-bottom: 0.35rem;
}

.page-hero-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.4rem;
}

.page-hero-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(30, 64, 175, 0.28);
}

.page-hero-subtitle {
    color: #475569;
    margin-bottom: 0;
}

.icon-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #0f172a;
}

.icon-title i {
    color: #3b82f6;
}

@media (max-width: 768px) {
    .page-hero {
        padding: 1.1rem 1rem;
    }

    .page-hero-title {
        align-items: flex-start;
    }
}

.search-tip {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 0.6rem;
    padding: 0.75rem;
    display: flex;
    align-items: center;
}

/* Features Section */
.features-section {
    margin-bottom: 2rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.feature-card {
    background: white;
    border-radius: 0.75rem;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    color: white;
}

.feature-title {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.feature-description {
    color: #64748b;
    line-height: 1.5;
    margin: 0;
    font-size: 0.9rem;
}

/* Theme cards */
.theme-card,
.deal-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1rem !important;
    overflow: hidden;
    background: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.theme-card:hover,
.deal-card:hover {
    transform: translateY(-3px);
    border-color: rgba(59, 130, 246, 0.3);
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.12) !important;
}

.theme-card .card-body,
.deal-card .card-body {
    padding: 1.25rem;
}

.info-card .card-title,
.deal-card .card-title {
    color: #0f172a;
    font-weight: 700;
}

.info-card .btn {
    border-radius: 999px;
}

.deal-card .deal-image {
    width: 100%;
    object-fit: cover;
    aspect-ratio: 4 / 3;
    border-bottom: 1px solid #e2e8f0;
}

.deal-card .badge {
    border-radius: 999px;
}

.deal-card .btn {
    border-radius: 999px;
}

/* Loading Section */
.loading-section {
    display: none;
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
}

.loading-section.show {
    display: block;
}

.loading-spinner {
    margin-bottom: 1.5rem;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e2e8f0;
    border-top: 4px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-section h5 {
    color: #374151;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Results Section */
.results-section {
    margin-bottom: 3rem;
}

.result-card {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    position: relative;
    border-left: 4px solid #3b82f6;
}

.result-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.result-card h6 a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.result-card h6 a:hover {
    color: #3b82f6;
}

/* Compact Results Layout */
.result-card-compact {
    background: white;
    border-radius: 0.75rem;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    transition: all 0.2s ease;
    min-height: 60px;
}

.result-card-compact:hover {
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    transform: translateY(-1px);
}

.result-left {
    flex-shrink: 0;
    width: 80px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-logo-container {
    width: 100%;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.site-logo-compact {
    max-height: 32px;
    max-width: 70px;
    object-fit: contain;
    border-radius: 0.375rem;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    padding: 0.25rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    display: block;
    margin: 0 auto;
}

.site-name-compact {
    font-size: 0.75rem;
    font-weight: 600;
    color: #374151;
    text-align: center;
    line-height: 1.2;
    background: #f8fafc;
    padding: 0.5rem 0.25rem;
    border-radius: 0.375rem;
    border: 1px solid #e2e8f0;
    width: 100%;
}

.result-main {
    flex: 1;
    min-width: 0;
    padding-top: 0.25rem;
    /* Add small top padding for alignment when content wraps */
}

.result-header-compact {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.5rem;
}

.result-title-compact {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.result-title-compact a {
    color: #1f2937;
    text-decoration: none;
    display: block;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
    /* Remove the problematic single-line constraints */
}

.result-title-compact a:hover {
    color: #3b82f6;
}

.result-badges-compact {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.result-badges-compact .relevance-badge {
    padding: 0.2rem 0.5rem;
    font-size: 0.65rem;
    border-radius: 0.5rem;
}

.score-badge-compact {
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'Inter', monospace;
    transition: all 0.2s ease;

    /* Default/medium score (40-69%) */
    background: #3b82f6;
    color: white;
    border: 1px solid #2563eb;
}

/* High scores (70%+) - Green */
.score-badge-compact.high-score {
    background: #10b981;
    color: white;
    border: 1px solid #059669;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

/* Medium scores (40-69%) - Blue (default) */
.score-badge-compact.medium-score {
    background: #3b82f6;
    color: white;
    border: 1px solid #2563eb;
}

/* Low scores (20-39%) - Orange */
.score-badge-compact.low-score {
    background: #f59e0b;
    color: #92400e;
    border: 1px solid #d97706;
}

/* Very low scores (<20%) - Red */
.score-badge-compact.very-low-score {
    background: #ef4444;
    color: white;
    border: 1px solid #dc2626;
}

/* Keyword-only matches (when query coverage is 0) - Purple */
.score-badge-compact.keyword-match {
    background: #8b5cf6;
    color: white;
    border: 1px solid #7c3aed;
}

/* Exact matches - Gold */
.score-badge-compact.exact-match {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #92400e;
    border: 1px solid #d97706;
    box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.3);
    font-weight: 700;
}

.coverage-badge-compact {
    padding: 0.2rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.65rem;
    font-weight: 600;
    background: #10b981;
    color: white;
}

.result-info-compact {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.result-path-compact {
    font-size: 0.8rem;
    color: #64748b;
    word-wrap: break-word;
    overflow-wrap: break-word;
    line-height: 1.3;
}

.matching-keywords-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.keyword-tag-compact {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #92400e;
    padding: 0.125rem 0.375rem;
    border-radius: 0.375rem;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-block;
}

.result-right {
    flex-shrink: 0;
}

.visit-btn-compact {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
    border: none;
    min-height: 44px;
}

.visit-btn-compact:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.visit-btn-compact .fas {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

/* Mobile responsiveness for compact layout */
@media (max-width: 768px) {
    .result-card-compact {
        flex-direction: column;
        align-items: stretch;
        padding: 1rem;
        gap: 0.75rem;
    }

    .result-left {
        width: auto;
        justify-content: flex-start;
    }

    .site-logo-container {
        width: 60px;
    }

    .result-header-compact {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .result-badges-compact {
        width: 100%;
        justify-content: flex-start;
    }

    .result-title-compact a {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .result-path-compact {
        white-space: normal;
        overflow: visible;
        text-overflow: unset;
    }

    .visit-btn-compact {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .result-card-compact {
        padding: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .result-left {
        align-self: flex-start;
    }

    .site-logo-container {
        width: 50px;
        height: 32px;
    }

    .site-logo-compact {
        max-height: 24px;
        max-width: 50px;
    }

    .result-badges-compact {
        gap: 0.25rem;
    }

    .visit-btn-compact {
        padding: 0.375rem 0.75rem;
        font-size: 0.8rem;
    }
}

/* Mobile Responsiveness */
@media (max-width: 767px) {

    /* Mobile: Full width, no ads */
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1.25rem;
    }

    .stat-number {
        font-size: 1.8rem;
    }

    .stat-label {
        font-size: 0.9rem;
    }

    .search-input-group {
        flex-direction: column;
    }

    .search-btn {
        width: 100%;
    }

    .popular-tags {
        flex-direction: column;
        align-items: flex-start;
    }

    .result-card {
        padding: 1.25rem;
        padding-bottom: 3.5rem;
    }

    .visit-button {
        right: 1.25rem;
        bottom: 0.75rem;
    }

    .external-links-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .feature-card {
        padding: 1.25rem;
    }

    .search-card {
        padding: 1.5rem;
    }
}

@media (min-width: 768px) and (max-width: 991px) {

    /* Tablet: Ads visible but smaller, main content centered */
    .main-container .container-fluid .row>.col-12 {
        max-width: 100%;
        margin: 0 auto;
    }
}

@media (min-width: 992px) {

    /* Desktop and up: Full layout with proper ad placement */
    .ad-content {
        padding: 0.75rem;
    }

    .ad-content i {
        font-size: 1.8rem;
    }
}

@media (max-width: 576px) {
    .main-container {
        padding: 0 0 2rem;
    }

    .search-card {
        padding: 1.5rem;
    }

    .hero-section {
        margin: 0 -15px 2rem -15px;
        padding: 2rem 0;
    }
}

/* Custom Styles for Inline Elements */

/* Sticky elements with custom top offset */
.sticky-top-custom {
    top: 20px;
}

/* Tunisia flag styling */
.tunisia-flag {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

/* Contact modal success icon */
.contact-success-icon {
    font-size: 3rem;
}

/* Contact modal error icon */
.contact-error-icon {
    font-size: 3rem;
}

/* Utility Classes */
.text-primary {
    color: #3b82f6 !important;
}

.bg-primary {
    background-color: #3b82f6 !important;
}

/* Loading Animation */
.loading {
    display: none;
}

.loading.show {
    display: block;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    color: #64748b;
}

.no-results i {
    color: #cbd5e1;
    margin-bottom: 1.5rem;
}

.no-results h4 {
    color: #374151;
    margin-bottom: 1rem;
}

/* Mark Highlighting */
mark {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #92400e;
    padding: 0.1rem 0.3rem;
    border-radius: 0.25rem;
    font-weight: 600;
}

/* Modern Internal Results Section */
.internal-results-section {
    margin-top: 2rem;
}

.internal-results-header {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.section-icon {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
    color: white;
    font-size: 1.2rem;
}

.section-title h5 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 0;
}

.results-count .badge {
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
}

/* Modern Results Grid - Single Column Layout */
.results-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.result-card-modern {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: 100%;
    border-left: 4px solid #3b82f6;
}

.result-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.result-header {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.result-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.result-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.result-title {
    margin-bottom: 0.5rem;
}

.result-title a {
    color: #1f2937;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.result-title a:hover {
    color: #3b82f6;
}

.result-path {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.matching-keywords {
    background: #f0f9ff;
    border-radius: 0.75rem;
    padding: 1rem;
    border-left: 4px solid #0ea5e9;
}

.keywords-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0369a1;
    display: block;
    margin-bottom: 0.5rem;
}

.keywords-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.keyword-tag {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    color: white;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
}

.result-footer {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-top: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-info {
    display: flex;
    align-items: center;
}

.site-logo-small {
    height: 32px;
    width: auto;
    max-width: 100px;
    border-radius: 6px;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 1px solid #cbd5e1;
    padding: 4px;
    object-fit: contain;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.site-logo-small {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

.site-name {
    font-size: 0.85rem;
    color: #64748b;
    font-weight: 500;
    background: #e2e8f0;
    padding: 0.3rem 0.8rem;
    border-radius: 2rem;
}

.visit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 2rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.visit-btn:hover {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.4);
}

.btn-logo {
    height: 36px;
    width: auto;
    max-width: 90px;
    border-radius: 8px;
    padding: 8px;
    object-fit: contain;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.btn-logo:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

.visit-text {
    font-size: 0.875rem;
    font-weight: 600;
}

/* Badges */
.relevance-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.relevance-badge.exact {
    background: #10b981;
    color: white;
}

.relevance-badge.high {
    background: #22c55e;
    color: white;
}

.relevance-badge.good {
    background: #eab308;
    color: white;
}

.relevance-badge.moderate {
    background: #f59e0b;
    color: white;
}

.relevance-badge.low {
    background: #ef4444;
    color: white;
}

.score-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #64748b;
    color: white;
    font-family: 'Inter', monospace;
}

.coverage-badge {
    padding: 0.4rem 0.8rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    background: #0ea5e9;
    color: white;
}

/* Keyword Highlighting */
.keyword-highlight {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #92400e;
    padding: 0.25rem 0.6rem;
    border-radius: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    margin-right: 0.5rem;
    display: inline-block;
    margin-bottom: 0.25rem;
}

.matching-keywords {
    background: #f0f9ff;
    border-radius: 0.75rem;
    padding: 1rem;
    border-left: 4px solid #0ea5e9;
    margin: 1rem 0;
}

/* Results Header */
.results-header {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.results-header h5 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Classification and Entity Badges */
.classification-badge {
    padding: 0.5rem 1rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: inline-block;
}

.classification-badge.specific {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.classification-badge.general {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
}

.entity-tag {
    background: rgba(59, 130, 246, 0.1);
    color: #1e40af;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 500;
    margin: 0.25rem;
    display: inline-block;
}

.entity-tag.brand {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.entity-tag.spec {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

/* External Links */
.external-links-section {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.external-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.external-link-card {
    background: #f8fafc;
    color: #374151;
    padding: 1.5rem;
    border-radius: 1rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-weight: 500;
}

.external-link-card:hover {
    background: white;
    color: #3b82f6;
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.15);
    text-decoration: none;
}

/* Pagination */
.pagination {
    --bs-pagination-bg: white;
    --bs-pagination-border-color: #e2e8f0;
    --bs-pagination-hover-bg: #f8fafc;
    --bs-pagination-active-bg: #3b82f6;
    --bs-pagination-active-border-color: #3b82f6;
}

.pagination .page-link {
    border-radius: 0.75rem !important;
    margin: 0 0.25rem;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #374151;
}

.pagination .page-link:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.2);
}

.pagination-bottom {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

/* Footer */
.footer {
    background: #1f2937 !important;
    padding: 3rem 0 2rem;
    margin-top: 4rem;
    border-top: 1px solid #374151;
}

.footer h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer h6 {
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
}

.footer .badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

.footer-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #3b82f6;
}

/* Error Pages Styling */
.error-page-card {
    background: white;
    border-radius: 1.5rem;
    padding: 3rem 2rem;
    margin: 3rem auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
    text-align: center;
    max-width: 600px;
}

.error-icon {
    font-size: 4rem;
    color: #64748b;
    margin-bottom: 1.5rem;
}

.error-icon i {
    display: block;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: #1e40af;
    line-height: 1;
    margin-bottom: 1rem;
    font-family: 'Inter', sans-serif;
}

.error-title {
    font-size: 2rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 1rem;
}

.error-description {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.error-actions {
    margin-bottom: 2rem;
}

.error-actions .btn {
    margin: 0.5rem;
}

.error-suggestions {
    text-align: left;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.5rem;
    border: 1px solid #e2e8f0;
}

.error-suggestions h6 {
    color: #1f2937;
    font-weight: 600;
    margin-bottom: 1rem;
}

.error-suggestions ul li {
    margin-bottom: 0.5rem;
    color: #4b5563;
}

.error-suggestions ul li i {
    width: 20px;
}

/* Error page responsive design */
@media (max-width: 768px) {
    .error-page-card {
        padding: 2rem 1.5rem;
        margin: 2rem 1rem;
    }

    .error-code {
        font-size: 4rem;
    }

    .error-title {
        font-size: 1.5rem;
    }

    .error-actions .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }
}

/* Mobile Responsiveness for Modern Results */
@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .internal-results-header {
        padding: 1rem 1.5rem;
    }

    .section-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }

    .result-content {
        padding: 1rem;
    }

    .result-footer {
        padding: 1rem;
        flex-direction: column;
        gap: 1rem;
        align-items: stretch;
    }

    .visit-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Enhanced Logo Visibility */
.btn-logo:hover {
    transform: scale(1.05);
    border-color: rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #374151 0%, #1f2937 100%);
}

/* Logo contrast enhancement for white backgrounds */
.btn-logo,
.site-logo-small {
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* Alternative fallback for logos that need extra contrast */
.logo-enhanced {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    padding: 4px !important;
}

.logo-enhanced:hover {
    background: linear-gradient(135deg, #334155 0%, #475569 100%) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
}

/* Failure Reporting Styles */
.failure-report-section {
    margin-top: 2rem;
    border-radius: 0.5rem;
    overflow: hidden;
}

.failure-report-section .alert {
    border: none;
    border-radius: 0.5rem;
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    color: #92400e;
}

.failure-report-section .alert .fas {
    color: #f59e0b;
    font-size: 1.2rem;
}

.failure-report-section .btn-outline-warning {
    border-color: #f59e0b;
    color: #92400e;
    background: rgba(251, 191, 36, 0.1);
    font-weight: 600;
    transition: all 0.2s ease;
}

.failure-report-section .btn-outline-warning:hover {
    background: #f59e0b;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.failure-report-section .btn-close {
    filter: brightness(0.7);
}

/* Modal Styles for Failure Reporting */
.modal-content {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    border-radius: 1rem 1rem 0 0;
    border-bottom: none;
    padding: 1.5rem;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    border-top: 1px solid #e5e7eb;
    padding: 1.5rem 2rem;
}

/* Notification Styles */
.alert.position-fixed {
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    border: none;
    font-weight: 500;
}

.alert-success.position-fixed {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    color: #166534;
    border-left: 4px solid #22c55e;
}

.alert-danger.position-fixed {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

/* Animation for failure report section */
.failure-report-section {
    animation: slideInUp 0.3s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for failure reporting */
@media (max-width: 768px) {
    .failure-report-section .alert {
        flex-direction: column;
        text-align: center;
    }

    .failure-report-section .btn {
        margin-top: 1rem;
        width: 100%;
    }

    .modal-dialog {
        margin: 1rem;
    }

    .modal-body,
    .modal-footer {
        padding: 1rem;
    }
}

/* Live Products Section */
.live-products-section {
    background: white;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.live-products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.live-product-card {
    position: relative;
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.live-product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

.product-image {
    height: 160px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d1d5db;
    font-size: 2.5rem;
}

.product-details {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.product-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: #1f2937;
    margin-bottom: 0.75rem;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.75rem;
    align-items: center;
}

.product-site {
    font-size: 0.8rem;
    color: #6b7280;
    display: flex;
    align-items: center;
}

.product-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: #3b82f6;
}

.product-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.product-availability {
    font-size: 0.8rem;
    display: flex;
    align-items: center;
}

.text-success {
    color: #10b981 !important;
}

.text-danger {
    color: #ef4444 !important;
}

.product-relevance {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.relevance-indicator {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
}

.product-link-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.live-products-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

.placeholder-message {
    text-align: center;
    color: #6b7280;
    max-width: 500px;
    margin: 0 auto;
}

.site-loading-indicators {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    text-align: left;
    max-width: 500px;
    margin: 0 auto;
}

.site-loading-item {
    background-color: #f3f4f6;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #4b5563;
}

.site-loading-item i {
    color: #3b82f6;
}

.loading-indicator {
    display: flex;
    align-items: center;
    color: #6b7280;
    font-size: 0.9rem;
}

.no-products-message {
    text-align: center;
    padding: 3rem 1rem;
    color: #6b7280;
}

.no-products-message i {
    font-size: 2.5rem;
    opacity: 0.3;
    display: block;
}

.all-sites-container {
    max-width: 1000px;
    margin: 0 auto;
}

.site-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    justify-content: center;
}

.site-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px;
    background-color: transparent;
    border-radius: 10px;
    transition: transform 0.2s;
    border: none;
}

.site-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.site-logo-box {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #1f2937 0%, #374151 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 8px;
    padding: 8px;
    border: none;
    box-shadow: none;
    border-radius: 12px;
}

.site-logo-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.site-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: #4b5563;
    text-align: center;
    margin-top: 4px;
    border: none;
    padding: 0;
    background: transparent;
}

.site-spinner {
    position: absolute;
    bottom: 0;
    right: 0;
}

/* Dot pulse animation for each site */
.dot-pulse {
    position: relative;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #3b82f6;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }

    50% {
        transform: scale(1.2);
        opacity: 1;
    }

    100% {
        transform: scale(0.8);
        opacity: 0.8;
    }
}

/* Progress bar styles */
.progress {
    max-width: 600px;
    margin: 0 auto 20px;
    border-radius: 50px;
    background-color: #e2e8f0;
    height: 10px !important;
}

.progress-bar {
    transition: width 0.5s ease;
    border-radius: 50px;
    background: linear-gradient(90deg, #3b82f6 0%, #60a5fa 100%);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

@media (max-width: 992px) {
    .site-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 768px) {
    .site-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 576px) {
    .site-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .site-logo-box {
        width: 75px;
        height: 75px;
    }
}

.site-spinner .fa-check-circle {
    font-size: 18px;
    position: absolute;
    bottom: -5px;
    right: -5px;
    background: white;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    color: #10b981;
}/ *   B e s t   D e a l s   S e c t i o n   * / 
 . b e s t - d e a l s - s e c t i o n   { 
         p a d d i n g :   1 . 5 r e m   0 ; 
 } 
 
 . d e a l - c a r d   { 
         t r a n s i t i o n :   t r a n s f o r m   0 . 2 s   e a s e ,   b o x - s h a d o w   0 . 2 s   e a s e ; 
         b o r d e r :   n o n e ; 
         b o r d e r - r a d i u s :   1 2 p x ; 
         o v e r f l o w :   h i d d e n ; 
 } 
 
 . d e a l - c a r d : h o v e r   { 
         t r a n s f o r m :   t r a n s l a t e Y ( - 5 p x ) ; 
         b o x - s h a d o w :   0   8 p x   2 0 p x   r g b a ( 0 ,   0 ,   0 ,   0 . 1 2 )   ! i m p o r t a n t ; 
 } 
 
 . d e a l - p r i c e   { 
         p a d d i n g :   0 . 5 r e m   0 ; 
         b o r d e r - t o p :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
         b o r d e r - b o t t o m :   1 p x   s o l i d   # e 2 e 8 f 0 ; 
 } 
 
 . d e a l - c a r d   . b a d g e   { 
         f o n t - s i z e :   0 . 7 5 r e m ; 
         p a d d i n g :   0 . 3 5 r e m   0 . 6 5 r e m ; 
 } 
 
 . d e a l - c a r d   . b t n - s m   { 
         f o n t - s i z e :   0 . 8 7 5 r e m ; 
         p a d d i n g :   0 . 5 r e m   1 r e m ; 
 } 
 
 @ m e d i a   ( m a x - w i d t h :   7 6 8 p x )   { 
         . b e s t - d e a l s - s e c t i o n   h 4   { 
                 f o n t - s i z e :   1 . 2 5 r e m ; 
         } 
 } 
 
 
/* Deal Card Images */
.deal-image {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background: #f8f9fa;
    padding: 1rem;
}

.deal-card .card-img-top {
    border-bottom: 1px solid #e2e8f0;
}
