/*
 * AI Directory Plugin Styles
 * Version: 1.0.0
 */

/* ==========================================================================
   Directory Wrapper
   ========================================================================== */
.ai-directory-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.ai-directory-hero {
    text-align: center;
    margin-bottom: 50px;
}

.ai-directory-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #1a1a1a;
}

.ai-directory-subtitle {
    font-size: 24px;
    color: #4a5568;
    margin-bottom: 10px;
    font-weight: 500;
}

.ai-directory-description {
    font-size: 16px;
    color: #718096;
    margin-bottom: 30px;
}

/* ==========================================================================
   Search Bar
   ========================================================================== */
.ai-directory-search-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.ai-directory-search {
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.ai-directory-search:focus-within {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

.ai-directory-search-input {
    flex: 1;
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.ai-directory-search-btn {
    background: #4299e1;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
    color: #fff;
}

.ai-directory-search-btn:hover {
    background: #3182ce;
}

.ai-directory-search-btn svg {
    width: 20px;
    height: 20px;
}

/* ==========================================================================
   Category Filters
   ========================================================================== */
.ai-directory-filters {
    margin-bottom: 40px;
}

.ai-directory-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.ai-category-btn {
    padding: 10px 20px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #4a5568;
}

.ai-category-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
}

.ai-category-btn.active {
    background: #4299e1;
    border-color: #4299e1;
    color: #fff;
}

/* ==========================================================================
   Loading Indicator
   ========================================================================== */
.ai-directory-loading {
    text-align: center;
    padding: 40px;
}

.ai-directory-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #e2e8f0;
    border-top-color: #4299e1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* ==========================================================================
   Website Cards Grid
   ========================================================================== */
.ai-directory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.ai-website-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-website-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: #cbd5e0;
}

.ai-website-card-image {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f7fafc;
}

.ai-website-card-image a {
    display: block;
    width: 100%;
    height: 100%;
}

.ai-website-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ai-website-card:hover .ai-website-thumbnail {
    transform: scale(1.05);
}

.ai-website-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.ai-website-placeholder svg {
    opacity: 0.3;
}

.ai-website-categories {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.ai-website-category-badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 600;
    color: #4299e1;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-website-card-content {
    padding: 20px;
}

.ai-website-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.ai-website-card-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.ai-website-card-title a:hover {
    color: #4299e1;
}

.ai-website-card-description {
    color: #718096;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.ai-website-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e2e8f0;
}

.ai-website-view-details {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #4299e1;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.ai-website-view-details:hover {
    gap: 8px;
    color: #3182ce;
}

.ai-website-visit-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #f7fafc;
    border-radius: 8px;
    color: #4a5568;
    transition: all 0.3s ease;
}

.ai-website-visit-link:hover {
    background: #4299e1;
    color: #fff;
}

/* ==========================================================================
   No Results
   ========================================================================== */
.ai-directory-no-results {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    background: #f7fafc;
    border-radius: 12px;
}

.ai-directory-no-results p {
    font-size: 18px;
    color: #718096;
}

/* ==========================================================================
   Single Website Page
   ========================================================================== */
.ai-website-single-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ai-website-single-container {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}

.ai-website-single-header {
    padding: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.ai-website-single-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.ai-website-back-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.ai-website-back-link:hover {
    color: #fff;
    gap: 8px;
}

.ai-website-single-categories {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-website-single-category {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.ai-website-single-title {
    font-size: 42px;
    margin: 0 0 15px 0;
    font-weight: 700;
}

.ai-website-single-description {
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.95;
    line-height: 1.6;
}

.ai-website-single-actions {
    margin-top: 30px;
}

.ai-website-visit-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #667eea;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ai-website-visit-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.ai-website-single-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    padding: 40px;
}

.ai-website-single-main h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.ai-website-single-image,
.ai-website-single-about,
.ai-website-single-features {
    margin-bottom: 40px;
}

.ai-website-single-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.ai-website-single-text {
    color: #4a5568;
    line-height: 1.8;
    font-size: 16px;
}

.ai-website-features-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ai-website-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
    color: #4a5568;
    font-size: 15px;
}

.ai-website-features-list li:last-child {
    border-bottom: none;
}

.ai-website-features-list li svg {
    color: #48bb78;
    flex-shrink: 0;
}

.ai-website-single-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.ai-website-info-card {
    background: #f7fafc;
    padding: 25px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.ai-website-info-card h3 {
    font-size: 18px;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.ai-website-info-item {
    margin-bottom: 20px;
}

.ai-website-info-item:last-child {
    margin-bottom: 0;
}

.ai-website-info-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #718096;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ai-website-info-link {
    color: #4299e1;
    text-decoration: none;
    word-break: break-all;
}

.ai-website-info-link:hover {
    text-decoration: underline;
}

.ai-website-info-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-website-info-category {
    background: #fff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    color: #4a5568;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.3s ease;
}

.ai-website-info-category:hover {
    border-color: #4299e1;
    color: #4299e1;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */
@media (max-width: 1024px) {
    .ai-website-single-content {
        grid-template-columns: 1fr;
    }
    
    .ai-website-single-sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    .ai-directory-title {
        font-size: 36px;
    }
    
    .ai-directory-subtitle {
        font-size: 20px;
    }
    
    .ai-directory-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 20px;
    }
    
    .ai-website-single-title {
        font-size: 32px;
    }
    
    .ai-website-single-content {
        padding: 25px;
    }
}

@media (max-width: 480px) {
    .ai-directory-wrapper {
        padding: 20px 15px;
    }
    
    .ai-directory-title {
        font-size: 28px;
    }
    
    .ai-directory-grid {
        grid-template-columns: 1fr;
    }
    
    .ai-website-single-header {
        padding: 25px 20px;
    }
    
    .ai-website-single-title {
        font-size: 26px;
    }
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.ai-directory-pagination-wrapper {
    margin-top: 50px;
    display: flex;
    justify-content: center;
}

.ai-directory-pagination {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ai-page-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border: 2px solid #e2e8f0;
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #4a5568;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.ai-page-btn:hover {
    border-color: #cbd5e0;
    background: #f7fafc;
    transform: translateY(-2px);
}

.ai-page-btn.active {
    background: #4299e1;
    border-color: #4299e1;
    color: #fff;
    font-weight: 600;
}

.ai-page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.ai-page-btn:disabled:hover {
    transform: none;
    border-color: #e2e8f0;
    background: #fff;
}

.ai-page-prev,
.ai-page-next {
    padding: 0 16px;
}

.ai-page-dots {
    color: #cbd5e0;
    padding: 0 5px;
    font-weight: bold;
}

/* Results count */
.ai-directory-results-info {
    text-align: center;
    margin-bottom: 20px;
    color: #718096;
    font-size: 14px;
}

@media (max-width: 768px) {
    .ai-directory-pagination {
        gap: 6px;
    }
    
    .ai-page-btn {
        min-width: 36px;
        height: 36px;
        font-size: 13px;
    }
    
    .ai-page-prev,
    .ai-page-next {
        padding: 0 12px;
    }
}
