/* TechHub — estilos públicos (home, software, ayuda) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body.tech-public {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f7fa;
    color: #1a1e24;
    line-height: 1.6;
    min-height: 100vh;
}

.tech-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== NAVBAR ===== */
.tech-navbar {
    background: #0b0f17;
    border-bottom: 2px solid #2a3a5e;
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.tech-navbar .tech-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #f0f4fc;
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.site-branding i {
    color: #00b4ff;
    font-size: 2rem;
    filter: drop-shadow(0 0 6px #00b4ff66);
}

.site-branding .brand-badge {
    background: #00b4ff;
    color: #0b0f17;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0 10px;
    border-radius: 30px;
    margin-left: 6px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-menu a,
.nav-menu .nav-auth-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    color: #b8c7e0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: 30px;
    transition: all 0.2s ease;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: inherit;
}

.nav-menu a i,
.nav-menu .nav-auth-btn i {
    font-size: 0.95rem;
    color: #6c86a8;
}

.nav-menu a:hover,
.nav-menu .nav-auth-btn:hover {
    background: #1f2a3f;
    color: #ffffff;
}

.nav-menu a:hover i,
.nav-menu .nav-auth-btn:hover i {
    color: #00b4ff;
}

.nav-menu a.active {
    background: #1f2a3f;
    color: #ffffff;
    font-weight: 600;
    box-shadow: inset 0 0 0 1px #2a3a5e;
}

.nav-menu a.active i {
    color: #00b4ff;
}

.nav-menu .nav-login {
    background: transparent;
    border: 1px solid #3a4a6e;
}

.nav-menu .nav-register {
    background: #00b4ff;
    color: #0b0f17 !important;
    font-weight: 600;
}

.nav-menu .nav-register i {
    color: #0b0f17 !important;
}

.nav-menu .nav-register:hover {
    background: #3ac5ff;
    color: #0b0f17 !important;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: #f0f4fc;
    cursor: pointer;
    padding: 4px 10px;
}

/* ===== HERO HOME ===== */
.hero-tech {
    padding: 60px 0 40px;
    background: linear-gradient(145deg, #0f1520 0%, #192433 100%);
    border-bottom: 1px solid #2a3a5e;
    color: #eef3fc;
}

.hero-tech .hero-badge {
    display: inline-block;
    background: #1f2a3f;
    color: #7abfff;
    padding: 6px 20px;
    border-radius: 40px;
    font-weight: 500;
    font-size: 0.85rem;
    border: 1px solid #2a4a6e;
    margin-bottom: 16px;
}

.hero-tech .hero-badge i {
    margin-right: 8px;
    color: #00b4ff;
}

.hero-tech h1 {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: -1.5px;
    line-height: 1.1;
    margin-bottom: 16px;
}

.hero-tech h1 i {
    color: #00b4ff;
    margin-right: 10px;
    filter: drop-shadow(0 0 10px #00b4ff55);
}

.hero-tech p {
    font-size: 1.25rem;
    color: #b8c7e0;
    max-width: 700px;
    margin-bottom: 28px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
}

.btn-tech-primary {
    background: #00b4ff;
    color: #0b0f17;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.2s;
    border: none;
    font-size: 1rem;
    box-shadow: 0 0 20px #00b4ff33;
    cursor: pointer;
    font-family: inherit;
}

.btn-tech-primary:hover {
    background: #3ac5ff;
    transform: scale(1.02);
    box-shadow: 0 0 30px #00b4ff66;
    color: #0b0f17;
}

.btn-tech-outline {
    background: transparent;
    color: #b8c7e0;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 500;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #3a4a6e;
    transition: all 0.2s;
}

.btn-tech-outline:hover {
    background: #1f2a3f;
    border-color: #00b4ff;
    color: white;
}

/* ===== SECCIONES Y CARDS ===== */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 48px 0 16px;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.section-title i {
    color: #00b4ff;
    font-size: 2.2rem;
}

.grid-tech {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 28px;
    margin: 24px 0 50px;
}

.card-tech {
    background: #ffffff;
    border-radius: 16px;
    padding: 28px 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
    border: 1px solid #e6edf4;
    transition: all 0.25s;
    position: relative;
}

.card-tech:hover {
    transform: translateY(-5px);
    border-color: #00b4ff;
    box-shadow: 0 16px 40px rgba(0, 180, 255, 0.10);
}

.card-tech .icon-wrap {
    background: #e6f3ff;
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.card-tech .icon-wrap i {
    font-size: 2rem;
    color: #0077be;
}

.card-tech h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0b0f17;
}

.card-tech p {
    color: #4a5a6e;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-tech .meta-tech {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.8rem;
    color: #6c86a8;
    border-top: 1px solid #eef3f8;
    padding-top: 16px;
    flex-wrap: wrap;
}

.card-tech .meta-tech i {
    color: #8ca3c0;
    margin-right: 4px;
}

.tag {
    display: inline-block;
    /*background: #e6f3ff;*/
    color: #005a8c;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 40px;
    letter-spacing: 0.3px;
}

.community-block {
    background: #0f1520;
    border-radius: 20px;
    padding: 32px 36px;
    margin: 20px 0 40px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #2a3a5e;
    color: #eef3fc;
}

.community-block .left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.community-block .left i {
    font-size: 2.8rem;
    color: #00b4ff;
    filter: drop-shadow(0 0 8px #00b4ff44);
}

.community-block .left h4 {
    font-size: 1.3rem;
    font-weight: 600;
}

.community-block .left p {
    color: #b0c4dd;
    margin: 0;
}

/* ===== AYUDA ===== */
.help-hero {
    background: linear-gradient(145deg, #0f1520 0%, #192433 100%);
    border-bottom: 1px solid #2a3a5e;
    padding: 50px 0 40px;
    color: #eef3fc;
    text-align: center;
}

.help-hero h1 {
    font-size: 2.8rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 12px;
}

.help-hero h1 i {
    color: #00b4ff;
    margin-right: 12px;
    filter: drop-shadow(0 0 12px #00b4ff55);
}

.help-hero p {
    font-size: 1.2rem;
    color: #b8c7e0;
    max-width: 640px;
    margin: 0 auto 28px;
}

.search-box {
    max-width: 620px;
    margin: 0 auto;
    display: flex;
    background: #1a2332;
    border: 1px solid #2a3a5e;
    border-radius: 60px;
    overflow: hidden;
    transition: border 0.2s;
}

.search-box:focus-within {
    border-color: #00b4ff;
    box-shadow: 0 0 0 3px #00b4ff33;
}

.search-box input {
    flex: 1;
    padding: 14px 24px;
    background: transparent;
    border: none;
    color: #f0f4fc;
    font-size: 1rem;
    outline: none;
    font-family: inherit;
}

.search-box input::placeholder {
    color: #6c86a8;
}

.search-box button {
    background: #00b4ff;
    border: none;
    padding: 0 28px;
    color: #0b0f17;
    font-weight: 600;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
    font-family: inherit;
}

.search-box button:hover {
    background: #3ac5ff;
}

.help-categories {
    padding: 48px 0 32px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.category-card {
    background: white;
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
    border: 1px solid #e6edf4;
    transition: all 0.25s;
    text-decoration: none;
    color: #1a1e24;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.category-card:hover {
    transform: translateY(-4px);
    border-color: #00b4ff;
    box-shadow: 0 12px 32px rgba(0, 180, 255, 0.08);
    color: #1a1e24;
}

.category-card .icon-wrap {
    background: #e6f3ff;
    width: 60px;
    height: 60px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 14px;
}

.category-card .icon-wrap i {
    font-size: 2rem;
    color: #0077be;
}

.category-card h4 {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.category-card p {
    font-size: 0.85rem;
    color: #6c86a8;
    margin: 0;
}

.featured-articles {
    padding: 16px 0 48px;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
}

.article-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #e6edf4;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    display: block;
}

.article-card:hover {
    border-color: #00b4ff;
    box-shadow: 0 8px 24px rgba(0, 180, 255, 0.06);
    color: inherit;
}

.article-card .article-tag {
    display: inline-block;
    background: #e6f3ff;
    color: #005a8c;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 14px;
    border-radius: 40px;
    letter-spacing: 0.3px;
    margin-bottom: 10px;
}

.article-card h4 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.article-card p {
    color: #4a5a6e;
    font-size: 0.9rem;
    margin-bottom: 14px;
}

.article-card .article-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.8rem;
    color: #6c86a8;
    border-top: 1px solid #eef3f8;
    padding-top: 14px;
}

.article-card .article-meta i {
    color: #8ca3c0;
    margin-right: 4px;
}

.article-card .article-meta .read-more {
    color: #0077be;
    font-weight: 500;
    margin-left: auto;
}

.article-view {
    background: white;
    border-radius: 20px;
    padding: 40px;
    border: 1px solid #e6edf4;
    margin: 32px 0 48px;
}

.article-view h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 12px;
}

.article-view .article-meta-top {
    color: #6c86a8;
    font-size: 0.9rem;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef3f8;
}

.article-view .wiki-content {
    line-height: 1.8;
    color: #1a1e24;
}

.faq-section {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 36px;
    margin: 16px 0 48px;
    border: 1px solid #e6edf4;
}

.faq-section h2 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-section h2 i {
    color: #00b4ff;
}

.faq-item {
    border-bottom: 1px solid #eef3f8;
    padding: 16px 0;
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.05rem;
    color: #1a1e24;
    padding: 4px 0;
    user-select: none;
}

.faq-question i {
    color: #00b4ff;
    transition: transform 0.3s;
}

.faq-question.open i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    color: #4a5a6e;
    padding: 0;
}

.faq-answer.open {
    max-height: 500px;
    padding: 12px 0 4px;
}

/* ===== FOOTER ===== */
.footer-tech {
    background: #0b0f17;
    border-top: 1px solid #1f2a3f;
    padding: 30px 0;
    color: #8ca3c0;
    font-size: 0.9rem;
    margin-top: auto;
}

.footer-tech .tech-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

.footer-tech .footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
}

.footer-tech .footer-links a {
    color: #8ca3c0;
    text-decoration: none;
    transition: color 0.2s;
}

.footer-tech .footer-links a:hover {
    color: #00b4ff;
}

.footer-tech i {
    margin-right: 6px;
    color: #4a6a8a;
}

.tech-public-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.tech-flash {
    max-width: 1240px;
    margin: 16px auto 0;
    padding: 0 24px;
}

.tech-page-hero {
    padding: 40px 0 24px;
    background: linear-gradient(145deg, #0f1520 0%, #192433 100%);
    border-bottom: 1px solid #2a3a5e;
    color: #eef3fc;
}

.tech-page-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.tech-page-hero h1 i {
    color: #00b4ff;
    margin-right: 10px;
}

.tech-page-hero p {
    color: #b8c7e0;
    margin: 0;
}

.auth-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
}

.auth-wrap .auth-card {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e6edf4;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.auth-wrap .auth-card-header {
    background: linear-gradient(145deg, #0f1520 0%, #192433 100%);
    color: #eef3fc;
    padding: 24px;
    text-align: center;
}

.auth-wrap .auth-card-header i {
    color: #00b4ff;
    font-size: 2rem;
    margin-bottom: 8px;
}

.auth-wrap .auth-card-header h4 {
    margin: 0;
    font-weight: 600;
}

.auth-wrap .auth-card-body {
    padding: 28px 24px;
}

.auth-wrap .auth-card-footer {
    padding: 16px 24px;
    background: #f8fafc;
    border-top: 1px solid #eef3f8;
    text-align: center;
    font-size: 0.9rem;
    color: #6c86a8;
}

.auth-wrap .auth-card-footer a {
    color: #0077be;
    font-weight: 500;
}

.tech-public .btn-primary {
    background: #00b4ff;
    border-color: #00b4ff;
    color: #0b0f17;
    font-weight: 600;
    border-radius: 10px;
}

.tech-public .btn-primary:hover {
    background: #0090cc;
    border-color: #0090cc;
    color: #0b0f17;
}

.tech-public .form-control {
    border-radius: 10px;
    border-color: #e2e8f0;
}

.tech-public .form-control:focus {
    border-color: #00b4ff;
    box-shadow: 0 0 0 3px rgba(0, 180, 255, 0.15);
}

.tech-public .alert {
    border-radius: 12px;
}

/* Guía HTML embebida (plantillas de fichas, etc.) */
.help-guide {
    font-size: 0.95rem;
    line-height: 1.55;
    color: #1e293b;
}

.help-guide h2 {
    font-size: 1.35rem;
    color: #1d4ed8;
    margin: 28px 0 10px;
}

.help-guide h3 {
    font-size: 1.05rem;
    color: #334155;
    margin: 18px 0 8px;
}

.help-guide p,
.help-guide li {
    margin-bottom: 8px;
}

.help-guide ul,
.help-guide ol {
    margin: 0 0 12px 0;
    padding-left: 22px;
}

.help-guide .subtitle {
    color: #64748b;
    font-size: 1rem;
    margin-bottom: 20px;
}

.help-guide .cover-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 0.9rem;
}

.help-guide code {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.85rem;
    background: #f1f5f9;
    padding: 1px 5px;
    border-radius: 4px;
    color: #0f172a;
}

.help-guide pre {
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.8rem;
    line-height: 1.45;
    background: #0f172a;
    color: #e2e8f0;
    padding: 12px 14px;
    border-radius: 8px;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
    margin: 8px 0 14px;
}

.help-guide pre .comment { color: #94a3b8; }
.help-guide pre .tag { color: #7dd3fc; }
.help-guide pre .attr { color: #fcd34d; }
.help-guide pre .jinja { color: #c4b5fd; }

.help-guide table {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0 16px;
    font-size: 0.9rem;
}

.help-guide th,
.help-guide td {
    border: 1px solid #cbd5e1;
    padding: 7px 10px;
    text-align: left;
    vertical-align: top;
}

.help-guide th {
    background: #eff6ff;
    color: #1e40af;
    font-weight: 600;
}

.help-guide tr:nth-child(even) td {
    background: #f8fafc;
}

.help-guide .note {
    background: #eff6ff;
    border-left: 4px solid #2563eb;
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
}

.help-guide .warning {
    background: #fff7ed;
    border-left: 4px solid #ea580c;
    padding: 10px 14px;
    margin: 12px 0;
    border-radius: 0 6px 6px 0;
}

.help-guide .file-tree {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-family: Consolas, monospace;
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 16px;
}

.help-guide .steps {
    counter-reset: step;
}

.help-guide .step {
    counter-increment: step;
    margin-bottom: 14px;
}

.help-guide .step-title::before {
    content: counter(step) ". ";
    color: #2563eb;
    font-weight: 700;
}

.help-guide footer {
    margin-top: 30px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
    font-size: 0.85rem;
    color: #94a3b8;
    text-align: center;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        padding-top: 16px;
        border-top: 1px solid #1f2a3f;
        margin-top: 12px;
        gap: 4px;
    }

    .nav-menu.open {
        display: flex;
    }

    .nav-menu a,
    .nav-menu .nav-auth-btn {
        padding: 12px 16px;
        width: 100%;
        border-radius: 8px;
        justify-content: flex-start;
    }

    .hero-tech h1 {
        font-size: 2.2rem;
    }

    .hero-tech p {
        font-size: 1rem;
    }

    .grid-tech {
        grid-template-columns: 1fr;
    }

    .community-block {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .help-hero h1 {
        font-size: 2rem;
    }

    .search-box {
        flex-direction: column;
        border-radius: 16px;
    }

    .search-box input {
        padding: 16px 20px;
        width: 100%;
    }

    .search-box button {
        padding: 14px;
        justify-content: center;
        border-radius: 0 0 16px 16px;
        width: 100%;
    }

    .category-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-tech .tech-container {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .article-view {
        padding: 24px 20px;
    }
}

@media (max-width: 480px) {
    .hero-tech h1 {
        font-size: 1.8rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .articles-grid {
        grid-template-columns: 1fr;
    }

    .help-hero h1 {
        font-size: 1.6rem;
    }
    
    .generador-embed-card {
        max-height: calc(100vh - 9rem);
    }
}

.generador-embed-card {
    overflow: auto;
    max-height: calc(100vh - 11rem);
    -webkit-overflow-scrolling: touch;
}

.generador-embed-card > .card-body {
    min-height: 0;
}
