/* ============================================
   TIPOS DE MANDOLINA
   Estilos comunes para todas las fichas de tipos
   ============================================ */

/* Tarjeta general que envuelve todo el contenido del tipo */
.tipo-article {
    background-color: var(--bg-panel);
    border-radius: var(--radius-card);
    padding: 2rem 1.9rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);
    margin-top: 1.5rem;
}

/* Migas de pan (similar a guías) */
.tipo-breadcrumbs {
    max-width: 1100px;
    margin: 1.5rem auto 0.75rem;
    padding: 0 1.25rem;
    font-size: 0.86rem;
    color: var(--text-soft);
}

.tipo-breadcrumbs a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.tipo-breadcrumbs a:hover {
    text-decoration: underline;
    color: var(--accent-dark);
}

.tipo-breadcrumbs span {
    color: var(--text-soft);
}

/* Cabecera del artículo de tipo */
.tipo-header {
    margin-bottom: 2.2rem;
}

.tipo-label {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background-color: #ecfdf5;
    color: #166534;
    border: 1px solid rgba(22, 101, 52, 0.16);
}

.tipo-header h2 {
    margin-top: 0.7rem;
    margin-bottom: 0.6rem;
}

.tipo-intro {
    margin: 0;
    color: var(--text-muted);
    max-width: 750px;
}

/* ====================================
   ÍNDICE DE CONTENIDOS – PÁGINAS TIPO
   ==================================== */

.tipo-indice {
    background-color: #f9fafb;
    border-radius: var(--radius-card);
    padding: 1.5rem 1.8rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-soft);

    /* centrada, sin ocupar todo el ancho */
    max-width: 520px;
    margin: 0 auto 2.5rem;
}

.tipo-indice h3 {
    margin-top: 0;
    margin-bottom: 0.8rem;
    font-size: 1.05rem;
    color: var(--accent-dark);
}

.tipo-indice ol {
    margin: 0;
    padding-left: 1.5rem;
    font-size: 0.92rem;
}

.tipo-indice li {
    margin-bottom: 0.4rem;
}

/* Enlaces del índice: que se note que son clicables */
.tipo-indice a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.tipo-indice a:hover {
    text-decoration: underline;
    color: var(--accent);
}

/* Un pelín más compacto en móvil */
@media (max-width: 640px) {
    .tipo-indice {
        padding: 1.25rem 1.3rem;
        margin-bottom: 2rem;
    }
}

/* Layout de dos columnas para texto + side (foto, producto, etc.) */
.tipo-grid-2 {
    display: grid;
    gap: 1.7rem;
    align-items: flex-start;
}

@media (min-width: 900px) {
    .tipo-grid-2 {
        grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.3fr);
    }
}

/* Un poco más compacto en móvil (tarjeta global) */
@media (max-width: 640px) {
    .tipo-article {
        padding: 1.6rem 1.4rem;
    }
}

/* Columna lateral genérica */
.tipo-side {
    display: flex;
    flex-direction: column;
    gap: 1.4rem;
}

/* Foto decorativa de tipo */
.tipo-photo {
    margin: 0;
}

.tipo-photo img {
    width: 100%;
    display: block;
    border-radius: var(--radius-card);
    object-fit: cover;
    box-shadow: var(--shadow-soft);
}

.tipo-photo figcaption {
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: var(--text-soft);
}

/* Tarjeta de producto dentro de tipos (reutiliza .producto-amazon) */
.tipo-producto.producto-amazon {
    padding: 1.1rem 1.2rem 1.2rem;
}

/* Bloques de sección: espacio vertical uniforme */
.tipo-article section {
    margin-bottom: 2.7rem;
}

.tipo-article h2 {
    margin-top: 0;
    margin-bottom: 0.7rem;
}

.tipo-article p {
    margin-bottom: 0.9rem;

}

.tipo-article ul {
    padding-left: 1.3rem;
    margin-top: 0.2rem;
    margin-bottom: 0.9rem;
}

.tipo-article li {
    margin-bottom: 0.35rem;
}

/* Tarjetas pros / contras */
.tipo-pros-cons {
    margin-top: 1.2rem;
}

