/**
 * Styles CSS
 * Path: public_html/css/styles.css
 * Version: 3.2.0
 * 
 * Changelog v3.2.0:
 * - ADDED: AI Search CTA button styles (#ai-search-cta) for no-results state
 * - ADDED: .no-results, .no-results-title, .search-term styles
 * 
 * Changelog v3.1.0:
 * - ADDED: Accessibility styles (.sr-only, .skip-link) merged from accessibility.css
 * 
 * Changelog v3.0.0:
 * - REMOVED: .category badge styles (now in badges.css)
 * - KEPT: General layout and tool card structure
 */

/* ============================================
   ACCESSIBILITY UTILITIES
   ============================================ */

/* Screen Reader Only Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 9999;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* ============================================
   GENERAL STYLING
   ============================================ */

body {
    margin: 0;
    padding: 0;
    font-family: 'Roboto', sans-serif;
    color: #333;
    background: #f0f4f8;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Main Layout */
.main {
    display: flex;
    flex: 1;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

/* Main Content Area */
.container {
    flex: 1;
    padding: 20px;
    max-width: 1350px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Tool List */
.tool-list {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: space-between;
}

/* Make the entire tool card clickable */
.tool-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    width: calc(33.33% - 20px);
    height: 100%;
    cursor: pointer;
    position: relative;
    box-sizing: border-box;
}

/* Tool Card */
.tool-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 1px solid #ddd;
    background-color: #fff;
    box-sizing: border-box;
    text-align: center;
    overflow: hidden;
    transition: transform 0.2s ease;
    height: 100%;
}

/* Tool Logo */
.tool-logo {
    margin-bottom: 15px;
}
.tool-logo img {
    width: 100%;
    height: auto;
    display: block;
    max-width: 150px;
    border-radius: 8px;
}

/* Tool Content */
.tool-content {
    padding: 10px;
    width: 100%;
}
.tool-content h2 {
    font-size: 1.2em;
    margin: 10px 0;
}
.tool-content p {
    margin: 5px 0;
}

/* Filters */
.filters { 
    display: flex; 
    flex-wrap: wrap; 
    gap: 10px; 
}

/* Hover effects for tool cards */
.tool-card:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* ============================================
   NO RESULTS STATE WITH AI CTA
   ============================================ */

.no-results {
    text-align: center;
    padding: 3rem 2rem;
    background: #f8f9fa;
    border-radius: 12px;
    margin: 2rem auto;
    max-width: 500px;
    width: 100%;
}

.no-results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 1.5rem 0;
}

.search-term {
    background: #e9ecef;
    padding: 2px 10px;
    border-radius: 4px;
    font-family: monospace;
    color: #495057;
}

/* AI Search CTA Button */
#ai-search-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    overflow: hidden;
    animation: ai-cta-pulse 2s ease-in-out infinite;
    display: inline-block;
}

#ai-search-cta:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.5);
    animation: none;
}

/* Pulse glow animation */
@keyframes ai-cta-pulse {
    0%, 100% {
        box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    }
    50% {
        box-shadow: 0 8px 30px rgba(102, 126, 234, 0.6);
    }
}

/* Shimmer effect */
#ai-search-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: ai-cta-shimmer 3s ease-in-out infinite;
}

@keyframes ai-cta-shimmer {
    0% {
        left: -100%;
    }
    50%, 100% {
        left: 100%;
    }
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top:hover {
    background-color: #005a87;
    transform: translateY(15px) scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 124, 186, 0.4);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 768px) {
    .back-to-top {
        bottom: 15px;
        right: 15px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .main {
        flex-direction: column;
    }
    .container {
        width: 100%;
        padding: 10px;
    }
    .tool-card-link {
        width: calc(50% - 20px);
    }
    
    /* No results - mobile */
    .no-results {
        padding: 2rem 1.5rem;
        margin: 1rem auto;
    }
    
    .no-results-title {
        font-size: 1.25rem;
    }
    
    #ai-search-cta {
        padding: 14px 28px;
        font-size: 1rem;
    }
}

@media screen and (max-width: 480px) {
    .back-to-top {
        bottom: 10px;
        right: 10px;
        width: 44px;
        height: 44px;
        font-size: 14px;
    }
    
    .tool-card-link {
        width: 100%;
    }
    
    /* No results - small mobile */
    .no-results {
        padding: 1.5rem 1rem;
        margin: 0.75rem auto;
    }
    
    .no-results-title {
        font-size: 1.1rem;
        margin-bottom: 1.25rem;
    }
    
    #ai-search-cta {
        padding: 12px 24px;
        font-size: 0.95rem;
        width: 100%;
    }
}