/* FRESH-AI.news — Styles v1.0 */

:root {
    --bg: #0a0a0f;
    --bg-card: #13131a;
    --bg-elevated: #1a1a24;
    --text: #e4e4e9;
    --text-muted: #8888a0;
    --accent: #6c5ce7;
    --accent-glow: #a29bfe;
    --border: #2a2a3a;
    --radius: 12px;
    --font: 'Segoe UI', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
    text-align: center;
}

.main-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px;
}

/* Floating Logo */
.floating-logo {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
    opacity: 0.7;
    transition: opacity 0.3s;
    cursor: pointer;
}
.floating-logo:hover {
    opacity: 1;
}
.floating-logo img {
    height: 240px;
    width: auto;
}
.floating-logo.hidden {
    opacity: 0;
    pointer-events: none;
}
.main-nav a {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    transition: all 0.2s;
}
.main-nav a:hover {
    color: var(--text);
    background: var(--bg-elevated);
}

/* Hero */
.hero {
    text-align: center;
    padding: 48px 0 32px;
}
.hero h1 {
    font-size: 40px;
    line-height: 1.2;
    margin-bottom: 12px;
}
.highlight {
    color: var(--accent);
    text-shadow: 0 0 18px var(--accent-glow);
}
.hero-sub {
    color: var(--text-muted);
    font-size: 16px;
}

/* Stats */
.stats-bar {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 32px;
    flex-wrap: wrap;
}
.stat {
    text-align: center;
}
.stat-value {
    display: block;
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-glow);
}
.stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Tema Grid */
.tema-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
    margin-bottom: 40px;
}
@media (max-width: 700px) {
    .tema-grid { grid-template-columns: repeat(3, 1fr); }
}
.tema-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 12px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    transition: all 0.2s;
}
.tema-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.tema-icon { font-size: 28px; display: block; margin-bottom: 6px; }
.tema-name { font-size: 13px; }

/* Video Grid */
.video-section { padding-bottom: 40px; }
.video-section h2 {
    font-size: 22px;
    margin-bottom: 20px;
}

.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
}

.video-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
}
.video-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.video-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 170px;
    background: var(--bg-elevated);
    position: relative;
    text-decoration: none;
}
.play-icon {
    font-size: 40px;
    color: var(--accent);
    opacity: 0.8;
    transition: opacity 0.2s;
}
.video-thumb:hover .play-icon { opacity: 1; }
.video-tema {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0,0,0,0.7);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
}

.video-info {
    padding: 14px 16px;
}
.video-info h3 {
    font-size: 15px;
    margin-bottom: 8px;
}
.video-info h3 a {
    color: var(--text);
    text-decoration: none;
}
.video-info h3 a:hover { color: var(--accent-glow); }

.video-meta {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
    display: flex;
    gap: 12px;
}
.video-stats {
    font-size: 13px;
    color: var(--text-muted);
    display: flex;
    gap: 14px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.empty-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.empty-state h3 { margin-bottom: 8px; }
.empty-state p { color: var(--text-muted); max-width: 400px; margin: 0 auto 4px; }
.empty-hint { font-size: 13px; margin-top: 8px; }

/* How it works */
.about-preview {
    padding: 40px 0;
}
.about-preview h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
}
.how-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 700px) {
    .how-grid { grid-template-columns: 1fr; }
}
.how-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
}
.how-icon { font-size: 32px; display: block; margin-bottom: 10px; }
.how-card h3 { font-size: 16px; margin-bottom: 8px; }
.how-card p { font-size: 13px; color: var(--text-muted); }

.about-link {
    text-align: center;
    margin-top: 24px;
}
.about-link a {
    color: var(--accent-glow);
    text-decoration: none;
}

/* About page */
.about-hero {
    text-align: center;
    padding: 48px 0 24px;
}
.about-hero h1 { font-size: 38px; margin-bottom: 10px; }

.about-content {
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 48px;
}
.about-content h2 {
    font-size: 22px;
    margin: 32px 0 12px;
    color: var(--accent-glow);
}
.about-content p {
    margin-bottom: 12px;
    color: var(--text-muted);
}
.about-content ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 12px;
}
.about-content li {
    padding: 4px 0;
    color: var(--text-muted);
}

.tema-list {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
.tema-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    text-align: center;
}
.tema-big-icon { font-size: 24px; display: block; margin-bottom: 4px; }

