/* RESET & BASE */
* { box-sizing: border-box; margin: 0; padding: 0; }
body { background-color: var(--bg-deep); color: var(--text-muted); font-family: var(--font-body); line-height: 1.6; overflow-x: hidden; }
h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); color: var(--text-main); font-weight: 700; line-height: 1.2; }
a { color: var(--text-main); text-decoration: none; transition: var(--transition-smooth); }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.text-center { text-align: center; }
.mt-4 { margin-top: 2rem; }

/* TYPOGRAPHY & GRADIENS */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan) 0%, var(--accent-violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* UI ELEMENTS */
.glass-nav { position: fixed; top: 0; width: 100%; z-index: 1000; background: rgba(7, 9, 12, 0.7); backdrop-filter: blur(16px); border-bottom: var(--border-glass); }
.header-inner { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.brand-text { font-size: 1.5rem; font-family: var(--font-heading); font-weight: 700; letter-spacing: -0.5px; }
.nav-menu { display: flex; list-style: none; gap: 32px; }
.nav-menu a { font-size: 0.95rem; font-weight: 500; opacity: 0.8; }
.nav-menu a:hover { opacity: 1; color: var(--accent-cyan); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 12px 28px; border-radius: var(--radius-md); font-weight: 600; font-family: var(--font-heading); transition: var(--transition-smooth); cursor: pointer; text-align: center; }
.btn-primary { background: var(--text-main); color: var(--bg-deep); border: none; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(255,255,255,0.1); }
.btn-secondary { background: var(--bg-glass-light); border: var(--border-glass); color: var(--text-main); }
.btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn-outline-cyan { border: 1px solid var(--accent-cyan); color: var(--accent-cyan); background: transparent; }
.btn-outline-cyan:hover { background: var(--accent-glow); }
.btn-glow { box-shadow: 0 0 20px var(--accent-glow); }
.btn-large { padding: 16px 40px; font-size: 1.1rem; }

/* GLASS CARDS */
.glass-card, .glass-panel { background: var(--bg-glass); border: var(--border-glass); border-radius: var(--radius-lg); padding: 40px; backdrop-filter: blur(20px); transition: var(--transition-smooth); }
.glass-card:hover { transform: translateY(-5px); border-color: rgba(255,255,255,0.2); box-shadow: 0 20px 40px rgba(0,0,0,0.4); }

/* SECTIONS */
.section-padding { padding: 100px 0; }
.section-header { margin-bottom: 60px; }
.section-title { font-size: 2.5rem; margin-bottom: 16px; }

/* HERO */
.hero-section { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; overflow: hidden; padding-top: 80px; }
.hero-bg-canvas { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-bg-fallback { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: radial-gradient(circle at center, rgba(0, 240, 255, 0.1) 0%, var(--bg-deep) 70%); z-index: 2; }
.hero-content { position: relative; z-index: 3; max-width: 800px; }
.hero-badge { display: inline-block; padding: 6px 16px; border: var(--border-glass); border-radius: 50px; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 24px; background: var(--bg-glass-light); color: var(--accent-cyan); }
.hero-title { font-size: clamp(2.5rem, 5vw, 4.5rem); margin-bottom: 24px; letter-spacing: -1px; }
.hero-subtitle { font-size: 1.2rem; color: var(--text-muted); margin-bottom: 40px; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; }

/* GRIDS */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 32px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 32px; }

/* COURSE HIGHLIGHT */
.course-landing-block { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; padding: 60px; border-top: 1px solid rgba(0, 240, 255, 0.3); }
.course-title { font-size: 2rem; margin: 16px 0; }
.course-bullets { list-style: none; margin-bottom: 24px; }
.course-bullets li { margin-bottom: 8px; color: var(--text-main); }
.price-block { margin-bottom: 32px; }
.price-block .price { font-size: 3rem; font-weight: 700; font-family: var(--font-heading); color: var(--accent-cyan); }
.mockup-placeholder { width: 100%; height: 400px; border-radius: var(--radius-md); background: linear-gradient(135deg, #1A1F2B 0%, #0B0F14 100%); border: var(--border-glass); display: flex; align-items: center; justify-content: center; font-family: var(--font-heading); color: var(--text-muted); }

/* GITHUB CARDS */
.gh-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.gh-badge { font-size: 0.8rem; background: rgba(138, 43, 226, 0.2); color: #D0A2F7; padding: 4px 10px; border-radius: 4px; }
.gh-link { display: inline-block; margin-top: 24px; color: var(--accent-cyan); font-weight: 500; }
.gh-link:hover { color: #fff; }

/* FOOTER */
.site-footer { border-top: var(--border-glass); background: var(--bg-surface); padding-top: 80px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; margin-bottom: 60px; }
.footer-bottom { border-top: var(--border-glass); padding: 24px 0; }
.footer-bottom .container { display: flex; justify-content: space-between; align-items: center; font-size: 0.9rem; }
.legal-links a { margin-left: 24px; color: var(--text-muted); }

/* ANIMATIONS (Fades) */
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease-out, transform 0.8s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; } .delay-3 { transition-delay: 0.3s; }

/* ============================================
   PRODUCTS ARCHIVE — Página /productos/
============================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat( auto-fill, minmax(340px, 1fr) );
    gap: 32px;
}
.product-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.product-card-media { position: relative; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; aspect-ratio: 16 / 9; background: var(--bg-surface); }
.product-card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }
.product-card:hover .product-card-media img { transform: scale(1.04); }
.product-card-media iframe { width: 100%; height: 100%; border: none; display: block; }
.product-card-placeholder { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--text-muted); font-family: var(--font-heading); font-size: 1rem; background: linear-gradient(135deg, rgba(0,240,255,0.04), rgba(138,43,226,0.04)); }
.product-card-body { padding: 28px; display: flex; flex-direction: column; flex: 1; }
.product-card-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.product-price-inline { font-family: var(--font-heading); font-weight: 700; font-size: 1.1rem; color: var(--accent-cyan); }
.product-currency { font-size: 0.7rem; font-weight: 400; margin-left: 2px; color: var(--text-muted); }
.product-card-title { font-size: 1.2rem; margin-bottom: 10px; line-height: 1.3; }
.product-card-title a:hover { color: var(--accent-cyan); }
.product-card-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; flex: 1; }
.product-card-bullets { list-style: none; margin-bottom: 20px; }
.product-card-bullets li { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 6px; display: flex; align-items: flex-start; gap: 8px; }
.bullet-check { color: var(--accent-cyan); flex-shrink: 0; font-weight: 700; }
.product-cta-btn { display: block; width: 100%; text-align: center; margin-top: auto; }

/* ============================================
   PRODUCT SINGLE — Landing de un producto
============================================ */
.product-single-layout { padding-bottom: 100px; }
.product-single-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; padding: 40px 0 80px; }
.product-single-info { display: flex; flex-direction: column; gap: 24px; }
.product-buy-card { padding: 32px; border-top: 1px solid rgba(0, 240, 255, 0.2); }
.product-video-wrapper { position: relative; aspect-ratio: 16/9; border-radius: var(--radius-lg); overflow: hidden; background: var(--bg-surface); }
.product-video-wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.product-image-wrapper { border-radius: var(--radius-lg); overflow: hidden; }

/* Responsive productos */
@media (max-width: 991px) {
    .products-grid { grid-template-columns: 1fr; }
    .product-single-grid { grid-template-columns: 1fr; gap: 40px; }
}

/* ============================================
   BLOG — Cards de Artículos
============================================ */
.blog-card { padding: 0; overflow: hidden; }
.blog-card-image { display: block; overflow: hidden; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.blog-card-image img { width: 100%; height: 220px; object-fit: cover; display: block; transition: transform 0.6s ease; }
.blog-card:hover .blog-card-image img { transform: scale(1.04); }
.blog-card-body { padding: 28px; }
.blog-card-title { font-size: 1.15rem; margin: 12px 0 10px; line-height: 1.3; }
.blog-card-title a:hover { color: var(--accent-cyan); }
.blog-card-excerpt { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 20px; }
.blog-card-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; }
.post-category-tag { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--accent-cyan); background: rgba(0,240,255,0.08); padding: 3px 10px; border-radius: 20px; }
.post-date { color: var(--text-muted); font-size: 0.85rem; }
.post-read-time { color: var(--text-muted); font-size: 0.85rem; }

/* ============================================
   SINGLE POST — Artículo Individual
============================================ */
.single-post-layout { padding: 120px 0 80px; }
.single-post-grid { display: grid; grid-template-columns: 1fr 340px; gap: 48px; align-items: start; }
.single-post-title { font-size: clamp(1.8rem, 4vw, 3rem); margin: 20px 0 32px; letter-spacing: -0.5px; }
.post-meta-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 4px; }
.post-featured-image { border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 40px; }
.post-featured-image img { width: 100%; height: auto; display: block; }
.post-body { font-size: 1.05rem; line-height: 1.8; color: var(--text-muted); }
.post-body h2, .post-body h3 { color: var(--text-main); margin: 40px 0 16px; }
.post-body p { margin-bottom: 20px; }
.post-body ul, .post-body ol { padding-left: 24px; margin-bottom: 20px; }
.post-body ul li, .post-body ol li { margin-bottom: 8px; }
.post-body a { color: var(--accent-cyan); }
.post-body blockquote { border-left: 3px solid var(--accent-cyan); padding: 16px 24px; margin: 32px 0; background: var(--bg-glass-light); border-radius: 0 var(--radius-md) var(--radius-md) 0; font-style: italic; }
.post-body strong { color: var(--text-main); }
.post-tags { margin-top: 32px; }
.tags-list a { font-size: 0.8rem; background: var(--bg-glass-light); border: var(--border-glass); padding: 4px 12px; border-radius: 20px; margin-right: 8px; display: inline-block; margin-bottom: 8px; }
.tags-list a:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.post-navigation { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 48px; padding-top: 32px; border-top: var(--border-glass); }
.nav-post-link { display: flex; flex-direction: column; padding: 20px; background: var(--bg-glass); border: var(--border-glass); border-radius: var(--radius-md); transition: var(--transition-smooth); }
.nav-post-link:hover { border-color: var(--accent-cyan); }
.nav-post-link.next { text-align: right; }
.nav-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; color: var(--text-muted); margin-bottom: 6px; }
.nav-title { font-size: 0.95rem; color: var(--text-main); font-weight: 600; }

/* SIDEBAR */
.single-post-sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 24px; }
.sidebar-widget h4 { color: var(--text-main); font-size: 1rem; margin-bottom: 16px; }
.sidebar-links { list-style: none; }
.sidebar-links li { margin-bottom: 12px; }
.sidebar-links a { color: var(--text-muted); font-size: 0.9rem; transition: color 0.3s; }
.sidebar-links a:hover { color: var(--accent-cyan); }
.sidebar-social-btn { display: block; padding: 12px 16px; background: rgba(0,240,255,0.06); border: 1px solid rgba(0,240,255,0.2); border-radius: var(--radius-md); color: var(--accent-cyan); font-size: 0.9rem; font-weight: 500; text-align: center; transition: var(--transition-smooth); }
.sidebar-social-btn:hover { background: rgba(0,240,255,0.12); }

