/* ============================================
   HOMEPAGE CARDS - Twin Card Layout
   ============================================ */

/* Main Container */
.homepage-cards-section {
    padding-bottom: 10px;
    margin: 0 auto;
    margin-bottom: 0;
}

.homepage-cards-row {
    display: flex;
    gap: 15px;
    align-items: stretch;
    margin: 0 15px;
}

.homepage-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 260px;
    max-height: 260px;
}

/* News card takes more space */
.news-ticker-card {
    flex: 1.4;
    padding: 15px;
}

.features-card {
    flex: 1;
}

.news-ticker-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3498db;
}

.news-ticker-header svg {
    color: #3498db;
    width: 20px;
    height: 20px;
}

.news-ticker-header h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.news-ticker-status {
    font-size: 0.7rem;
    color: #94a3b8;
    margin-left: auto;
}

/* News Ticker Container */
.news-ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    margin-bottom: 10px;
    max-height: 150px;
}

.news-ticker-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
    animation: tickerScroll 25s linear infinite;
}

.news-ticker-wrapper:hover {
    animation-play-state: paused;
}

@keyframes tickerScroll {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

/* Individual News Item */
.news-ticker-item {
    display: flex;
    gap: 10px;
    padding: 6px;
    background: #f8fafc;
    border-radius: 6px;
    transition: background 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.news-ticker-item:hover {
    background: #e0f2fe;
}

.news-ticker-thumb {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-ticker-thumb-placeholder {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: linear-gradient(135deg, #3498db 0%, #8e44ad 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    flex-shrink: 0;
}

.news-ticker-content {
    flex: 1;
    min-width: 0;
}

.news-ticker-title {
    font-size: 0.92rem;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 2px 0;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-ticker-meta {
    font-size: 0.65rem;
    color: #64748b;
    margin: 0;
}

/* Loading skeleton */
.news-ticker-skeleton {
    display: flex;
    gap: 8px;
    padding: 6px;
    background: #f8fafc;
    border-radius: 6px;
}

.skeleton-thumb {
    width: 40px;
    height: 40px;
    border-radius: 5px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

.skeleton-text {
    flex: 1;
}

.skeleton-line {
    height: 10px;
    background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 3px;
    margin-bottom: 6px;
}

.skeleton-line:last-child {
    width: 50%;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Blog Button */
.news-ticker-footer {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
}

.blog-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease;
}

.blog-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #1a5276 100%);
    color: white;
}

/* ============================================
   RIGHT CARD - Tools Count, Voice Search, LLM Pricing
   ============================================ */
.features-card {
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Tools Count Section */
.tools-count-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    padding: 14px 18px;
    text-align: center;
    color: white;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: cardPulse 2.5s ease-in-out infinite;
}

@keyframes cardPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.tools-count-box:hover {
    opacity: 0.95;
    animation-play-state: paused;
}

.tools-count-number {
    font-size: 1.8rem;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.tools-count-label {
    font-size: 0.95rem;
    font-weight: 600;
    opacity: 0.95;
}

.tools-count-dots {
    font-size: 0.95rem;
    font-weight: 600;
    animation: dotsBlink 1.5s infinite;
}

@keyframes dotsBlink {
    0%, 20% { opacity: 0.3; }
    40% { opacity: 0.6; }
    60% { opacity: 1; }
    80%, 100% { opacity: 0.3; }
}

/* Bottom Section - Voice Search & LLM Pricing */
.features-bottom-row {
    display: flex;
    gap: 10px;
    flex: 1;
}

.feature-box {
    flex: 1;
    border-radius: 8px;
    padding: 12px 10px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    color: inherit;
}

.feature-box:hover {
    opacity: 0.95;
}

/* Voice Search Box */
.voice-search-box {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
}

.voice-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.voice-icon-wrapper svg {
    width: 20px;
    height: 20px;
}

.feature-box-title {
    font-size: 0.9rem;
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.feature-box-subtitle {
    font-size: 0.65rem;
    opacity: 0.85;
    margin: 0;
}

/* LLM Pricing Box */
.llm-pricing-box {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.llm-icon-wrapper {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: iconPulse 2s ease-in-out infinite;
    animation-delay: 0.3s;
}

.llm-icon-wrapper svg {
    width: 20px;
    height: 20px;
}

/* ============================================
   VOICE SEARCH MODAL
   ============================================ */
.voice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.voice-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.voice-modal {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    transform: scale(0.8);
    transition: all 0.3s ease;
}

.voice-modal-overlay.active .voice-modal {
    transform: scale(1);
}

.voice-modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #64748b;
}

.voice-modal-icon {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    position: relative;
}

.voice-modal-icon.listening {
    animation: pulse-mic 1s infinite;
}

@keyframes pulse-mic {
    0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(17, 153, 142, 0.4); }
    50% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(17, 153, 142, 0); }
}

.voice-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

.voice-modal-status {
    font-size: 1rem;
    color: #64748b;
    margin-bottom: 20px;
}

.voice-modal-transcript {
    background: #f8fafc;
    border-radius: 10px;
    padding: 15px;
    min-height: 60px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #1e293b;
}

.voice-modal-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 30px;
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.voice-modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

.voice-modal-btn.cancel {
    background: #e2e8f0;
    color: #64748b;
}

.voice-modal-btn.cancel:hover {
    background: #cbd5e1;
    box-shadow: none;
}

.voice-not-supported {
    color: #ef4444;
    font-size: 0.9rem;
}

/* ============================================
   DARK MODE
   ============================================ */
body.dark-mode .homepage-card {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .news-ticker-header h4 {
    color: #f1f5f9;
}

body.dark-mode .news-ticker-item {
    background: #0f172a;
}

body.dark-mode .news-ticker-item:hover {
    background: #1e3a5f;
}

body.dark-mode .news-ticker-title {
    color: #f1f5f9;
}

body.dark-mode .news-ticker-meta {
    color: #94a3b8;
}

body.dark-mode .news-ticker-footer {
    border-top-color: #334155;
}

body.dark-mode .skeleton-thumb,
body.dark-mode .skeleton-line {
    background: linear-gradient(90deg, #334155 25%, #475569 50%, #334155 75%);
    background-size: 200% 100%;
}

body.dark-mode .tools-count-number {
    color: #ff7b7b;
}

body.dark-mode .blog-btn {
    background: linear-gradient(135deg, #4a90c2 0%, #357abd 100%);
    color: #fff;
}

body.dark-mode .blog-btn:hover {
    background: linear-gradient(135deg, #357abd 0%, #2a5d8f 100%);
}

body.dark-mode .voice-modal {
    background: #1e293b;
}

body.dark-mode .voice-modal-title {
    color: #f1f5f9;
}

body.dark-mode .voice-modal-transcript {
    background: #0f172a;
    color: #f1f5f9;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 992px) {
    .homepage-cards-row {
        flex-direction: column;
    }
    
    .homepage-card {
        min-height: auto;
        max-height: none;
    }
    
    .news-ticker-card {
        flex: 1;
    }
    
    .news-ticker-container {
        max-height: 200px;
    }
}

@media (max-width: 576px) {
    .homepage-cards-section {
        padding: 10px 0;
    }
    
    .homepage-cards-row {
        margin: 0 10px;
        gap: 10px;
    }
    
    .tools-count-number {
        font-size: 1.4rem;
    }
    
    .features-bottom-row {
        flex-direction: row;
    }
    
    .feature-box {
        padding: 10px 8px;
    }
}
