/*
Theme Name: Kadence Child
Theme URI: https://voy.digital
Description: Child Theme de Kadence para personalización de single.php, archive.php, etc.
Author: Felipe Belmar
Author URI: https://voy.digital
Template: kadence
Version: 1.1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kadence-child
Tags: blog, custom-theme, child-theme
Requires at least: 5.0
Tested up to: 6.5
Requires PHP: 7.4
*/

/*
📌 Explicación de cada campo del header de WordPress:

Theme Name:        Nombre que aparecerá en Apariencia > Temas.
Theme URI:         URL oficial del tema o de tu web (opcional).
Description:       Descripción breve de tu tema hijo (se muestra en el admin).
Author:            Tu nombre o el de tu agencia.
Author URI:        URL del autor (tu web personal o agencia).
Template:          Slug (nombre de la carpeta) del tema padre → aquí "kadence".
Version:           Versión de tu tema hijo (útil para cache busting).
License:           Licencia (WordPress recomienda GPL).
License URI:       Enlace a la licencia.
Text Domain:       Identificador único para traducciones.
Tags:              Palabras clave (opcional, útiles en el repositorio WP).
Requires at least: Versión mínima de WordPress soportada.
Tested up to:      Última versión de WordPress en la que probaste el tema.
Requires PHP:      Versión mínima de PHP que necesita tu tema.
*/


/* ===========================
   ENLACES GENERALES
   =========================== */
a {
  text-decoration: none;
  color: inherit;
}
a:hover {
  color: #00f070;
}


/* ===========================
   PÁGINAS DE CATEGORÍA
   =========================== */

