/* ===== GLOBAL STYLES ===== */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --gradient-start: #667eea;
    --gradient-end: #764ba2;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== ERROR UI HIDE ===== */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
    display: none; /* Hide by default */
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Only show if there's an actual error (when ErrorBoundary catches something) */
.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk0IDI2Ny4wNTIgNTIuNzk0IDI2Ny4wNTIgNTIuNzk0IDI2Ny4wNTIgNTIuNzk0IDI4OS4wNzggODQuNTUxNyAyODkuMDc4IDg0LjU1MTcgMjg5LjA3OCA4NC41NTE3IDI4OS4wNzggODQuNTUxN0MyODkuODcgODUuNjAyMiAyOTAgODYuNzY1NSAyOTAgODhDMjkwIDg4LjE5NDcgMjg5Ljk5NSA4OC4zODUyIDI4OS45ODUgODguNTc0MyAyODkuOTg1IDg4LjU3NDMgMjg5Ljk4NSA4OC41NzQzIDI4OS45ODUgODguNTc0M0wyODkuOTg1IDg4LjU3NDMgMjg5LjQzMyA5My42NTcgMjg5LjQzMyA5My42NTcgMjg5LjQzMyA5My42NTcgMjg5LjQzMyA5My42NTcgMjg4Ljg1MSA5OC43MzkgMjg4Ljg1MSA5OC43MzkgMjg4Ljg1MSA5OC43MzkgMjg4Ljg1MSA5OC43MzkgMjYzLjUwNiA1MVoiIGZpbGw9IiNGRkQ3MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIgZmlsbC1vcGFjaXR5PSIxIi8+PC9nPjwvc3ZnPg==) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}

/* ===== Development-only: Suppress false error notifications ===== */
@media (prefers-color-scheme: dark), (prefers-color-scheme: light) {
    /* In development, hide the reconnection error UI as it causes false positives */
    #blazor-error-ui[style*="display: block"] {
        display: none !important;
    }
}

/* ===== HERO SECTION ===== */
.hero-section {
    position: relative;
    min-height: 500px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    color: white;
    padding: 80px 0;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.5rem;
    opacity: 0.95;
    margin-bottom: 2rem;
}

/* ===== SEARCH BOX ===== */
.search-box {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 900px;
    margin: 0 auto;
}

.search-box .form-control {
    border: 2px solid #e0e0e0;
    height: 56px;
    font-size: 1.05rem;
}

.search-box .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.search-box .btn {
    height: 56px;
    font-weight: 600;
}

.search-box .input-group-lg .btn {
    padding: 0.5rem 1rem;
    font-size: 1.25rem;
}

.search-box .btn-outline-secondary {
    border-color: #e0e0e0;
    border-left: none;
    border-width: 2px;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.search-box .btn-outline-secondary:hover:not(:disabled) {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.search-box .btn-outline-secondary:disabled {
    opacity: 0.6;
}

.search-box .input-group .form-control {
    border-right: none;
}

.search-box .input-group:focus-within .form-control {
    border-color: var(--primary-color);
}

.search-box .input-group:focus-within .btn-outline-secondary {
    border-color: var(--primary-color);
}

/* ===== POPULAR CATEGORIES ===== */
.popular-categories {
    color: white;
}

.category-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.6rem 1.2rem;
    font-size: 0.95rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.category-badge:hover {
    background: white;
    color: var(--gradient-end);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.category-badge .badge {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
    font-weight: 600;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    background: #f8f9fa;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===== HOVER CARDS ===== */
.hover-card {
    transition: all 0.3s ease;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15) !important;
}

/* ===== LOCATION MATCH CARDS ===== */
.location-match-card {
    border: 2px solid var(--primary-color);
    position: relative;
}

.location-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--primary-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.location-badge i {
    font-size: 0.9rem;
}

.serves-location-badge {
    position: absolute;
    top: 45px;
    right: 10px;
    background: var(--success-color);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 600;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.serves-location-badge i {
    font-size: 0.85rem;
}

.distance-info {
    color: var(--primary-color);
    font-weight: 600;
}

/* ===== AUTOCOMPLETE ===== */
.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-height: 400px;
    overflow-y: auto;
    z-index: 1000;
    margin-top: -1px;
}

.autocomplete-section {
    border-bottom: 1px solid #f0f0f0;
}

.autocomplete-section:last-child {
    border-bottom: none;
}

.autocomplete-section-title {
    padding: 0.5rem 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: #6c757d;
    background: #f8f9fa;
}

.autocomplete-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #333;
}

.autocomplete-item:hover {
    background-color: #f0f7ff;
    color: var(--primary-color);
}

.autocomplete-item i {
    font-size: 1rem;
    opacity: 0.7;
}

.autocomplete-dropdown::-webkit-scrollbar {
    width: 8px;
}

.autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* ===== SEARCH PREVIEW PANEL ===== */
.search-preview-panel {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 15px 15px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    margin-top: 1rem;
    z-index: 999;
    max-height: 600px;
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.preview-header h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.preview-header button {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.preview-header button:hover {
    background: var(--primary-color);
    color: white;
}

.preview-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    max-height: 450px;
    overflow-y: auto;
}

.preview-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    text-align: center;
    background: #f8f9fa;
}

.preview-footer .btn {
    min-width: 200px;
}

/* ===== AD CARD COMPONENT ===== */
.ad-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    border: 2px solid transparent;
}

.ad-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.ad-card.location-match-card {
    border-color: var(--primary-color);
}

.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 180px;
    background: #f5f5f5;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ad-card:hover .card-image {
    transform: scale(1.05);
}