/* Footer */
.site-footer {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    padding: 40px 0 20px;
    margin-top: 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 24px;
}
@media (max-width: 600px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer-col h3 { font-size: 18px; margin-bottom: 8px; }
.footer-col h4 { font-size: 14px; margin-bottom: 8px; color: var(--accent-glow); }
.footer-col p { font-size: 13px; color: var(--text-muted); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 4px; }
.footer-col a {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 13px;
}
.footer-col a:hover { color: var(--text); }
.footer-small { font-size: 11px; margin-top: 8px; }
.footer-small a { color: var(--accent-glow); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

/* Newsletter Footer */
.newsletter-section {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}
.newsletter-section h3 {
    font-size: 18px;
    margin-bottom: 6px;
}
.newsletter-section p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 12px;
}
.newsletter-form-footer {
    display: flex;
    gap: 8px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}
.newsletter-form-footer input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--text);
    font-size: 14px;
}
.newsletter-form-footer input:focus {
    outline: none;
    border-color: var(--accent);
}
.newsletter-msg {
    font-size: 13px;
    margin-top: 8px;
}
.newsletter-msg.success { color: #4caf50; }
.newsletter-msg.error { color: #ff4646; }

/* Contact form */
.contact-hero {
    text-align: center;
    padding: 48px 0 24px;
}
.contact-hero h1 { font-size: 38px; margin-bottom: 10px; }

.contact-form-section {
    max-width: 600px;
    margin: 0 auto 48px;
}

.contact-form {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
}
.form-group {
    margin-bottom: 20px;
}
.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
}
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.btn {
    display: inline-block;
    padding: 10px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-glow);
    transform: translateY(-1px);
}

.form-success {
    text-align: center;
    padding: 48px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}
.form-success .success-icon { font-size: 48px; display: block; margin-bottom: 16px; }
.form-success h2 { margin-bottom: 8px; }
.form-success p { color: var(--text-muted); margin-bottom: 24px; }

.form-error {
    background: rgba(255, 70, 70, 0.1);
    border: 1px solid rgba(255, 70, 70, 0.3);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #ff4646;
    font-size: 14px;
}

/* Misc */
code {
    background: var(--bg-elevated);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}

/* ===== Blog Page ===== */
.blog-hero {
    text-align: center;
    padding: 48px 0 24px;
}
.blog-hero h1 { font-size: 38px; margin-bottom: 10px; }

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
    padding-bottom: 48px;
}

.blog-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
}
.blog-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.blog-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}
.blog-card-tag {
    display: inline-block;
    font-size: 11px;
    padding: 3px 10px;
    background: var(--accent);
    color: #fff;
    border-radius: 12px;
    margin-bottom: 10px;
    align-self: flex-start;
}
.blog-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.3;
}
.blog-card h3 a { color: var(--text); text-decoration: none; }
.blog-card h3 a:hover { color: var(--accent-glow); }
.blog-card p {
    color: var(--text-muted);
    font-size: 14px;
    flex: 1;
    margin-bottom: 12px;
}
.blog-card-meta {
    font-size: 12px;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* ===== Article Page ===== */
.article-content {
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 48px;
}
.article-content h1 {
    font-size: 32px;
    margin-bottom: 10px;
    line-height: 1.2;
}
.article-meta {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.article-body {
    font-size: 16px;
    line-height: 1.8;
    color: var(--text);
}
.article-body p { margin-bottom: 16px; }
.article-body h2 {
    font-size: 24px;
    margin: 32px 0 12px;
    color: var(--accent-glow);
}

/* ===== FAQ Page ===== */
.faq-hero {
    text-align: center;
    padding: 48px 0 24px;
}
.faq-hero h1 { font-size: 38px; margin-bottom: 10px; }

.faq-list {
    max-width: 750px;
    margin: 0 auto;
    padding-bottom: 48px;
}
.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: 12px;
    overflow: hidden;
}
.faq-question {
    padding: 18px 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: background 0.2s;
}
.faq-question:hover { background: var(--bg-elevated); }
.faq-question::after {
    content: '+';
    font-size: 20px;
    color: var(--accent);
    transition: transform 0.2s;
}
.faq-item.open .faq-question::after {
    content: '−';
}
.faq-answer {
    padding: 0 20px 18px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
    display: none;
}
.faq-item.open .faq-answer {
    display: block;
}

/* ===== Testimonials ===== */
.testimonials {
    padding: 40px 0;
}
.testimonials h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 24px;
}
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
@media (max-width: 700px) {
    .testimonial-grid { grid-template-columns: 1fr; }
}
.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
}
.testimonial-card p {
    font-size: 14px;
    color: var(--text-muted);
    font-style: italic;
    margin-bottom: 12px;
}
.testimonial-author {
    font-size: 13px;
    font-weight: 600;
}
.testimonial-role {
    font-size: 12px;
    color: var(--text-muted);
}