/* ============================================
   LEGAL PAGES — Contenido Legal Legible
============================================ */
.legal-content h2 { font-size: 1.3rem; color: var(--text-main); margin: 40px 0 14px; padding-top: 24px; border-top: var(--border-glass); }
.legal-content h2:first-of-type { border-top: none; padding-top: 0; }
.legal-content h3 { font-size: 1.05rem; color: var(--text-main); margin: 24px 0 10px; }
.legal-content ul { padding-left: 24px; margin-bottom: 16px; }
.legal-content ul li { margin-bottom: 8px; color: var(--text-muted); }
.legal-content p { color: var(--text-muted); margin-bottom: 14px; }
.legal-content strong { color: var(--text-main); }
.legal-content a { color: var(--accent-cyan); }
.legal-content a:hover { text-decoration: underline; }
.cookie-table { width: 100%; border-collapse: collapse; margin: 20px 0 32px; font-size: 0.85rem; }
.cookie-table th { background: rgba(255,255,255,0.05); color: var(--text-main); padding: 10px 14px; text-align: left; border-bottom: 1px solid rgba(255,255,255,0.1); }
.cookie-table td { padding: 10px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-muted); }
.cookie-table tr:last-child td { border-bottom: none; }

/* ============================================
   PAGINACIÓN
============================================ */
.page-numbers { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; font-family: var(--font-heading); font-weight: 600; font-size: 0.9rem; margin: 0 4px; background: var(--bg-glass); border: var(--border-glass); color: var(--text-muted); transition: var(--transition-smooth); }
.page-numbers:hover, .page-numbers.current { background: rgba(0,240,255,0.1); border-color: var(--accent-cyan); color: var(--accent-cyan); }
.page-numbers.dots { background: transparent; border-color: transparent; }

/* RESPONSIVE */
@media (max-width: 991px) {
    .course-landing-block { grid-template-columns: 1fr; padding: 40px 24px; }
    .hero-ctas { flex-direction: column; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .nav-menu { display: none; }
    .mobile-menu-toggle { display: block; background: transparent; border: none; cursor: pointer; }
    .bar { display: block; width: 25px; height: 2px; background: white; margin: 5px auto; transition: 0.3s; }
    .single-post-grid { grid-template-columns: 1fr; }
    .single-post-sidebar { position: static; }
    .post-navigation { grid-template-columns: 1fr; }
}
@media (min-width: 992px) { .mobile-menu-toggle { display: none; } }