.card-image-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #ccc;
    font-size: 3rem;
}

.ad-card-body {
    padding: 1rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-badge {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.ad-card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0.5rem 0;
    line-height: 1.3;
    color: #333;
    min-height: 2.6rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.company-name {
    font-size: 0.875rem;
    color: #666;
    margin: 0.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.company-name i {
    font-size: 1rem;
}

.ad-card-description {
    font-size: 0.875rem;
    color: #666;
    margin: 0.5rem 0;
    flex-grow: 1;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ad-card-meta {
    display: flex;
    gap: 1rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f0f0f0;
}

.meta-item {
    font-size: 0.8rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.meta-item i {
    font-size: 0.9rem;
}

.ad-card-actions {
    margin-top: 1rem;
}

.ad-card-actions .btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
}

/* ===== COMPACT CARD VARIANT ===== */
.ad-card.compact {
    flex-direction: row;
    height: auto;
}

.ad-card.compact .card-image-wrapper {
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.ad-card.compact .ad-card-body {
    padding: 0.75rem;
}

.ad-card.compact .ad-card-title {
    font-size: 1rem;
    min-height: auto;
}

.ad-card.compact .ad-card-description {
    -webkit-line-clamp: 2;
}

/* ===== RESPONSIVE GRID ===== */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 1200px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
    
    .preview-cards {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 768px) {
    .results-grid {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
    }
    
    .preview-cards {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 1rem;
        padding: 1rem;
    }
    
    .search-preview-panel {
        margin-top: 0.5rem;
    }
    
    .card-image-wrapper {
        height: 150px;
    }
}

@media (max-width: 576px) {
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .preview-cards {
        grid-template-columns: 1fr;
    }
    
    .ad-card.compact {
        flex-direction: column;
    }
    
    .ad-card.compact .card-image-wrapper {
        width: 100%;
        height: 150px;
    }
}

/* ===== AUTHENTICATION PAGES ===== */
.auth-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.register-container {
    padding: 3rem 1rem;
}

.register-container .auth-card {
    max-width: 700px;
    width: 100%;
}

.auth-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 2.5rem;
    width: 100%;
    max-width: 450px;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    color: #333;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-footer {
    margin-top: 1.5rem;
}

.auth-container .input-group-text {
    background: #f8f9fa;
    border-right: none;
}

.auth-container .input-group .form-control {
    border-left: none;
}

.auth-container .input-group:focus-within .input-group-text {
    border-color: var(--primary-color);
    background: #e7f1ff;
}

.auth-container .input-group:focus-within .form-control {
    border-color: var(--primary-color);
}

/* ===== AUTH RESPONSIVE ===== */
@media (max-width: 768px) {
    .auth-container {
        padding: 1.5rem 1rem;
        min-height: calc(100vh - 150px);
    }

    .register-container {
        padding: 2rem 1rem;
    }

    .auth-card {
        padding: 2rem 1.5rem;
        border-radius: 15px;
        max-width: 100%;
    }

    .register-container .auth-card {
        max-width: 100%;
    }

    .auth-header h2 {
        font-size: 1.75rem;
    }

    .auth-header p {
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .auth-container {
        padding: 1rem 0.5rem;
    }

    .auth-card {
        padding: 1.5rem 1rem;
        border-radius: 10px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .auth-header {
        margin-bottom: 1.5rem;
    }

    .auth-header h2 {
        font-size: 1.5rem;
    }

    .auth-header p {
        font-size: 0.85rem;
    }

    .auth-footer {
        margin-top: 1rem;
    }

    .auth-footer p {
        font-size: 0.9rem;
    }
}

/* ===== LOADING STATES ===== */
.skeleton-card {
    background: #f5f5f5;
    border-radius: 12px;
    overflow: hidden;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.skeleton-image {
    height: 180px;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 0.5rem 0;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-text.medium {
    width: 80%;
}

/* ===== SCROLL TRIGGER ===== */
.scroll-trigger {
    padding: 2rem;
    text-align: center;
}

.scroll-trigger .spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ===== AD DETAILS PAGE ===== */
.ad-details-container {
    min-height: calc(100vh - 60px);
}

.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
}

/* Hero Section */
.ad-hero-section {
    position: relative;
    height: 400px;
    overflow: hidden;
}

.ad-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.ad-hero-placeholder {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-hero-placeholder i {
    font-size: 8rem;
    color: rgba(255, 255, 255, 0.3);
}

.ad-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.6));
}

.ad-hero-content {
    position: relative;
    z-index: 10;
    height: 100%;
    display: flex;
    align-items: flex-end;
    padding-bottom: 2rem;
}

.ad-hero-content .container {
    width: 100%;
}

.back-button {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9) !important;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.back-button:hover {
    background: rgba(255, 255, 255, 1) !important;
    transform: translateX(-5px);
}

.ad-header-info {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.category-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
}

.status-badge.active {
    background: var(--success-color);
    color: white;
}

.status-badge.inactive {
    background: var(--secondary-color);
    color: white;
}

.ad-title {
    color: white;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.5);
    margin-bottom: 1rem;
}

.ad-meta-info {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.ad-meta-info .meta-item {
    color: white;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.5);
}

.ad-meta-info .meta-item i {
    font-size: 1.1rem;
}

/* Content Section */
.ad-content-section {
    padding: 3rem 15px;
    max-width: 1200px;
}

.detail-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 2rem;
    overflow: hidden;
}

.detail-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.detail-card-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.detail-card-header h3 i {
    color: var(--primary-color);
}

.detail-card-body {
    padding: 1.5rem;
}

.description-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #333;
    margin: 0;
}

.service-details-text {
    font-size: 1rem;
    line-height: 1.8;
    color: #555;
    white-space: pre-line;
    margin: 0;
}

/* Contact Card */
.contact-card {
    position: sticky;
    top: 20px;
}

.contact-info {
    margin-bottom: 1.5rem;
}

.company-name {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.company-name i {
    font-size: 2rem;
    color: white;
}

.company-name div {
    flex: 1;
}

.company-name label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.25rem;
}

.company-name span {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-item div {
    flex: 1;
}

.contact-item label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
    margin-bottom: 0.25rem;
}

.contact-link {
    display: block;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-link:hover {
    color: var(--primary-color);
}

.contact-actions {
    margin-top: 1.5rem;
}

.contact-actions .btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
}

/* Info Card */
.info-card {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.5);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #555;
    font-size: 0.9rem;
}

.info-value {
    font-weight: 500;
    color: #333;
    font-size: 1rem;
}

/* ===== AD DETAILS RESPONSIVE ===== */
@media (max-width: 992px) {
    .ad-hero-section {
        height: 350px;
    }

    .ad-title {
        font-size: 2rem;
    }

    .contact-card {
        position: relative;
        top: 0;
    }

    .ad-content-section {
        padding: 2rem 15px;
    }
}

@media (max-width: 768px) {
    .ad-hero-section {
        height: 300px;
    }

    .ad-title {
        font-size: 1.75rem;
    }

    .ad-meta-info {
        gap: 1rem;
    }

    .ad-meta-info .meta-item {
        font-size: 0.9rem;
    }

    .detail-card-header h3 {
        font-size: 1.1rem;
    }

    .description-text {
        font-size: 1rem;
    }

    .company-name span {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .ad-hero-section {
        height: 250px;
    }

    .ad-hero-content {
        padding-bottom: 1rem;
    }

    .ad-title {
        font-size: 1.5rem;
    }

    .ad-meta-info {
        flex-direction: column;
        gap: 0.5rem;
    }

    .category-badge,
    .status-badge {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }

    .detail-card-header,
    .detail-card_body {
        padding: 1rem;
    }

    .contact-actions .btn {
        padding: 0.65rem 1rem;
    }

    .ad-content-section {
        padding: 1.5rem 15px;
    }
}

/* ===== NAVBAR ===== */
.navbar {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.navbar-brand {
    font-size: 1.5rem;
}

.navbar-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.05);
}

.brand-text {
    background: linear-gradient(135deg, #0066cc 0%, #00ccff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    line-height: 1.2;
}

.brand-tagline {
    font-size: 0.65rem;
    color: #6c757d;
    font-weight: 500;
    letter-spacing: 0.3px;
    margin-top: -2px;
    display: block;
}

.footer-brand {
    background: linear-gradient(135deg, #00ccff 0%, #0066cc 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
    font-weight: 600;
}

/* ===== HERO SECTION TAGLINE ===== */
.hero-tagline {
    font-size: 1.1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.95);
    margin-top: 0.5rem;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 25px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-tagline i {
    font-size: 1.2rem;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    margin-top: auto;
}

.footer-main {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-brand-section {
    padding-right: 2rem;
}

.footer-logo {
    height: 60px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.footer-brand {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.footer-tagline {
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.footer-tagline i {
    font-size: 1rem;
}

.footer-description {
    font-size: 0.9rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 1.5rem;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-social a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.footer-heading {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
    color: white;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #00ccff 0%, transparent 100%);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
    text-decoration: underline;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
    padding: 1.5rem 0;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.8);
}

.footer-community-text {
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.footer-community-text i {
    animation: heartbeat 1.5s ease-in-out infinite;
}

@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

@media (max-width: 768px) {
    .navbar-logo {
        height: 40px;
    }
    
    .navbar-brand span {
        font-size: 1.25rem;
    }
    
    .brand-tagline {
        font-size: 0.55rem;
    }
    
    .hero-tagline {
        font-size: 0.95rem;
        padding: 0.4rem 1rem;
    }
    
    .footer-brand-section {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    
    .footer-logo {
        height: 50px;
    }
    
    .footer-heading {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }
    
    .footer-links {
        margin-bottom: 1.5rem;
    }
    
    .footer-community-text {
        justify-content: center;
        margin-top: 0.5rem;
    }
}

@media (max-width: 576px) {
    .navbar-logo {
        height: 35px;
    }
    
    .hero-tagline {
        font-size: 0.85rem;
        padding: 0.35rem 0.8rem;
    }
    
    .footer-logo {
        height: 45px;
    }
    
    .footer-brand {
        font-size: 1.25rem;
    }
    
    .footer-tagline {
        font-size: 0.75rem;
    }
    
    .footer-social {
        justify-content: center;
        margin-bottom: 1rem;
    }
}

/* ===== FLYER VIEWER ===== */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.flyer-viewer {
    animation: slideDown 0.3s ease-out;
}

.pdf-viewer-container,
.image-viewer-container {
    border-radius: 8px;
    overflow: hidden;
}

.pdf-viewer {
    width: 100%;
    height: 600px;
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.flyer-image {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    cursor: zoom-in;
    transition: transform 0.3s ease;
}

.flyer-image:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .pdf-viewer {
        height: 400px;
    }
}
