/* AECO Tools & Products Directory - Frontend Styles */
/* Matching AECO.digital gradient design #7bb52b #8ac932 */

.aeco-tools-directory {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
}

/* Stats Grid */
.aeco-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* Featured Companies Showcase */
.aeco-featured-showcase {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border-radius: 16px;
    padding: 32px;
    margin-bottom: 40px;
    box-shadow: 0 4px 16px rgba(123, 181, 43, 0.1);
    border: 2px solid rgba(123, 181, 43, 0.2);
}

.featured-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.featured-icon {
    font-size: 2rem;
    line-height: 1;
}

.featured-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1a1a1a;
    margin: 0;
    background: linear-gradient(135deg, #7bb52b 0%, #8ac932 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.featured-companies-slider {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.featured-company-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.featured-company-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #7bb52b 0%, #8ac932 100%);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.featured-company-card:hover::before {
    transform: scaleX(1);
}

.featured-company-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(123, 181, 43, 0.2);
    border-color: #7bb52b;
}

.featured-logo {
    font-size: 2.5rem;
    min-width: 60px;
    text-align: center;
    line-height: 1;
}

.featured-info {
    flex: 1;
    min-width: 0;
}

.featured-company-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-tagline {
    font-size: 0.85rem;
    color: #6b7280;
    font-style: italic;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-location {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.featured-arrow {
    font-size: 1.5rem;
    color: #7bb52b;
    transition: transform 0.3s ease;
    font-weight: 700;
}

.featured-company-card:hover .featured-arrow {
    transform: translateX(4px);
}

.aeco-stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid #7bb52b;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.aeco-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(123, 181, 43, 0.15);
}

.aeco-stat-card:nth-child(2) { border-left-color: #8ac932; }
.aeco-stat-card:nth-child(3) { border-left-color: #FF6B6B; }
.aeco-stat-card:nth-child(4) { border-left-color: #712baf; }

.stat-label {
    font-size: 0.8rem;
    color: #999;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.stat-detail {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

/* Filter Section */
.aeco-filter-section {
    background: transparent;
    padding: 24px 0;
    margin-bottom: 30px;
    border-radius: 0;
    box-shadow: none;
    max-width: 100%;
    box-sizing: border-box;
}

.aeco-filters {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: flex-end;
    max-width: 1200px;
    margin: 0 auto;
}

.aeco-search-box, .aeco-filter-group, .aeco-sort-group {
    display: flex;
    flex-direction: column;
}

.aeco-search-box label, .aeco-filter-group label, .aeco-sort-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-size: 0.9rem;
}

#aeco-search, select {
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    transition: border-color 0.3s ease;
}

#aeco-search:focus, select:focus {
    outline: none;
    border-color: #7bb52b;
}

.aeco-reset-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #7bb52b 0%, #8ac932 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    height: 46px;
}

.aeco-reset-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 181, 43, 0.3);
}

/* Tools Grid */
.aeco-tools-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 24px;
    margin-bottom: 30px;
}

/* Ensure 2 columns on all desktop screens */
@media (min-width: 769px) {
    .aeco-tools-directory .aeco-tools-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Tool Card */
.aeco-tool-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.aeco-tool-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(123, 181, 43, 0.15);
}

.tool-header {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    padding: 20px 24px;
    border-bottom: none;
    position: relative;
}

.tool-title-row {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 0;
}

.tool-logo {
    font-size: 3rem;
    min-width: 70px;
    text-align: center;
    line-height: 1;
}

.tool-info { 
    flex: 1;
    padding-top: 8px;
}

.tool-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin: 0;
}

.tool-badge { 
    font-size: 1.1rem;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tool-badge.featured {
    background: #fef3c7;
    color: #92400e;
}

.tool-badge.trending {
    background: #fee2e2;
    color: #991b1b;
}

.tool-header h3 {
    margin: 0 0 6px 0;
    font-size: 1.5rem;
    color: #1a1a1a;
    font-weight: 800;
    line-height: 1.2;
}

.tool-tagline {
    color: #6b7280;
    font-size: 0.95rem;
    margin: 0 0 12px 0;
    font-style: italic;
    line-height: 1.4;
}

.tool-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 12px;
}

.tool-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Main Investors */
.main-investors {
    margin-top: 16px;
    background: rgba(167, 139, 250, 0.15);
    padding: 12px 16px;
    border-radius: 8px;
}