/* ===== Newsletter ===== */
.newsletter {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    margin: 40px 0;
}
.newsletter h3 { font-size: 22px; margin-bottom: 8px; }
.newsletter p { color: var(--text-muted); margin-bottom: 20px; }
.newsletter-form {
    display: flex;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}
.newsletter-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-elevated);
    color: var(--text);
    font-size: 15px;
}
.newsletter-form input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ===== Hero Featured ===== */
.hero-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 32px 0;
}
@media (max-width: 700px) {
    .hero-featured { grid-template-columns: 1fr; }
}
.featured-main {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-main h2 { font-size: 26px; margin-bottom: 10px; }
.featured-main p { color: var(--text-muted); font-size: 15px; margin-bottom: 16px; }
.featured-main .btn { align-self: flex-start; }
.featured-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.featured-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}
.featured-stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--accent-glow);
}
.featured-stat-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ===== Section spacing ===== */
.section-title {
    font-size: 22px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.section-title a {
    color: var(--accent-glow);
    font-size: 14px;
    float: right;
    text-decoration: none;
    font-weight: 400;
}

/* ===== Tema page header ===== */
.tema-header {
    text-align: center;
    padding: 32px 0;
}
.tema-header h1 { font-size: 36px; }

/* ── Agente IA de ayuda al usuario ───────────────────────────── */
.chat-toggle {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--accent);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    z-index: 900;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .45);
    transition: transform .15s ease, background .15s ease;
}
.chat-toggle:hover { transform: scale(1.06); background: var(--accent-glow); }
.chat-toggle.active { background: var(--bg-elevated); }

.chat-panel {
    position: fixed;
    right: 20px;
    bottom: 88px;
    width: min(380px, calc(100vw - 40px));
    max-height: min(560px, calc(100vh - 120px));
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    overflow: hidden;
    z-index: 900;
}
.chat-panel[hidden] { display: none; }

.chat-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: var(--bg-elevated);
    border-bottom: 1px solid var(--border);
}
.chat-header strong { display: block; font-size: 15px; }
.chat-status { font-size: 12px; color: var(--text-muted); }
.chat-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    padding: 0 4px;
}
.chat-close:hover { color: var(--text); }

.chat-log {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-msg {
    max-width: 85%;
    padding: 10px 13px;
    border-radius: var(--radius);
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}
.chat-msg.bot {
    align-self: flex-start;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
}
.chat-msg.user {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
}
.chat-msg.thinking { color: var(--text-muted); font-style: italic; }
.chat-msg.error { border-color: #a33; color: #ff9b9b; }

.chat-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 0 16px 12px;
}
.chat-suggestions[hidden] { display: none; }
.chat-suggestions button {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-muted);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
}
.chat-suggestions button:hover { color: var(--text); border-color: var(--accent); }

.chat-form {
    display: flex;
    gap: 8px;
    padding: 12px;
    border-top: 1px solid var(--border);
    background: var(--bg-elevated);
}
.chat-form input {
    flex: 1;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    padding: 10px 12px;
    font-family: var(--font);
    font-size: 14px;
}
.chat-form input:focus { outline: none; border-color: var(--accent); }
.chat-form button {
    background: var(--accent);
    border: none;
    border-radius: var(--radius);
    color: #fff;
    padding: 0 16px;
    font-size: 16px;
    cursor: pointer;
}
.chat-form button:hover { background: var(--accent-glow); }

@media (max-width: 520px) {
    .chat-panel { right: 10px; left: 10px; width: auto; bottom: 80px; }
    .chat-toggle { right: 14px; bottom: 14px; }
}

/* ── Ficha de vídeo ──────────────────────────────────────────── */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    padding: 16px 0 0;
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-glow); }

.video-detail {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    margin: 20px 0 32px;
}
.video-detail h1 { font-size: 30px; line-height: 1.25; margin: 10px 0; }
.video-tema-badge {
    display: inline-block;
    font-size: 12px;
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
}
.video-detail-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 18px; }
.video-detail-body { color: var(--text-muted); margin-bottom: 22px; }

.video-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.video-tag {
    font-size: 12px;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 3px 10px;
}

.related-list { list-style: none; }
.related-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
}
.related-list a { color: var(--text); text-decoration: none; }
.related-list a:hover { color: var(--accent-glow); }
.related-list .meta-date { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