.category-archive .archive-header {
  text-align: center;
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.category-archive .archive-title {
  color: #fff;
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.category-archive .archive-description {
  color: #ccc;
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.back-to-blog {
  margin-top: 1.5rem;
}

.btn-back {
  background: #0E2A2B;
  color: #A4DF1E;
  padding: 0.75rem 1.5rem;
  border-radius: 25px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-back:hover {
  background: #A4DF1E;
  color: #061C1E;
  transform: translateY(-2px);
}


/* ===========================
   CATEGORÍAS
   =========================== */

/* Categorías en single posts */
.single-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cat-pill {
  background: #A4DF1E;
  color: #061C1E;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.cat-pill:hover {
  background: #8BC91A;
  transform: translateY(-1px);
}

/* Categorías en archive/loop */
.entry-taxonomies {
  margin-bottom: 0.75rem;
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem;
  position: absolute;
  width: 100%;
  top: 8px;
  right: 8px;
}

.entry-taxonomies .cat-pill {
  background: #8258ED;
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 16px;
  font-size: 10px;
  font-weight: 600;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: all 0.2s ease;
}

.entry-taxonomies .cat-pill:hover {
  background: hsl(257, 70%, 50%);
  transform: translateY(-1px);
}


/* ===========================
   BOTONES
   =========================== */
.btn-read {
        background: #A4DF1E;
        padding: 4px 4px 4px 12px;
        color: #061C1E;
        border-radius: 32px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 4px;
        width: max-content;
        line-height: 1em;
        font-weight: 600;
        font-size: 16px;
        transition: .3s ease-in-out;
    }
    
    .btn-read:hover {
        background: #061C1E;
        color: #A4DF1E;
        /*outline: 1px solid #A4DF1E;*/
        
        svg {
            background: #A4DF1E;
            fill: #061C1E;
        }
    }
    
    .btn-read svg {
        transition: .3s ease-in-out;
        background: #061C1E;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 24px;
        height: 24px;
        padding: 4px;
        fill: white;
        border-radius: 50%;
    }
   

/* .btn-read {
  align-self: flex-start;
  padding: 0.5rem 1rem;
  background: #00f070;
  border-radius: 32px;
  font-weight: bold;
  color: #000;
  transition: background .3s ease, transform .2s ease;
  text-decoration: none;
}
.btn-read:hover {
  background: #00d060;
  transform: translateY(-2px);
} */


/* ===========================
   PAGINACIÓN (si se usa)
   =========================== */
.pagination {
  text-align: center;
  margin-top: 3rem;
}
.pagination .page-numbers {
  display: inline-block;
  margin: 0 0.3rem;
  padding: 0.6rem 1rem;
  background: #0f2020;
  color: #ddd!important; /* mejor contraste */
  border-radius: 6px;
  font-weight: 600;
  transition: all 0.3s ease;
  font-size: 16px;
}
.pagination .page-numbers:hover {
  background: #222;
  color: #fff;
}
.pagination .current {
  background: #00f070;
  color: #000!important;
  font-weight: 700;
}

.pagination .current:hover {
  background: #00f070;
  color: #000!important;
  font-weight: 700;
}


/* ===========================
   BLOG Y ARCHIVE (Grid view) 
   home.php, archive.php, category.php
   =========================== */
.blog-archive {
  background: #051313;
  padding: 4rem 0;
}

.container {
  max-width: 1200px;
  margin: auto;
  padding: 0 1rem;
}

.archive-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: #fff;
}
.archive-title span { color: #00f070; }

/* ===========================
   BLOG Y ARCHIVE (Grid view) 
   home.php, archive.php, category.php
   =========================== */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* siempre 3 columnas en desktop */
  gap: 2rem;
}

/* Tablet (mínimo 2 columnas) */
@media (max-width: 1024px) {
  .posts-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile (1 o 2 columnas según ancho) */
@media (max-width: 640px) {
  .posts-grid {
    grid-template-columns: 1fr; /* en móviles pequeños 1 columna */
  }
}

/* CARD */
.post-card {
  background: #08262B;
  border-radius: 12px;
  /* overflow: hidden!important; */
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.post-card::before {
    position: absolute;
    content: '';
    width: 7px;
    height: 56px;
    background: red;
    left: 0px;
    transform: translateX(-100%);
    top: 30px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(0deg, #A4DF1F 0%, #29C780 100%);
}

.post-card:hover { transform: translateY(-5px); }
.post-thumb {
    border-radius: 1rem;
    overflow: hidden;
    flex-shrink: 0;
    width: 100%;
}
.post-thumb img {
  width: 100%;
  /* height: 200px; */
  height: 100%;
  object-fit: cover;
  /* display: block; */
  aspect-ratio: 3.6 / 2.4;
}

.post-content {
  flex: 1;
  padding: 1.5rem;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.post-actions {
  padding: 0 1.5rem 1.5rem;
}

/* Limpiar estilos heredados del tema padre en títulos */
.post-title {
  font-size: 20px;
  margin: 0.5rem 0 1rem;
  line-height: 1.4;
  color: #fff;
  border: none !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
.post-title a {
  color: inherit;
  text-decoration: none;
}
.post-title a:hover { color: #00f070; }

.post-date {
  font-size: 12px;
  color: #AFAFAF;
  display: block;
  margin-bottom: 0.5rem;
}

.post-excerpt {
  font-size: 0.95rem;
  margin-bottom: 1rem;
  color: #ccc;
  flex-grow: 1;
}


/* ===========================
   FILTROS AJAX BLOG (categorías estilo pills + sticky)
   =========================== */
.blog-categories {
  position: sticky;
  top: 60px; /* ajusta según la altura de tu header */
  z-index: 3;
  background: #051313; /* color de fondo igual al blog */
  padding: 1rem 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;;
}


/* Si está logueado el admin (WordPress añade .admin-bar al body) */
.admin-bar .blog-categories {
  top: calc(60px + 32px); /* header (100px) + admin-bar (32px) */
}

.blog-categories .cat-filter {
  background: #0f2020;
  color: #fff;
  padding: 0.5rem 1.2rem;
  border-radius: 50px; /* pastillas redondeadas */
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.3s ease;
}

.blog-categories .cat-filter:hover {
  background: #1a2a2a;
  border-color: #00f070;
}

.blog-categories .cat-filter.active {
  background: #00f070;
  color: #000;
  font-weight: 600;
}


/* ===========================
   LOADER (scroll infinito)
   =========================== */
#loading {
  text-align: center;
  margin: 2rem 0;
  color: #fff;
  font-size: 1rem;
}
#loading:after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  margin-left: 8px;
  border: 3px solid #00f070;
  border-top: 3px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ===========================
   SINGLE – HERO + CONTENIDO 946px
   =========================== */

.single-post {
  background: #051313;
  /* padding: 3rem 0 4rem; */
  /* padding-bottom: 4rem; */
}

/* Hero */
.single-hero {
  padding-top: 6rem;
  margin-bottom: 2rem;
}
.single-hero-card {
  max-width: 946px;
  margin: 0 auto;
  background: radial-gradient(1200px 400px at 0% 0%, rgba(0, 240, 112, 0.08), rgba(0,0,0,0)) #0a1a1a;
  background: #0A2F33;
  border: 1px solid #838181;
  border-radius: 32px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.25);
   position: relative;
}

.single-hero-card::before {
    position: absolute;
    content: '';
    width: 7px;
    height: 56px;
    background: red;
    left: 0px;
    transform: translateX(-100%);
    top: 30px;
    border-radius: 4px 0 0 4px;
    background: linear-gradient(0deg, #A4DF1F 0%, #29C780 100%);
}


.single-hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 2rem;
  align-items: center;
}
@media (max-width: 1024px) {
  .single-hero-grid { grid-template-columns: 1fr; }
}

.single-hero-info {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 16px;
}

.single-hero-thumb img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 16px;
}

/* Categorías tipo pill */
.single-cats {
  margin-bottom: .75rem;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.single-cats .cat-pill {
  background: #8258ED;
  color: #fff;
  line-height: 1em;
  padding: 4px 12px;
  border-radius: 50px;
  font-size: 12px;
  border: 1px solid transparent;
  transition: all .25s ease;
}
.single-cats .cat-pill:hover {
  background: hsl(257, 70%, 50%);
}

/* Título/meta */
.single-title {
  color: #fff;
  font-size: 24px;
  line-height: 1.3;
  margin: .25rem 0 .5rem;
  font-weight: 800;
}
@media (min-width: 1024px) {
    
  .single-title { font-size: 24px; }
}

@media (max-width: 1024px){
   .single-hero {
        margin: auto;
        width: calc(100% - 3rem);
        margin-bottom: 16px;
    }

    .single-article {
        margin: auto;
        width: calc(100% - 3rem);

        .content-narrow {
            padding: 32px!important;
        }
    }

    .related-posts {
        margin: auto;
        width: calc(100% - 3rem);
    }

    .single-title {
        line-height: 1.3em;
    }

    .single-hero-thumb {
        img {
            aspect-ratio: 16 / 9;
            object-fit: cover;
        }
    }
}

@media (max-width: 767px){
   .single-hero {
        margin: auto;
        width: calc(100% - 2rem);
        margin-bottom: 16px;
        .single-hero-card {
            border-radius: 24px;
            .single-hero-info {
                padding: 0px;
                .cat-pill {
                    font-size: 10px;
                }
                .single-title {
                    font-size: 1.1rem!important;
                }
            }
        }

        
    }

    .single-article {
        margin: auto;
        width: calc(100% - 2rem);

        .content-narrow {
            padding: 24px!important;

            .single-content {
                font-size: .9rem!important;
            }
        }
    }

    .related-posts {
        margin: auto;
        width: calc(100% - 2rem);
    }

    

    .single-hero-thumb {
        img {
            aspect-ratio: 16 / 9;
            object-fit: cover;
        }
    }
}
.single-meta, .single-date {
  color: #AFAFAF;
  font-size: 12px;
}

/* Contenido (946px) */
.single-article .content-narrow {
  background-color: #08262A;
  max-width: 946px;
  border-radius: 32px;
  margin: 0 auto;
  padding: 64px;
  color: #ddd;
  /* margin-bottom: 4rem; */
}
@media (min-width: 768px) {
  .single-article .content-narrow { padding: 64px; }
}

.single-content {
    margin-top: 0px!important;
}

/* Tipografía */
.single-content { font-size: 1.08rem; line-height: 1.75; }
.single-content p { margin: 0 0 1.3rem; }
.single-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.6rem;
  font-weight: 800;
  color: #00f070;
}
.single-content h3 {
  /* margin: 2rem 0 0.8rem; */
  font-size: 1.3rem;
  font-weight: 700;
  color: #00f070;
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6{
color: white;
}
.single-content a { color: #00f070; }
.single-content img, .single-content figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 12px;
  margin: 1.5rem 0;
}
.single-content blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #00f070;
  background: #0f2020;
  color: #eee;
  border-radius: 8px;
}

/* Navegación anterior/siguiente */
.single-navigation {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
}
.single-navigation a {
  background: #0f2020;
  padding: .6rem 1rem;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  transition: background .25s ease;
}
.single-navigation a:hover {
  background: #00f070;
  color: #000;
}

/* Navegación cards custom (prev/next) */
.single-nav-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin: auto;
  margin-top: 2rem;
  max-width: 946px;
  margin-bottom: 4rem;
}
.single-nav-cards .nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #0E2A2B;
  padding: 8px;
  border-radius: 16px;
  color: #fff;
  text-decoration: none;
  transition: transform .2s ease, background .25s ease;
}
.single-nav-cards .nav-card:hover {
  transform: translateY(-2px);
  background: #103334;
}
.single-nav-cards .nav-card.prev { text-align: left; }
.single-nav-cards .nav-card.next { text-align: right; }
.single-nav-cards .nav-text {
  display: flex;
  flex-direction: column;
  gap: 0px;
}
.single-nav-cards .nav-meta {
  font-size: 12px;
  color: #C2E7B0;
}
.single-nav-cards .nav-title {
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3em;
}
.single-nav-cards .nav-thumb {
  width: 100px;
  height: 100%;
  border-radius: 12px;
  overflow: hidden;
  flex: 0 0 auto;
}
.single-nav-cards .nav-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
@media (max-width: 768px) {
  .single-nav-cards {
    grid-template-columns: 1fr;
  }
  .single-nav-cards .nav-card.next {
    flex-direction: row-reverse;
    text-align: left;
  }
}

/* Relacionados */
.related-posts {
  margin-top: 3rem;
  max-width: 946px;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 4rem;
}
.related-posts .related-title {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  font-weight: 700;
}
.related-posts .posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.post-button {
    padding: 24px;
    padding-top: 0px;
}

#comments {
    display: none;
}