/* Badge Container - between investors and description */
.badge-container {
    background: transparent;
    padding: 0;
    margin-top: 16px;
    min-height: auto;
}

.badge-container .tool-badges {
    margin: 0;
}

.investors-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.investors-list {
    font-size: 0.95rem;
    color: #1a1a1a;
    font-weight: 600;
    line-height: 1.5;
}

.tool-body {
    padding: 24px;
    flex: 1;
}

/* Funding and Tags Section */
.funding-tags-section {
    margin-bottom: 24px;
}

.funding-boxes {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.funding-box {
    flex: 1;
    background: rgba(167, 139, 250, 0.15);
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
}

.funding-box-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.funding-box-value {
    font-size: 1rem;
    color: #1a1a1a;
    font-weight: 700;
}

.focus-tags-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.focus-tag {
    padding: 6px 14px;
    background: rgba(167, 139, 250, 0.15);
    border-radius: 20px;
    font-size: 0.85rem;
    color: #6b46c1;
    font-weight: 500;
}

.tool-description {
    color: #444;
    line-height: 1.7;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

/* Products Section */
.products-section {
    margin-bottom: 20px;
}

.products-header {
    font-size: 0.9rem;
    font-weight: 700;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 16px 0;
}

.tool-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.product-item {
    padding: 16px;
    background: #f8f9fb;
    border-radius: 8px;
    margin-bottom: 12px;
    border-left: 3px solid #7bb52b;
}

.product-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.product-name {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 1rem;
    flex: 1;
}

.product-score-audit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.product-score {
    background: linear-gradient(135deg, #7bb52b 0%, #8ac932 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
}

.audit-link {
    color: #7bb52b;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
}

.audit-link:hover {
    color: #6a9e27;
    text-decoration: underline;
}

.product-category {
    color: #7bb52b;
    font-size: 0.85rem;
    font-weight: 600;
}

.product-description {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 8px 0;
}

.product-features {
    list-style: none;
    padding: 0;
    margin: 10px 0 0 0;
}

.product-features li {
    padding: 4px 0 4px 20px;
    position: relative;
    font-size: 0.85rem;
    color: #555;
}

.product-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #7bb52b;
    font-weight: 700;
}

/* Footer */
.tool-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    gap: 12px;
}

.tool-link-btn {
    flex: 1;
    padding: 14px 20px;
    background: linear-gradient(135deg, #7bb52b 0%, #8ac932 100%);
    color: white !important;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none !important;
    text-align: center;
    display: block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.tool-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(123, 181, 43, 0.3);
    color: white !important;
    text-decoration: none !important;
    background: linear-gradient(135deg, #6a9e27 0%, #7ab82e 100%);
}

/* Loading */
.aeco-loading {
    text-align: center;
    padding: 60px 20px;
    grid-column: 1 / -1;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 20px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #7bb52b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Pagination */
.aeco-pagination {
    margin: 40px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.page-btn {
    min-width: 44px;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #e0e0e0;
    background: white;
    color: #666;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.page-btn:hover:not([disabled]):not(.active) {
    border-color: #7bb52b;
    color: #7bb52b;
}

.page-btn.active {
    background: #7bb52b;
    color: white;
    border-color: #7bb52b;
}

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

.page-btn.prev,
.page-btn.next {
    color: #9ca3af;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
}

.page-ellipsis {
    color: #9ca3af;
    padding: 0 4px;
}

/* Responsive */
@media (max-width: 1024px) {
    .aeco-filters {
        grid-template-columns: 1fr 1fr;
    }
    .aeco-search-box, .aeco-reset-btn {
        grid-column: 1 / -1;
    }
    .aeco-tools-grid {
        grid-template-columns: 1fr;
    }
    .featured-companies-slider {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    .aeco-tools-directory { padding: 15px; }
    .aeco-stats-grid { grid-template-columns: 1fr; }
    .aeco-filters { grid-template-columns: 1fr; }
    .aeco-tools-grid { grid-template-columns: 1fr; }
    .featured-companies-slider { grid-template-columns: 1fr; }
    .aeco-featured-showcase { padding: 20px; }
    .featured-title { font-size: 1.4rem; }
}

@media (max-width: 480px) {
    .tool-logo { font-size: 2rem; }
    .tool-header h3 { font-size: 1.2rem; }
    .tool-footer { flex-direction: column; }
    .featured-logo { font-size: 2rem; min-width: 50px; }
    .featured-company-name { font-size: 1rem; }
}
