/*
Theme Name: CloudStudio Blog
Theme URI: https://cloudstudio.mx/blog
Author: CloudStudio Technologies
Author URI: https://cloudstudio.mx
Description: Theme hermano del portal cloudstudio.mx. Hereda head/nav/footer y la hoja Tailwind del portal para identidad visual idéntica. Enfocado a SEO/GEO de contenido técnico.
Version: 1.0.1
Requires PHP: 8.0
License: Proprietary
Text Domain: cs-blog
*/

/* Estilos propios del theme — la mayoría viven en /assets/css/app.css (Tailwind compilado del portal) y en el <style> inline de partials/head.php */

.cs-blog-hero {
    padding-top: 9rem;
    padding-bottom: 3.5rem;
}

/* Tarjeta de post (listado) */
.cs-card {
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1.25rem;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.cs-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 0, 85, 0.35);
    box-shadow: 0 24px 60px -24px rgba(255, 0, 85, 0.35);
}
html.light .cs-card { background: #ffffff; border-color: rgba(0,0,0,0.08); }
html.light .cs-card:hover { border-color: rgba(255,0,85,0.4); box-shadow: 0 24px 60px -24px rgba(255,0,85,0.18); }

/* Contenido del post (single) — tipografía editorial */
.cs-prose { color: #d4d4d4; font-size: 1.0625rem; line-height: 1.8; }
.cs-prose > * + * { margin-top: 1.25rem; }
.cs-prose h2 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800; letter-spacing: -0.02em;
    color: #ffffff; font-size: 1.875rem; line-height: 1.2;
    margin-top: 3rem; margin-bottom: 1rem;
}
.cs-prose h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700; letter-spacing: -0.015em;
    color: #ffffff; font-size: 1.375rem; line-height: 1.25;
    margin-top: 2.25rem; margin-bottom: 0.75rem;
}
.cs-prose h4 { font-family: 'Outfit', sans-serif; font-weight: 700; color: #ffffff; font-size: 1.125rem; margin-top: 1.75rem; }
.cs-prose p  { color: #b4b4b4; }
.cs-prose a  { color: #FF0055; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.cs-prose a:hover { color: #ff6699; }
.cs-prose strong { color: #ffffff; font-weight: 700; }
.cs-prose em { color: #d4d4d4; font-style: italic; }
.cs-prose ul, .cs-prose ol { padding-left: 1.5rem; }
.cs-prose ul { list-style: disc; }
.cs-prose ol { list-style: decimal; }
.cs-prose ul li, .cs-prose ol li { margin-top: 0.5rem; color: #b4b4b4; }
.cs-prose blockquote {
    border-left: 3px solid #FF0055;
    padding: 0.5rem 1.25rem;
    margin: 1.75rem 0;
    background: rgba(255, 0, 85, 0.05);
    border-radius: 0 0.5rem 0.5rem 0;
    color: #e5e5e5; font-style: italic; font-size: 1.125rem;
}
.cs-prose code {
    background: rgba(255, 255, 255, 0.08);
    color: #ff6699;
    padding: 0.15rem 0.4rem;
    border-radius: 0.375rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.9em;
}
.cs-prose pre {
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #e5e5e5;
    padding: 1rem 1.25rem;
    border-radius: 0.75rem;
    overflow-x: auto;
    font-size: 0.9em;
    line-height: 1.6;
}
.cs-prose pre code { background: none; color: inherit; padding: 0; }
.cs-prose img { border-radius: 0.75rem; max-width: 100%; height: auto; }
.cs-prose hr  { border-color: rgba(255, 255, 255, 0.08); margin: 2.5rem 0; }
.cs-prose figure figcaption { color: #888; font-size: 0.875rem; margin-top: 0.5rem; text-align: center; }
.cs-prose table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.95em; }
.cs-prose th, .cs-prose td { border: 1px solid rgba(255, 255, 255, 0.08); padding: 0.6rem 0.85rem; text-align: left; }
.cs-prose th { background: rgba(255, 255, 255, 0.03); color: #ffffff; font-weight: 700; }

html.light .cs-prose            { color: #2a2a2a; }
html.light .cs-prose h2,
html.light .cs-prose h3,
html.light .cs-prose h4,
html.light .cs-prose strong     { color: #0a0a0a; }
html.light .cs-prose p,
html.light .cs-prose ul li,
html.light .cs-prose ol li      { color: #404040; }
html.light .cs-prose blockquote { background: rgba(255, 0, 85, 0.06); color: #1a1a1a; }
html.light .cs-prose code       { background: rgba(0,0,0,0.06); color: #c10044; }
html.light .cs-prose pre        { background: #0a0a0a; color: #e5e5e5; }
html.light .cs-prose hr         { border-color: rgba(0,0,0,0.1); }
html.light .cs-prose th         { background: rgba(0,0,0,0.04); color: #0a0a0a; }
html.light .cs-prose th,
html.light .cs-prose td         { border-color: rgba(0,0,0,0.1); }
html.light .cs-prose figure figcaption { color: #6b6b6b; }

/* Search form (variante compacta — usada en 404 y como fallback) */
.cs-search-form { position: relative; }
.cs-search-input {
    width: 100%;
    background: rgba(17, 17, 17, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.875rem 3rem 0.875rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.cs-search-input::placeholder { color: rgba(255, 255, 255, 0.45); }
.cs-search-input:focus { outline: none; border-color: #FF0055; background: rgba(17, 17, 17, 0.75); }
.cs-search-submit {
    position: absolute; top: 50%; right: 0.4rem; transform: translateY(-50%);
    width: 2.25rem; height: 2.25rem; border-radius: 9999px;
    background: #FF0055; color: #ffffff;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
    transition: background 0.2s ease;
}
.cs-search-submit:hover { background: #cc0044; }
html.light .cs-search-input { background: #ffffff; border-color: rgba(0,0,0,0.12); color: #0a0a0a; }
html.light .cs-search-input::placeholder { color: rgba(0,0,0,0.4); }
html.light .cs-search-input:focus { background: #ffffff; border-color: #FF0055; }

/* Search form — variante HERO (grande, con ícono leading y botón con texto) */
.cs-search-form--hero { position: relative; }
.cs-search-icon {
    position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.5); font-size: 1.125rem; pointer-events: none;
}
.cs-search-input--hero {
    padding: 1.25rem 8rem 1.25rem 3.25rem;
    font-size: 1rem;
    border-radius: 9999px;
    background: rgba(17, 17, 17, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.6);
}
.cs-search-input--hero:focus {
    box-shadow: 0 0 0 4px rgba(255, 0, 85, 0.18), 0 8px 32px -12px rgba(255, 0, 85, 0.4);
}
.cs-search-submit--hero {
    position: absolute; top: 50%; right: 0.4rem; transform: translateY(-50%);
    width: auto; height: 2.75rem; padding: 0 1.75rem;
    border-radius: 9999px;
    background: #FF0055; color: #ffffff;
    font-weight: 700; font-size: 0.875rem;
    display: inline-flex; align-items: center; justify-content: center;
    border: none; cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.cs-search-submit--hero:hover { background: #cc0044; transform: translateY(-50%) scale(1.02); }
html.light .cs-search-input--hero {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 32px -12px rgba(0, 0, 0, 0.12);
}
html.light .cs-search-input--hero:focus {
    box-shadow: 0 0 0 4px rgba(255, 0, 85, 0.12), 0 8px 32px -12px rgba(255, 0, 85, 0.25);
}
html.light .cs-search-icon { color: rgba(0, 0, 0, 0.35); }

/* Chips de categorías — versión "Apple App Store" pills, scrolleable en mobile */
.cs-chips {
    margin: 0 -1.5rem 2.25rem;
    overflow: hidden;
}
@media (min-width: 768px) {
    .cs-chips { margin-left: 0; margin-right: 0; }
}
.cs-chips-track {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 1.5rem;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.cs-chips-track::-webkit-scrollbar { display: none; }
@media (min-width: 768px) {
    .cs-chips-track { padding-left: 0; padding-right: 0; flex-wrap: wrap; }
}
.cs-chip {
    flex-shrink: 0;
    scroll-snap-align: start;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.05rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: -0.005em;
    transition: all 0.18s ease;
    white-space: nowrap;
}
.cs-chip:hover {
    background: rgba(255, 0, 85, 0.12);
    border-color: rgba(255, 0, 85, 0.45);
    color: #ffffff;
    transform: translateY(-1px);
}
.cs-chip.is-active {
    background: #FF0055;
    border-color: #FF0055;
    color: #ffffff;
    box-shadow: 0 6px 20px -8px rgba(255, 0, 85, 0.6);
}
.cs-chip.is-active:hover { background: #cc0044; border-color: #cc0044; transform: translateY(-1px); }
.cs-chip-count {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 1.25rem; height: 1.25rem; padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.6875rem; font-weight: 700;
    color: rgba(255, 255, 255, 0.65);
}
.cs-chip.is-active .cs-chip-count {
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
}

html.light .cs-chip {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
    color: #404040;
}
html.light .cs-chip:hover {
    background: rgba(255, 0, 85, 0.08);
    border-color: rgba(255, 0, 85, 0.4);
    color: #0a0a0a;
}
html.light .cs-chip.is-active {
    background: #FF0055;
    border-color: #FF0055;
    color: #ffffff;
}
html.light .cs-chip-count { background: rgba(0, 0, 0, 0.06); color: #525252; }
html.light .cs-chip.is-active .cs-chip-count { background: rgba(255,255,255,0.25); color: #ffffff; }

/* Paginación */
.cs-pagination {
    margin-top: 6rem; /* 96px — separa visualmente del grid de cards */
}
@media (min-width: 768px) {
    .cs-pagination { margin-top: 7rem; } /* 112px en desktop */
}
.cs-pagination a, .cs-pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 2.5rem; height: 2.5rem; padding: 0 0.85rem;
    border-radius: 9999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #d4d4d4; font-weight: 600; font-size: 0.875rem;
    transition: all 0.2s ease;
    margin: 0 0.15rem;
}
.cs-pagination a:hover { border-color: #FF0055; color: #ffffff; background: rgba(255, 0, 85, 0.12); }
.cs-pagination .current { background: #FF0055; border-color: #FF0055; color: #ffffff; }
html.light .cs-pagination a, html.light .cs-pagination span { color: #404040; border-color: rgba(0,0,0,0.12); }
html.light .cs-pagination .current { color: #ffffff; }