.tipo-card {
    background-color: var(--bg-panel);
    border-radius: var(--radius-card);
    padding: 1.4rem 1.5rem 1.2rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

.tipo-card h3 {
    margin-top: 0;
    margin-bottom: 0.6rem;
}

.tipo-card--pros {
    border-top: 4px solid #16a34a;
}

.tipo-card--cons {
    border-top: 4px solid #ea580c;
}

/* Bloque media (texto + vídeo) */
.tipo-media {
    margin-top: 1.7rem;
}

.tipo-media-text p {
    color: var(--text-main);
}

.tipo-media-text ul {
    padding-left: 1.3rem;
}

.tipo-media-text li {
    margin-bottom: 0.3rem;
}

/* Ajuste vídeo pequeño (aprovecha .video-wrapper global) */
.tipo-media-video {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.tipo-media-video .video-wrapper--small {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}



.tipo-media-video .video-wrapper {
    width: 100%;
    max-width: 560px;      /* ancho típico de vídeo YouTube, puedes ajustar */
    aspect-ratio: 16 / 9;  /* forma panorámica 16:9 */
    margin: 0 auto;        /* lo centra dentro de su columna */
}

.tipo-media-video .video-wrapper iframe {
    width: 100%;
    height: 100%;
    display: block;
    border: 0;
}




.video-caption {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-soft);
}





/* Rejilla de productos Amazon dentro de tipos */
.tipo-productos-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 1.4rem;
}

@media (min-width: 768px) {
    .tipo-productos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* ====================================
   CTA FINAL – SIGUIENTES PASOS
   ==================================== */

/* CTA final para enlazar guías y comparativas */
.tipo-cta-section {
    margin-top: 2.4rem;
}

.tipo-cta-card {
    background-color: #fefce8;
    border-radius: var(--radius-card);
    padding: 1.9rem 1.7rem 1.6rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
}

.tipo-cta-card h2 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.tipo-cta-card p {
    margin-bottom: 0.4rem;
    color: var(--text-muted);
}

/* Contenedor de botones: fila con 3 columnas iguales en escritorio */
.tipo-cta-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.9rem;
}

/* Cada botón ocupa lo mismo y tiene la misma altura */
.tipo-cta-actions .btn-cta {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;

    padding: 0.85rem 1.2rem;
    text-align: center;
    white-space: normal;
}

/* En móviles, que se apilen en columna a ancho completo */
@media (max-width: 640px) {
    .tipo-cta-actions {
        flex-direction: column;
    }

    .tipo-cta-actions .btn-cta {
        width: 100%;
    }
}

/* Pequeño toque para el hero de tipos (usa hero base de silo1.css) */
.hero--tipo .hero-tag {
    background-color: #ecfdf5;
    color: #15803d;
    border-radius: 999px;
    padding: 0.18rem 0.7rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ====================================
   BLOQUE VENTAJAS / INCONVENIENTES
   EN TARJETA CON DEGRADADO
   ==================================== */

#ventajas-inconvenientes {
    background: linear-gradient(135deg, #fffbeb, #fef9c3);
    border-radius: var(--radius-card);
    padding: 1.9rem 1.7rem 1.6rem;
    border: 1px solid var(--border-soft);
    box-shadow: var(--shadow-soft);
    margin-bottom: 2.7rem;   /* mantiene el ritmo vertical del resto */
}

#ventajas-inconvenientes h2 {
    margin-top: 0;
    margin-bottom: 1.1rem;
}

/* Ajuste interno para que la rejilla de pros/cons respire bien */
#ventajas-inconvenientes .tipo-pros-cons {
    margin-top: 0.6rem;
}

/* ====================================
   AVISO / TIPOS-TIP – BLOQUE DESTACADO
   ==================================== */

.tipos-tip {
    margin: 1.8rem 0 2.4rem;
    padding: 1.1rem 1.3rem;
    border-radius: var(--radius-card);
    background-color: #ecfdf5;               /* verde muy clarito tipo aviso */
    border-left: 4px solid #16a34a;          /* borde acento como en guías */
    box-shadow: var(--shadow-soft);
}

.tipos-tip p {
    margin: 0;
    font-size: 0.95rem;
    color: #166534;
}

/* ====================================
   BLOQUE AMAZON OSCURO EN PÁGINAS TIPO
   (banda a ancho completo dentro de la ficha)
   ==================================== */

.page-tipo .productos-amazon--oscuro {
    position: relative;
    z-index: 0;

    /* rompemos el padding de .tipo-article (2rem 1.9rem)
       para que la banda llegue hasta el borde de la tarjeta */
    margin-left: -1.9rem;
    margin-right: -1.9rem;

    /* recuperamos el padding interior */
    padding-left: 1.9rem;
    padding-right: 1.9rem;

    border-radius: 0;          /* la banda se ve recta, como en home */
    margin-top: 2.4rem;
    margin-bottom: 2.4rem;
}

/* Fondo a pantalla completa por detrás del contenido */
.page-tipo .productos-amazon--oscuro::before {
    content: "";
    position: absolute;
    inset: 0;

    /* extendemos el fondo al ancho de la ventana */
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;

    /* color de fondo oscuro para la banda */
    background: #020617;

    z-index: -1;   /* por detrás del texto y las tarjetas,
                      pero por delante del fondo clarito de la ficha */
}